• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

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

0
Dada44
Asked:
Dada44
1 Solution
 
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
 
Dada44Author Commented:
Oops I've found it:

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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now