can some one tell me how can pass a javascript variable into hyperlink along with a php varaible?
Here is my code..
Expand|Select|Wrap|Line Numbers
- <html>
- <head>
- <script type="text/javascript">
- function favBrowser()
- {
- var mylist=document.getElementById("myList")
- document.getElementById("favorite").value=mylist.options[mylist.selectedIndex].text
- }
- </script>
- </head>
- <body>
- <form>
- Select your favorite browser:
- <select id="myList" onchange="favBrowser()">
- <option>Internet Explorer</option>
- <option>Netscape</option>
- </select>
- <p>Your favorite browser is: <input type="text" id="favorite" size="20"></p>
- </form>
- <a href='mypage.php?var1=$xxx&val2='>Link</a>
- </body>
- </html>
Now i want display that selected value in a hyperlink too...
i.e.
Expand|Select|Wrap|Line Numbers
- <a href='mypage.php?var1=$xxx&val2='>Link</a>
so when i click this hyperlink it should contain two variables values.
Thanks in advance.