Can browser call Jscript function automaticaly when page loads 
Author Message
 Can browser call Jscript function automaticaly when page loads

I'm searchin for the way to initialize data in html forms. One possible
soluttion would be to
write jscript function that is called automatically just before user actualy
see the page in order to initialize form field values. But I can't find the
way to do this....
Thank you
Maks



Wed, 23 Apr 2003 03:00:00 GMT  
 Can browser call Jscript function automaticaly when page loads
You could always use the value, selected and checked properties of the form
controls to set initial values. If you want to use a script, here's the
skeleton of what you need:

  <script>
  function loadEmUp() {
    // initialize fields
  }
  </script>

  <body onload="loadEmUp()">
  <!-- Your form here -->
  </body>

The problem with this is that a reset button on the form will clear all the
values instead of re-initializing them. You could call your initialization
function with the button's onClick handler in this case.

=-=-=
Steve
-=-=-


Quote:
> I'm searchin for the way to initialize data in html forms. One possible
> soluttion would be to
> write jscript function that is called automatically just before user
actualy
> see the page in order to initialize form field values. But I can't find
the
> way to do this....
> Thank you
> Maks



Wed, 23 Apr 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Page Loading issues if jscript functions called

2. Loading a page with javascript functions (Always load a cached page)

3. call a jscript-function in the vbscript-part of an asp-page

4. How do I call JScript functions from within ASP written in JScript

5. how do I display a 'page loading...'- image while actual page is loading

6. When page loads, load a page in another frame

7. How to fire a function after page is loaded

8. calling vbscript function from jscript

9. Loading page content into a jscript variable

10. Calling JScript function from VBScript code

11. Calling a function defined in a linked JScript file

12. how an applet can fire a jscript event (or call a function)

 

 
Powered by phpBB® Forum Software