homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Form submit opens two pages but not in chrome or safari
Can anyone help?

Msg#: 4566098 posted 7:36 pm on Apr 18, 2013 (gmt 0)

ok, I have some javascript code that enables one html form to open two pages on submit, one in the same window and the other in a new window. This works fine in IE and FF although not in Chrome or Opera.

Can anyone shed any light on this? Here is the code:

echo '<script language="Javascript" type="text/javascript">
function OnButton5()



return true;

function OnButton6()



return true;

The actual code as part of the html form which calls these javascript functions is this:

onclick="OnButton5(); OnButton6();"

Can anyone give any advice on how to make this cross browser compatible in order to work in chrome and safari as well as IE and FF.




Msg#: 4566098 posted 2:41 am on Apr 29, 2013 (gmt 0)

That is an interesting issue, I saw the same thing happening to me.
I tested this and it should work for you in multiple browsers.

change your onclick to:

and add this to OnButton5() function...


Msg#: 4566098 posted 12:04 pm on May 2, 2013 (gmt 0)


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved