473,385 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

It opens new window when it shouldn`t

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
5 1197
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Koyan | last post by:
Hallo everybody, I have in my website administration pages the following script: function openWin(){...
3
by: John Dalberg | last post by:
Hi I have a form that opens a new window for the results. Because the results might take a few seconds due to server processing, I would like to display a message "please wait" in the new...
1
by: gopal srinivasan | last post by:
I need to know how to close a parent modal window when child modal window opens, also i need to know the syntax for writing document on the modal window on the fly, like what we do in case of...
2
by: Vijay Kerji | last post by:
Hi, Please go through the following scenario. 1)On Button click, Parent window opens a child window using showModalDialog 2)Button is a server control and showModalDialog script is registered...
4
by: MrMike | last post by:
Hi. I have a hyperlink control (lnkViewLogData) which is assigned the following attribute when the page loads... Me.lnkViewLogData.Attributes.Add("onClick", _ ...
5
by: Roger Withnell | last post by:
This is a framed webpage with the navigation bar in "NavBar" and the main window in "Main". When opening a new page in "Main" from "NavBar" with: function OpenFrameWindow(src) { var...
7
by: Jaggu | last post by:
Hi , I need to close main window, once the child window succesfully opens else main window to remain. In my case when I close the main window immediately after the "window.open()" as mentioned...
1
by: axiarich | last post by:
We have some doc mgt "lite" on our site. I basically have a window with a button that opens the relevant document (Excel, PDF, etc.). The button calls some javascript which basically performs a...
7
by: Andrew Poulos | last post by:
Is there a way for javascript to know if a browser has been set to open new windows in tabs? I'm trying to fix some code that allows a user to close a window that javascript opened and it seems to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.