Click here to Skip to main content
15,879,348 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello All,

I have added UpdatePanel in my aspx page, and in that page,
I have added javascript code and other fields also,
But when I click on button to save data that time javascript within updatepanel not called,


Help me to resolve this problem..
Posted
Updated 18-Aug-12 3:47am
v2
Comments
bbirajdar 18-Aug-12 12:36pm    
Thats a big issue. we cannot help you unless you show what code you have written
Ramu Sangabathula Original 18-Aug-12 20:54pm    
A bit of code is useful here, anyway here is my suggestion, UpdatePanels will do a complete request but only repaints the Panel area,if you want the script to be fired every time the panel is updated, then you should think of placing the script inside the update panel.

1 solution

Hi Madhuri,

Call your java script from code behind.
you will found the solution if you call the java script from code behind when you required.

Thanks,
Viprat Shah
 
Share this answer
 
Comments
madhuri@mumbai 20-Aug-12 4:56am    
thanks,but i cannot call javascript from cidebehind,because i have called in that html controls & required that controls
VIPR@T 20-Aug-12 5:09am    
can you post your javascript that you need to call ?
madhuri@mumbai 20-Aug-12 6:40am    
var HiddCurrTab = document.getElementById('<%=HiddCurrTab.ClientID%>');
var countries = new ddtabcontent("countrytabs")
var cr = parseInt(countries.getcurrentTabl());

if ('<%=financemenu%>' == 'Load')
cr = 0;
else if ('<%=financemenu%>' == 'button')
cr = cr + 1;

if (cr < 4) {

HiddCurrTab.value = cr;
countries.currenttab(cr)
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
}
else {
window.location = "t1.aspx";
}
madhuri@mumbai 20-Aug-12 6:42am    
here i have used 4 div and i want to navigate 1 div to next div when after clicking on btn.
VIPR@T 20-Aug-12 6:58am    
Hi,

you can write down below code to call this java script function from your button click.

Page.ClientScript.RegisterStartupScript(this.GetType(),
"alert", "AAA();", true);

Here AAA() is your java script function name.

Thanks,
Viprat

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