Solved

Safari Javascript issue

Posted on 2010-08-16
3
489 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 19

Accepted Solution

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

Assisted Solution

by:jhp333
jhp333 earned 62 total points
ID: 33452163
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
ID: 33452182
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
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…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
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.

734 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