Greetings,
I have a page that I want to have as a js popup page accessible from the menu. The code I think I need is:
aI("text=CONTACT US;url=radio_archive/player_inc.php;
onclick="NewWindow(this.href,'name','500','525','yes');return false;");
but when I put this in the menu file the menu disappears. Do I need to add the js script to the menu page or something else or is this even possible?
Here is the js I use on the web pages to make the onclick event work:
var win = null;
function NewWindow(wizpage, wizname, w, h, scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height=' + h + ',width=' + w + ',top= 100,' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',resizable'
win = window.open(wizpage, wizname, settings)
}
Thanks,
Scott
use of onclick event in menu item for popup page
Re: use of onclick event in menu item for popup page
Hi,
Well, I'm not a function person, so all I can do is give you one I actually have working so you can see it, and from that you should be able to figure out how to do yours
The function goes in the top of the data file right below the sufOffsetLeft, menuclosedelay stuff
Then in the aI string, the code would be
So when you click that link, it will open a page at 500x400px set at the left 100 and top 100, be resizable, have scrollbars, toolbar and status bar. You can put in any of the parameters for a browser window.
Maybe you can figure out how to do what you need with whatever that function you have is using this model. Post back if you need more help.
Ruth
Well, I'm not a function person, so all I can do is give you one I actually have working so you can see it, and from that you should be able to figure out how to do yours

Code: Select all
var newwindow;
function mynewwin(url)
{
newwindow=window.open(url,'name','height=500,width=400,left=100,top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
}
Code: Select all
aI("text=page in a new window;url=javascript:mynewwin('http://poems2u.com/');");
Maybe you can figure out how to do what you need with whatever that function you have is using this model. Post back if you need more help.
Ruth
Re: use of onclick event in menu item for popup page
Ruth,
Thanks so much for the help. It worked perfectly! Not only are the menus the best I have used, but the support forums are great too. Thank you for taking the time to share your knowledge.
Best,
Scott
Thanks so much for the help. It worked perfectly! Not only are the menus the best I have used, but the support forums are great too. Thank you for taking the time to share your knowledge.
Best,
Scott