467,910 Members | 1,774 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

Open new window and send variable..

I'm busy with a nieuws-item and when somebody wants to send the nieuws item to a friend he can click on a image.
Then a new window will pop up and there he can put in his and his friends names and email-adres.
But i have 1 problem, i can't get no value of a variable to the new form.
This is what i now have...:
[HTML] <form method="post"><input type="image" src="templates/images/emailvriend.gif" onClick="window.open('http://www.website.com/the_script.php','mywindow','width=500,height=500,l eft=350,top=300')" name="test2" value="blablablabla" /></form>[/HTML]

as you can see i tried to put in a name and a value but.. uuuu nothing...
Can anyone please help me?

Thanx Paul
May 2 '07 #1
  • viewed: 1832
5 Replies
Expert 4TB
Any data in a form is posted to the server but javascript is only run on the client/browser. So that script has no way to get that value the way it's written now. Ask on the javascript board how to do what you want.
May 2 '07 #2
Expert 2GB

Expand|Select|Wrap|Line Numbers
  1. <a href="#" onClick="window.open('http://www.website.com/the_script.php?test2=blablablabla','mywindow','width=500,height=500'); return false;"><img src="templates/images/emailvriend.gif" border="0"></a> 
May 2 '07 #3
Expert 2GB
there should be no gap in "width", not sure why that is getting put into the code because the gap is not there when I try and edit it.
May 2 '07 #4
Well, i tried what kevinADC sayd buth that didn't work.
I will put a post at the javascript forum.
Because i don't have the knowledge of javascript, only php and html...
Thanx guys!

May 2 '07 #5
Expert 2GB
I would think it should work if the PHP script knows how to handle the data being sent in the query string. But alas, I don't know PHP.
May 2 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

23 posts views Thread by Markus | last post: by
2 posts views Thread by Magnus Blomberg | last post: by
13 posts views Thread by Seth Grimes | last post: by
3 posts views Thread by Stephen V | last post: by
5 posts views Thread by rockdale | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.