Traditionally, to call a JavaScript function once the page has loaded, you'd add an onload attribute to the body containing a bit of JavaScript (usually only calling a function):
<body onload="foo()">
When the page has loaded, I want to run some JavaScript code to dynamically populate portions of the page with data from the server. I can't use the onload attribute since I'm using JSP fragments, which have no body element I can add an attribute to.
Is there any other way to call a JavaScript function on load? I'd rather not use jQuery as I'm not very familiar with it.
Traditionally, to call a JavaScript function once the page has loaded, you'd add an onload attribute to the body containing a bit of JavaScript (usually only calling a function):
<body onload="foo()">
When the page has loaded, I want to run some JavaScript code to dynamically populate portions of the page with data from the server. I can't use the onload attribute since I'm using JSP fragments, which have no body element I can add an attribute to.
Is there any other way to call a JavaScript function on load? I'd rather not use jQuery as I'm not very familiar with it.
Traditionally, to call a JavaScript function once the page has loaded, you'd add an onload attribute to the body containing a bit of JavaScript (usually only calling a function)
<body onload="foo()">
When the page has loaded, I want to run some JavaScript code to dynamically populate portions of the page with data from the server. I can't use the onload attribute since I'm using JSP fragments, which have no body element I can add an attribute to.
Is there any other way to call a JavaScript function on load? I'd rather not use jQuery as I'm not very familiar with it.
How todo I call a JavaScript function on page load?
How can ITraditionally, to call a JavaScript function ononce the page load without makinghas loaded, you'd add an onload attribute to the body containing a bit of JavaScript (usually only calling a function):
<body onload='callFunctiononload="foo()'>">
i want to check when loadingWhen the page what is the purposehas loaded, I want to run some JavaScript code to dynamically populate portions of using thatthe page,
if for addition then ok , if for edition , there will be with data come from the server to be displayed in that page, so i want to check. I can't use the request each time page is loaded ,onload attribute since i don'tI'm using JSP fragments, which have body tag in my page cz i use jspf (JSP Fragment)no body element I can add an attribute to.
NOTE : i don't know jQuerry , is there's another
Is there any other way to call a JavaScript function on load? I'd rather not use jQuery as I'm not very familiar with it.
How to call a JavaScript function on page load
How can I call a JavaScript function on page load without making
<body onload='callFunction()'>
i want to check when loading the page what is the purpose of using that page, if for addition then ok , if for edition , there will be data come from server to be displayed in that page, so i want to check the request each time page is loaded , since i don't have body tag in my page cz i use jspf (JSP Fragment) . NOTE : i don't know jQuerry , is there's another way?
How do I call a JavaScript function on page load?
Traditionally, to call a JavaScript function once the page has loaded, you'd add an onload attribute to the body containing a bit of JavaScript (usually only calling a function):
<body onload="foo()">
When the page has loaded, I want to run some JavaScript code to dynamically populate portions of the page with data from the server. I can't use the onload attribute since I'm using JSP fragments, which have no body element I can add an attribute to.
Is there any other way to call a JavaScript function on load? I'd rather not use jQuery as I'm not very familiar with it.
How docan I call a JavaScript function on page load without making
<body onload='callFunction()'>
Ii want another way to call methodcheck when loading the page loadwhat is the purpose of using that page, can someone help if for addition then ok , if for edition , there will be data come from server to be displayed in that page, so i want to check the request each time page is loaded , since i don't have body tag in my page cz i use jspf (JSP Fragment) . NOTE : i don't know jQuerry , is there's another way?
How do I call a JavaScript function on page load without making
<body onload='callFunction()'>
I want another way to call method when page load, can someone help?
How can I call a JavaScript function on page load without making
<body onload='callFunction()'>
i want to check when loading the page what is the purpose of using that page, if for addition then ok , if for edition , there will be data come from server to be displayed in that page, so i want to check the request each time page is loaded , since i don't have body tag in my page cz i use jspf (JSP Fragment) . NOTE : i don't know jQuerry , is there's another way?
- 115.8k
- 28
- 202
- 255