I’ve taken over a website that uses a Javascript menu system. I haven’t got a clue who wrote the code for the menu system but I need to make a small change to it so that one of the menu links opens in a pop-up window. This is an extract of the code within a .js file that builds the menu links:
[CODE]
startMenu(‘mEmailUtils’,true, 160, 0, 160, subM, ”, false);
addItem(‘POP3 Email’, ‘javascript:poptastic(‘pop3.aspx?type=web&refresh=<%=vrefresh%>&host=<%=vmailserver%>&user=<%=vuser%>&pass=<%=vpass%>&open=<%=vopen%>’);’, ”);
addItem(‘POP3 Task Scheduler’, ‘index.asp?page=admin_pop3task&title=603’, ”);
addItem(‘Group Email’, ‘index.asp?page=admin_groupemail&title=217’, ”);
Ignore the first addItem for the moment, I’ll come back to that in a moment. The second and third addItem’s show how things are at the moment. The first value is the name of the link and the second value is the URL. Now back to the first addItem….this is where I’ve attempted to call a Javascript function to launch the URL in a pop-up window. Quite obviously it doesn’t work. To complicate matters the link has to contain some ASp variables. So on my ASP page that includes the .js file I have the following:
[CODE]
vrefresh = rs2(“admin_pop3refresh”)
vmailserver = rs2(“admin_mailserver”)
vuser = rs2(“admin_mailusername”)
vpass = rs2(“admin_mailpassword”)
vopen = rs2(“admin_openemail”)
I know these variables hold the correct values and I think I’ve used them within the URL correctly as well. So the issue must be with the way I’m trying to open the link in a pop-up window. I’ve tried a few ways of opening the link in a pop-up window but none have worked so far.
Sorry if there’s a lack of information here, but any ideas on how to achieve this would be appreciated.