Log in

View Full Version : Help with basic scripting



koralex90
07-11-2007, 03:27 PM
Hi. I have an image link in which if i click on it, it enlarges in a popup window by dhtml. I also have an information tag with it as well on mouseover.

However, I could only get one working at a time. This was because I had two "rel"s for this script below

<p><a href="http://img384.imageshack.us/img384/9486/autobhzx7.jpg" rel="thumbnail" rel="auto"><img src="http://img124.imageshack.us/img124/5/thumb1wo6.jpg" style="width: 155px; height: 207px" /></a></p>

Please tell me how to combine rel="thumbnail" rel="auto" so that i could get both of them working! Thanks

Trinithis
07-11-2007, 05:43 PM
I don't think "thumbnail" or "auto" are valid attribute values for rel.

What you want to do is use the onclick attribute and have it call a JavaScript function capable of making a pop-up window.



<img onclick="window.open('page.html','popwin')" />

alexjewell
07-11-2007, 07:26 PM
Trinithis, his rel's are correct. How to combine the 2 rel's, I'm not entirely sure. You might want to combine the two javascripts, somehow, into ONE rel...