Solved

Safari Javascript issue

Posted on 2010-08-16
3
476 Views
Last Modified: 2013-12-07
Hi experts,

The following code works fine with other browsers but Safari

<input type="button" value="Cancel" OnClick="window.navigate('cohindex.php');" >

(OnClick="window.open('cohindex.php');"  works but it opens a new window which is not what i want)

Your help is highly appreciated.
Kind regards
0
Comment
Question by:Corona880
3 Comments
 
LVL 19

Accepted Solution

by:
Albert Van Halen earned 63 total points
Comment Utility
Use window.location.href = 'cohindex.php';
0
 
LVL 7

Assisted Solution

by:jhp333
jhp333 earned 62 total points
Comment Utility
window.open('cohindex.php', '_self')
will load the new page on the current window.

or you can also do:
window.location.href='cohindex.php';
0
 
LVL 40

Expert Comment

by:gurvinder372
Comment Utility
using an anchor tag would have simplified a lot
<a href='cohindex.php'>

but i guess since it is a php (a server side) script, you need to submit to it rather than just navigate to it.

<input type="button" value="Cancel" OnClick="cancel()" >

function cancel()
{
   document.forms[0].action = "cohindex.php";
   document.forms[0].submit();
}
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now