home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Beginner java code script not loading images

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2082
Discussions: 200,919, Posts: 2,379,069, Members: 246,287
Old October 4th, 2009, 02:15 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Oct 2009
Posts: 1
Exclamation
Beginner java code script not loading images

I have been trying for the last 2 days to get what seems like a simple to script to run. I have the following var setup

<script type="text/javascript">

var rNumber = randInt(5);// generate a random integer from 1 to 5
var rAd = adDescription(rNumber);// description of the random ad
var rLink = adLink(rNumber);// URL of the random ad

Now I need I need to enter a command to write the text

< a href="url">
<img src="adn.jpg" alt="description" />
</a>

Where the url is the value of the rLink variable

n is the value of the rNumber variable

description is the value of the rAd variable

This is what I added


<script type="text/javascript">

var rNumber = randInt(5);// generate a random integer from 1 to 5
var rAd = adDescription(rNumber);// description of the random ad
var rLink = adLink(rNumber);// URL of the random ad

document.write("<a href='adLink'>");
document.write("rNumber");
document.write("<img src='"ad + randInt + .jpg"' alt='adDescription' />");
document.write("</a>");
</script>

Problem is nothing shows when I open the page what am I doing wrong?

Last edited by cov010 : October 4th, 2009 at 02:26 PM.
cov010 is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginner, javascript code help! snikker74 Webmastering and Programming 4 April 4th, 2008 12:08 PM
Why aren't these images loading? ArcticFox Webmastering and Programming 7 May 31st, 2005 04:31 AM
Need a Script (loading pic) Creatures Webmastering and Programming 6 June 7th, 2003 04:50 AM
ie not loading images and kazaa is not downloading octaval General Tech Discussion 2 June 7th, 2003 03:58 AM
Stop images loading..SOMETIMES! Nathan323 Webmastering and Programming 3 March 23rd, 2003 01:18 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2850)
Obama the Muslim (12)
Why is Khalid Sheikh Mohammed even .. (9)
Is the PSU I received dead? (10)
windows vista security holes (8)
Foreign voltage (10)
HIS HD5770 graphic card question (15)
Install XP pro and a Vista laptop ?.. (9)
Print spooler problem (12)
Dept. of HS: NSA 'Helped' Develop V.. (15)
A good PSU? (10)
New Computer wont recognize XP disc (7)
Ideal cheap graph card for PC-Gamin.. (15)
EVGA 9800 gtx help with finding a g.. (8)
Recent Discussions
Display shows 3x5 inch in middle of s.. (3)
windows vista security holes (8)
monitor will not turn on at all, (1)
Print spooler problem (12)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (33)
World's largest Monopoly Game using G.. (331)
Foreign voltage (10)
FiOS modem/router interfering with ne.. (7)
Browsers wont load websites (2)
Virus Doctor Popup? (1)
Help getting around port 80 for camer.. (1)
Dept. of HS: NSA 'Helped' Develop Vis.. (15)
Install XP pro and a Vista laptop ?? (9)
EVGA 9800 gtx help with finding a goo.. (8)
Modern Warfare For the PC (32)
Problem with speed step/turbo boost? (1)
Modern Warfare 2: Who Bought It? (61)
SIS 740 and Widescreen (8)
Baffling Problem with my CPU/MoBo's. .. (0)
HIS HD5770 graphic card question (15)
Best file format to play on Windows H.. (0)
PSP Go bought in Japan (0)
Asus P4G8X Mobo (3)
Need hard disk drivers (4)
windows 7 internet problem (4)


All times are GMT -4. The time now is 08:02 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28