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

It opens new window when it shouldn`t

P: n/a
Why when i`m clicking on a link:
<a href='javascript:document.form_name.texbox1.value= "sss"'>ssS</a>
It writes data to a form AND opens new window with adress like in link.
Anybody can help ?

Michael
Oct 2 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Try

<a href="" onclick='document.form_name.texbox1.value="sss";re turn
false;'>ssS</a>

TOM

Michal Zubkowicz wrote:
Why when i`m clicking on a link:
<a href='javascript:document.form_name.texbox1.value= "sss"'>ssS</a>
It writes data to a form AND opens new window with adress like in link.
Anybody can help ?

Michael
Oct 2 '06 #2

P: n/a
Michal Zubkowicz wrote:
Why when i`m clicking on a link:
<a href='javascript:document.form_name.texbox1.value= "sss"'>ssS</a>
http://www.jibbering.com/faq/#FAQ4_24

--
David Dorward <http://blog.dorward.me.uk/ <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Oct 2 '06 #3

P: n/a
Lee
Michal Zubkowicz said:
>
Why when i`m clicking on a link:
<a href='javascript:document.form_name.texbox1.value= "sss"'>ssS</a>
It writes data to a form AND opens new window with adress like in link.
Anybody can help ?
In general, and certainly not unless you undertand the implications:
Don't use the javascript: pseudo-protocol.
Don't use links when you're not linking to an URL.

<a href="sorry.html" onclick="document.form_name.texbox1.value='sss';re turn
false">ssS</a>

Where sorry.html is a page apologizing to people who don't have scripting
enabled.
--

Oct 2 '06 #4

P: n/a
tompra napisał(a):
Try

<a href="" onclick='document.form_name.texbox1.value="sss";re turn
false;'>ssS</a>

TOM
Thanks a lot. You`re great :). I`ve already f***n with it one day :D
Michael
Oct 2 '06 #5

P: n/a
David Dorward napisał(a):
Michal Zubkowicz wrote:
>Why when i`m clicking on a link:
<a href='javascript:document.form_name.texbox1.value= "sss"'>ssS</a>

http://www.jibbering.com/faq/#FAQ4_24
On all tutorials I`ve seen it was wrote in that way what I`ve tried.
I have now this page in bookmarks :)
Oct 2 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.