Passing data from java to a PHP script

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
can I use javascript and PHP in the following manner to create a
pop-up window:

<--- in <head> </head>
<script language=javascript>

function popup(folder1, file1)

In the body:
echo "<a href = \"javascript:popup(folder, file)\"> show me the


the file is saved as a php file. My purpose is to have a popup window
generated using the values of folder and file. I can work with the
normal way that is without popup. But with popup, the javascript is
not seems to be working. Is the error is with PHP code or java script
code? Generally how do I can pass the parameter in such a situation ?

The popup is working without passing the parameter to a PHP script in
the server, so that the link is created from the page itself like
"folder/file", and  passing it to the java script.



Re: Passing data from java to a PHP script

function popup(folder1, file1)
 window1=open("solution.php?folder=" + folder1 + "&file=" + file1);

Re: Passing data from java to a PHP script

Thanks for the reply. The absence of the "+" and spaces between the
elements caused the error. Now I nave corrected it as suggested by you,
window1=open("solution.php?folder="+folder1+"&file="+file1); and is
working fine.


Re: Passing data from java to a PHP script

Raju V.K wrote :
Quoted text here. Click to load it

I don't know much about java script.
But I guess you should keep in mind, tha php works on the webserver
while java script works on the client so possibilities of interaction
might be poor.


perl -e 'print

Site Timeline