Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 05-04-2011, 11:02 AM
Bansaw's Avatar
Bansaw Bansaw is offline
Contributing Member
 
Join Date: 09-04-06
Posts: 59
iTrader: 0 / 0%
Javascript move page on - works only once :s - why?

I have a piece of code that, when invoked, closes the current browser window and opens my main index.html page.

It works fine, but only once!

When I navigate away from the index page again and click on the same button , it simply closes the browser window and does not open index.html.

Anyone know why it works only one time around?

Code:
function MovePageOn() { window.open('','_self'); window.close(); x=open('./index.html','windowname2','menubar=1,resizable=1,scrollbars=1,width=800,height=600'); w=open('./VMS_Installer2.exe','windowname1','menubar=1,resizable=1,scrollbars=1,width=800,height=600'); return false; } </script> AND FURTHER DOWN: <FORM ACTION="VMS_Installer2.exe"> <P><INPUT TYPE=SUBMIT VALUE="Click here to launch installation" onClick="MovePageOn()"> </FORM>
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 05-06-2011, 11:39 AM
Bansaw's Avatar
Bansaw Bansaw is offline
Contributing Member
 
Join Date: 09-04-06
Posts: 59
iTrader: 0 / 0%
OK, so I eventually did some more research and found out why.

I simply missed the NULL out, just after index.html.

So,
Code:
x=open('./index.html','windowname2','menubar=1,resizable=1,scrollbars=1,width=800,height=600');
should have been
Code:
x=open('./index.html','','windowname2','menubar=1,resizable=1,scrollbars=1,width=800,height=600');
Now it opens everytime.
 
Reply With Quote
  #3  
Old 05-12-2011, 10:59 PM
8apps 8apps is offline
Junior Member
 
Join Date: 05-12-11
Posts: 6
iTrader: 0 / 0%
I had similar problem. Thanks for sharing!
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how this javascript code works? rahulraj Coding Forum 1 04-13-2010 10:04 AM
Ready to Set A Static Page for Homepage....How to move blog posts to another page? rookiethomas Blogging Forum 2 09-21-2009 01:04 PM
Javascript app works in Firefox, not in IE Gr8Writer Coding Forum 0 01-30-2008 04:39 PM
Javascript: works in IE, not FF gnznroses Coding Forum 1 01-13-2008 11:39 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 06:11 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC