Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
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: Anyone know where I can find example of this....
RJ Eaton
Posts: 234
 
Anyone know where I can find example of this....Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Nov 15 7:12 AM

I have a custom entity 1:m to opportunity .. The grid on the opportunity tab shows the data from the custom entity and has + to add new data..


When the insert page loads, I have some code that gathers all the closed products for the opportunity and lists them in a combobox.. I have some code on the OnChange event of the combobox that changes a label providing the user with directions based upon the selection in the combobox..


The issue is that the OnChange event on server side posts a row to the database, and then after adding more data to the form and saving posts a second row ...


So I am thinking if I can move the onChange event to client side with some javascript then I can change the label on the form w/o posting back..


Does anyone have an example of how I can do this..?


I have so far tried adding to the load actions the following:


this.cmbProduct.Attributes.Add("onchange",


"Javascript: var switch(this.cmbProduct.SelectedValue){case (Air Export): case(Air Import): L.ForeColor = System.Drawing.Color.Red;L.Font.Size = System.Web.UI.WebControls.FontUnit.Point(10);");


However, this doesn't seem to fire.


I thought about adding an external .js file but not quite sure how to register it correctly:


ScriptManager.RegisterStartupScript(Page, this.GetType(), "CallJS", "JSFunctionName();", true);


    the example above I don't know how to change to call the external file..


 


Does anyone have an example of something like this so I can figure this out..?




 


 


 

[Reply][Quote]
RJ Eaton
Posts: 234
 
Re: Anyone know where I can find example of this....Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Nov 15 7:34 AM

Well still trying to resolve this have tried the following and still no luck in getting this to work correctly.. Any ideas or direction are welcome..


OnLoad action of Quickform I have added this:


ScriptManager.RegisterClientScriptInclude(this.cmbProduct, "OnExit", ChangeLabel(), HttpContext.Current.Request.ApplicationPath + "/SupportFiles/jscipt/UTI/UTI_POE.js");


my javascript is a function called ChangeLabel(),


I am getting an error when the smartpart loads telling me that the ChangeLabel doesn't exist. What is the syntax to correctly register my Javascrip function to be called from the file ?

[Reply][Quote]
Scott Jeynes
Posts: 3
 
Re: Anyone know where I can find example of this....Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Nov 15 11:15 AM

Hi RJ,


I don't think you would include a function name in this method call...I believe it should look something like this:


ScriptManager.RegisterClientScriptInclude(this.Page, this.GetType(), "OnExit", HttpContext.Current.Request.ApplicationPath + "/SupportFiles/jscipt/UTI/UTI_POE.js");


This part just creates the link to the JS file. You'll still need the event handler on the control, just like you had in your first post. You might try removing the "Javascript:" at the beginning of the event handler if it doesn't seem to be firing.


I hope this points in the right direction. This stuff is fussy!

[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 © 2024 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): 11/22/2024 2:51:05 PM