View Full Version : Javascript Help
rize
August 27th, 2008, 07:02 PM
<script language='javascript'>
function move(choice)
{
if(choice == 1)
page='new1.php'
else
page='new2.php'
document.getElementById('formName').action = page;
document.getElementById('formName').submit();
}
</script>
how do i make new1 and new2 open in new window? like the _blank thing? :winkiss:
SlickEddie
August 27th, 2008, 07:06 PM
open.window command
http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
rize
August 27th, 2008, 07:12 PM
open.window command
http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
Thank you very much (L)
edit//
document.getElementById('formName').action = page;
document.getElementById('formName').submit();
I know i need to change the .action =page;
what should i change it with?
since my new code is:
if(choice == 1)
window.open ("new1.php","mywindow");
else
window.open ("new2","mywindow");
nsmchris
August 27th, 2008, 07:35 PM
if you are just trying to get the page to open in a new windows then use this
window.open("new1.php","_blank")
rize
August 28th, 2008, 02:45 AM
if you are just trying to get the page to open in a new windows then use this
window.open("new1.php","_blank")
got it.. thanks :detective:
rize
December 14th, 2008, 10:36 AM
uhm this is an old thread but i have a problem..
this script has errors in IE6 and it won't work :( any crossbrowser solution?
xjake88x
December 21st, 2008, 06:08 PM
Are you actually trying to submit form data here? If you give me a little information of what you're trying to do, there's a better way to do it in general.
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.