Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a small form inside and update panel. On the form I have some jquery that will make display some additional inputs when the a selected index is chosen. I then submit the input. After the submit my Jquery does not work? I can move the visibility of the server, but i would prefer to do this with JS.

So my question is how do I get my JS running again after a submit to a refreshed form within an update panel?

What I have tried:

If Not Page.IsPostBack Then

If Not Page.IsPostBack Then

Initpage()

LoadData()

else
'' made the ddl get its datsource again


End If


i have changed the jquery
from hide() to css("display","none")
Posted
Updated 22-Jun-16 7:14am

1 solution

Use ScriptManager and run your jquery code in pageLoad rather than $(document).ready

How to run javascript after updatepanel execution completed | The ASP.NET Forums[^]

If you can't get it working from the above then you'll need to update your question to include the relevant code and markup.
 
Share this answer
 

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



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