aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Does Onload supported in Mozilla Firefox 3.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Does Onload supported in Mozilla Firefox 3.6" Watch "Does Onload supported in Mozilla Firefox 3.6" New topic
Author

Does Onload supported in Mozilla Firefox 3.6

Krish Khan
Ranch Hand

Joined: Dec 14, 2009
Posts: 46
Hello everyone!!

I need to know i can use onload function in jsp to call java script as soon as page loads for Mozilla Fire Fox browser? If so Please assist me .....
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Did you try? What happened?

Eric
Krish Khan
Ranch Hand

Joined: Dec 14, 2009
Posts: 46
Hi Eric,

Nice to hear from you !

Yes i tried it didnt work.I am using Netbeans IDE. Its working with Chrome browser and also onunload function is working.. below is my code

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Works fine for me:

http://jsbin.com/ulovi3

Eric
Krish Khan
Ranch Hand

Joined: Dec 14, 2009
Posts: 46
Eric!!

Do i need to place my script inside head tag???

I have placed them outside head tag
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

You put it between the head and body? If your markup is invalid, what might happen is anyone's guess.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Krish Khan
Ranch Hand

Joined: Dec 14, 2009
Posts: 46
Even i tried keeping script in head tag ...

Still its not working..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

Strip the page down to the minimum that still exhibits the problem and post it.
Krish Khan
Ranch Hand

Joined: Dec 14, 2009
Posts: 46
Here is my JSP code..





And the code continues.... Hope i get some solution please..
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Look at the JavaScript console, do you see errors?

Ctrl-Shift-J

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

So much for "minimum"...
Krish Khan
Ranch Hand

Joined: Dec 14, 2009
Posts: 46
Hi Eric,

There are no errors. Do i need to inport any libraries for that.?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18675
    
    8

Krish Khan wrote:Here is my JSP code..

First of all, post the HTML you generate. Not the thing which is generating it. And second, get rid of the 90% of that code which doesn't have anything to do with your question. A reasonable example would be no more than 10 lines of code.
 
Consider Paul's rocket mass heater.
 
subject: Does Onload supported in Mozilla Firefox 3.6