• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

html address

hopefully this is easy one.

i have a web page that has a combo box as follows:

            </select><select name="ctl00$PSDDL" onchange="javascript:setTimeout('__doPostBack(\'ctl00$PSDDL\',\'\')', 0)" id="ctl00_PSDDL">
                  <option selected="selected" value="american">American</option>
                  <option value="decimal">Decimal</option>
                  <option value="hongkong">Hong Kong</option>
 
            </select>


if the url is http://xyz.com how do i add to the url to force it to display decimal rather than hongkong or american??

something like http://xyz.com?ctl00_PSDDL=decimal
0
arwar49
Asked:
arwar49
  • 2
1 Solution
 
cfEngineersCommented:
location.href='http://xyz.com?ctl00_PSDDL='+document.GetElementById('ctl00_PSDDL').options[document.GetElementById('ctl00_PSDDL').selectedIndex].value;
0
 
arwar49Author Commented:
i get the following message:

Internet Explorer has modified the page to help prevent cross-site scripting.

however when i add:

&ctl00$PSDDL=%22american%22

it seems to work as desired
0
 
arwar49Author Commented:
i solved it myself
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now