Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am using javascript function. it is working properly but after using ajax updatepanel on gridview for shows data then javascript function not working.

javascript function:
C#
$(function () {
   alert("ok");
        });


load only when page load but not ajax call. need to load this function every page request.


Please help.


Thanks
Shubham Gupta
Posted
Updated 23-Aug-15 21:17pm
v2

 
Share this answer
 
Comments
Member 11449483 27-Aug-15 2:37am    
Hello,

function pageLoad()

runs every time when select any data in imageslider. and my imageslider goes his starting position. it is not correct please give me any alternate option.

Thanks
Shubham
F-ES Sitecore 27-Aug-15 3:50am    
You haven't given enough information for someone to give a solution. You've posted an alert and nothing else. My post was to show you how you can re-initialise your javascript events after an update panel fires, if you understand what is happening you might be able to use this to fix your problem. At the moment we don't know what your problem is.
Member 11449483 27-Aug-15 4:12am    
Hello

i am using an repeater as imageslider and bind data in it,
and when scroll image slider using javascript function then using pageload() it always returns on current position.
Try this one

XML
function pageLoad() {
           $(function () {
   alert("ok");
        });
       }



AND IN BODY

<body onload="pageLoad();">
 
Share this answer
 
Comments
Member 11449483 27-Aug-15 2:37am    
Hello,

function pageLoad()

runs every time when select any data in imageslider. and my imageslider goes his starting position. it is not correct please give me any alternate option.

Thanks
Shubham

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900