Ok folks. I'm stuck. I have a random image/link generating code that works great. However, the moment I call another function using onClick that will set the size of a new window once the link is clicked my links and images don't display. I need help.
The current code is called in the body from a separate javascript file using <script type="text/javascript" src="randpagld.js"></script>
it appears as follows:
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[0]="images/img1.jpg"
myimages[1]="images/img2.jpg"
myimages[2]="images/img3.jpg"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0){
document.write('<img alt="put a popup message here" src="'+myimages[ry]+'" border=0>')
}
else if (ry==1){
document.write( '<a href="link to new page" onClick="winBRopen('specify link here also','','725',' 500','','','yes');return false;"><img alt="put a popup message here" src="'+myimages[ry]+'" border=0></a>' );
}
else{
document.write( '<a href="link to new page" onClick="winBRopen('specify link here also','','725',' 500','','','yes');return false;"><img alt="put a popup message here" src="'+myimages[ry]+'" border=0></a>' );
}
}
The winBRopen function is called from another .js file that I call in the header of the page the same way that I called the last .js file.
It appears as follows:
Bookmarks