![]() |
![]() |
#1 |
Guest
Posts: n/a
|
![]() I need to write an HTML page with a select element that on having its GO submission button hit will redirect the browser to other pages on my site. I can figure out how to set up the element & the submission button, but not how to get it to navigate to the other pages. What am I doing wrong? I think I need a script, but I don't know how to write them & can't seem to track down one on the web that does this. Later on I'll need one that can tell the viewer's autodialer to make a phone call, so if anyone knows how to do THAT.... |
![]() |
![]() |
#2 |
Guest
Posts: n/a
|
![]() So I put the scripts in here and of course EZBoard flipped, said no and of course ate everything I wrote (remind me to compose somewhere else next time). So I will try again. Everything from the <script to the </script> goes into the header on your page. This is the javascript that actually does the work. <script language="JavaScript" type="text/javascript"> <!-- hides script from non Javascript Browsers function goto(){ if (document.goto_selection.Link_Selecter.options[document.goto_selection.Link_Selecter.selectedIndex].value != "none") { location = document.goto_selection.Link_Selecter.options[document.goto_selection.Link_Selecter.selectedIndex].value } } //Ends Hiding--> </script> Everything from <form to </form> goes into the body where you want the select box to show up. You need to replace the URL# with the URL of the link you want and replace the NAME# with the Name of the link. To add more entries just copy <option value="URL1">Name1</option> and paste it right affter the others. <form name="goto_selection"> <select name="Link_Selecter" size=1> <option value="URL1">Name1</option> <option value="URL2">Name2</option> </select> <input type="button" value="Go" onclick="goto()"> </form> Let me know if this is not what you were referring to. Astryne the Lurker. P.s. and you were wondering how I found you. |
![]() |
![]() |
#3 |
Guest
Posts: n/a
|
![]() If you need to do redirection, server-side is always the best way. People can disable scripted redirects and that uiv kludge. It also has an annoying tendency to mess up back buttons. If you have access to the server, and it runs apache, add a .htaccess file to the directory where the origin file is and add: Redirect origin target Easy =) |
![]() |
![]() |
#4 |
Guest
Posts: n/a
|
![]() The java should work perfectly. I should have mentioned it will only be for internal use on a p2p network, so no servers are actually involved. |
![]() |
![]() |
#5 |
Guest
Posts: n/a
|
![]() redirects suck. I had one redirect me 4 times in seconds but you don't spot it because it flew past so quickly. Then I hit the back button on my mouse and kept ending up on the same page. Eventually I got naffed off because as fast as I was hitting back it was redirecting me forward. Eventually I hit the little arrow next to back in my browser. Don't do it!!! |
![]() |
![]() |
#6 |
Guest
Posts: n/a
|
![]() Sebbers, I think you're beyond help. ![]() *HUGS!!* |
![]() |
![]() |
#7 |
Guest
Posts: n/a
|
![]() Plain links will do the job just as well. That's what they were designed for =P Being redirected by scripting and having one's back button screwed up is a sure way to annoy people. |
![]() |
![]() |
#8 |
Guest
Posts: n/a
|
![]() She doesn't really want to redirect people, just have themm be able to choose their destination from a pull down menu instead of a list of links... At least thats how I read it and what the little script does. Then again maybe I misread it... |
![]() |
![]() |
#9 |
Guest
Posts: n/a
|
![]() Thanks Astryne, that worked great. |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|