SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)

    hide/display a div

    i'm hoping this is simple, and someone will step up and go "oh, that's easy, just do such-and-such"

    in return i promise to help with any sql problems you might have

    okay, here's the situation

    on http://r937.com/sqllinks.cfm i have some radio buttons which are supposed to hide/display sections on the page

    works in internet explorer and firefox, just sits there in mozilla and opera

    the javascript looks like this:
    Code:
    <script type="text/javascript">
    var keywords = new Array("Access","DataModelling"
    ,"DataWarehousing","Database","DB2","MySQL","Oracle"
    ,"PostgreSQL","SQL","SQLServer","Sybase");
    </script>
    <script type="text/javascript" src="showkeywords.js"></script>
    and the linked script looks like this:
    Code:
    function show(keyword) {
      if (keyword=="All") {
        for (i=0; i < keywords.length; i++) {
          document.getElementById(keywords[i]).style.display="block";
          }
      }
      else {
        for (i=0; i < keywords.length; i++) {
          document.getElementById(keywords[i]).style.display="none";
          }
        document.getElementById(keyword).style.display="block";
      }
    }
    obviously i don't know the DOM very well at all...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It works for me on Win2K with Opera 7.23 and Mozilla 1.6.

    Nice work!

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,350
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    thanks, mike

    you'll never guess what the problem was

    pebkac!!

    in mozilla and opera, i had javascript turned off!!

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    Makes ya wanna scream, eh?



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
  •