Jump to content


Javascript new Window Code Problem


2 replies to this topic

#1 signature16

    Young Padawan

  • Members
  • Pip
  • 180 posts
  • Gender:Male
  • Location:San Diego

Posted 15 January 2007 - 06:09 AM

I am trying to use this piece of javascript to open a new window. Unfortunately when the window opens, it is not scrollable. How can I make the window scrollable?


This is the website I am working on: http://shrinkalink.com/6173

If you click the Gallery button, you can see why I want to have the new window scrollable.



<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>


Thanks!

#2 Stu

    Retired P2L Staff

  • Publishing Betazoids
  • PipPipPipPip
  • 1,761 posts
  • Gender:Male

Posted 15 January 2007 - 06:19 AM

<a class="nav-img"  href="#" onClick="MM_openBrWindow('http://www.sailmakanikai.com/gallery/?dir=main','','width=750,height=850')"><img src="images/gallery.jpg" alt="Gallery" class="nav-img" /></a>
try changing the above, to this:
<a class="nav-img"  href="#" onClick="MM_openBrWindow('http://www.sailmakanikai.com/gallery/?dir=main','','width=750,height=850,scrollbars=yes')"><img src="images/gallery.jpg" alt="Gallery" class="nav-img" /></a>
adding 'scrollbars=yes' to it.

you may want to add a title to it aswell on second thoughts:
<a class="nav-img"  href="#" onClick="MM_openBrWindow('http://www.sailmakanikai.com/gallery/?dir=main','Photo Gallery','width=750,height=850,scrollbars=yes')"><img src="images/gallery.jpg" alt="Gallery" class="nav-img" /></a>

Edited by Stu, 15 January 2007 - 06:44 AM.


#3 signature16

    Young Padawan

  • Members
  • Pip
  • 180 posts
  • Gender:Male
  • Location:San Diego

Posted 15 January 2007 - 06:30 AM

worked like a charm.

thank you much!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users