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>
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.
Re: hyperlink pass html menu value
is it like this ?
Code:
onclick="document.location.href=http://localhost/uploadVideo.php?programName=selectTitle&episode=txtEpisode"
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 + "';"
1 Attachment(s)
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...
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.
Re: hyperlink pass html menu value
Very thank you...Mendhak!!!
Problem solved!!
Re: hyperlink pass html menu value
Great, now add [resolved] to the thread title.