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
Printable View
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
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">
Just look at the code!Code:onmouseover="this.innerHTML(<img src='welcome home.gif'>')"
It should be
Of course, it shouldn't be this either, see axion's post.Code:onmouseover="this.innerHTML = '<img src=\'welcome home.gif\'>'"
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..
That's because this stupid forum removed by backslashes.
Code:onmouseover="this.innerHTML = '<img src=\\'welcome home.gif\\'>'"