aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes onBeforeLoad event not triggered 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 "onBeforeLoad event not triggered" Watch "onBeforeLoad event not triggered" New topic
Author

onBeforeLoad event not triggered

Viidhya Kishore
Ranch Hand

Joined: Jan 03, 2007
Posts: 99
Hello,
My requirement is :

I need to insert a record into a table before page load.
when the page loads I fetch record from the table and show the record.

I am trying to do something very basic like I am doing a db connection at the JSP itself(as this is supposed to be a working prototype)

so, I successfully inserted into the table.

Now my issue is ;
My <body> is having the html for the table that I am to display with the select.

Now I tried to write a 'onBeforeLoad' event in the <body>
which will trigger the select and sudmit the form to get me the data.

But the onBeforeLoad event just is not getting triggered.

Also,if I submit the form on the 'onBeforeLoad' event will my table still load up?

Please help.

Vidhya
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

onBeforeLoad is not a standard event and is not supported by most browsers. You shouldn't use it.

Beside:
Now I tried to write a 'onBeforeLoad' event in the <body>
which will trigger the select and sudmit the form to get me the data.
How can you expect to trigger anything that hasn't been loaded yet?

What are you really trying to accomplish? Why aren't you just dealing with this on the server before the JSP gets loaded?
[ July 30, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: onBeforeLoad event not triggered
 
Similar Threads
showing variable field from database. table.
How to keep the selected value ?
A href command not working
displaying data from two table in single jsp page
Having trouble with javascript ...