TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jatan vyas
1.6k
95
2.3k
Document.ready method is called after pageload method.
Jun 6 2018 1:18 AM
Hello Guys
I am facing one strange issue. I am upgrading my project to latest jquery version 3.3.2
I have create one sample page which contains only update panel and a javascript link.
Now problem is instead of calling documet.ready mehtod, when i refresh the page (run the application) , pageLoad method called first and than documet.ready method gets called.
I have tried using older version of jqury 2.2.4 and up to that it was working fine with update panel, but when i upgraded to latest version 3.x.x it creates an issue. Below is sample code
default.aspx page
<
head
runat
=
"server"
>
<
script
type
=
"text/javascript"
src
=
"https://code.jquery.com/jquery-3.0.0.js"
>
</
script
>
<
%--
<
script
type
=
"text/javascript"
src
=
"https://code.jquery.com/jquery-2.2.4.js"
>
</
script
>
--%
>
<
script
src
=
"Scripts/JavaScript.js"
>
</
script
>
<
title
>
</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
Page body
</
div
>
<
asp:ScriptManager
runat
=
"server"
ID
=
"sm"
ScriptMode
=
"Debug"
EnableCdn
=
"false"
EnablePartialRendering
=
"true"
LoadScriptsBeforeUI
=
"true"
>
<
CompositeScript
>
<
Scripts
>
<
asp:ScriptReference
Name
=
"MicrosoftAjax.js"
/>
<
asp:ScriptReference
Name
=
"MicrosoftAjaxWebForms.js"
/>
</
Scripts
>
</
CompositeScript
>
</
asp:ScriptManager
>
<
asp:UpdatePanel
runat
=
"server"
ID
=
"upSnapshot"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
Update panel body
</
ContentTemplate
>
</
asp:UpdatePanel
>
</
form
>
</
body
>
Javascript
$j = jQuery.noConflict();
$j(document).ready(
function
() {
alert(
'document.ready'
);
});
function
pageLoad(sender, args) {
alert(
'Pageload'
);
}
Reply
Answers (
1
)
Issue with token based authentication in shared hosting
Bootstrap table pagination