Advanced Search

Results 1 to 5 of 5

Thread: Posting a javascript value

  1. #1
    Join Date
    Oct 2005
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Posting a javascript value

    how the hell do i post a javascript value? Someone told me it was something like this.

    HTML Code:
    <form name="form1" method="post" action="profile03_update.asp?promiscuity=document.getElementById(level)">
    where level is the javascript variable. I think I am close but... i need some assistance. Thanks!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Lol, no. You edit the value of a hidden input (<input type="hidden">) then submit its form.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Oct 2005
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    crap i'm such a loser!

    can you gimme an example? I'm still not 100% getting how I get the javascript value in there. Thanks twey =)

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <form id="myform" action="profile03_update.asp" method="post" onsubmit="elements['promiscuity'].value = document.getElementById('level').value;return true;">
      <input type="hidden" id="promiscuity" />
      <input type="submit" value="Go!" />
    </form>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Oct 2005
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks! Much clearer now. =D!!!!!! you rock!

Bookmarks

Posting Permissions

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