Focal Point
[CLOSED] WebFOCUS HTML to PROCEDURE call

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1037018395

November 17, 2010, 07:11 AM
BalaMurugan
[CLOSED] WebFOCUS HTML to PROCEDURE call
I have a select box in the WF HTML as defined below:
<SELECT id=combobox1 style="FONT-SIZE: 9pt; Z-INDEX: 4; LEFT: 250px; WIDTH: 70px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 260px" tabIndex=3 onchange=combobox1_onchange[this) name=RPTFMT persistentuniqueid="compUid_15"> 
<OPTION value=EXL2K selected displaytext="Excel">Excel</OPTION> 
<OPTION value=HTML displaytext="HTML">HTML</OPTION></SELECT>


But when i run this HTML which calls a particular .fex file, i get the followign errors:
(FOC160) THE OPTION AFTER THE WORD 'FORMAT' IS INVALID: ON
(FOC009) INCOMPLETE REQUEST STATEMENT
(FOC009) INCOMPLETE REQUEST STATEMENT
(FOC3280) TABLASTPAGE CAN ONLY BE USED WITH STYLED OUTPUT FORMATS

and i have given -TYPE RPTFMT = &RPTFMT to check the value and im surprised that it is empty!!. In the javascript when i alert the same, I get the selected value but not sure why after submit it is empty.
I am pretty new to UI calls to Procedure although find that it is close to any UI calls. Any help on this would be great. Thanks in advance

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6
Windows, All Outputs
November 17, 2010, 08:36 AM
Brian Suter
cant really see your code. If you use the HTML composer, these things are handled for you. Make sure your capitalization is correct and is the control in the FORM you are usinbg with a submit button. Turn on traces or an HTTP tracer so you can see the HTTP request that got to the servlet, did it have what you expect?


Brian Suter
VP WebFOCUS Product Development
November 18, 2010, 12:18 AM
BalaMurugan
I have checked my capitalization as well, and they seem to be the same. Below is the exact code
< !-- -->

function button1_OnClick(ctrl) {
var e = document.getElementById("combobox1")
var fmt = e.options[e.selectedIndex].value
alert("fmt="+fmt)
alert(document.forms[0].RPTFMT.value)
document.forms[0].submit()
OnExecute(ctrl)
}

One moer strange thing that i noted was I jus could not find the request parameters being passed in the URL, could this be something with the settings? Im confused, because the format is displayed in the alert before form.submit....but not sure where it is getting lost Frowner


WebFOCUS 7.6
Windows, All Outputs
November 18, 2010, 12:58 AM
BalaMurugan
ooops...the code,

SELECT id=combobox1 style="FONT-SIZE: 9pt; Z-INDEX: 4; LEFT: 250px; WIDTH: 70px; FONT-FAMILY: Arial; POSITION: absolute; TOP: 260px" tabIndex=3 onchange=combobox1_onchange(this) name=RPTFMT persistentuniqueid="compUid_15">



WebFOCUS 7.6
Windows, All Outputs
November 18, 2010, 10:58 AM
Wep5622
You should put your code between [ CODE][ /CODE] tags (without the spaces) Wink

Also, I'm pretty sure Javascript requires lines to be terminated with a semi-colon (';').

Also, your onchange event has a syntax error:
 onchange=combobox1_onchange[this)



WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
November 18, 2010, 11:07 AM
Kamesh
In order to get the value for RPTFMT, you should send that parameter along with the url.

How are you calling the fex? Is that inside the javascript?


WFConsultant

WF 8105M on Win7/Tomcat
November 18, 2010, 11:17 PM
BalaMurugan
Thanks for the responses,
@ Kamesh:
Im calling the fex through the onclick event of the button. I have actually tied the fex call while creating the button.

@Wep5622:
But Im able to execute the scripts without any error, although i havent included a ';'
The onchange event was generated dynamically when i created the combo using HTML Composer, so not sure if that is the cause.


WebFOCUS 7.6
Windows, All Outputs
November 19, 2010, 09:41 AM
Kamesh
You should add the parameters along with the url in your onclick event.

For ex: if you have a function called submitURL() in your onClick event then your function look like below.

function submitURL()
{
var rptfmt = document.form.RPTFMT.value;
var shttp="/ibi_apps/WFServlet?" + "&" + "IBIF_ex=rptpref_save" + "&" + "IBIAPP_app=webportal" + "&RPTFMT=" + rptfmt;
alert("shttp : " + shttp);


window.open(shttp,"Report","height=180,width=380,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=no,left=125,top=160");
}

You need to do all the validation and add the parameter. I just gave you the overview of how the code should look like.

Hope this helps,


WFConsultant

WF 8105M on Win7/Tomcat