6/30/2025 1:29:37 PM
|
|
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.
|
|
|
|
jQuery - Ajax
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? |
|
|
|
Re: jQuery - Ajax
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. |
|
|
|
Re: jQuery - Ajax
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). |
|
|
|
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!
|
|
|
|
|
|
|
|