Changeset 1611 for trunk/template-common
- Timestamp:
- Nov 17, 2006, 5:20:07 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/template-common/scripts.js
r1505 r1611 1 1 function SelectAll( formulaire ) 2 2 { 3 len = formulaire.elements.length;3 var len = formulaire.elements.length; 4 4 var i=0; 5 5 for( i = 0; i < len; i++) … … 15 15 function DeselectAll( formulaire ) 16 16 { 17 len = formulaire.elements.length;17 var len = formulaire.elements.length; 18 18 var i=0; 19 19 for( i = 0; i < len; i++) … … 29 29 function Inverser( formulaire ) 30 30 { 31 len = formulaire.elements.length;31 var len = formulaire.elements.length; 32 32 var i=0; 33 33 for( i=0; i<len; i++) … … 41 41 } 42 42 43 function verifieAndOpen()43 function phpWGOpenWindow(theURL,winName,features) 44 44 { 45 var ok=1; 46 if (!img.complete) 45 img = new Image(); 46 img.src = theURL; 47 if (img.complete) 47 48 { 48 // sometime the image loading is not complete 49 // especially with KHTML and Opera 50 setTimeout("verifieAndOpen()",200) 49 var width=img.width +40; 50 var height=img.height +40; 51 51 } 52 52 else 53 53 { 54 /* give more space for scrollbars (10 for FF, 40 for IE) */ 55 width=img.width +40; 56 height=img.height +40; 57 window.open(owURL,owName,owFeatures + ',width=' + width + ',height=' + height); 54 var width=640; 55 var height=480; 56 img.onload = resizeWindowToFit; 58 57 } 58 newWin = window.open(theURL,winName,features+',left=2,top=1,width=' + width + ',height=' + height); 59 59 } 60 60 61 function phpWGOpenWindow(theURL,winName,features)61 function resizeWindowToFit() 62 62 { 63 img = new Image() 64 img.src = theURL; 65 owURL=theURL; 66 owName=winName; 67 owFeatures=features; 68 verifieAndOpen(); 63 newWin.resizeTo( img.width+50, img.height+100); 69 64 } 70 65
Note: See TracChangeset
for help on using the changeset viewer.