Forum Moderators: open
Here's part of the menu.js scrip that I'm using;
<code>
document.write('<DIV id="menulocation">');
document.write('<TABLE cellpadding="0" cellspacing="0" border="0" width="100%" background="picts/background-menu.gif" bgcolor="#C0C0C0"><tr><td>');
document.write('<TABLE cellpadding="0" cellspacing="0" border="0"><tr><td width="25"> <br>');
// START LINKS //
document.write('</td><td nowrap>');
document.write('<a href="index.html" class="menu">Home</a>');
document.write('</td><td nowrap>');
document.write('<a href="about.htm" class="menu">Company</a>');
document.write('</td><td nowrap>');
document.write('<a href="services.htm" class="menu">Services</a>');
</>
and so on...
Here's the script (searchinventory.js) that pops up the window I want.
<code>
var popurls=new Array()
popurls[0]="search.htm"
function openpopup(popurl){
var winpops=window.open(popurl,"","width=800,height=600")
}
openpopup(popurls[Math.floor(Math.random()*(popurls.length))])
</>
The array is so I can pop up a series of URLS, but that's not important because right now I want the same URL all the time.
What do I put into the menu.js to call searchinventory.js?
Bruce B
document.write('<a href="javascript:openpopup(0)" class="menu">Search</a>');
document.write('<a href="javascript:openpopup(1)" class="menu">Services</a>');
<searchinventory.js>
var popurls=new Array()
popurls[0]="search.htm" ;
popurls[1]="services.htm";
function openpopup(idx){
var winpops=window.open(popurls[idx],"","width=800,height=600");
}