This topic is locked
[SOLVED]

 Passing a variable returned by pphprunner to a Java appl

2/16/2011 3:29:23 AM
PHPRunner General questions
M
mlapl1 author

Dear All,
I am running phprunner 5.2
On my LIST page, one of the fields returned consists of a URL.
I do not want to display the URL. Instead, I would like the URL to be passed to a Java applet as a parameter. The applet should then be displayed inside the cell in the LIST table which would normally display the URL.
Can anyone help me with doing this?
Thank you very much for your assistance.

Andrew

Sergey Kornilov admin 2/16/2011

Andrew,
I guess you can use 'View as' type 'Custom' and form the whole applet calling code snippet there.
Show us an example of that applet parameters if you need more help.

M
mlapl1 author 2/16/2011

Hi Sergey
I have not yet tried what you suggest yet but the applet looks like this

<APPLET id=applet

archive=http://xyx.com/elearning/mod/nanogong/nanogong.jar

code=gong.NanoGong width=100 height=30>

<param name="SoundFileURL" value="http://xyz.com/media/cigarette.wav"; />

</APPLET>


I want to set things up in such a way that all I need to store in the database is the URL in the SoundFileURL parameter.
The idea is that when the URL is retrieved from the database, the URL is automatically embedded into the applet code and the whole applet is then embedded in the html page.
One workaround I have is to ask the user to input the entire applet code (including the URL) into the appropriate field, but that is a real waste of space.
Thanks again

Andrew

Sergey Kornilov admin 2/16/2011

Set 'View as' type of SoundURL field to 'Custom' and use the following code:

$value = "<APPLET id=applet

archive=http://xyx.com/elearning/mod/nanogong/nanogong.jar

code=gong.NanoGong width=100 height=30>

<param name='SoundFileURL' value='" . $value . "' />

</APPLET>";
M
mlapl1 author 2/17/2011

Wow... sounds just right - Thank you - I will try it. The power of phprunner always amazes me.
Andrew