Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, July 6, 2025 
 
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!
 Web Forums - SalesLogix Web Platform & Application Architect
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Fire JS function from SLX Currency control?
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Fire JS function from SLX Currency control?Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Nicolas Galler
Posts: 93
 
Re: Fire JS function from SLX Currency control?Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/6/2025 9:17:32 AM