PDA

View Full Version : I-frame link?


spoofm0nkey
05-03-2005, 11:44 PM
i wasn't exactly sure where to put this question.

what i'm going for is a popup link to a page that has an iframe in it, and depending on the thing you clicked i want it to bring up the same page except a diferent page inside the iframe on that page... wait. ok that's really confusing, heres a drawing of what i mean.

(made by photoshop)

http://img73.echo.cx/img73/8933/exampleforgelp0sc.gif
please help. Thanks.

glenngv
05-04-2005, 05:33 AM
Are you using a server-side language? It's easier if you do.
But if not, here's the javascript solution.

main page:
<script type="text/javascript">
function openPopup(oLink){
var oWin = window.open("popup.htm?" + oLink.href, "_mypopup", "width=800, height=600, resizable=1");
oWin.focus();
return false;
}
</script>
...
<a href="bigpic1.gif" onclick="return openPopup(this)"><img src="thumb1.gif" alt="" /></a>

popup:
<script type="text/javascript">
window.onload = function(){
var qs = location.search;
if (qs && qs.length>1){
window.open(qs.substring(1), "nameOfIframe")
}
}
</script>

spoofm0nkey
05-04-2005, 07:38 AM
That's awesome man thanks! and uh... well, this is a whole nother matter but the same thing. do you know how i could get the arrows to work so they navigate you through the folder that the art images are in? left to right.. o.o
...is it possable to do this in java?

-- i can use both: server and client side.

glenngv
05-06-2005, 03:10 AM
Can you elaborate more?