help with show/hide function in Javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • colinod
    Contributor
    • Nov 2007
    • 347

    help with show/hide function in Javascript

    I have a page that uses the following Javascript for a show hide function

    Code:
    function showHide(shID) {
       if (document.getElementById(shID)) {
          if (document.getElementById(shID+'-show').style.display != 'none') {
             document.getElementById(shID+'-show').style.display = 'none';
             document.getElementById(shID).style.display = 'block';
          }
          else {
             document.getElementById(shID+'-show').style.display = 'inline';
             document.getElementById(shID).style.display = 'none';
          }
       }
    }
    This works fine in Internet Explorer but is non functional in Firefox, Chrome and Safari does not work

    Working page in ie can be seen here


    its the hear more clips button that im having the problem with
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    well, it worked fo me on FF6. though I’ve been unable to hide the clips due to an invisible element (the link) to click on.

    Comment

    • colinod
      Contributor
      • Nov 2007
      • 347

      #3
      We did not want the need to rehide the clips and i found out the problem with the browers i was trying was fixed when i stopped trying to hide table rows and just hid a complete table at a time

      Comment

      • colinod
        Contributor
        • Nov 2007
        • 347

        #4
        I have however found another problem, if you goto the following page http://www.yaketyyakallmouth.com/new...oys.asp?id=all

        and then select the first person on the list the next page everything works fine,

        if you select Richard Allinson or John Altman however you get the show more link at the bottom and when its clicked it comes up with a

        ADODB.Recordset error '800a0bcd'

        Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

        /newpages2/boys2.asp, line 285

        i have narrowed it down to the fact i have a if i = 12 then statement that determines when the show hide function should appear because i only get this error when exactly 12 items are called from the database!!!

        i have attached the page in question and any assistance would be very much appreciated
        Attached Files

        Comment

        Working...