What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Dropdown boxes

Dropdown boxes
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Dropdown boxes
<html>

  <head>
    <title>blah</title>
    <script type="text/javascript">
      function changelanguage(fMenu) {
        var iSelectedItem = fMenu.selectedIndex
        var sLanguage = fMenu.options[iSelectedItem].value;
    //  If you're using frames (eg: you have a frame called TestFrame):
        parent.TestFrame.location.href = "http://blah.com/" + sLanguage + "/help.htm";
    //  If you're not using frames:
    //  document.location.href = "http://blah.com/" + sLanguage + "/help.htm";
      }
    </script>
  </head>

  <body>
    <form name="form1">
      <select name="menu1" onChange="changelanguage(this)">
        <option selected value="en">English</option>
        <option value="we">Welsh</option>
      </select>
    </form>
  </body>

</html>


* do not use the 'item name' as the attribute to get to your pages. Use the 'item value' instead as some language names can/will contain invalid characters for URLs. Also this is much more versitile; you don't need to update all your page urls if you change the language name a bit...

* do not use '.src', use '.location.href' for compatibily reasons

* with the use of 'this' in the form, you assign the current object's name. Much more versitile then adding it in your script directly (eg: you can have multiple menu's, and yet only 1 function)



PS: this is nothing new, but the host killercarrot.co.uk has had always had serieus troubles in their DNS updates (or whatever). I know many people who can access that site, including me.  And this isn't the first time this happened, the other sites hosted on killercarrot had problems in the past also.

This post was edited on 03-14-2005 at 07:32 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-14-2005 07:24 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Dropdown boxes - by user27089 on 03-14-2005 at 06:08 PM
RE: Dropdown boxes - by L. Coyote on 03-14-2005 at 06:24 PM
RE: Dropdown boxes - by Stigmata on 03-14-2005 at 06:28 PM
RE: Dropdown boxes - by user27089 on 03-14-2005 at 06:30 PM
RE: Dropdown boxes - by Stigmata on 03-14-2005 at 06:33 PM
RE: Dropdown boxes - by user27089 on 03-14-2005 at 07:18 PM
RE: Dropdown boxes - by CookieRevised on 03-14-2005 at 07:24 PM
RE: Dropdown boxes - by user27089 on 03-14-2005 at 07:30 PM
RE: Dropdown boxes - by CookieRevised on 03-14-2005 at 07:34 PM
RE: Dropdown boxes - by Dempsey on 03-14-2005 at 07:50 PM
RE: Dropdown boxes - by CookieRevised on 03-14-2005 at 08:26 PM
RE: Dropdown boxes - by saralk on 03-14-2005 at 08:30 PM
RE: Dropdown boxes - by Dempsey on 03-14-2005 at 08:31 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On