/    Sign up×
Community /Pin to ProfileBookmark

Why onload method is not calling ??

I wrote onLoad method in body tag of the html. it’s not calling the onload method. is any reason?? I testing like this onLoad=”alert(‘hi’)” it’s working but the following method is not working.

I wrote like this onLoad=”test();”

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@svidgenJan 15.2010 — Post your code (or URL), please.
Copy linkTweet thisAlerts:
@AdusumalliauthorJan 15.2010 — I attached my html code after jsp rendered. code is there in starting itself.

[upl-file uuid=11e2696f-477d-46f5-8813-56182a3ed761 size=39kB]JSP.txt[/upl-file]
Copy linkTweet thisAlerts:
@svidgenJan 15.2010 — It's probably this line here:
[code=html] var type = ;[/code]

This is the type of thing you'd probably be able to hone in on using your browser's javascript error-log and trying to run the method code independently of the [B]onLoad()[/B] event. Are you familiar with finding the javascript error-log with your current browser?
Copy linkTweet thisAlerts:
@AdusumalliauthorJan 15.2010 — thanks for reply, yeah. i know the js debug. main thing is it's enter into that method.

I put alert as first statement in js method. but it's not getting the alert message.
Copy linkTweet thisAlerts:
@criterion9Jan 15.2010 — If there is an error in your javascript none of the javascript may run. See above:

var type = ;
[/quote]
Copy linkTweet thisAlerts:
@FangJan 15.2010 — and this (corrected) var popWin = window.open('ozPpolApptChangeStartTime.jsp?apt=RptAppt&apptId=293&rptId=818&date=01/14/2010','PpolApptLov','left=100,top=60,width=640,height=300,scrollbars=yes,resizable=yes');
Copy linkTweet thisAlerts:
@AdusumalliauthorJan 15.2010 — I am trying to call this method. is anything wrong in this method .

<i>
</i> function screenOnload()
{
alert('hello&gt;&gt;');
var type = '&lt;&amp;#37;=recur%&gt;';
alert('type&gt;&gt;'+type);
if ( type == 'rptAppt')
{ <br/>
alert('hi&gt;&gt;');
var popWin = window.open('ozPpolApptChangeStartTime.jsp?apt=RptAppt&amp;apptId='+&lt;%=id%&gt;'&amp;rptId='+&lt;%=repeateid%&gt;'&amp;date='+&lt;%=date%&gt;'','PpolApptLov','left=100,top=60,width=640,height=300,scrollbars=yes,resizable=yes');
popWin.opener = self;
popWin.focus();
}
}
Copy linkTweet thisAlerts:
@AdusumalliauthorJan 15.2010 — and this (corrected) var popWin = window.open('ozPpolApptChangeStartTime.jsp?apt=RptAppt&amp;amp;apptId=293&amp;amp;rptId=818&amp;amp;date=01/14/2010','PpolApptLov','left=100,top=60,width=640,height=300,scrollbars=yes,resizable=yes');
[/QUOTE]


Yes. this is the mistake i did. thanks alot.

thanks all. now it's working.
×

Success!

Help @Adusumalli spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...