SageFix. LetsFix!  
Current Location : Home > Web Development > JavaScript > Popup Window Function > Post Share/Save/Bookmark    

Main Menu
SageFix - Let's Fix

Board Categories
    Web Site Designing
- Graphics
    Web Development
- .NET
- Classic ASP
- JavaScript
- PHP
    WebSite Management
- Promotion Techniques
- Search Engine Optimization
    Databases
- MySQL

Tutorials

Database Connection Strings

  Contact Us


Popup Window Function      Jul 27, 2002, 17:47 990386
  
You wanted to control all this from an external file right? Just make a file named 'funcs.js' or something like that, and in it put all your functions that are common among all pages.
Code:
function popWin1()	{	window.open('file.htm','name','width=300, height=300, scrollbars);	}
This will open 'file.htm' into a 300x300 window named 'name' with scrollbars.

Then link funcs.js to all the pages that will use the popWin1() function with this code inserted into the <HEAD>
Code:
<script language="javascript" src="js/funcs.js"></script>
This assumes that you have placed 'funcs.js' file into the subfolder 'js'.

Then, just call the popWin1() function from whatever event you'd like, or place it in a link, like this:
Code:
<a href="javascript:popWin1()">Popup Window 1</a>
Alternatively you could pass the URL as a parameter or something like that.

 









Subscribe to our mailing list
email


Current Location : Home > Web Development > JavaScript > Popup Window Function > Post Share/Save/Bookmark    

Development problem? SageFix is completely free -- paid for by advertisers and donations. Click here to Contact Us If you have any query. Enjoy!
Request processed in 7.0E-5 seconds Home - Contact Us - Terms Of Service - Privacy Policy - Copyrights - Top
Advertisements do not imply our endorsement of that product or service.
Current server time now is 09-Sep-2010 09:42:07
Copyright © 2009 Sagefix Inc. All rights reserved.
Powered By SageFix