Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to show notifier when page is loaded #23

Closed
pengpenghust opened this issue Jun 1, 2012 · 5 comments
Closed

unable to show notifier when page is loaded #23

pengpenghust opened this issue Jun 1, 2012 · 5 comments

Comments

@pengpenghust
Copy link

Hi there!

humane is a very helpful js and I really enjoyed using it.

However, today I need to add a notifier when a page is loaded. In Chrome, it worked just fine with Jquery 1.7.1 and I put humane.log() inside $document.ready. However, when I use IE9 the notifier won't show up. So I put the humane.log() into window.onload to getting throught that. But when go back to IE8, the notifier disappears again.

If I create a DOM which clicked to trigger the notifier to show up in IE8, it just work fine, so I doubt it might be conflicts with onload or Jquery $document.ready functions,

Any suggestions to show the notifier when the page is loaded in IE8?

@wavded
Copy link
Owner

wavded commented Jun 1, 2012

ahh do you have a simple snippet that fails that I could see?

@pengpenghust
Copy link
Author

Sorry for my late response.
Here is a very simple page for this situation:


<body onload="humaneShow();">
    <p>Automatically Show</p>
       <script>
        function humaneShow(){              
        humane.log("Welcome Back");
         }
      </script>
 </body>

This is a very simple page which works just fine in IE9, however when I use IE8, the page has no response even without any error information. If I add a button clicked to trigger another notifier, this first notifier will appear first and then the triggered one will also show up.
In IE9 the problem is I could not use Jquery's document.ready to replace the onload function, you can try it yourself.
In Chrome and other Browsers I had tried they all worked fine.

Thanks again for your concern!

wavded added a commit that referenced this issue Jun 4, 2012
@wavded
Copy link
Owner

wavded commented Jun 4, 2012

thanks, this has been fixed in master, also you can do this as well too:

<body>
    <p>Automatically Show</p>
       <script>        
        humane.log("Welcome Back"); // will fire and show when dom is ready
      </script>
 </body>

@wavded wavded closed this as completed Jun 4, 2012
@pengpenghust
Copy link
Author

Thanks again for your concern, and it works fine now, I am really glad to have such a nice library to use!

@wavded
Copy link
Owner

wavded commented Jun 5, 2012

you are welcome! cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants