Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, June 30, 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: jQuery - Ajax
Andrew James
Posts: 51
 
jQuery - AjaxYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 May 10 8:53 AM
Insert Account/Contact

I currently need to fire the Look for matching records button on leaving the work phone text box (doesn't matter if this contains data or not). I have tried an onBlur event but nothing seems to happen. I am now looking into using jQuery - Ajax to do this but have now come up with a problem with the url.

$.ajax({
type: 'POST',
url:'InsertContactAccount.aspx/cmdMatchingRecords_ClickAction',
success: function(msg) { alert('success');
}});

the InsertContactAccount.aspx does not contain the method cmdMatchingRecords_ClickAction, my InsertContact.ascx file does

does anyone know how I can do this?
[Reply][Quote]
Jose Urena
Posts: 92
 
Re: jQuery - AjaxYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 10 1:33 PM
Use fiddler to locate the exact control ID of that button and add the property to the work phone asp textbox onchange="javascript:dolook();".

** my expample is for onchange, you probably need OnBlur="javascript:dolook();" .

Make a javascript and place it on base.master that does something like:

function dolook()
{
document.getElementById('ctl00_DialogWorkspace_AddEditTargetResponse_cmdOK').click();
}

You noticed the long name the control have? I implemented this with the targetresponse cmdOK button on certain cirscumtances. This is really simple already.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: jQuery - AjaxYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 10 2:35 PM
First of all, keep in mind that there on most Controls that SLX Provides, the Events may already be taken, so you need to find a way to add multiple handlers (I have done this, but won't expand on this post).

Second, the Composite Control may have multiple items within it, so you may need to make sure you pick the correct Control, otherwise you won't be able to attach the Event.

Instead of Fiddler, use IE Developer tool and locate the Control that you are interested, then find out what SubControl you would like to attach the Event to.

Server side, you can do something similar to:

TextBox tb = myPhoneControl.FindControl("_TXT") as TextBox;
tb.Attributes.Add("onblur", "doLookup()");

You can get a reference to the button for the search on server side code and then register your Javascript:

scr = "function doLookup() {";
scr += " var btnCtr = document.getElementById('" + button.ClientID + "');";
scr += " btnCtr.click();";
scr += " }";
ScriptManager.RegisterScriptBlock(typeof(Page), "keyForScript", scr, true);


Now, with IE Developer tool you can see which events are used, and on which Elements, and find the best event to hook, if you need to add multiple Events, then you will need to find ways to attach multiple Event Handlers (again, I've done it when needed, but most of the times I don't need to do so).
[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): 6/30/2025 10:19:23 AM