HighDots Forums  

Conflicting onLoads.....HELP!

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Conflicting onLoads.....HELP! in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
director boy
 
Posts: n/a

Default Conflicting onLoads.....HELP! - 11-29-2004 , 12:10 PM






I'm trying to use this javascript to center and resize my main page: <script
type='text/javascript'> <!-- window.onload = function() { var
width,height,new_x,new_y; width = 798; height = 598; new_x =
((screen.availWidth / 2)- (width / 2)); new_y = ((screen.availHeight / 2) -
(height / 2)) window.resizeTo(width,height); window.moveTo(new_x,new_y); } -->
</script> It works fine on most pages, but because I have other onLoad
functions in my BODY tag, the javascript won't work: <BODY BGCOLOR=#000000
LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0
onLoad='MM_preloadImages('images/mxman_38b.gif','images/mxman_40b.gif','images/m
xman_12b.gif','images/mxman_14b.gif','images/mxman_16b.gif','images/mxman_27b.gi
f','images/mxman_30b.gif','images/mxman_32b.gif','images/mxman_34b.gif','images/
mxman_36b.gif');MM_showHideLayers('Home','','show' ,'Shelter','','hide','AoNaA','
','hide','Wire','','hide','Rework','','hide','Prom o','','hide','Metal','','hide'
,'Contract','','hide','Location','','hide','About' ,'','hide')' text='#FFFFFF'
link='#FFD659' vlink='#FFD659' alink='#CCCCCC'> How can I incorporate the
javascript functions into my BODY tag? Thanks.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.