You can do this with PHP (maybe javascript too, but I'd recommend PHP for several reasons-- easier, and it wouldn't require the user have Javascript enabled).
Note that to use PHP, you must have the extension of the page be .php, not .htm (unless you change your server configuration), as well as having PHP installed/enabled on the server.
Use a get variable to pass the link:
<a href="nba_main.php?iframe=http://othersite.com">
On nba_main.php:
Code:
<iframe src="<?php echo $_GET['iframe']; ?>" ....>
Now, you may also want to do a bit more to check that it is in fact a link you want to use like that, not just something the user entered randomly.
Code:
<?php
$iframe = @$_GET['iframe'];
$okurls = array(
'http://1.com',
'http://2.com',
'http://3.com'
);
if (!in_array($iframe,$okurls)) { $iframe = 'http://default.com'; }
?>
Then just use <?php echo $iframe; ?> for the iframe's src.
Bookmarks