Results 1 to 6 of 6

Thread: Need help, so frustrated!

  1. #1
    Join Date
    Nov 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need help, so frustrated!

    Hi guys

    If anyone can help with this I'd be most appreciative, I've had a horrible time with this.

    Basically, I am making a menu on a page whereby you can click an option and some text will appear lower down the page. This is achieved using javascript. Now, I want to make it so that once you click on an option (Like: 'Mission Statement') that options text will change colour- so it is easy to see what option you have selected.

    Now, strangely enough, I have managed to get it working in IE of all places, but not FF (latest versions of both). I can't figure out why.

    The style I am using is called 'Style1'. The CSS is as follows:

    .style1 { font-weight: bold;font-style: italic;font-size:11px ;text-transform:uppercase}
    a:link {color: #F68121; text-decoration:none}
    a:active {color: Blue; text-decoration:none}
    a:visited { color: #F68121; text-decoration:none }

    hr {
    height:1px;
    color: #F4821F;
    padding-top: 0px;
    padding-bottom: 0px;
    line-height: normal;
    }

    The Javascript I am using looks like this:

    <div align="center">
    <a href="#principles" onclick="showCont(0);returnfalse;" style="text-decoration: none" ><span class="style1">Mission Statement</span></a><br>
    </div>
    <div align="center">
    <a href="#history" onclick="showCont(1);return false;" style=" text-decoration: none"
    ><span class="style1">Staff</span></a><br>
    </div>
    <div align="center">
    <a href="#century" onclick="showCont(2);return false;" style=" text-decoration: none"
    ><span class="style1">B.E.E</div>
    </a>
    <div align="center">
    <a href="#why" onclick="showCont(3);return false;" style=" text-decoration: none"
    ><span class="style1">Social Responsibility</div>
    </a>
    <hr>
    <br>
    <div id="cnt">
    </div>

    Help!

    Thanks

  2. #2
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    Link to the site where this page is hosted would be nice to better understand the problem

  3. #3
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You missed adding semicolons here:
    Code:
    .style1 {font-weight: bold;font-style: italic;font-size:11px ;text-transform:uppercase;}
    a:link {color: #F68121; text-decoration:none;}
    a:active {color: Blue; text-decoration:none;}
    a:visited { color: #F68121; text-decoration:none;}
    I don't remember if FF had a problem with that, but you should have it anyway.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  4. #4
    Join Date
    Nov 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi guys.

    Thanks for your replies. I managed to fix the problem by tweaking some of my CSS.

    I have a new problem that needs help though. The menu that I spoke about earlier works fine, but I am trying to get a div to work within a javascript array. Is this possible?

    The array looks like this so far (Remembering that " cannot be included in the array):

    function showCont(typ) {
    var stuff = new Array()
    stuff[0] = "<tr height= 100 class=noprint > <td valign=top rowspan=1 height=100 ><p><span class=style1>TITLE HERE<a name=DCVG></a></span></p><p><span class=bodytext>TEXT HERE </span></p><div align=right class='bodytextbold' id='more1' style=display:block><a href=#readmore1 style=color:#009933; text-decoration:underline onClick=divShow('moretext1'), divHide('more1')>more &gt;&gt;<hr ></a></div><div style=display:none id='moretext1'><div align=right class=noprint> <a href=#readmore1 onClick=divHide('moretext1'), divShow('more1') style=color:#009933; text-decoration:underline class=bodytextbold>&lt;&lt; less </a></div><p>ADDITIONAL TEXT HERE</p></td></tr>

    This is the function that I use for the menu, to call the text:

    <div align="center" class="aboutlinks"><a href="#cathodic" onclick="showCont(0);return false;">TITLE HERE</a></div>
    <div align="center" class="aboutlinks"><a href="#surveys" onclick="showCont(1);return false;">TITLE HERE</a></div>

    Any help would be appreciated. I cannot give a link to the site because it is not hosted yet.

    Thanks
    Kevin

  5. #5
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    are you trying to create that div?

    what are you trying to do?

  6. #6
    Join Date
    Nov 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No worries. I'm sorted. Thanks.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •