9999 Posted March 8, 2007 Share Posted March 8, 2007 This is how my pull-down looks: SCRIPT LANGUAGE="JavaScript"> <!-- Begin function formHandler(form){ var URL = document.form.site.options[document.form.site.selectedIndex].value; window.location.href = URL; } // End --> </SCRIPT> <center> <form name="form"> <select name="site" size=1 onChange="javascript:formHandler()"> <option value="">Choose Paragraph <option value="#Paragraph1"> Paragraph 1 </option> <option value="#Paragraph2"> Paragraph 2 </option> <option value="#Paragraph3"> Paragraph 3 </option> </select> </form> </center> Further down on my page here is my anchors. They are of course seperated with text in between them: <a name="Paragraph1">Paragraph 1</a> <a name="Paragraph2">Paragraph 2</a> <a name="Paragraph3">Paragraph 3</a> Someone told me I might need to change this line: window.location.href = URL; with this: window.location = window.location + URL; It stil doesn't work Quote Link to comment Share on other sites More sharing options...
fenway Posted March 8, 2007 Share Posted March 8, 2007 Doesn't work like doesn't change pages, or throws an error? Quote Link to comment Share on other sites More sharing options...
9999 Posted March 8, 2007 Author Share Posted March 8, 2007 Does not do anything. I just want it to move down the page to a differnt section. Another example of this would be if you had one of the "go to top of page" things but you did it from a pull-down. Quote Link to comment Share on other sites More sharing options...
fenway Posted March 9, 2007 Share Posted March 9, 2007 Well, alert(window.location + URL) and see what you get. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.