A couple of questions

liunx

Guest
Right before i ask them im only 17 and i used frontpage if thats any help i know everyone here probably uses more advanced programmes but i was woundering if you could help me <br />
<br />
1. ive got images tumbnails on my site and you click them to make them bigger and then they open in a new window and i was woundering how to stop the right click on the image that opens in the new window<br />
<br />
2. again when the image opens in a new window i was woundering how to make the browser the size of the image so that you don't have a big white background behind it you just have the image<br />
<br />
and this is my site <!-- w --><a class="postlink" href="http://www.pvg-notts.co.uk">www.pvg-notts.co.uk</a><!-- w --> so you can see what im on about cheers<!--content-->For both of them you need to use Javascript. But 2 things stopping people right clicking just annoys people using their own browser features and it will not stop people stealing your images as discussed here about 50 times javascript can be disabled, use printscreen, drag image into addressbar. <br />
<br />
Try searching this site for what you needDynamic Drive (<!-- m --><a class="postlink" href="http://www.dynamicdrive.com">http://www.dynamicdrive.com</a><!-- m -->) Dont really know if it will be of any use as im not really a javascript man<!--content-->Using javascript you can set up a function that pop up the new window at a specified size:<br />
<br />
<br />
<br />
<a name="pic1" href=http://www.webdeveloper.com/forum/archive/index.php/"#pic1" <br />
onClick="OpenWindow('480','362','your_image_big.jpg','pic1')"><br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"your_image_thumbnail.jpg" name="pic1" border="0" alt=""><br />
</a><br />
<br />
<script language="Javascript" type="text/javascript"><br />
<br />
function OpenWindow(height, width, picurl,picname) {<br />
<br />
//rearrange code all on one line<br />
window.open(picurl, picname, <br />
'height='+height+',width='+width+<br />
',scroll=no,resizable=no,toolbar=no');<br />
<br />
}<br />
<br />
</script><br />
<br />
<br />
That should do it.<!--content-->
 
Back
Top