Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8067571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:21:35+00:00 2026-06-05T12:21:35+00:00

<body onload=javascript function> is working well on desktop browser, but is not working on

  • 0

<body onload="javascript function"> is working well on desktop browser, but is not working on iPhone. My iPhone seems like it can read external CSS files and JS files, since when I click button from page, it fires JS functions. But oddly, only onload event is not working. I am so clueless now. Can anybody tell me why can’t I fire onload event on iPhone? Below is my code.

<!DOCTYPE HTML>
<html>
    <head>
        <title>HTML5 연습</title>
        <meta name="viewport" content="width=480, user-scalable=1"/>
        <link rel="stylesheet" href="../styles/test1.css" />
        <script type="text/javascript" src="../scripts/fbsdk.js"></script>
        <script type="text/javascript" src="../scripts/initcss.js"></script>
        <script>
            //document.addEventListener('DOMContentLoaded', checkLoginCase, false);
        </script>
    </head>
    <body onload="checkLoginCase()">
        <div id="wrap">
            <header id="top">
                <img src="../fbimg/logo.png" alt="상단이미지" title="상단이미지">
            </header>
        </div>
        <button onclick="checkLoginCase()"> check fxn1</button>
        <button onclick="checkAlert()"> check fxn2</button>
    </body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T12:21:37+00:00Added an answer on June 5, 2026 at 12:21 pm

    It should be working, but try to avoid inline JavaScripts.

    Try this:

    window.onload = (function(){
        checkLoginCase();
    });
    
    //-or-
    
    window.onload = checkLoginCase;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pretty simple function here but not working. Just started with Javascript so be gentle
how do I automatically execute javascript? I know of <body onLoad=> , but I
I'm working without the JavaScript framework, but I want to call a function just
I have a site that I put: <body onload="ajaxLoad()" > I have a Javascript
The recursive setTimeout function getRandomProducts is called onload in the html body tag, and
I'm trying to pass a value via PHP to a Javascript function but it
here is my code <html> <head> <script type=text/javascript> window.onload = function(){ sel = document.getElementsByTagName('select');
I have this code and in Firefox is working well, but in Chrome I'am
I would like to use the HTML5 File API with unobtrusive JavaScript. But I
The following code is working well to scroll down the complete page. But I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.