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

Problem with javascript code

P: 3
I have problem with javascript code. Following is my code

<div class="col1"><input name="loginName" type="text" class="txtbox" value=""></div>
<div class="col1"><input name="password" type="password" class="txtbox" value="collins"></div>
<div class="go_but"><a name="bttngo" href="#" onclick="return checkLogin();">GO &raquo;</a></div>

i want when i put password and press enter it should go to my next page. my go button is coming from css. it is href tag. if i used bttn as a image then i is possible. but for css button what code should i use.

Please help me thanks in advance.
Oct 18 '06 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,071
your javascript has spaces in it
try taking those out
Oct 18 '06 #2

P: 6
The correct JavaScript code for a link is
<DIV onClick="window.location.href='URL'; return true;">GO</DIV>
Oct 19 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.