Results 1 to 8 of 8

Thread: hyperlink pass html menu value[Resolved]

Hybrid View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Resolved hyperlink pass html menu value[Resolved]

    i have one form, contain one select menu(selectTitle) and a text field(txtEpisode)..........now i want pass the item selected in select menu and text field to the hyperlink......

    but at the end, the hyperlink pass the word "selectTitle".....what is the problem?

    Code:
    <a href="http://localhost/UploadVideo.php?programName=selectTitle&episode=txtEpisode" class="style8" onclick="return UploadVideo('http://localhost/UploadVideo.php?programName=selectTitle&episode=txtEpisode')">Upload Video Clips </a>
    Last edited by kenny_oh; Dec 1st, 2005 at 11:23 AM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: hyperlink pass html menu value

    That's because you're passing that exact word. You should perform a document.location.href change in the onclick event of the hyperlink, wherein you can append the values in the selecttitle and txtepisode elements.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Re: hyperlink pass html menu value

    is it like this ?
    Code:
    onclick="document.location.href=http://localhost/uploadVideo.php?programName=selectTitle&episode=txtEpisode"

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: hyperlink pass html menu value

    Like this:

    onclick="document.location.href='http://localhost/uploadVideo.php?programName=" + document.getElementById(selectTitle).value + "&episode=" + document.getElementById(txtEpisode).value + "';"

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Re: hyperlink pass html menu value

    hmmm ....cannot....i forgot tell u that the onclick = return uploadvideo is the java script for popup a new window.......i hv attach my file...
    Attached Files Attached Files

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: hyperlink pass html menu value

    The hyperlink should look like this:

    <a class="style8" href="#" onclick="javascript:UploadVideo('http://localhost/uploadVideo.php?programName=' + document.getElementById('selectTitle').value + '&episode =' + document.getElementById('txtEpisode').value +';');">Upload Video Clips </a>

    And that's it. You didn't need the document.location.href bit.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Re: hyperlink pass html menu value

    Very thank you...Mendhak!!!
    Problem solved!!

  8. #8
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: hyperlink pass html menu value

    Great, now add [resolved] to the thread title.

Posting Permissions

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



Click Here to Expand Forum to Full Width