Problem with javascript code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Piyu
    New Member
    • Oct 2006
    • 3

    Problem with javascript code

    Hi
    I have problem with javascript code. Following is my code

    <div class="col1"><i nput name="loginName " type="text" class="txtbox" value="collins_ sd@hotmail.com" ></div>
    <div class="col1"><i nput 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.
  • kestrel
    Recognized Expert Top Contributor
    • Jul 2006
    • 1071

    #2
    your javascript has spaces in it
    try taking those out

    Comment

    • oley
      New Member
      • Oct 2006
      • 6

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

      Comment

      Working...