Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, August 17, 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: Adding Javascript onChange event to SLX Email, SLX Name and SLX Picklist Controls
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Adding Javascript onChange event to SLX Email, SLX Name and SLX Picklist ControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Feb 09 7:27 AM
Hi,

Does anybody know how to programmatically (in server side code) add Javascript onchange events to these controls? Usually (if its a textbox for example) you can just do:

myTextBox.Attributes.Add("onchange","myJSFunction()");

However, this doesnt work for the SLX custom controls. I have tried something like:

(txtAccEmail.Controls[0] as TextBox).Attributes.Add("onchange", "ValidateEmailField(this)");

To get the first Control in the Email Control (which would be the textbox part), cast it as a Textbox so I can get the Attributes.Add method, but there is no change event on the control when the page gets rendered.

I have tried also doing a ScriptManager.RegisterStartupScript on the page postback to add javascript to the page to find the controls and attach the events. This works, but seems to break other Ajax stuff in the client, as my page no longer renders correctly (all the controls are pushed over to the left). When I click on a menu item, such as New..., the screen will then sort itself out, so it must fire those events that I am somehow messing up.

Any ideas??

I know I can do validation on Postback events, but I want to do as much client side as possible. This is the Add/Contact account screen so for the functionality I require we are talking at least 12 postbacks to the server, before the user can even click Save. This just slows the page down so much when compared to how I had it in 6.2.

Thanks,

Nick
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Adding Javascript onChange event to SLX Email, SLX Name and SLX Picklist ControlsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Feb 09 8:06 AM
This is wokring actually using the RegisterStartupScript approach - Compatibitlity Mode being switched off in IE8 was screwing things up. Behaving much better now it switched on.

Serves me right for using a beta browser I guess
[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): 8/17/2025 3:15:06 PM