Just to close the loop, I found a way to do it with the yahoo event handler.
Basically I have tabs that pull data from other files, and if those files have links and the link is to an internal document open the liked doc in the tab, if an external document link like normal. Sort of like using an iframe but no iframes. Working example here. Click on 'don' to open other files. Actually tab 1 is a separate .htm file as well. http://dev.besavvy.com/Spry_P1_4_1214/samples/tabbedpanels/tabbed_panel_samp le.htm# Joshua -----Original Message----- From: Joshua Cyr [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 2:00 PM To: CF-Talk Subject: RE: OT: javascript to prevent a normal link from working Ah, but these are links I have no control over from other pages. The trick is that they are just normal pages that are pulled in to the tab. Joshua Cyr Savvy Software 866.870.6358 www.besavvy.com -----Original Message----- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 19, 2006 1:48 PM To: CF-Talk Subject: Re: OT: javascript to prevent a normal link from working return false in your <a href> tag. <a href="#" onclick="doFunction(args); return false;">foo</a> On 12/19/06, Joshua Cyr <[EMAIL PROTECTED]> wrote: > I am playing with YUI and spry and have a fun task of having content > from other pages load into a tab system in spry. All is working well > so far. > Next I have event listener code to check for the click of any link in > that tab content area (which is a separate file). Those links are > just normal links with no onclick or anything. If you click on it > load that linked pages data into the tab. That also works. > > What I am stuck on now is how to get the page to then stop going to > the new page. In other words if the link goes to 'aboutus.cfm' I can > get the content of aboutus.cfm to load into the tab content area, but > the page then reloads fully to go to the aboutus.cfm page. > > Basically clicking on a link will trigger the function below which > needs to stop the default behavior of opening a new page. > > I use return false; in my function, but that only cancel's things in > IE7 and not firefox. I also tried return(false); with same result. > > Relevant JS is: > > function clickHandler(e) { > var elTarget = YAHOO.util.Event.getTarget(e); // sets the var with > the href of the new page > Spry.Utils.updateContent('apDiv1',elTarget); // updates my div with > new content > return(false); // try to stop browser from opening new page } > YAHOO.example.init = function() { > YAHOO.util.Event.on(YAHOO.util.Dom.getElementsByClassName('joshua', > 'div')[0], "click", clickHandler); > } > > > Joshua Cyr > Savvy Software > 866.870.6358 > <http://www.besavvy.com/> www.besavvy.com > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264511 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

