A very simple function not working in Safari


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

Dada44Asked:
Who is Participating?
 
Dada44Connect With a Mentor Author Commented:
Oops I've found it:

 <a href="javascript:parent.parent.location.href ='http://www.webpage.com/';" >
0
 
sunithnairCommented:
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

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.