Help - Search - Members - Calendar
Full Version: insert an image in javascript
HTMLHelp Forums > Programming > Client-side Scripting
cedric
when you look at this page http://www.frituurdekouter.be/pages/managecart.html
you will see hte word 'verwijder' ('remove').
That word is put there trough a variable declared in this file http://www.frituurdekouter.be/scripts/language-nl.js
I would like to change that word with an img?
Is that possible?
Christian J
Does it work with

CODE
strRLabel = "<img src=\"verwijder.gif\" alt=\"Verwijder\">";

?

Not sure if that's the right variable, though. It's inserted in a string at line 568 in "nopcart.js".
cedric
nope tried that
Christian J
Works for me (FWIW I didn't mean you should change that line 568, rather line 20 in "language-nl.js").
cedric
yes, but it's not the label but the button I want to change.
If I do that it just shows the text <img src=\"verwijder.gif\" alt=\"Verwijder\">???

thanks for the help tough
Christian J
I don't see any button in my browser. unsure.gif

In nopcart.js there's an INPUT form button at line 618 that you might replace it with an image.
cedric
it is that var that is also declared in language-nl.js
but I cant change that to <img src=''>.
it doesn't work
Darin McGrew
See http://htmlhelp.com/faq/html/forms.html#custom-button
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.