Results 1 to 5 of 5

Thread: ' is not working :S

  1. #1

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,390

    ' is not working :S

    just say i want 2 do this:

    onmouseover="this.innerHTML(<img src='welcome home.gif'>')"

    how can i do this ??? because js doesn't like the ' ... - how can i make this work??

    thanks kris

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    Looks like your trying a rollover? http://www.google.com/search?q=%22ja...utf-8&oe=utf-8

    In any case, it seems to be a parsing problem in IE. If you're using an image (i.e. <img src="blah.gif" onmouseover="...">), you could use:
    Code:
    <img onmouseover = "this.src = 'welcome home.gif'" alt="Welcome Home">

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Code:
    onmouseover="this.innerHTML(<img src='welcome home.gif'>')"
    Just look at the code!

    It should be
    Code:
    onmouseover="this.innerHTML = '<img src=\'welcome home.gif\'>'"
    Of course, it shouldn't be this either, see axion's post.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,390
    whops that what i meant ... but it still DOESN:T WORK

    i will show u y:



    onmouseover="this.innerHTML = '<img src='welcome home.gif'>'"
    ----------------------------------------^----------------^---



    c how it conflicts with the other comma's

    ... how can i work round this - for eg in vb u use 2 double quotes in a row... but that doesn't work in java..

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    That's because this stupid forum removed by backslashes.

    Code:
    onmouseover="this.innerHTML = '<img src=\\'welcome home.gif\\'>'"
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width