cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

JavaScript

Former Member
0 Likes
447

Hi All,

I am trying to create a webpage that will contain a form and iframe. The form contains 4 input fields and a button to update the iframe. The iframe will display the results from a JCO Call transaction by passing default values of 4 parameters. I am using a function call in my JavaScript. It passes parameters to an irpt file in iframe that triggers the JCO Call transaction. But my program is not calling the transaction as expected. Could anyone give me an idea about some common mistakes one might make? Thanks in advance.

Regards,

V M.

Accepted Solutions (1)

Accepted Solutions (1)

agentry_src
Active Contributor
0 Likes

Have you invoked the irpt directly with the four parameters and had success? Can you paste in the javascript that you are using? Are you using an Xacute query to execute the JCo Transaction or using runner? Why are you using an iframe instead of a table? It might simplify your coding.

What version of xMII are you using? Any other details you think might be of use, please provide.

Thanks,

Mike

Former Member
0 Likes

Hi Michael,

I like your idea of testing the irpt first. Could you please tell me how to pass parameters to the irpt directly? Appreciate it.

Regards,

Venki.

Former Member
0 Likes
	

var URL = 'MyProject/MyIrpt.irpt?&VALUE_1=' + '1'
				+ '&VALUE_2=' + '2'  ;
				
frames['MyFrame'].location.href= URL;

And on your irpt something like:


<SERVLET NAME="Illuminator">
<PARAM NAME="QueryTemplate" VALUE="MyProject/MyXacuteQuery">
	<PARAM NAME="StyleSheet" VALUE="http://localhost/MyProject/MyOutput.xsl">
	<PARAM NAME="Content-Type" VALUE="text/xml">
		<PARAM NAME="Param.1" 				VALUE="{VALUE_1}">
		<PARAM NAME="Param.2" 				VALUE="{VALUE_2}">

</SERVLET>

Or substitute with an applet if desired.

agentry_src
Active Contributor
0 Likes

paste a url into the browser address window such as

http://someplace.com/someapplication.irpt?Param1="45.67"&Param2="Joe Smith"&Param3="X"&Param4="Development"

Then refer to the session variables in your applet (or wherever you need them) like so:

		
<PARAM NAME="Param.1" VALUE="{Param1}">
  

Hope this helps.

Mike

Former Member
0 Likes

Guys,

Hurrah! I got it to work now. This is getting exciting now. There are few more things I need to fix -

1. When I open the webpage, its executing the BAPI right away. I don't want that to happen.

2. I would like to pass values from the webpage. Right now, I am giving fixed values from my JavaScript.

Please help. Thanks.

Regards,

V M.

Former Member
0 Likes

Ok guys, I got everything to work now. Will be back with more questions, hopefully on a different topic. Thanks everybody.

Regards,

V M.

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Venki,

I hope its better to use Tables than Frames.

You need to create an Applet which inturn has the Xacute Query (i.e the Query that calls transaction) and then you need to pass parameters for that Query if its necessary from Frontend.

I have sent you sample Page you can just check.

Regards,

Rao

Edited by: Craig Cmehil on Jul 3, 2008 3:28 PM

jcgood25
Active Contributor
0 Likes

I completely disagree on your comment against frames, since the use of iFrames can be leveraged very nicely with irpt pages and significantly enhance the user experience. Not only will the pages themselves be much easier to manage than one large complicated page, but they can also be called directly or from other relevant areas within the application.

Regards,

Jeremy