• 0

how to make a javascript popup scrollable


Question

Fblade

hey guys i have jus found a tutorial for making a javascript popup, it works fine and all but there is one problem when i try and put more content in then the hieght allows it cuts off and dosnet allow me to scroll down on the page.

<script TYPE="text/javascript">
var newwindow;
function poptastic(url)
{
	newwindow=window.open(url,'name','height=450,width=600');
	if (window.focus) {newwindow.focus()}
}
</SCRIPT>

this is the code and i just need to make it scrollable any ideas people?

thanks for time fblade

Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
Trix.Neo

<script LANGUAGE="JavaScript" type="text/javascript">
	function openPopup(URL) {

		var window_width=580;
		var window_height=400;
		var from_top=20;
		var from_left=20;
		var has_toolbar='no';
		var has_location='no';
		var has_directories='no';
		var has_status='no';
		var has_menubar='no';
		var has_scrollbars='yes';
		var is_resizeable='no';

		var attributes = 'width='+window_width+',height='+window_height+',top='+from_top+',screenY='+from_top+',left='+from_left+',screenX='+from_left+',yoolbar='+has_toolbar+',location='+has_location+',directories='+has_directories+',status='+has_status+',menubar='+has_menubar+',scrollbars='+has_scrollbars+',resizeable='+is_resizeable;

		window.open(URL,'',attributes);
	}
</script>

then use this to open it...

<a href="#" onclick="openPopup([your url here])">Click Here</a>

Link to post
Share on other sites
  • 0
Fblade

cant get it to work mate any other ideas?

Link to post
Share on other sites
  • 0
+Dick Montage
<a href="javascript:void(window.open('mypage.html','MyWindow','width=400,height=400,scrollbars=1'));">Link</a>

Link to post
Share on other sites
  • 0
Trix.Neo

doh :pinch:

put 'javascript:' infront of the openPopup in the link lol

or use Niks (who never does anywork at work :no: ) j/k

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.