Gregoriochavez Posted August 23, 2010 Share Posted August 23, 2010 The attached file is a text version of the .js that I am running. I am now at the final step and have no idea how to do it. You can view the web site (under development) at www.capsulecomments.com. What is needed is guidance on how to link the last selection (City) to a web page. Select Country > State > City and on that last one I want the user redirected to a html web page. For example, if you click on Vancouver I want a new page to come up entitled vancouver.html. As this is still on my computer, the path would be something like C:/capsulecomments.com/vancouver.html. Once it is on the server the path will just be vancouver.html. There will eventually be several thousand cities in the drop down menu, which will link to the appropriate several thousand .html pages. Any assistance on this would be greatly appreciated. I am not a coder, so the help has to be fairly specific on what goes where and how it is parsed. But, I do not know what changes I have to make in the script to effect that action. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 23, 2010 Share Posted August 23, 2010 Assuming the last field will also be a select list, just use the html pages for each city as the value of the options. Then use an onchange event such as this onchange="window.location=this.options[this.selectedIndex].value;" Quote Link to comment Share on other sites More sharing options...
Gregoriochavez Posted August 24, 2010 Author Share Posted August 24, 2010 I'm getting nowhere on this. I do not know where this would plug into the javascript that I'm using. There is only one onChange in that script (near the bottom) and it relates to: ('stateSelect').parentNode; parentObj.removeChild(selObj); var inputSel = document.createElement("SELECT"); inputSel.setAttribute("name","state"); inputSel.setAttribute("id","stateSelect"); inputSel.setAttribute("onchange","javascript: So, assuming for the moment that the location of the required file is c:/capsulecomments.com/vancouver.html, does it then read onchange="window.location=this.options[this.selectedindex].C;/capsulecomments/vancouver.html"? As I stated in my original message, I am not a coder, therefore I apologize for my slow uptake on this. Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 24, 2010 Share Posted August 24, 2010 I can't answer your question. I don't know how all the code relates to the HTML page. The onchange event would be tied to the cities field. To be honest I'm not going to dig throught he code and write the solution for you. This forum is for people who want help with code they have written. if you need someone to write the code for you I'm sure there's someone willing to do this for you (for a fee) in the freelance forum. Quote Link to comment Share on other sites More sharing options...
Gregoriochavez Posted August 24, 2010 Author Share Posted August 24, 2010 Fair comment. I was not aware of the purpose of this site. I'll unsubscribe and move on. Thank you for the input you did provide. 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.