Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

<body Onload> X2

Featured Replies

Hi All

 

Just wondered how to get two <body onLoad> to work on one page and validate?

 

 

<body onLoad="goforit()">

 

<body onLoad="MM_preloadImages('images/menu/homehomeover.jpg','images/menu/

homeservicesover.jpg','images/menu/homeportfolioover.jpg','images/menu/

homepricesover.jpg','images/menu/homenewsover.jpg','images/menu/

homeimageryover.jpg','images/menu/homecontactover.jpg')">

 

 

Ive tried...

 

<body onLoad= "goforit()", "MM_preloadImages('images/menu/homehomeover.jpg','images/menu/

homeservicesover.jpg','images/menu/homeportfolioover.jpg','images/menu/

homepricesover.jpg','images/menu/homenewsover.jpg','images/menu/

homeimageryover.jpg','images/menu/homecontactover.jpg')">

 

but no luck!?

 

Thanks Ben

instead of putting the executable JS code in the onload statement, make the onload point to a js function.

 

<script type="text/javascript">
function onload() {
MM_preloadImages('images/menu/homehomeover.jpg','images/menu/
homeservicesover.jpg','images/menu/homeportfolioover.jpg','images/menu/
homepricesover.jpg','images/menu/homenewsover.jpg','images/menu/
homeimageryover.jpg','images/menu/homecontactover.jpg');
goforit();
}
</script>

<body onLoad= "goforit(); MM_preloadImages('images/menu/homehomeover.jpg','images/menu/

homeservicesover.jpg','images/menu/homeportfolioover.jpg','images/menu/

homepricesover.jpg','images/menu/homenewsover.jpg','images/menu/

homeimageryover.jpg','images/menu/homecontactover.jpg');">

  • Author

Thanks guys thats just what I needed! Big Thanks!

 

PP thats a good tip, when I change all pages over I will use the function method!

 

Cheers davara didnt know you could simply use a ; to break them!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.