This is the web log of Tim Bennett, web designer. He also runs Texelate, offering the best web design Leeds, Yorkshire has to offer

Dynamic popups in JavaScript

Thursday, October 12th, 2006 at 3:42 pm

Here’s how you can create dynamic popups with JavaScript:

<script language=”javascript”> 

function popupusersetails( udetails ) {

 

var dynamwin = window.open(“”,”userdetails”,”width=300,height=300,scrollbars=1,resizable=1″);

 

var html = “<html><head></head><body><p>”+ udetails +”</p>.</body></html>”;

 

dynamwin.document.open();

dynamwin.document.write( html );

dynamwin.document.close();

 

 

</script>

<a onclick=”popupusersetails( ‘Tim’ );” href=”javascript:void(0);”>Click here to see my details</a>

Leave a Reply

You must be logged in to post a comment. If you don't have an account register one now.

Do you need a website or web-related service?
I run an award-winning web design studio.