By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,493 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,493 IT Pros & Developers. It's quick & easy.

Open new window and send variable..

P: 137
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="'','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
Share this Question
Share on Google+
5 Replies

Expert 5K+
P: 7,435
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 2.5K+
P: 4,059

Expand|Select|Wrap|Line Numbers
  1. <a href="#" onClick="'','mywindow','width=500,height=500'); return false;"><img src="templates/images/emailvriend.gif" border="0"></a> 
May 2 '07 #3

Expert 2.5K+
P: 4,059
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

P: 137
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 2.5K+
P: 4,059
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.