Click to See Complete Forum and Search --> : How to use current URL in an "openWindow" link?


gulen
07-07-2003, 05:18 PM
In a frame-set, how to open content of one frame into a new window?

<a href="" onClick="MM_openBrWindow(URL of current frame)">new window without frames</a>

Since this is a template, I have to "automate" the name of the current URL!

Cant find any hints at internet.
Thanks!

Charles
07-07-2003, 05:26 PM
Since the link will do nothing for the 13% of users who do not use JavaScript, it's best to use JavaScript to draw the link.

<script type="text/javascript">
<!--
document.write('<a href="#">new window without frames</a>');
document.links[document.links.length-1].onclick = function () {self.open(self.location.href, 'child'); return false}
// -->
</script>

Nicole_Anna
07-07-2003, 10:38 PM
Originally posted by Charles
Since the link will do nothing for the 13% of users who do not use JavaScript, it's best to use JavaScript to draw the link.

<script type="text/javascript">
<!--
document.write('<a href="#">new window without frames</a>');
document.links[document.links.length-1].onclick = function () {self.open(self.location.href, 'child'); return false}
// -->
</script>

Hi,

I'm new to Javascript.

Do the below '#' need to declared?

<a href="#">new window without frames</a>');