|
Subscribe
|
|
I added a TextField (txtName) to my page and want to access the input on the clientside or assign an Ajax Toolkit Extender to it. When I view the html of the page, the input id is actually txtName_Input. I think that's very confusing to .NET developers who are used to a control's clientid being the control's html id, especially since there's no method/property on TextField to get the input's clientID. Right now, I have to just hardcode txtName.ClientID & "_Input".
Edit: oops, excuse the grammatically incorrect title.
|
|
|
Hi jchau,
The "[ClientID]_Input" <input> field was used to work around a ViewState issue during the earlier release(s) of the Toolkit. We've since come up with a better technique and with the v0.6 release, the "[Client]_Input" has been removed.
Now the <input> field is created dynamically with JavaScript on the client when the page loads, or more specifically, when the DOM is ready. You should be able to now reference the <input> field directly with it's .ClientID.
Hope this helps.
--
Geoffrey McGill
Coolite Inc.
Development Team
Coolite Examples | Coolite API Docs | ExtJS API Docs
twitter [coolite | personal]
|
|
|
|
One step ahead of me, awesome =P. v0.6 is shaping up to be a massive release. Can't wait!
One more question. If the textbox is created dynamically, will it be available in time for Ajax Toolkit Extenders to reference it during the ASP.NET Ajax Init event of page?
|
|
|
> v0.6 is shaping up to be a massive release.
indeed it is.
> If
the textbox is created dynamically, will it be available in time for
Ajax Toolkit Extenders to reference it during the ASP.NET Ajax Init
event of page?
I'm not really sure how, or at what point the Ajax Extender client-side event handlers get attached, although what I do know for sure is that the <input> field will not be available until after the Ext.onReady() event. The onReady event happens early, although maybe not early enough for the Extenders to attach to. This is a bit of an unknown at this point.
Does the Extender need to attach at a .NET Control or can it attach to a standard html <input> field?
What Extender are you using? It would always be best to use an Ext native extension. Maybe an extension exists which can remove the requirement for the Ajax Extender.
--
Geoffrey McGill
Coolite Inc.
Development Team
Coolite Examples | Coolite API Docs | ExtJS API Docs
twitter [coolite | personal]
|
|
|
geoffrey.mcgill (8/18/2008) > Does the Extender need to attach at a .NET Control or can it attach to a standard html <input> field?
The Extender attaches to a standard html input field that's part of the DOM.
geoffrey.mcgill (8/18/2008) > What
Extender are you using? It would always be best to use an Ext native
extension. Maybe an extension exists which can remove the requirement
for the Ajax Extender.
I am just investigating compatibility between Coolite and ASP.NET AJAX. I may use the AutoComplete extender that attaches to a textbox. I will try it when v0.6 is released. If it doesn't work, I can settle with using Ext native extensions. However, not sure how others may feel if Coolite is not compatible with ASP.NET AJAX. Personally, I would love to drop ASP.NET AJAX all together and just use Coolite once it's fully released. UpdatePanels are evil. The only reason I am still using ASP.NET AJAX now is for the ease of creating client components with server side support.
|
|
|
|
Just did a quick test. Ext.onReady runs before ASP.NET AJAX pageInit and pageLoad client events. So I think we are all good =P. I posted another thread last week about extending ExtJS and using it in Coolite. It would be great if u can take a look. I just ran into another situation where I needed a SearchField that extends Ext.form.TriggerField.
|
|
|
jchau (8/18/2008) I may use the AutoComplete extender that attaches to a textbox. The <ext:ComboxBox> will be included with the v0.6 release. This may help replace the AutoComplete extender. Or, another option with be the <AjaxEvents>, which could be attached to the keystrokes. There will be lots of options.
jchau (8/18/2008) However, not sure how others may feel if Coolite is not compatible with ASP.NET AJAX. The Coolite Toolkit works perfectly in conjunction with the ASP.NET AJAX framework, maybe even better than the native asp.net web controls do. We're not limited by many of the restrictions of old-school asp.net web controls and ajax extenders. My only point is, I'm not sure at what stage the Extenders try to attach themselves on the client. If it's later than Ext.onReady then there shouldn't be any problems. Again, we're only talking about the Ajax Extenders, of which, there's always (or will be) a better solution within Coolite or Ext.
jchau (8/18/2008) UpdatePanels are evil. yes and no. This is certainly an area where the Coolite Toolkit controls will work much better with the <asp:UpdatePanel> than native asp.net web controls. I've been having a lot of fun with <asp:UpdatePanels>'s recently. Like any tool, it's just depends on how it's being used.
jchau (8/18/2008) The only reason I am still using ASP.NET AJAX now is for the ease of creating client components with server side support. Version 0.6 release will certainly help with adding server-side event handling support. An <AjaxEvent> can be attached to any Control (or html element) and any event. It's incredibly powerful and this functionality does not currently exist in the asp.net space.
Hope this helps answer some of your questions.
--
Geoffrey McGill
Coolite Inc.
Development Team
Coolite Examples | Coolite API Docs | ExtJS API Docs
twitter [coolite | personal]
|
|
|
jchau (8/18/2008) Just did a quick test. Ext.onReady runs before ASP.NET AJAX pageInit and pageLoad client events. So I think we are all good =P. I posted another thread last week about extending ExtJS and using it in Coolite. It would be great if u can take a look. I just ran into another situation where I needed a SearchField that extends Ext.form.TriggerField.
I take that back. It works fine in IE7 but in FF3, it's random which event fires first. This is crazy...
|
|
|
In FireFox, both libraries might be looking for the same trigger to fire their "onReady" events which creates a race. First one wins and that might be random.
--
Geoffrey McGill
Coolite Inc.
Development Team
Coolite Examples | Coolite API Docs | ExtJS API Docs
twitter [coolite | personal]
|
|
|
geoffrey.mcgill (8/18/2008) In FireFox, both libraries might be looking for the same trigger to fire their "onReady" events which creates a race. First one wins and that might be random.
Is there a way to make this not random? There are many cases where I need to access an ASP.NET AJAX client component during Ext.onReady().
|
|
|