iframe question

Associate
Joined
18 Aug 2004
Posts
1,886
Location
midlands
hi,

is it possible to have an iframe hidden, then when you click a link it opens up?

so that it is only viewed when the user wants to see it?

or maybe theres a better way to do it?... also is it possible to have it so it sort of slides down when wanted to be viewed...

hope someone can help
nickels
 
dont know how to do it :(

looking for something like the things on the side of last.fm but with a webpage in them

could someone make the code? would be very happy if it was possible

thanks
nickels
 
addy_010 said:
i have a class in css file that has a display:none setting, then on the webpage, i have the js change it from none to block and then vice versa. that works fine for me

can i have the code? i dont know how to do js
 
right i sorted it out, but when i put text in the div to be hidden it works but when i put an iframe in it, it messes up the layout :/

Code:
<script>
function toggleDiv(div)
{
if(div.style.display == "none")
div.style.display = "block";
else
div.style.display = "none";
}
</script>

 <div id="benefits"><table cellpadding="3" cellspacing="0" width="300">
<tr>
<td style="cursor:hand;" onclick="toggleDiv(document.all.testdiv);"> Click here to view/hide comments
<font face="arial">&nbsp;</font></td>
</tr>
<tr>
<td>
<div id="testdiv" name="testdiv" style="display:block;"><iframe src="http://www.google.co.uk"></div>
</td>
</tr>
</table></div>
 
Back
Top Bottom