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?