PDA

View Full Version : Automatically redirecting...


Tidus
04-25-2003, 01:20 AM
Hello!

I know this is prob pretty simple but I aint sure how to do it..

How to i make it so like, if someone goes to:

index.php3?goto=news

how would i make it so the target frame "main" goes to like news.php3

i know i would prob have to have an IF statement somewhere? but i dunno..

Any suggestions?

J

Jason
04-25-2003, 02:03 AM
if (goto != ""){
$redirect = "goto".".php3";
}


then set your frame to the $redirect string...



Jason

x_goose_x
04-25-2003, 04:48 AM
To target frames you'll need client side:

<?php
$goto = $_GET['goto'];
?>

<script language="JavaScript1.2" type="text/javascript">
top.main.location = '<?=$goto ?>.php3';
</script>

Tidus
04-26-2003, 11:00 AM
Thanks all

i have a dropdown menu in the frame "top".
so how would i implement that javascript into the drop down menu?

Thanks

mordred
04-26-2003, 02:47 PM
Depends on the dropdown menu and because that becomes a javascript question, it might be better asked in the JS programming forum.