The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> insert an image in javascript
cedric
post Jun 12 2009, 05:57 PM
Post #1


Member
***

Group: Members
Posts: 42
Joined: 10-June 09
Member No.: 8,846



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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 13 2009, 06:47 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



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".
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
cedric
post Jun 13 2009, 07:43 AM
Post #3


Member
***

Group: Members
Posts: 42
Joined: 10-June 09
Member No.: 8,846



nope tried that
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 13 2009, 01:27 PM
Post #4


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



Works for me (FWIW I didn't mean you should change that line 568, rather line 20 in "language-nl.js").
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
cedric
post Jun 13 2009, 03:19 PM
Post #5


Member
***

Group: Members
Posts: 42
Joined: 10-June 09
Member No.: 8,846



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 13 2009, 03:55 PM
Post #6


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
cedric
post Jun 13 2009, 04:36 PM
Post #7


Member
***

Group: Members
Posts: 42
Joined: 10-June 09
Member No.: 8,846



it is that var that is also declared in language-nl.js
but I cant change that to <img src=''>.
it doesn't work
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Jun 13 2009, 06:44 PM
Post #8


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



See http://htmlhelp.com/faq/html/forms.html#custom-button
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 02:04 AM