Results 1 to 3 of 3

Thread: Switch Content Script

  1. #1
    Join Date
    Dec 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Switch Content Script

    I think that the getElementsByTagName function is missing from this script. Do you have this function?

    Thanks for your help,
    berlinll

  2. #2
    Join Date
    Dec 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I've seen this script used earlier in this forum and that example also did not have the curobj.getElementsByTagName function. Mozilla keeps throwing an error that curobj.getElementsByTagName is not a function.

  3. #3
    Join Date
    Dec 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK, so now I got past that problem. On the webpage where the script is described there's the following snippet:

    <h3 onClick="expandcontent('sc1')" style="cursor:hand; cursorointer">
    What is JavaScript?</h3>

    This piece is incorrect. You need to have:

    onClick="expandcontent(this,'sc1')"

    So now that I have "this" in there, I don't get the "not a function error." I still can't get this bad boy to work. When the page loads, my <div> is already expanded.

    Any ideas?

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
  •