View previous topic :: View next topic |
Author |
Message |
jon
Joined: 01 Oct 2004 Posts: 40
|
Posted: Sun Oct 10, 2004 7:39 pm Post subject: Open a new window with JavaScript? |
|
|
How do I open a new window from my main page with JavaScript. I would appreciate if you can post sample code.
Thanks,
jon |
|
Back to top |
|
|
pepper
Joined: 10 Oct 2004 Posts: 5
|
Posted: Mon Oct 11, 2004 8:49 am Post subject: |
|
|
Hey Jon,
You can open new popup window in JavaScript with the window.open method or you can use a normal link with target="_blank" attribute.
Check the examples below:
Code: | window.open("your_page.htm", "JS popup", "width=255, height=255, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no"); |
Code: |
<a href="your_page.htm" target="_blank">Open New Window</a> |
Cheers _________________ Hot Pepper :/ |
|
Back to top |
|
|
paul
Joined: 11 Oct 2004 Posts: 128
|
Posted: Mon Oct 11, 2004 9:28 am Post subject: |
|
|
pepper is correct. I would use the window.open JavaScript method, because you have some control over the popup if you open it this way. _________________ World Countries | Survival Skills |
|
Back to top |
|
|
raven
Joined: 31 Jan 2006 Posts: 41
|
Posted: Tue Jan 31, 2006 6:01 pm Post subject: |
|
|
paul wrote: | pepper is correct. I would use the window.open JavaScript method, because you have some control over the popup if you open it this way. |
Is there another manner you can open a window with JS? Your answer seems to indicate there is. Why would you never use that option or better question might be when would you use it? _________________ Programmers do it in code |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|