Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:27
HOW to create item that opens Sub + new page + new window?
Poster: nickvasallo
Dated: Friday October 26 2007 - 16:58:29 BST
I want to create "An Item that Opens a Submenu and Links to a New Page in a New Window" as per the instructions on the frames tutorial, I was directed here to pose the question.
Re: HOW to create item that opens Sub + new page + new window?
Poster: Ruth
Dated: Friday October 26 2007 - 17:26:07 BST
Hi,
Try this post
viewtopic.php?f=10&t=9316
Ruth
Re: HOW to create item that opens Sub + new page + new window?
Poster: nickvasallo
Dated: Friday October 26 2007 - 17:36:39 BST
hi ruth, thanks. so if i wanted to simply open new page in a new window without any resizing or whatever which part of the code would I need?
Re: HOW to create item that opens Sub + new page + new window?
Poster: Ruth
Dated: Friday October 26 2007 - 20:53:47 BST
Well, here's my guess 'cause I don't really know, but I think you'd just eliminate anything after the url, keeping the last ) (url) Maybe you'd also need 'name', Try it with just the url part and see what happens. I'm not sure what the default is on a new window, if it has all the goodies, like scroll bars and such. I think it does.
edit: after experimenting, it's this
Code:
var newwindow;
function mynewwindow(url)
{
newwindow=window.open(url);
}
function mynewwindow(url)
{
newwindow=window.open(url);
}
Ruth
Re: HOW to create item that opens Sub + new page + new window?
Poster: nickvasallo
Dated: Friday October 26 2007 - 21:24:37 BST
again, thank you! you are a lifesaver
Re: HOW to create item that opens Sub + new page + new window?
Poster: John
Dated: Monday October 29 2007 - 13:16:13 GMT
There's also the much easier target=_blank;.
Re: HOW to create item that opens Sub + new page + new window?
Poster: nickvasallo
Dated: Monday October 29 2007 - 15:57:53 GMT
that actually just opens a new window, in order to do what i needed it was a bit more complex
Re: HOW to create item that opens Sub + new page + new window?
Poster: John
Dated: Monday October 29 2007 - 17:22:20 GMT
Quote:
so if i wanted to simply open new page in a new window without any resizing or whatever which part of the code would I need?
Guess I missed the part about 'in order to do what i needed it was a bit more complex' somewhere in that statement.
Re: HOW to create item that opens Sub + new page + new window?
Poster: nickvasallo
Dated: Monday October 29 2007 - 17:26:03 GMT
Oh yes, I can see what you missed - please see 1st post: "An Item that Opens a Submenu and Links to a New Page in a New Window" as per the instructions on the frames tutorial. Not just a new window from a link.
What is needed an extra function within the java menu data file. Ruth gave me some code that works, thanks for trying though