If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member Hitch - CP's Avatar
    Join Date
    Jun 2009
    Member #
    Hey guys,

    I have a page on wordpress and I am trying to get a list that comes up with a number of different options. When you click on an option, I am wanting that list-item to be selected and the hyperlink attached to take the user to the desired page.

    The current page is: Squad Page - LM Crusaders HC

    The code in hdeaer.php:

    <script LANGUAGE="javascript">
        function OnChange(dropdown)
            var myindex  = dropdown.selectedIndex
            var SelValue = dropdown.options[myindex].value
            var baseURL  = <Some value based on SelValue>
            top.location.href = baseURL;
            return true;

    The code in the template page:

    <select name=select1 onchange='OnChange(this.form.select1);'>
            <option value="">google</option>
            <option value="">apple</option>
            <option value="">yahoo</option>

    I'm not very savvy when it comes to JavaScript so this may well be (and probably is) completely wrong.

    I have tried to piece this all together from tutorials as I have never done this before can't be this hard!

    Many thanks for any help,
    Ali Hitch

    Portfolio & Tutorial Site


  3. #2
    Senior Member
    Join Date
    Dec 2009
    Chicago, IL
    Member #
    2 times
    Error: missing = in XML attribute
    Source File: Squad Page - LM Crusaders HC
    Line: 27, Column: 29
    Source Code:
    var baseURL = <Some value based on SelValue>

    Meaning that you're not setting the baseURL correctly, but you should just send the user to the SelValue var value, as it seems that you're putting an extra step in there for no reason.

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 10:30 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: