by John C. Bland II | Mar 18, 2008 | Ajax, ColdFusion
Where are you?
I’ve tried numerous things to get the tab to refresh. First off I was looking at Ext 2.0 docs but I didn’t realize it until I did a dump on the _ColdFusion.Layout.getTabLayout(“tabs”).getActiveTab()_ and noticed a method not mentioned on the docs. Oops…my bad! ๐
So…instead of just bashing CF8’s attempt at UI Controls via Ajax I figured I’d ask anyone listening.
bq. How do you refresh the active tab dynamically?
Before you answer, let me clarify. I have N number of tabs and inside this particular tab I open a _CFWindow_ (a few gripes about this too) which does some updating and when done I need the selected tab to refresh the contents so it properly shows the latest and greatest info.
Here is what I found to work (and all that worked):
bq. function refreshActiveTab(){
var activeID = ColdFusion.Layout.getTabLayout(“tabs”).getActiveTab().id;
ColdFusion.Layout.hideTab(“tabs”, activeID);
ColdFusion.Layout.showTab(“tabs”, activeID);
ColdFusion.Layout.selectTab(“tabs”, activeID);
return;
}
That’s quite a sucky way to do it, IMO. The user doesn’t see the hide/show…at least in FF. In IE7 the modal background has no alpha (which looks crappy) so I can’t see it anyway.
Either way, after my trials tonight it merely validates my thoughts on CF’s Ajax UI Controls: they need a lot of work! I’ll rant later but the CF Ajax binding is SWEET (lacking a couple things but still sweet). I just want to see the UI controls come up to a really professional level.
</partialRant>
by John C. Bland II | Feb 26, 2008 | Ajax
“Spry”:https://labs.adobe.com/technologies/spry/home.html is a great Ajax library and is pretty easy to use but seeing as you do not have the images in the html at the time of rendering in the browser “Lightbox”:https://www.huddletogether.com/projects/lightbox2/ doesn’t have access to the current _a_ and _area_ tags in the page. So…what’s the solution?
Well, there are other ways you can make this happen but here is one:
bq. Spry.Utils.addLoadListener(function() { setTimeout(function() { myLightbox.updateImageList(); }, 1000); });
Basically add a listener so when the data is loaded simply tell _myLightbox_ to update the image list (which is the function that parses the DOM) after 1 second (1000 milliseconds), just to give Spry enough time to render the html. _myLightbox_ is the instance name Lightbox.js creates for the Lightbox instance.
Feel free to explore other ways for adding listeners/observers to Spry and post them. I didn’t find much in Google so I figured I’d post my quick fix.
by John C. Bland II | Oct 5, 2007 | Ajax
I’ve used “Adobe Spry”:https://labs.adobe.com/technologies/spry/ a few times and I think it is the easiest Ajax library to use. Well, I finally caught up on my RSS reading and the “Adobe Labs Latest Releases feed”:https://weblogs.macromedia.com/labs/index.xml showed a new Spry update. So, I went to the site to check it out and oooooooohhhhhh ahhhhhhhhh. ๐ It isn’t just amazing but it does look MUCH better.
**Logo**
**New Site Design**
by John C. Bland II | Sep 15, 2007 | Adobe AIR, Ajax, Software
Ok, this is my first impression and, as with all things, I’m sure I’ll find something wrong with it but right now…NOPE…IT ROCKS!
You can build “HTML+Javascript AIR applications”:https://labs.adobe.com/technologies/air/develop_ajax.html! I love it, again…at first glance. The more I play with it I’ll expand my thoughts but at this point this is about all I can say. lol. ๐
Oh, it is also useful for normal Javascript, Apple iPhone development, and more. Last note…it is free! ๐
by John C. Bland II | Sep 6, 2007 | Ajax
Yes, I’m trying to make a lil’ money off this blog (golf can get expensive; lol) so I went to setup AdSense and noticed something simple but sweet.
I clicked on the zip code textfield and voila…I get that popup. I thought it was general but then I noticed it actually showed potential/legit information about Arizona. ๐
Bravo Google…nice feature.