7/6/2025 8:29:20 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
Fire JS function from SLX Currency control?
Posted: 19 May 09 7:44 PM
|
I have a small calculator type app that I coded with slx text boxes (which render to asp.net text controls). I set up the form in AA to get the bindings and such and then added javascript to run the calculations when onchange of the control and imported to support files. I am adding the onchange event to the controls on the onload of the form like so: Labor.Attributes["onchange"] = "TotalCalc()"; Material.Attributes["onchange"] = "TotalCalc()";
Works great, but I decided I need to see the values formatted as currency so I changed the control types to SLX Currency controls - now of course the Javascript doesn't fire. Is there a way to either 1. format asp.net textboxes as currency or 2. Add an Onchange event I can fire JS from on the SLX Currency controls? Thanks |
|
|
|
Re: Fire JS function from SLX Currency control?
Posted: 20 May 09 12:44 PM
|
I would try something like this (if you just want it invoked for any currency control on the form): ScriptManager.RegisterClientScriptBlock(this, GetType(), "Recalc", "$('.currency input').change(TotalCalc)", true);
or if you need it only for certain boxes: ScriptManager.RegisterClientScriptBlock(this, GetType(), "Recalc_Labor", "$('#" + Labor.ClientID + " input').change(TotalCalc)", true); ScriptManager.RegisterClientScriptBlock(this, GetType(), "Recalc_Material", "$('#" + Material.ClientID + " input').change(TotalCalc)", true);
I have not tried it first hand so would be curious to know if it works 
Thanks |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|