We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

A very simple function not working in Safari

Dada44
Dada44 asked
on
Medium Priority
266 Views
Last Modified: 2013-12-07

Hi all,

I have the code below working in all browsers and versions except for Safari. Using Safari if you click the image nothing happens.
Can anyone please help me to fix the script also for Safari??

Thanks a ton in advance!
<script language="javascript">
   function loadme(url){
 
      parent.parent.location.href = url;
   
    }
   </script>
  </head>
  <body>
 
 <a href="javascript:loadme('http://www.webpage.com/', false);" ><img src="image.jpg" border=0></a>

Open in new window

Comment
Watch Question

What does this function do? Where do you want the image to be loaded? Is this what you are looking for?
<script language="javascript">
   function loadme(url){
 
      window.location.href = url;
   
    }
   </script>
  </head>
  <body>
 
 <a href="javascript:loadme('http://www.webpage.com/', false);" ><img src="image.jpg" border=0></a>

Open in new window

Commented:
Oops I've found it:

 <a href="javascript:parent.parent.location.href ='http://www.webpage.com/';" >

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.