Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2004
    Posts
    713
    Thanks
    6
    Thanked 2 Times in 2 Posts

    submit form using textlink

    i discovered this code to submit form using text link
    <a href="javascript:document.MyForm.submit();">search</a>

    now my question is if i want to submit to search.php?country=us
    how can i do?
    flying dagger

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The form still needs to have a form action to submit to... Set the form action accordingly....

    Then again, it should be pointed out that by not using form elements as intended, your form will not work for those with javascript disabled... If you do not like the button, try using type=image instead....

    ......Willy


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •