472,951 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,951 software developers and data experts.

Passing data from java to a PHP script

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)
{
window1=open("solution.php?folder=folder1&file=fil e1");
}
In the body:
<?
echo "<a href = \"javascript:popup(folder, file)\"> show me the
solution</a>";

?>

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.

regards,

Raju
Jul 17 '05 #1
3 4292
Raju V.K wrote :
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)
{
window1=open("solution.php?folder=folder1&file=fil e1");
}
In the body:
<?
echo "<a href = \"javascript:popup(folder, file)\"> show me the
solution</a>";

?>

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.


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.

HTH
Martin

--
perl -e 'print 7.74.117.115.116.11.32.13.97.110.111.116.104.101.1 14.11
..32.13.112.101.114.108.11.32.13.104.97.99.107.101 .114.10.7'
Jul 17 '05 #2
function popup(folder1, file1)
{
window1=open("solution.php?folder=" + folder1 + "&file=" + file1);
}

Jul 17 '05 #3
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.

Regards,
Raju

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andy R. | last post by:
Hello everyone, I've spent quite some time now, looking for some information on how to get this done, sadly none has helped me much, though. I have a bit of java scrpt on a webpage (.php) to...
4
by: timwap | last post by:
I hava a Java Applet that produces a DTMF tone at a certain time of day. There are 4 parameters to the Applet, they are hour = Hour of triggered event 00~23 min = minute of triggered event 00~59...
10
by: vbMark | last post by:
Hello, I am doing this: window.location="page2.php?subj="+subj+"&body="+body; to send information to another page. However, I don't want that second page to show up or display in any way....
11
by: comp.lang.php | last post by:
On one of my sites, I have a TCL CGI script that has a security hole in spite of it having effective server-side validation (the fact that it's CGI IS its security hole). The front end is a PHP...
4
by: jos | last post by:
Hi There, What would be suitable options to exchange data between a Dot net program and a java program? Thanks Jyotsna Sharan
7
by: Oleg Konovalov | last post by:
Hi, I am trying to pass a bunch of checked checkboxes (Javascript array) from page1 to the Java action class on subsequent web page (page2). (on page 1 I have a bunch of DB rows with a checkbox,...
1
by: Eric Capps | last post by:
This may be more of a Java question, but I feel that JavaScript experts may be more qualified to help me find a solution. In short: is it possible to call a Java method from JavaScript, passing...
2
satterfieldben
by: satterfieldben | last post by:
I have a newbie question about passing variables between functions. I am wanting to use a drop down box to select a value. Then base on which was selected, it would create a variable and I would...
8
by: pt36 | last post by:
I have two pages one.html two.html page one.html have a form named form1 and a textarea named text1 man one write in the textarea text 1 page two.html have a form named form2 and a...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.