It opens new window when it shouldn`t

  • Thread starter Michal Zubkowicz
  • Start date
M

Michal Zubkowicz

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
 
L

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';return
false">ssS</a>

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


--
 
T

tompra

Try

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

TOM
 
M

Michal Zubkowicz

tompra napisał(a):
Try

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

TOM
Thanks a lot. You`re great :). I`ve already f***n with it one day :D
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top