ASP.NET AJAX and Javascript

S

Simic

I have page on which I am using CollapsiblePanelExtender and JavaScripts.
When Javascripot is directly on the page everything is working good. I am
trying to put those scripts in to the file and to include it with
RegisterStartupScript using either ScriptManager.RegisterStartupScript or
ClientScript.RegisterStartupScript in Page_Load or OnPreRender event.
The Javascript in those cases is not seen objects which are on UpdatePanel
which is showing trough CollapsiblePanelExtender .

Does anybody have some idea?
Thanks.
 
S

Simic

One more thing. On other page where I am using also
CollapsiblePanelExtender when I open page source view I regularly see
objects(grid) html tags. With the first problematic page I don't see
objects. Probably they are saved in view state or similar and that is the
problem.
 
S

Simic

The solution was that I use created name
document.getElementById("ctl00_ContentPlaceHolder1_grdDetails");
 
S

Simic

Well I tried with document.getElementById('<%=grdDetails.ClientID%>');
and that was in first version when JavaScript was inside asp.net file.
With extern js file that won't work.
 
S

Simic

I agree with you and for most of the code I found some function $n(element)
which is returnig element based on name but in this case I didn't have other
solution. Until is working it is ok, maybe I would have to fix it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top