Link to URL

Buy now  £29 Get support

The second example below must be served from localhost or a webserver example.

Click the image to open a link in the same window or a new window.

Click the image to execute javascript code.

 
  1. <html>
  2.     <head>
  3.         <title>Magic Magnify: Link to URL</title>
  4.        
  5.         <!-- link to magicmagnify/magicmagnify.js file -->
  6.         <script src="magicmagnify/magicmagnify.js" type="text/javascript"></script>
  7.        
  8.     </head>
  9.     <body>
  10.        
  11.  
  12.         <p class="note">The second example below must be served from localhost or a webserver <a href="http://demo.magictoolbox.com/magicmagnify/example9.html">example</a>.</p>
  13.         <div class="w50">
  14.             <p>Click the image to open a link in the same window or a new window.</p>
  15.             <a href="images/shoe_large.jpg" class="MagicMagnify" rel="link-url:http://magictoolbox.com; link-window:_blank;"><img src="images/shoe_small.jpg"/></a>
  16.         </div>
  17.         <div class="w50">
  18.             <p>Click the image to execute javascript code.</p>
  19.             <a href="images/shoe_large.jpg" class="MagicMagnify" rel="link-url:javascript:alert('test message from js code');"><img src="images/shoe_small.jpg"/></a>
  20.         </div>
  21.         <div class="clear">&nbsp;</div>
  22.        
  23.  
  24.        
  25.     </body>
  26. </html>