View Full Version : New Window
TheSaint51
15.05.2001, 17:40
How would I get the framescoolmenu example #4 to display the links in a new browser window?
Hey Saint,
You would simply add _blank as the 5th variable when you make the menu item.
so...like this....
oCMenu.makeMenu('top0','','*News','/news/index.asp','_blank')
If you want to open a new window with specific properties set, you will have to use a little javascript.....if you want that, just let me know.
Edited by - Shane on 05/15/2001 16:53:43
In the 14th place of the menu variables, place the name of the function, in this case openit(page)
In the head of the page, inside script tags, create the function that will open the new window.
oCMenu.makeMenu('top0','','*News','/news/index.asp','','','','','','','','','','openit("http://www.yahoo.com")')
<head>
<script language="javascript">
function openit(page){
window.open (page,"","width=400,height=400,scrollbars=no,resize=no")
}
</script>
<head>
This way allows you to place the name of any page in there, and you can use the same function for any links you want to open in a window like that.
ShAnE
Hey Tim, How ya doin?
I kind of like to keep it simple, then let the other people figure it out. That is how I learn / learned. There is enough there to figure out that there could be many many parameters that could be passed from the function call, to the function.
If you're bored....how about doing my business communication and report writing class homework for me? <img src=icon_smile_tongue.gif border=0 align=middle>
btw...man I still haven't had time to look at your backend mods to the menu, I have been absolutely swamped here at work.
ShAnE
btw..you can set the position you want it to open at in the window.open() function. But I have noticed that it doesn't seem to like to work on the different browsers. Does the moveTo work crossbrowser?
I know what you are trying to do ecs, you are tryin to get more posts under your name huh? <img src=icon_smile_tongue.gif border=0 align=middle> j/k
Edited by - Shane on 05/16/2001 18:16:50
Ecs,
Man, I've have been damn busy! I finished up classes for now, I am starting some new ones in a month. By the way, how was/is that java learning going?
Hmmm.. so there is a prob if you want to open two windows at once, with one click? I am not sure how you would click two different links at one time...hehe...maybe I am just not thinkin. I am interested to see how you would handle opening two different windows with one click though......
ShAnE
Oh yeah, forgot to mention, it is only ns4 that doesn't handle the left and top attributes very well. NS6 and IE5.5 seem to work great, using yahoo.com as the page to open in the window.
Very nice, got the naming thing! So, can you explain to my dumba$$ the deal with the opener manipulation?
Thanks ecs,
ShAnE
Bummer, but you don't need an appendix anyways! :)
Nice work, I think there would probably be atleast a few people that would like that feature. Anyways, I am gonna take off from work now, been here for 9 hours today. I might check in from home later this evening. *edit*
Shane
ShAnE
Edited by - Shane on 05/16/2001 19:14:47
I understand, now you still have control of the new window from the opener window. So what kinds of things does that allow you to do?
ShAnE
vBulletin® v3.6.7, Copyright ©2000-2008, Jelsoft Enterprises Ltd.