-
problem invoking a method in javascript from codebehind
We have many transactions for eg:CashDeposit that are defined in xml eg:CashDeposit.xml.
That XML is converted in to controls and placed in an usercontrol.
While loading each Transaction we are loading an js file dynamically eg:CashDeposit.js for CashDeposit.
This is the code for loading the Js file dynamically:
string txnJS = "../ClientScripts/" + SessionManager.CurrentTransName + ".js";
ScriptReference dynamicJS = new ScriptReference(txnJS);
scrMain.Scripts.Add(dynamicJS);//scrMain is asp:ScriptManagerProxy
then a method called ChkLoadBody() in the currentTransaction.js for eg:CashDeposit.js is invoked from the codebehind as:
this.Page.ClientScript.RegisterStartupScript(Page.GetType(), "OnLoad",
"ChkLoadBody()", true);
In this method we move some fields dynamically.
The issue is while performing the transaction at first time we are able to load the transaction.js and we can able to invoke the ChkLoadBody() from js.
But after performing the same transaction,when we try to execute the same at second time we cant able to invoke the ChkLoadBody() from js.
how to resolve this issue?
-
 Originally Posted by coimbatorian
But after performing the same transaction,when we try to execute the same at second time we cant able to invoke the ChkLoadBody() from js.
What happens when you try? Do you get errors? If so what?
Or, are there no errors, but nothing happens?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
There are no errors
But it is not invoking the method in javascript
even when the RegisterStartupscript statement is executed?
Similar Threads
-
By blackbr in forum ASP.NET
Replies: 0
Last Post: 05-26-2007, 02:14 PM
-
Replies: 0
Last Post: 12-18-2006, 08:48 PM
-
By Laura Borealis in forum XML
Replies: 0
Last Post: 03-30-2002, 06:21 PM
-
By Dan Kurszewski in forum Web
Replies: 0
Last Post: 12-14-2000, 05:50 PM
-
By Murray Foxcroft in forum Web
Replies: 5
Last Post: 11-02-2000, 02:42 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks