Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Javascript wont show image
Old 05-22-2008, 06:18 AM Javascript wont show image
coldturkey's Avatar
Extreme Talker

Posts: 211
Name: Rachel
Location: Spain
Trades: 3
I have a code so visitors can change the side of the text.... but i want to change the text they click on to do this into an image....
Code:
    fS.addJSLink(fC,fS.incFS,"<img src='images/a+.gif'>","increaseSize");
    fS.addJSLink(fC,fS.rFS,"R ","resetSize");
    fS.addJSLink(fC,fS.decFS,"A- ","decreaseSize");
But what is shown is <img src='images/a+.gif'> written as it doesnt call the image??
What am I doing wrong???
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

coldturkey is offline
Reply With Quote
View Public Profile Visit coldturkey's homepage!
 
 
Register now for full access!
Old 05-23-2008, 10:15 PM Re: Javascript wont show image
logic ali's Avatar
Super Talker

Posts: 104
Trades: 0
Quote:
Originally Posted by coldturkey View Post
"<img src='images/a+.gif'>"
Is 'a' a string variable or the literal name of the file?

If it's the name of the file, you need

Code:
"<img src='images/a.gif'>"
If it's a string you need
Code:
"<img src='images/"+a+".gif'>"
logic ali is offline
Reply With Quote
View Public Profile
 
Old 05-28-2008, 08:36 AM Re: Javascript wont show image
coldturkey's Avatar
Extreme Talker

Posts: 211
Name: Rachel
Location: Spain
Trades: 3
Quote:
Originally Posted by logic ali View Post
Is 'a' a string variable or the literal name of the file?

If it's the name of the file, you need

Code:
"<img src='images/a.gif'>"
If it's a string you need
Code:
"<img src='images/"+a+".gif'>"
The image is called a+.gif - so it should show using "<img src='images/a+.gif'>" but it doesnt!
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

coldturkey is offline
Reply With Quote
View Public Profile Visit coldturkey's homepage!
 
Reply     « Reply to Javascript wont show image
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17265 seconds with 12 queries