Jump to content

Recommended Posts

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]

Link to comment
https://forums.phpfreaks.com/topic/211536-onchange-help-needed/
Share on other sites

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.