Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

ydn-javascript · Yahoo! User Interface Library Group

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 12937
  • Category: JavaScript
  • Founded: Dec 15, 2005
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 28451 - 28480 of 52481   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#28451 From: "y_lsmith" <lsmith@...>
Date: Tue Apr 1, 2008 6:00 pm
Subject: Re: datatable with SQL Server Express 2005
y_lsmith
Send Email Send Email
 
--- In ydn-javascript@yahoogroups.com, "kjmapper" <kjmapper@...> wrote:
>
> Hi -
>
> All the datatable examples have data that is hardcoded into the
> example.  A common scenario is of course to have data in a database,
> not hardcoded into the app.
>
> Anyone have any success using YUI datatable with SQL Server 2005
> express database tables, and if so have any pointers for how to do it?
>
> Thanks,
> JB
>


JB,

You may find what you're looking for in the online
examples/documentation for DataTable.
http://developer.yahoo.com/yui/datatable/

The database technology isn't important.  The server page/service that
will be requested by the DataSource needs to be able to communicate
with the database and reply to the http request with some form of
serialized data (JSON/XML/etc) for the DataSource to feed the
DataTable with.

Hope this helps,
Luke

#28452 From: "Kah Kah!" <kah_kah_crow@...>
Date: Tue Apr 1, 2008 6:03 pm
Subject: Re: Connect.asyncRequest dont work in IE .. why
kahkahcrow
Send Email Send Email
 
If your element type is 'SELECT', please try this workaround.

From:
  document.getElementById(combo).innerHTML = o.responseText;

To:
  el = document.getElementById(combo);
  el.innerHTML='';
  el.outerHTML= el.outerHTML.replace('</SELECT>', o.responseText + '</
SELECT>');

--
KahKah!

#28453 From: "Devin Singleton" <devsin@...>
Date: Tue Apr 1, 2008 6:09 pm
Subject: Re: datatable with SQL Server Express 2005
devsin@...
Send Email Send Email
 
One thought would be to use SQL's FOR XML clause.

On Tue, Apr 1, 2008 at 9:41 AM, kjmapper <kjmapper@...> wrote:

Hi -

All the datatable examples have data that is hardcoded into the
example. A common scenario is of course to have data in a database,
not hardcoded into the app.

Anyone have any success using YUI datatable with SQL Server 2005
express database tables, and if so have any pointers for how to do it?

Thanks,
JB







#28454 From: "aniad" <aniad@...>
Date: Tue Apr 1, 2008 6:45 pm
Subject: Resize utility causes horizontal scroll bars and obscures its content.
aniad
Send Email Send Email
 
I have a layout inside a resize utility which has only the bottom
resize handle.  The resize border seems to add just a little
edge/padding around the layout causing horizontal scroll bar to
appear.  How can I avoid this?  The resize is rendered with
'proxy:true' so when actually dragging the resize handle the right
edge of the proxy is scrolled off the screen.  Having the 'proxy:true'
or 'false' does not seem to make any difference.  The resize control
also obscures the bottom pixels of the layout and, as mentioned,
extends the width (thus the horizontal scroll bars). How do I fix this?

BTW, whether it is layout, or tab control, or whatever, it doesn't
matter.  It seems any control rendered at full width inside the resize
causes this behavior.

Here is my very simplified code.  Thank you,
Ania.

<script>

var layout;
var resize;

var IE_QUIRKS = (YAHOO.env.ua.ie && document.compatMode == "BackCompat");

// UNDERLAY/IFRAME SYNC REQUIRED
var IE_SYNC = (YAHOO.env.ua.ie == 6 || (YAHOO.env.ua.ie == 7 &&
IE_QUIRKS));

function initLayout()
{
    layout = new YAHOO.widget.Layout('layoutDiv',
    {
       height: 500,
       units: [
          { position: 'right', header: 'Right', height: 490, width:
300, resize: true, gutter: '2px 5px', footer: 'Footer', collapse:
true, scroll: false, body: 'right1', maxWidth: 1000 },
          { position: 'center', height: 490, scroll: false, resize:
true, body: 'selector', gutter: '2px 5px', collapse: true,
collapseSize: 50, maxWidth: 1000 }
             ]
    });

    layout.render();
}

function initResize()
{
    resize = new YAHOO.util.Resize('layoutDiv', { handles: 'b', proxy:
true});

    resize.on('resize', function(args) {
       var panelHeight = args.height;
       var headerHeight = (this.header == null ) ? 0 :
this.header.offsetHeight; // Content + Padding + Border
       var bodyHeight = (panelHeight - headerHeight);
       var bodyContentHeight = (IE_QUIRKS) ? bodyHeight : bodyHeight;//
- PANEL_BODY_PADDING;

       YAHOO.util.Dom.setStyle(this.body, 'height', bodyContentHeight +
'px');

       if (IE_SYNC)
       {
          this.sizeUnderlay();
          this.syncIframe();
       }

       layout.set('height', bodyContentHeight);
       layout.resize();

     });
}

YAHOO.util.Event.onDOMReady(initLayout);
YAHOO.util.Event.onDOMReady(initResize);

</script>

<body class=" yui-skin-sam">
     <div id="layoutDiv" height="100%" width="100%"></div>
     <div id="right1">I'm right side</div>
     <div id="selector">I'm center</div>
     Some stuff.
<script>

     (function() {
         var Dom = YAHOO.util.Dom,
             Event = YAHOO.util.Event;
     });

</script>
</body>

#28455 From: Todd Kloots <kloots@...>
Date: Tue Apr 1, 2008 6:46 pm
Subject: Re: Growing Menu IE Bug?
toddkloots
Send Email Send Email
 
"beatenbyrobots" -

The problem here is the Menu shadow.  In order to provide shadow support
for the Menu's default "Sam" skin, I had to manage the sizing of the
shadow through script.  If you are creating your own custom skin and
don't want your menus to have a shadow, then simply hide the shadow
element via CSS.  This will solve the IE 6 issue.  Here is an example:

http://yuiblog.com/sandbox/yui/v251/examples/menu/example02.html

If you DO want your custom skin to have a shadow, I have created a patch
that corrects the shadow sizing error.  Here is an example of how to use
the patch:

http://yuiblog.com/sandbox/yui/v251/examples/menu/example03.html

Of course, you'll still need to provide the necessary custom style
definition for your shadow.

- Todd

beatenbyrobots wrote:
>
> I think I may have found a bug, but I wanted to make sure that I'm not
> missing something obvious before submitting a bug report. I've created
> a simple test page to demonstrate the problem.
>
> http://beatenbyrobots.com/demo/growing-menu-demo.html
> <http://beatenbyrobots.com/demo/growing-menu-demo.html>
>
> I have a menubar with a single item. This item has a menu with ten
> items. I've tested this with Firefox 2.0.0.1 (Mac & PC), Safari 3.1
> (Mac & PC) and IE6. Everything works fine with the exception of IE6.
>
> In IE6 the scrollbar shows up when the subnav appears even though
> there really shouldn't be anything beyond what is visible in the
> viewport. But most interestingly, each time the subnav appears, its
> width increases. It just keeps growing and growing. However, if I
> remove the following style, the problem goes away:
> .yuimenuitemlabel {
> display: block;
> }
>
> I've learned that in order for the problem to occur, the subnav has to
> be long enough to force the seemingly unnecessary scrollbar to appear.
> How long that is will, of course, vary depending on your local settings.
>
> Any thoughts?
>
>

#28456 From: "windrunner37" <windrunner37@...>
Date: Tue Apr 1, 2008 6:48 pm
Subject: problems showing/hiding calendar control
windrunner37
Send Email Send Email
 
I am having problems with showing and hiding the calendar control from
code.

I create it like this:

     YAHOO.calendar.cal1 =
         new YAHOO.widget.CalendarGroup( "cal1", "calendar",
                                         { pages: 2,
                                           title: calendarTitle,
                                           pagedate: pageDate,
                                           close: true } );

My friend does not need to call the control's show method to display
it. He just creates the object similar like above and calls render and
thats it! the calendar appears. But I for some reason can only display
my calendar after calling it's show function.

Also, my calendar does not disappear when I call the hide function
from my selectEvent handling function:

function selectEventHandler(type, args, obj) {
     alert( "inside selectEventHandler()" );

     var dates = args[0];
     var selDate = dates[0];    // this should be an array in this
format: [YYYY, MM, DD]

     document.getElementById( inputFieldForCal ).value( selDate[1] +
'/' + selDate[2] + '/' + selDate[0] );

     this.hide();
}

My div container tag seems to be set up properly:

<div id="calendar" name="calendar"
style="position:absolute;display:none;"></div>


So why am I having these problems? Any help is greatly appreciated.

#28457 From: Eric Miraglia <miraglia@...>
Date: Tue Apr 1, 2008 7:04 pm
Subject: Re: Re: Problems with a chart in a tab
ericmiraglia
Send Email Send Email
 
Sanjiv,

This is undoubtedly problematic, and we need to make it easier.  As Josh mentioned, we'll look at making the chart less brittle against ancestor DOM changes in the next release -- no schedule for you on that yet, but we'll announce it here when we have a target date.

In the meantime, here are a couple of things to look at:

  • I've used mychart.set("series", seriesDef); to force the chart to redraw in my own implementations.  This has not been sufficient to recover a tabbed chart that I've broken via display:none in my tests, but it may work in your example if you've moved the chart in the beforeActiveTabChange event.
  • This mockup gets you pretty close to what you're looking for:  http://ericmiraglia.com/yui/demos/tabchart.php . It looks like it works in FF, Safari, and Opera.  I didn't have time to trap the IE6 flow issues, but I suspect they're manageable with some additional fine tuning of the CSS.  Note that this approach hacks the TabView contentVisible attribute for the chart's tab, preventing display:none from ever being invoked; instead, it moves the contentEl for the chart's tab into negativeland and sets its height to 0px.

Sorry not to have a better answer for you on this.  Hopefully resetting your chart's series attribute will get you the effect you need.

Regards,
Eric


On Mar 31, 2008, at 3:58 PM, Sanjiv Jivan wrote:

Eric,
I'm having troubles with this too. A simple test of moving the chart to a different div (in negetiveland) and then adding it back to its original location results in the chart being displayed really small. When I click on the chart, it ends up reloading / redrawing itself. 

Do you have a working example of this? Is there a way to force the chart to redraw without requiring me to click the chart. I'm not so concerned about the reload, but would like the chart to be displayed right when re-added to the original location. I can see that the "object tag has height and width to 100% and the parent div has the correct dimensions, yet the chart displays 20x 60px when added back to original location.

Thanks,
Sanjiv

On 3/17/08, Eric Miraglia <miraglia@yahoo-inc.com> wrote:

tully_tim,


We don't have a demo of a workaround for you at present, but one thing you might try is using the TabView's event system to move the chart out of the being-hidden tab before it's hidden, and move the chart itself into negativeland (eg, left:-3000).  Then, when the tab is activated again, move the chart back into place.

I would start with the TabView's activeTabChange event and go from there.

Regards,
Eric


On Mar 16, 2008, at 1:03 PM, tully_tim wrote:

Any temporary hacks or workarounds for this? :)

--- In ydn-javascript@yahoogroups.com, "Josh Tynjala" <jtynjala@...>
wrote:
>
> It appears that Flash Player unloads and reloads a SWF (or the browser
> removes Flash Player and reinitializes it) when a parent element's
> display changes to none and then back to block. I've tested with both
> the charts and a very simple SWF to determine that this has nothing to
> do with the charts SWF itself.
> 
> I should be able to detect this problem because the SWF will resend its
> initializing events to JavaScript when it is reloaded. However, I need
> to rework some of the JavaScript code to keep a full copy of the chart
> state so that it may be reinitialized correctly. I expect this won't be
> trivial.
> 
> Josh Tynjala
> 
> Yahoo! Flash Platform
> 
> 
> 
> 
> 
> ________________________________
> 
> From: Eric Miraglia [mailto:miraglia@...] 
> Sent: Tuesday, January 29, 2008 8:47 AM
> To: ydn-javascript@yahoogroups.com
> Subject: Re: [ydn-javascript] Re: Problems with a chart in a tab
> 
> 
> 
> Bernhard,
> 
> 
> 
> There is definitely an issue with showing and hiding the chart canvas.
> I haven't dug deeply, but it seems to me that the Charts Control is
> sensitive to the display style attribute of its parent element changing
> -- so, a toggle between display:none and display:block on the parent
> blanks out the chart canvas and the data cannot be refreshed even by
> resending the DataSource.
> 
> 
> 
> This is a known issue on our end and we're going to investigate it.
> 
> 
> 
> This will cause Charts not to play nicely with TabView and some other
> YUI controls that toggle the display property of containing elements. I
> have had some success showing/hiding the Chart by moving it off the
> viewport (ie, style.left = -3000;) when I want to hide it. I haven't
> tested that solution across the A-Grade as yet.
> 
> 
> 
> Josh Tynjala, the Charts author, will report back to the list once he's
> finished the investigation of the problem.
> 
> 
> 
> Regards,
> 
> Eric
> 
> 
> 
> 
> 
> ______________________________________________
> 
> Eric Miraglia
> 
> Yahoo! User Interface Library
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Jan 28, 2008, at 10:47 PM, bergerbd wrote:
> 
> 
> 
> 
> 
> Me again,
> 
> --- In ydn-javascript@yahoogroups.com
> <mailto:ydn-javascript%40yahoogroups.com> , "bergerbd" <bergerbd@>
> wrote:
> > I'm trying to create a TabView that contains a Chart. Therefor I've
> > merged two of the available samples. The result is a tab containing a
> > chart but after switching to an other tab and back the data isn't
> > display anymore. Is there a solution to this problem? The sample can
> be
> > found at [1]
> 
> Even reloading the datasource on the tabchange-event does not help.
> The Axis are updated but the data is still invisible. :-( 
> 
> Bernhard
> 
> > [1] http://rafb.net/p/rdX5wR14.html <http://rafb.net/p/rdX5wR14.html>
>







#28458 From: "jeremymefford" <jeremymefford@...>
Date: Tue Apr 1, 2008 7:10 pm
Subject: Re: DS_JSFunction calling oFunction from global scope
jeremymefford
Send Email Send Email
 
So that worked perfect to fix my scope issue, however now my param
from the autocomplete is not getting passed into the function...

--- In ydn-javascript@yahoogroups.com, "y_lsmith" <lsmith@...> wrote:
>
> Jeremy,
>
> The JavaScript interpreter dereferences this.someFunc to the function
> itself (not the function scoped to the this object) before passing it to
> the DS_JSFunction constructor.  Functions do not carry their scope with
> them;  this is determined when they are executing.
>
> For example:
>
> var someFunc = function () {
>      alert(this.name); // who is this?
> };
>
> var MyClass = function (name) {
>      this.name = name;
>      this.fooFunc = someFunc;
> };
>
> var MyOtherClass = function (name) {
>      this.name = name;
> };
> MyOtherClass.prototype.barFunc = someFunc;
>
> // this is the window object
> someFunc();
>
> // this is the MyClass instance
> new MyClass('foo').fooFunc();
>
> // this is the MyOtherClass instance
> new MyOtherClass('bar').barFunc();
>
> var baz = { name: 'baz' };
> // this is baz
> someFunc.call(baz);
>
> You can avoid the this confusion by creating a closure around your
> instance method like so:
>
> init : function () {
>      //do stuff
>
>      var me = this;
>      this.myACDataSource = new YAHOO.widget.DS_JSFunction(function () {
>          me.someFunc();
>      });
> },
>
> Hope this helps,
> Luke
>
> --- In ydn-javascript@yahoogroups.com, "jeremymefford"
> <jeremymefford@> wrote:
> >
> > I'm not quite sure how to fix this problem I'm having.  I created a
> > custom object that contains an autocomplete widget with a datatable.
> >
> > I used the example off the YUI site that had me use DS_JSFunction for
> > my autocomplete widget, however the oFunction that it's calling is
> > referenced from the global scope when I want it to be local.  I all
> > actuality, I'm not even sure how it's calling from the global scope in
> > this case.
> >
> > Here is my situation, in code:
> >
> > var myObj = function() {
> >     return {
> >
> >     vars:null,
> >     init: function() {
> >
> >     //do stuff
> >     this.myACDataSource = new
> YAHOO.widget.DS_JSFunction(this.someFunc);
> >
> >     }
> >
> >     someFunc: function() {
> >        this.myvar = 'foo';
> >     }
> >
> >     }
> > }
> >
> > So, when I debug this w/Firebug with a breakpoint on the line
> > this.myvar = 'foo', firebug tells me:
> >
> > this = window test.jsp
> >
> > I'm so very confused as to how this is the case when clearly the
> > function called was in the scope of myObj.  I've worked around it by
> > calling this.myObjInstance.myvar, but I feel that this is a hack and
> > there should be a better way to do this.
> >
>

#28459 From: hemant kolte <kolte_hemant@...>
Date: Tue Apr 1, 2008 7:17 pm
Subject: Re: datatable and checkbox
kolte_hemant
Send Email Send Email
 
hi,
i have seen ur example it's helping me a lot .the only problem in that example is when i click on check box status of check box doesn't change .if it is  checked and on click it should be unchecked .how to change or update that that check box.
thanks

----- Original Message ----
From: Satyam <satyam@...>
To: ydn-javascript@yahoogroups.com
Sent: Tuesday, 1 April, 2008 8:47:57 PM
Subject: RE: [ydn-javascript] datatable and checkbox

The DataTable fires the checkboxClickEvent and you can do whatever you want with that. 

In http://satyam. com.ar/yui/ 2.5.0/assortedCo ntrols.html I showed how you can send that information to the server on each click because that is what many people ask, but you are certainly not forced to do so.  If you have sortable columns, you have to update the recordset for each click so that on sorting the checked boxes don't get lost, but you don't need to communicate that to the server and you certainly can keep a separate array of your own in parallel with this.

Satyam

--------- Mensaje Original --------
De: ydn-javascript@ yahoogroups. com
Para: "ydn-javascript@ yahoogroups. com" <ydn-javascript@ yahoogroups. com>
Asunto: [ydn-javascript] datatable and checkbox
Fecha: 31/03/08 16:32

hi,
is it possible to save checked values in array to check by javascript so that we can make less server trip.
suppose i have checked on 1st row and 3rd row then i need to store that true values in array and later go to database and check to delete or to modify or to move.
plz help me.
thanks


Did you know? You can CHAT without downloading messenger. Click here



Now you can chat without downloading messenger. Click here to know how.

#28460 From: "jacob.fogg" <jacob.fogg@...>
Date: Tue Apr 1, 2008 7:16 pm
Subject: Need a new IDE
jacob.fogg
Send Email Send Email
 
Hey everyone, I have been using eclipse/PDT/Aptana as my IDE using
SFTP Drive to handle the SFTP connection for over a year now, and
frankly, I am tired of the quirkiness of this setup... I don't know if
it's just Eclipse, just SFTP Drive, or a combination of the two...
Whatever it is, I have had enough!!!!

So, I am coming to you all, for suggestions on what you consider the
best connection/IDE setup.

My requirements are simple, SFTP support and built-in
auto-complete/function-hinting for PHP & JavaScript. (and of course
the basics like code coloring, I figured that is a given)

I have no problem buying something if it is stable and useful.

Thanks for your thoughts!

Jacob

#28461 From: "Bryce Fischer" <bryce@...>
Date: Tue Apr 1, 2008 7:24 pm
Subject: Re: Need a new IDE
vbfischer
Send Email Send Email
 
Aptana supports SFTP... At least the Pro version does.

On Tue, Apr 1, 2008 at 3:16 PM, jacob.fogg <jacob.fogg@...> wrote:

Hey everyone, I have been using eclipse/PDT/Aptana as my IDE using
SFTP Drive to handle the SFTP connection for over a year now, and
frankly, I am tired of the quirkiness of this setup... I don't know if
it's just Eclipse, just SFTP Drive, or a combination of the two...
Whatever it is, I have had enough!!!!

So, I am coming to you all, for suggestions on what you consider the
best connection/IDE setup.

My requirements are simple, SFTP support and built-in
auto-complete/function-hinting for PHP & JavaScript. (and of course
the basics like code coloring, I figured that is a given)

I have no problem buying something if it is stable and useful.

Thanks for your thoughts!

Jacob



#28462 From: "j_s_shirley" <jshirley@...>
Date: Tue Apr 1, 2008 7:25 pm
Subject: Re: Source for uploader.swf? The value for event["bytesLoaded"] is incorrect.
j_s_shirley
Send Email Send Email
 
--- In ydn-javascript@yahoogroups.com, "Allen Rabinovich"
<allenrabinovich@...> wrote:
>
> The source is available and included in the distribution. It's not
an FLA file; rather, it's an
> AS file that you can compile using the freely available Flex SDK
(you can also use Flash IDE;
> just set that AS file to be your Document Class). You'll find it in
the src/as folder.
>
> As for the bug -- I just checked the code and tested the uploader,
and it appears to be
> setting the correct value for bytesLoaded. Can you perhaps provide a
link to an example
> where this is happening?
>
> Thanks,
> Allen
>

Hi Allen,

I'm trying to debug another issue (you can see my post on it, also
experiencing oddities in OSX on FF3b4) and searching for the source
for uploader.swf

It doesn't seem to be in the yui 2.5.1 build.

Could you point me to a specific location, or perhaps a hosted version
of the source I can use?

Thanks,
-Jay

#28463 From: "Keith Davis" <keithdavis@...>
Date: Tue Apr 1, 2008 7:40 pm
Subject: Re: Need a new IDE
laurind
Send Email Send Email
 
We are using Zend Studio for Eclipse with Aptana. Zend's version of PDT
is much more stable and feature rich.

#28464 From: Todd Kloots <kloots@...>
Date: Tue Apr 1, 2008 8:01 pm
Subject: Re: expand nested submenus to show selected menu item
toddkloots
Send Email Send Email
 
Hey Jack -

When a menu is hidden, its selection is cleared.  So, when the menu is
clicked you'll have to store a reference to the selected item and then
use the "parent" property to crawl up and show each parent menu.  That
said, why are you doing this?  What is the use case here?  This
interaction you are trying to create doesn't make sense to me.  I have
never used an application where a button's flyout menu appears pre-
expanded with the selected item shown.

- Todd

Jack Bates wrote:
> Awesome, thanks Todd, that works.
>
> Now, when I show the menu, and the selected menu item is nested in a
> submenu, I need to expand it's parent submenus, so the user can find the
> selected menu item.
>
> I tried to achieve this using the following:
> http://cgi.sfu.ca/~jdbates/tmp/yui/200803310/test.html
>
>         button.getMenu().subscribe('show', function (type, args)
> 	  {
> 	    if (button.get('selectedMenuItem') != null)
> 	    {
> 	      button.get('selectedMenuItem').parent.show();
> 	    }
> 	  });
>
> I select a menu item in a submenu, "BBB". When I subsequently show the
> menu, I expect the submenu containing "BBB" - the "AAA" submenu - to be
> expanded.
>
> Instead however, only the root menu is shown.
>
> How do I expand nested submenus to show the selected menu item when the
> menu is shown?
>
> Thanks again, Jack
>
>
>> Jack -
>>
>> The MenuItem that was the target of the click event will be sent back
>> in
>> the arguments array that is passed back to your handler. This is
>> covered in this section of the Menu landing page:
>> http://developer.yahoo.com/yui/menu/#addingeventlisteners
>>
>> - Todd
>>
>> Jack Bates wrote:
>>
>>> When a sub menu item is clicked, how can I get that menu item?
>>>
>>> I applied a "click" event handler to a menu button in order to
>>>
>> change
>>
>>> the button label when a menu item is selected:
>>>
>>> button.getMenu().subscribe('click', function (event)
>>> {
>>> button.set('label',
>>> button.getMenu().activeItem.cfg.getProperty('text'));
>>> });
>>>
>>> It works for simple menu items, but not for sub menu items:
>>> http://cgi.sfu.ca/~jdbates/tmp/yui/200803280/test.html
>>>
>>> In this test case, selecting either "AAA" or "CCC" will correctly
>>>
>> change
>>
>>> the button label. However selecting the "BBB" sub menu item
>>>
>> incorrectly
>>
>>> changes the button label to "AAA"
>>>
>>> How can I get the sub menu item which was clicked, so I can set the
>>> button label to "BBB" when "BBB" is selected?
>>>
>>> Thanks and best wishes, Jack
>>>

#28465 From: "y_lsmith" <lsmith@...>
Date: Tue Apr 1, 2008 8:02 pm
Subject: Re: Datatable in a table cell hangs IE7
y_lsmith
Send Email Send Email
 
As noted on SF, the workaround for this bug is to include the following line of js before the instantiation of a DataTable:

YAHOO.widget.DataTable._bStylesheetFallback = !!YAHOO.env.ua.ie;

A true fix for this will need more investigation and you should see it in an upcoming release.

Hope this helps,
Luke


--- In ydn-javascript@yahoogroups.com, "Mike Sexter" <ydn-javascript@...> wrote:
>
> Added bug 1925543
>
> --- In ydn-javascript@yahoogroups.com, "y_lsmith" lsmith@ wrote:
> >
> > Oof! That's a live one. I recreated it locally, but my test set up had
> > the table-in-table initially rendered below the fold. IE7 hung when the
> > scrollable table entered the viewport. I was hoping the width/minWidth
> > patch we're testing might have resolved this for free, but no such luck.
> >
> > Can you add a SourceForge bug
>

#28466 From: "y_lsmith" <lsmith@...>
Date: Tue Apr 1, 2008 8:02 pm
Subject: Re: Datatable in a table cell hangs IE7
y_lsmith
Send Email Send Email
 
As noted on SF, the workaround for this bug is to include the following line of js before the instantiation of a DataTable:

YAHOO.widget.DataTable._bStylesheetFallback = !!YAHOO.env.ua.ie;

A true fix for this will need more investigation and you should see it in an upcoming release.

Hope this helps,
Luke


--- In ydn-javascript@yahoogroups.com, "Mike Sexter" <ydn-javascript@...> wrote:
>
> Added bug 1925543
>
> --- In ydn-javascript@yahoogroups.com, "y_lsmith" lsmith@ wrote:
> >
> > Oof! That's a live one. I recreated it locally, but my test set up had
> > the table-in-table initially rendered below the fold. IE7 hung when the
> > scrollable table entered the viewport. I was hoping the width/minWidth
> > patch we're testing might have resolved this for free, but no such luck.
> >
> > Can you add a SourceForge bug
>

#28467 From: "mr_cebyrd" <mr_cebyrd@...>
Date: Tue Apr 1, 2008 8:08 pm
Subject: JSON Parsing Problem
mr_cebyrd
Send Email Send Email
 
I have a problem with using YUI's JSON parser in Internet
Explorer(IE). I'm using IE, version 6.  I'm able to use the parse
method just fine in Firefox(By the way, I'm using YUI 2.5.1).
However, when I try to use the JSON parser inside IE, I get unhandled
exception errors. Any clues as to what could be causing this problem?
  Thanks in advance.

#28468 From: "Sanjiv Jivan" <sanjiv.jivan@...>
Date: Tue Apr 1, 2008 8:24 pm
Subject: Re: Re: Problems with a chart in a tab
sjivan
Send Email Send Email
 
Eric,
Thanks for taking the time in putting up the sample. Unfortunately your sample doesn't work for me in IE 6 or FF 2. In FF 2, on changing tabs I only see the axes and not the lines of the chart, and in IE that chart doesn't even appear partially.

You suggestion of mychart.set("series", seriesDef);  does redraw the chart, unfortunately the chart DOM removal / move in the prior step to move it out of the tab area results in a JS error which corrupts the chart. (eg skins are lost when moved back to original location).

Looking forward to seeing a working solution for this in your next release as in the current state the charts cant be used in most ajax apps which typically hide / show content.

Thanks again.

Sanjiv

On 4/1/08, Eric Miraglia <miraglia@...> wrote:

Sanjiv,


This is undoubtedly problematic, and we need to make it easier.  As Josh mentioned, we'll look at making the chart less brittle against ancestor DOM changes in the next release -- no schedule for you on that yet, but we'll announce it here when we have a target date.

In the meantime, here are a couple of things to look at:

  • I've used mychart.set("series", seriesDef); to force the chart to redraw in my own implementations.  This has not been sufficient to recover a tabbed chart that I've broken via display:none in my tests, but it may work in your example if you've moved the chart in the beforeActiveTabChange event.
  • This mockup gets you pretty close to what you're looking for:  http://ericmiraglia.com/yui/demos/tabchart.php . It looks like it works in FF, Safari, and Opera.  I didn't have time to trap the IE6 flow issues, but I suspect they're manageable with some additional fine tuning of the CSS.  Note that this approach hacks the TabView contentVisible attribute for the chart's tab, preventing display:none from ever being invoked; instead, it moves the contentEl for the chart's tab into negativeland and sets its height to 0px.

Sorry not to have a better answer for you on this.  Hopefully resetting your chart's series attribute will get you the effect you need.

Regards,
Eric


On Mar 31, 2008, at 3:58 PM, Sanjiv Jivan wrote:

Eric,
I'm having troubles with this too. A simple test of moving the chart to a different div (in negetiveland) and then adding it back to its original location results in the chart being displayed really small. When I click on the chart, it ends up reloading / redrawing itself. 

Do you have a working example of this? Is there a way to force the chart to redraw without requiring me to click the chart. I'm not so concerned about the reload, but would like the chart to be displayed right when re-added to the original location. I can see that the "object tag has height and width to 100% and the parent div has the correct dimensions, yet the chart displays 20x 60px when added back to original location.

Thanks,
Sanjiv

On 3/17/08, Eric Miraglia <miraglia@...> wrote:

tully_tim,


We don't have a demo of a workaround for you at present, but one thing you might try is using the TabView's event system to move the chart out of the being-hidden tab before it's hidden, and move the chart itself into negativeland (eg, left:-3000).  Then, when the tab is activated again, move the chart back into place.

I would start with the TabView's activeTabChange event and go from there.

Regards,
Eric


On Mar 16, 2008, at 1:03 PM, tully_tim wrote:

Any temporary hacks or workarounds for this? :)

--- In ydn-javascript@yahoogroups.com, "Josh Tynjala" <jtynjala@...>
wrote:
>
> It appears that Flash Player unloads and reloads a SWF (or the browser
> removes Flash Player and reinitializes it) when a parent element's
> display changes to none and then back to block. I've tested with both
> the charts and a very simple SWF to determine that this has nothing to
> do with the charts SWF itself.
> 
> I should be able to detect this problem because the SWF will resend its
> initializing events to JavaScript when it is reloaded. However, I need
> to rework some of the JavaScript code to keep a full copy of the chart
> state so that it may be reinitialized correctly. I expect this won't be
> trivial.
> 
> Josh Tynjala
> 
> Yahoo! Flash Platform
> 
> 
> 
> 
> 
> ________________________________
> 
> From: Eric Miraglia [mailto:miraglia@...] 
> Sent: Tuesday, January 29, 2008 8:47 AM
> To: ydn-javascript@yahoogroups.com
> Subject: Re: [ydn-javascript] Re: Problems with a chart in a tab
> 
> 
> 
> Bernhard,
> 
> 
> 
> There is definitely an issue with showing and hiding the chart canvas.
> I haven't dug deeply, but it seems to me that the Charts Control is
> sensitive to the display style attribute of its parent element changing
> -- so, a toggle between display:none and display:block on the parent
> blanks out the chart canvas and the data cannot be refreshed even by
> resending the DataSource.
> 
> 
> 
> This is a known issue on our end and we're going to investigate it.
> 
> 
> 
> This will cause Charts not to play nicely with TabView and some other
> YUI controls that toggle the display property of containing elements. I
> have had some success showing/hiding the Chart by moving it off the
> viewport (ie, style.left = -3000;) when I want to hide it. I haven't
> tested that solution across the A-Grade as yet.
> 
> 
> 
> Josh Tynjala, the Charts author, will report back to the list once he's
> finished the investigation of the problem.
> 
> 
> 
> Regards,
> 
> Eric
> 
> 
> 
> 
> 
> ______________________________________________
> 
> Eric Miraglia
> 
> Yahoo! User Interface Library
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Jan 28, 2008, at 10:47 PM, bergerbd wrote:
> 
> 
> 
> 
> 
> Me again,
> 
> --- In ydn-javascript@yahoogroups.com
> <mailto:ydn-javascript%40yahoogroups.com> , "bergerbd" <bergerbd@>
> wrote:
> > I'm trying to create a TabView that contains a Chart. Therefor I've
> > merged two of the available samples. The result is a tab containing a
> > chart but after switching to an other tab and back the data isn't
> > display anymore. Is there a solution to this problem? The sample can
> be
> > found at [1]
> 
> Even reloading the datasource on the tabchange-event does not help.
> The Axis are updated but the data is still invisible. :-( 
> 
> Bernhard
> 
> > [1] http://rafb.net/p/rdX5wR14.html <http://rafb.net/p/rdX5wR14.html>
>








#28469 From: "bretlevy" <bret@...>
Date: Tue Apr 1, 2008 8:55 pm
Subject: Re: problems showing/hiding calendar control
bretlevy
Send Email Send Email
 
wind runner:

You may be experiencing a "scope" issue.  There are ways in most/many
of the yui elements to specify the scopre that should be active in a
handler.  For starters, change this.hide() to YAHOO.calendar.cal1.hide
() (assuming the calender namespace is valid), or just use a global
variable (for testing).  If this works, then you just have a simple
scope issue.  Check to see if you can declare the scope for the
handler you are hooking in the docs.

If you can't get the calendar to show up at all, verify that your
HTML is properly formed (I have found that unclosed tags can be very
disruptive to yui!).  Also, make sure your target element is an
immediate child of body.  If it is hidden, you'll have to call show.
If it is not hidden, you may not have to call show.

display:none can be problematic, at least I think it was in some
versions of YUI.  Do a search and see if you can find some messages
about this.  If I remember correctly, display:none styled elements
may not be visible to YUI or the DOM or both (or something like that).

I drop my calendar(s) into a simple div like this:

     <div id="mycalcontainer"></div>

If that is at the "end" of your page, then it essentially is
invisible.  Then you set the x/y and everything else in the config
block when you instantiate your calendar (or via cfg calls).  This
has worked best for me.  I actually have a page generator class I use
that "builds" the framework of my pages in my site(s) and it adds
this div automatically (along with ones for alert messages,
colorpickers, etc).  I just "know" they'll be there!

Hope that helps,
~~bret


--- In ydn-javascript@yahoogroups.com, "windrunner37"
<windrunner37@...> wrote:
>
> I am having problems with showing and hiding the calendar control
from
> code.
>
> I create it like this:
>
>     YAHOO.calendar.cal1 =
>         new YAHOO.widget.CalendarGroup( "cal1", "calendar",
>                                         { pages: 2,
>                                           title: calendarTitle,
>                                           pagedate: pageDate,
>                                           close: true } );
>
> My friend does not need to call the control's show method to display
> it. He just creates the object similar like above and calls render
and
> thats it! the calendar appears. But I for some reason can only
display
> my calendar after calling it's show function.
>
> Also, my calendar does not disappear when I call the hide function
> from my selectEvent handling function:
>
> function selectEventHandler(type, args, obj) {
>     alert( "inside selectEventHandler()" );
>
>     var dates = args[0];
>     var selDate = dates[0];    // this should be an array in this
> format: [YYYY, MM, DD]
>
>     document.getElementById( inputFieldForCal ).value( selDate[1] +
> '/' + selDate[2] + '/' + selDate[0] );
>
>     this.hide();
> }
>
> My div container tag seems to be set up properly:
>
> <div id="calendar" name="calendar"
> style="position:absolute;display:none;"></div>
>
>
> So why am I having these problems? Any help is greatly appreciated.
>

#28470 From: Eric Miraglia <miraglia@...>
Date: Tue Apr 1, 2008 8:59 pm
Subject: Re: Re: Problems with a chart in a tab
ericmiraglia
Send Email Send Email
 
Sanjiv,

My apologies. I left a line of CSS in there that was breaking it in FF2 (it works now).  IE6 is the piece I didn't work through. But I agree with your assessment that the fragility of the current implementation makes it hard to deal with showing and hiding the chart.

We worked through this on the ProfilerViewer Control, which has a similar UI paradigm (chart is part of a selectively shown/hidden canvas), but there were fewer limitations there with respect to the parent container.

Regards,
Eric


On Apr 1, 2008, at 1:24 PM, Sanjiv Jivan wrote:

Eric,
Thanks for taking the time in putting up the sample. Unfortunately your sample doesn't work for me in IE 6 or FF 2. In FF 2, on changing tabs I only see the axes and not the lines of the chart, and in IE that chart doesn't even appear partially.

You suggestion of mychart.set("series", seriesDef);  does redraw the chart, unfortunately the chart DOM removal / move in the prior step to move it out of the tab area results in a JS error which corrupts the chart. (eg skins are lost when moved back to original location).

Looking forward to seeing a working solution for this in your next release as in the current state the charts cant be used in most ajax apps which typically hide / show content.

Thanks again.

Sanjiv

On 4/1/08, Eric Miraglia <miraglia@yahoo-inc.com> wrote:

Sanjiv,


This is undoubtedly problematic, and we need to make it easier.  As Josh mentioned, we'll look at making the chart less brittle against ancestor DOM changes in the next release -- no schedule for you on that yet, but we'll announce it here when we have a target date.

In the meantime, here are a couple of things to look at:

  • I've used mychart.set("series", seriesDef); to force the chart to redraw in my own implementations.  This has not been sufficient to recover a tabbed chart that I've broken via display:none in my tests, but it may work in your example if you've moved the chart in the beforeActiveTabChange event.
  • This mockup gets you pretty close to what you're looking for:  http://ericmiraglia.com/yui/demos/tabchart.php . It looks like it works in FF, Safari, and Opera.  I didn't have time to trap the IE6 flow issues, but I suspect they're manageable with some additional fine tuning of the CSS.  Note that this approach hacks the TabView contentVisibleattribute for the chart's tab, preventing display:none from ever being invoked; instead, it moves the contentEl for the chart's tab into negativeland and sets its height to 0px.

Sorry not to have a better answer for you on this.  Hopefully resetting your chart's series attribute will get you the effect you need.

Regards,
Eric


On Mar 31, 2008, at 3:58 PM, Sanjiv Jivan wrote:

Eric,
I'm having troubles with this too. A simple test of moving the chart to a different div (in negetiveland) and then adding it back to its original location results in the chart being displayed really small. When I click on the chart, it ends up reloading / redrawing itself. 

Do you have a working example of this? Is there a way to force the chart to redraw without requiring me to click the chart. I'm not so concerned about the reload, but would like the chart to be displayed right when re-added to the original location. I can see that the "object tag has height and width to 100% and the parent div has the correct dimensions, yet the chart displays 20x 60px when added back to original location.

Thanks,
Sanjiv

On 3/17/08, Eric Miraglia <miraglia@yahoo-inc.com> wrote:

tully_tim,


We don't have a demo of a workaround for you at present, but one thing you might try is using the TabView's event system to move the chart out of the being-hidden tab before it's hidden, and move the chart itself into negativeland (eg, left:-3000).  Then, when the tab is activated again, move the chart back into place.

I would start with the TabView's activeTabChange event and go from there.

Regards,
Eric


On Mar 16, 2008, at 1:03 PM, tully_tim wrote:

Any temporary hacks or workarounds for this? :)

--- In ydn-javascript@yahoogroups.com, "Josh Tynjala" <jtynjala@...>
wrote:
>
> It appears that Flash Player unloads and reloads a SWF (or the browser
> removes Flash Player and reinitializes it) when a parent element's
> display changes to none and then back to block. I've tested with both
> the charts and a very simple SWF to determine that this has nothing to
> do with the charts SWF itself.
> 
> I should be able to detect this problem because the SWF will resend its
> initializing events to JavaScript when it is reloaded. However, I need
> to rework some of the JavaScript code to keep a full copy of the chart
> state so that it may be reinitialized correctly. I expect this won't be
> trivial.
> 
> Josh Tynjala
> 
> Yahoo! Flash Platform
> 
> 
> 
> 
> 
> ________________________________
> 
> From: Eric Miraglia [mailto:miraglia@...] 
> Sent: Tuesday, January 29, 2008 8:47 AM
> To: ydn-javascript@yahoogroups.com
> Subject: Re: [ydn-javascript] Re: Problems with a chart in a tab
> 
> 
> 
> Bernhard,
> 
> 
> 
> There is definitely an issue with showing and hiding the chart canvas.
> I haven't dug deeply, but it seems to me that the Charts Control is
> sensitive to the display style attribute of its parent element changing
> -- so, a toggle between display:none and display:block on the parent
> blanks out the chart canvas and the data cannot be refreshed even by
> resending the DataSource.
> 
> 
> 
> This is a known issue on our end and we're going to investigate it.
> 
> 
> 
> This will cause Charts not to play nicely with TabView and some other
> YUI controls that toggle the display property of containing elements. I
> have had some success showing/hiding the Chart by moving it off the
> viewport (ie, style.left = -3000;) when I want to hide it. I haven't
> tested that solution across the A-Grade as yet.
> 
> 
> 
> Josh Tynjala, the Charts author, will report back to the list once he's
> finished the investigation of the problem.
> 
> 
> 
> Regards,
> 
> Eric
> 
> 
> 
> 
> 
> ______________________________________________
> 
> Eric Miraglia
> 
> Yahoo! User Interface Library
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Jan 28, 2008, at 10:47 PM, bergerbd wrote:
> 
> 
> 
> 
> 
> Me again,
> 
> --- In ydn-javascript@yahoogroups.com
> <mailto:ydn-javascript%40yahoogroups.com> , "bergerbd" <bergerbd@>
> wrote:
> > I'm trying to create a TabView that contains a Chart. Therefor I've
> > merged two of the available samples. The result is a tab containing a
> > chart but after switching to an other tab and back the data isn't
> > display anymore. Is there a solution to this problem? The sample can
> be
> > found at [1]
> 
> Even reloading the datasource on the tabchange-event does not help.
> The Axis are updated but the data is still invisible. :-( 
> 
> Bernhard
> 
> > [1] http://rafb.net/p/rdX5wR14.html <http://rafb.net/p/rdX5wR14.html>
>











#28471 From: "Hollywood" <impulsegto@...>
Date: Tue Apr 1, 2008 9:06 pm
Subject: Re: Re: Problems with a chart in a tab
thzerodotcom
Send Email Send Email
 
In IE7 the chart appears the first time, but if you tab to a different tab and then back it doesn't display the tab.  Works fine in FF2.
 
----- Original Message -----
Sent: Tuesday, April 01, 2008 3:24 PM
Subject: Re: [ydn-javascript] Re: Problems with a chart in a tab

Eric,
Thanks for taking the time in putting up the sample. Unfortunately your sample doesn't work for me in IE 6 or FF 2. In FF 2, on changing tabs I only see the axes and not the lines of the chart, and in IE that chart doesn't even appear partially.

You suggestion of mychart.set("series", seriesDef);  does redraw the chart, unfortunately the chart DOM removal / move in the prior step to move it out of the tab area results in a JS error which corrupts the chart. (eg skins are lost when moved back to original location).

Looking forward to seeing a working solution for this in your next release as in the current state the charts cant be used in most ajax apps which typically hide / show content.

Thanks again.

Sanjiv

On 4/1/08, Eric Miraglia <miraglia@yahoo-inc.com> wrote:

Sanjiv,


This is undoubtedly problematic, and we need to make it easier.  As Josh mentioned, we'll look at making the chart less brittle against ancestor DOM changes in the next release -- no schedule for you on that yet, but we'll announce it here when we have a target date.

In the meantime, here are a couple of things to look at:

  • I've used mychart.set("series", seriesDef); to force the chart to redraw in my own implementations.  This has not been sufficient to recover a tabbed chart that I've broken via display:none in my tests, but it may work in your example if you've moved the chart in the beforeActiveTabChange event.
  • This mockup gets you pretty close to what you're looking for:  http://ericmiraglia.com/yui/demos/tabchart.php . It looks like it works in FF, Safari, and Opera.  I didn't have time to trap the IE6 flow issues, but I suspect they're manageable with some additional fine tuning of the CSS.  Note that this approach hacks the TabView contentVisible attribute for the chart's tab, preventing display:none from ever being invoked; instead, it moves the contentEl for the chart's tab into negativeland and sets its height to 0px.

Sorry not to have a better answer for you on this.  Hopefully resetting your chart's series attribute will get you the effect you need.

Regards,
Eric


On Mar 31, 2008, at 3:58 PM, Sanjiv Jivan wrote:

Eric,
I'm having troubles with this too. A simple test of moving the chart to a different div (in negetiveland) and then adding it back to its original location results in the chart being displayed really small. When I click on the chart, it ends up reloading / redrawing itself. 

Do you have a working example of this? Is there a way to force the chart to redraw without requiring me to click the chart. I'm not so concerned about the reload, but would like the chart to be displayed right when re-added to the original location. I can see that the "object tag has height and width to 100% and the parent div has the correct dimensions, yet the chart displays 20x 60px when added back to original location.

Thanks,
Sanjiv

On 3/17/08, Eric Miraglia <miraglia@yahoo-inc.com> wrote:

tully_tim,


We don't have a demo of a workaround for you at present, but one thing you might try is using the TabView's event system to move the chart out of the being-hidden tab before it's hidden, and move the chart itself into negativeland (eg, left:-3000).  Then, when the tab is activated again, move the chart back into place.

I would start with the TabView's activeTabChange event and go from there.

Regards,
Eric


On Mar 16, 2008, at 1:03 PM, tully_tim wrote:

Any temporary hacks or workarounds for this? :)

--- In ydn-javascript@yahoogroups.com, "Josh Tynjala" <jtynjala@...>
wrote:
>
> It appears that Flash Player unloads and reloads a SWF (or the browser
> removes Flash Player and reinitializes it) when a parent element's
> display changes to none and then back to block. I've tested with both
> the charts and a very simple SWF to determine that this has nothing to
> do with the charts SWF itself.
> 
> I should be able to detect this problem because the SWF will resend its
> initializing events to JavaScript when it is reloaded. However, I need
> to rework some of the JavaScript code to keep a full copy of the chart
> state so that it may be reinitialized correctly. I expect this won't be
> trivial.
> 
> Josh Tynjala
> 
> Yahoo! Flash Platform
> 
> 
> 
> 
> 
> ________________________________
> 
> From: Eric Miraglia [mailto:miraglia@...] 
> Sent: Tuesday, January 29, 2008 8:47 AM
> To: ydn-javascript@yahoogroups.com
> Subject: Re: [ydn-javascript] Re: Problems with a chart in a tab
> 
> 
> 
> Bernhard,
> 
> 
> 
> There is definitely an issue with showing and hiding the chart canvas.
> I haven't dug deeply, but it seems to me that the Charts Control is
> sensitive to the display style attribute of its parent element changing
> -- so, a toggle between display:none and display:block on the parent
> blanks out the chart canvas and the data cannot be refreshed even by
> resending the DataSource.
> 
> 
> 
> This is a known issue on our end and we're going to investigate it.
> 
> 
> 
> This will cause Charts not to play nicely with TabView and some other
> YUI controls that toggle the display property of containing elements. I
> have had some success showing/hiding the Chart by moving it off the
> viewport (ie, style.left = -3000;) when I want to hide it. I haven't
> tested that solution across the A-Grade as yet.
> 
> 
> 
> Josh Tynjala, the Charts author, will report back to the list once he's
> finished the investigation of the problem.
> 
> 
> 
> Regards,
> 
> Eric
> 
> 
> 
> 
> 
> ______________________________________________
> 
> Eric Miraglia
> 
> Yahoo! User Interface Library
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Jan 28, 2008, at 10:47 PM, bergerbd wrote:
> 
> 
> 
> 
> 
> Me again,
> 
> --- In ydn-javascript@yahoogroups.com
> <mailto:ydn-javascript%40yahoogroups.com> , "bergerbd" <bergerbd@>
> wrote:
> > I'm trying to create a TabView that contains a Chart. Therefor I've
> > merged two of the available samples. The result is a tab containing a
> > chart but after switching to an other tab and back the data isn't
> > display anymore. Is there a solution to this problem? The sample can
> be
> > found at [1]
> 
> Even reloading the datasource on the tabchange-event does not help.
> The Axis are updated but the data is still invisible. :-( 
> 
> Bernhard
> 
> > [1] http://rafb.net/p/rdX5wR14.html <http://rafb.net/p/rdX5wR14.html>
>








#28472 From: Todd Kloots <kloots@...>
Date: Tue Apr 1, 2008 9:29 pm
Subject: Re: Re: Context menu doesn't work second time around
toddkloots
Send Email Send Email
 
"jacintorodrigues" -

As the Menu author, I looked into this issue and cannot reproduce this
problem using the latest build (2.5.1).  Here is my test case:

http://yuiblog.com/sandbox/yui/v251/examples/menu/example04.html

If you are having this problem, a very likely cause is that you are
reusing the same id each time you are creating a ContextMenu without
first destroying the previous instance that used that id.  Take a look
at the above example and if you are still experiencing this issue,
please notify me as well as provide a URL to a simple example that
clearly illustrates how to reproduce the bug.

Thanks,
Todd

jacintorodrigues wrote:
>
> Hi,
>
> I'm having exactly the same problem.
>
> Any help would be appreciated.
>
> Thanks
>
> --- In ydn-javascript@yahoogroups.com
> <mailto:ydn-javascript%40yahoogroups.com>, "jasonlee9" <jasonlee9@...>
> wrote:
> >
> > Hello,
> >
> > I'm having a prob w/context men and it's in regards to operating on
> > swapping out elements and re-creating the menu.
> >
> > When a user logs into my app, they only load the 'home' page once.
> > From there on out, I'm using all ajax requests and just updating the
> > dom at various points. A user can click on a 'Case' (like an issue/bug
> > report), which then takes them to a screen where they can see the
> > progress of it. The progress - or case message - is displayed as
> > paragraphs would be in a document. Each case message is wrapped in its
> > own div. At the 'home' level of the page I define a var like so:
> >
> > var ctx_menu;
> >
> > Then when I'm rendering out the case, each case is wrapped in a parent
> > div called 'current_case'. Once all of the case messages are rendered
> > out, I kick of some script to get all the case messages (based on
> > class name) and then assign that to the new context menu object. Since
> > the user can navigate back and forth in my app without the ctx_menu
> > var being cleared, I check to see if it's already been assigned and
> > then call the destroy() method on it. Here's my js that's at the
> > bottom of the case loading page snippet:
> >
> > if( typeof ctx_menu != "undefined"){ctx_menu.destroy;}
> > var case_messages=$$('div.edit_case_message'); // via prototype.js
> > ctx_menu=new YAHOO.widget.ContextMenu("cm_ctxmenu", {
> > trigger:case_messages,hidedelay:250 } );
> > ctx_menu.addItem("Insert case message before this one");
> > ctx_menu.addItem("Insert case message after this one");
> > ctx_menu.render("current_case");
> >
> > (current_case is the div that's the container for all the case
> messages.)
> >
> > So you can see I'm hooking up events to each case message and allowing
> > a user to insert a new one before or after an existing one. This all
> > works fine when I load up a first case after I've done a browser
> > reload/refresh. Plus, I have a hidedelay set so when a user focuses
> > out of the menu, it goes away. But when I navigate back to my case
> > list screen (no browser refresh, just DOM manip via ajax), then click
> > on the same or a different case, I can get the context menus to pop
> > up, but the menu items don't highlight when i mouseover them, nor can
> > I even select them. And the menu does not hide anymore. It just stays
> > there. Clicking out on some other part of the doc has no effect.
> >
> > Any suggestions as to why this might be happening? I'm trying to make
> > sure the ctx_menu var is destroyed before I render a new one, but it
> > doesn't seem to make a difference. tia.
> >
>
>

#28473 From: Todd Kloots <kloots@...>
Date: Tue Apr 1, 2008 9:32 pm
Subject: Re: tricky yuimenubar question
toddkloots
Send Email Send Email
 
"kevinmccalley"

Are you building your Menu from existing markup or completely from
script.  If the former, do you have the first-of-type CSS class names
applied in the correct places in the markup before you call the MenuBar
constructor?  Lastly, can you provide a URL to a simple example that
illustrates the problem?

Thanks,
Todd



kevinmccalley wrote:
>
> I am using a YUI horizontal menu bar, and for the most part, all of
> the elements seem to render very nicely.
>
> but the first-of-type item (yuimenubaritem first-of-type) does not
> initially position itself where it should -- once the page loads, it
> inconveniently moves to the top-left of the screen.
>
> then when the mouse is first moved by the user, the menubar item pops
> into the correct place.
>
> any ideas as to why this might be happening?
>
> anyone know how to fix this?
>
> firefox renders the menubar perfectly -- this problem only occurs in IE.
>
>

#28474 From: Todd Kloots <kloots@...>
Date: Tue Apr 1, 2008 9:40 pm
Subject: Re: YUI buttons layout with AJAX request
toddkloots
Send Email Send Email
 
Pieter -

Can you clarify the order of operations for creating your button? Is the
AJAX call you are making returning the HTML that will be used to create
the Button?  If so, you should be creating the Button inside the scope
of the callback for the AJAX request.  For example, some pseudo code:

onAJAXResponse(data) {

     contentElement.innerHTML = data;

     var oSubmitButton1 = new
YAHOO.widget.Button("add-initial-aliquots-submit-button", {
type:"submit" });

}

Better yet - can you provide a URL to an example that illustrates how
this comes together?  That'll make it much easier to help you debug.

- Todd

pieter.thoma wrote:
>
> Hi,
>
> I'm having a small problem when using YUI buttons and doing an AJAX
> request. I have some dynamic content which gets into a span or div
> using AJAX. The HTML is well returned, but the initialisation of the
> javascript code to make the hover of the button look well doesn't seem
> to work.
>
> I changed this:
>
> YAHOO.example.init = function () {
> YAHOO.util.Event.onContentReady("add-initial-aliquots", function () {
> var oSubmitButton1 = new
> YAHOO.widget.Button("add-initial-aliquots-submit-button", { type:
> "submit" });
> });
> } ();
>
> to:
> function click() {
> //ajax request
> YAHOO.util.Event.onContentReady("add-initial-aliquots", function () {
> var oSubmitButton1 = new
> YAHOO.widget.Button("add-initial-aliquots-submit-button", { type:
> "submit" });
> });
>
> But it doesn't seem to work.
>
> What am I doing wrong?
> } ();
>
>

#28475 From: Todd Kloots <kloots@...>
Date: Tue Apr 1, 2008 9:42 pm
Subject: Re: Adding id to a yui button
toddkloots
Send Email Send Email
 
If you want to apply an id to the actual <button> element, then you will
need to utilize the DOM to access that node inside the Button instance's
root element:

oButton.get("element").firstChild.firstChild.id = "my-button-id";

- Todd

royals87 wrote:
>
> This may be simple, but how do i make a button id appear in the html
> source after page load.
>
> If i type an id, it does not get copied over but rather gets generated
> like this:
>
> <span id="personalNextContainer" class="yuibutton yui-button
> yui-push-button">
> <span class="first-child">
> <button type="button" tabindex="0">Next</button>
> </span>
> </span>
>
>

#28476 From: "y_lsmith" <lsmith@...>
Date: Tue Apr 1, 2008 10:40 pm
Subject: Re: DS_JSFunction calling oFunction from global scope
y_lsmith
Send Email Send Email
 
Maybe you need to include the pass through arguments in the anonymous function wrapper?

var me = this;
this.myACDataSource = new YAHOO.widget.DS_JSFunction(function (a,b,c) {
    me.someFunc(a,b,c);
});

   
Or a more broad brush approach:
var me = this;
this.myACDataSource = new YAHOO.widget.DS_JSFunction(function () {
    someFunc.apply(me, arguments);
});


Hope this helps,
Luke

--- In ydn-javascript@yahoogroups.com, "jeremymefford" <jeremymefford@...> wrote:
>
> So that worked perfect to fix my scope issue, however now my param
> from the autocomplete is not getting passed into the function...
>
> --- In ydn-javascript@yahoogroups.com, "y_lsmith" lsmith@ wrote:
> >
> > Jeremy,
> >
> > The JavaScript interpreter dereferences this.someFunc to the function
> > itself (not the function scoped to the this object) before passing it to
> > the DS_JSFunction constructor. Functions do not carry their scope with
> > them; this is determined when they are executing.
> >
> > For example:
> >
> > var someFunc = function () {
> > alert(this.name); // who is this?
> > };
> >
> > var MyClass = function (name) {
> > this.name = name;
> > this.fooFunc = someFunc;
> > };
> >
> > var MyOtherClass = function (name) {
> > this.name = name;
> > };
> > MyOtherClass.prototype.barFunc = someFunc;
> >
> > // this is the window object
> > someFunc();
> >
> > // this is the MyClass instance
> > new MyClass('foo').fooFunc();
> >
> > // this is the MyOtherClass instance
> > new MyOtherClass('bar').barFunc();
> >
> > var baz = { name: 'baz' };
> > // this is baz
> > someFunc.call(baz);
> >
> > You can avoid the this confusion by creating a closure around your
> > instance method like so:
> >
> > init : function () {
> > //do stuff
> >
> > var me = this;
> > this.myACDataSource = new YAHOO.widget.DS_JSFunction(function () {
> > me.someFunc();
> > });
> > },
> >
> > Hope this helps,
> > Luke
> >
> > --- In ydn-javascript@yahoogroups.com, "jeremymefford"
> > <jeremymefford@> wrote:
> > >
> > > I'm not quite sure how to fix this problem I'm having. I created a
> > > custom object that contains an autocomplete widget with a datatable.
> > >
> > > I used the example off the YUI site that had me use DS_JSFunction for
> > > my autocomplete widget, however the oFunction that it's calling is
> > > referenced from the global scope when I want it to be local. I all
> > > actuality, I'm not even sure how it's calling from the global scope in
> > > this case.
> > >
> > > Here is my situation, in code:
> > >
> > > var myObj = function() {
> > > return {
> > >
> > > vars:null,
> > > init: function() {
> > >
> > > //do stuff
> > > this.myACDataSource = new
> > YAHOO.widget.DS_JSFunction(this.someFunc);
> > >
> > > }
> > >
> > > someFunc: function() {
> > > this.myvar = 'foo';
> > > }
> > >
> > > }
> > > }
> > >
> > > So, when I debug this w/Firebug with a breakpoint on the line
> > > this.myvar = 'foo', firebug tells me:
> > >
> > > this = window test.jsp
> > >
> > > I'm so very confused as to how this is the case when clearly the
> > > function called was in the scope of myObj. I've worked around it by
> > > calling this.myObjInstance.myvar, but I feel that this is a hack and
> > > there should be a better way to do this.
> > >
> >
>

#28477 From: "y_lsmith" <lsmith@...>
Date: Tue Apr 1, 2008 10:40 pm
Subject: Re: DS_JSFunction calling oFunction from global scope
y_lsmith
Send Email Send Email
 
Maybe you need to include the pass through arguments in the anonymous function wrapper?

var me = this;
this.myACDataSource = new YAHOO.widget.DS_JSFunction(function (a,b,c) {
    me.someFunc(a,b,c);
});

   
Or a more broad brush approach:
var me = this;
this.myACDataSource = new YAHOO.widget.DS_JSFunction(function () {
    someFunc.apply(me, arguments);
});


Hope this helps,
Luke

--- In ydn-javascript@yahoogroups.com, "jeremymefford" <jeremymefford@...> wrote:
>
> So that worked perfect to fix my scope issue, however now my param
> from the autocomplete is not getting passed into the function...
>
> --- In ydn-javascript@yahoogroups.com, "y_lsmith" lsmith@ wrote:
> >
> > Jeremy,
> >
> > The JavaScript interpreter dereferences this.someFunc to the function
> > itself (not the function scoped to the this object) before passing it to
> > the DS_JSFunction constructor. Functions do not carry their scope with
> > them; this is determined when they are executing.
> >
> > For example:
> >
> > var someFunc = function () {
> > alert(this.name); // who is this?
> > };
> >
> > var MyClass = function (name) {
> > this.name = name;
> > this.fooFunc = someFunc;
> > };
> >
> > var MyOtherClass = function (name) {
> > this.name = name;
> > };
> > MyOtherClass.prototype.barFunc = someFunc;
> >
> > // this is the window object
> > someFunc();
> >
> > // this is the MyClass instance
> > new MyClass('foo').fooFunc();
> >
> > // this is the MyOtherClass instance
> > new MyOtherClass('bar').barFunc();
> >
> > var baz = { name: 'baz' };
> > // this is baz
> > someFunc.call(baz);
> >
> > You can avoid the this confusion by creating a closure around your
> > instance method like so:
> >
> > init : function () {
> > //do stuff
> >
> > var me = this;
> > this.myACDataSource = new YAHOO.widget.DS_JSFunction(function () {
> > me.someFunc();
> > });
> > },
> >
> > Hope this helps,
> > Luke
> >
> > --- In ydn-javascript@yahoogroups.com, "jeremymefford"
> > <jeremymefford@> wrote:
> > >
> > > I'm not quite sure how to fix this problem I'm having. I created a
> > > custom object that contains an autocomplete widget with a datatable.
> > >
> > > I used the example off the YUI site that had me use DS_JSFunction for
> > > my autocomplete widget, however the oFunction that it's calling is
> > > referenced from the global scope when I want it to be local. I all
> > > actuality, I'm not even sure how it's calling from the global scope in
> > > this case.
> > >
> > > Here is my situation, in code:
> > >
> > > var myObj = function() {
> > > return {
> > >
> > > vars:null,
> > > init: function() {
> > >
> > > //do stuff
> > > this.myACDataSource = new
> > YAHOO.widget.DS_JSFunction(this.someFunc);
> > >
> > > }
> > >
> > > someFunc: function() {
> > > this.myvar = 'foo';
> > > }
> > >
> > > }
> > > }
> > >
> > > So, when I debug this w/Firebug with a breakpoint on the line
> > > this.myvar = 'foo', firebug tells me:
> > >
> > > this = window test.jsp
> > >
> > > I'm so very confused as to how this is the case when clearly the
> > > function called was in the scope of myObj. I've worked around it by
> > > calling this.myObjInstance.myvar, but I feel that this is a hack and
> > > there should be a better way to do this.
> > >
> >
>

#28478 From: "y_lsmith" <lsmith@...>
Date: Tue Apr 1, 2008 10:32 pm
Subject: Re: JSON Parsing Problem
y_lsmith
Send Email Send Email
 
Do you have a sample page I could look at?

Luke


--- In ydn-javascript@yahoogroups.com, "mr_cebyrd" <mr_cebyrd@...> wrote:
>
> I have a problem with using YUI's JSON parser in Internet
> Explorer(IE). I'm using IE, version 6.  I'm able to use the parse
> method just fine in Firefox(By the way, I'm using YUI 2.5.1).
> However, when I try to use the JSON parser inside IE, I get unhandled
> exception errors. Any clues as to what could be causing this problem?
>  Thanks in advance.
>

#28479 From: Nate Koechley <natek@...>
Date: Tue Apr 1, 2008 10:59 pm
Subject: Re: CSS grids: is there a recommended way to add css to grids?
nate.koechley
Send Email Send Email
 
Hey Jim,

The simple and surefire way is to treat Grids as a blank shell: Put
your HTML inside of Grids' and style only your HTML.

Of course it is possible to add your design's CSS to Grids' nodes
directly. Doing so may be somewhat more efficient (in terms of page
weight, etc), but may introduce some risk (if you change width,
border, margin, padding, position, float, display ... .)

Thanks,
Nate





On Apr 1, 2008, at 5:59 AM, Jim Byrne wrote:

> Hi,
>
> I'm been looking at the YUI CSS grids and would like to adopt the
> approach for a project - but I'm a bit lost as to how I add my own
> styles to the basic grids. I don't mean I don't know how to use CSS, I
> mean what's the best way to apply my own css rules to an existing
> grid?
>
> Is there a recommended approach?
>
> Do I just use the existing id's as hooks for my own extra padding,
> background images, colours and so on? Will this break the grid?
>
> I've done some searching and browsed the YUI website but can't find
> anything that points me in the right direction.
>
> Your help is appreciated. Thanks.
>
> All the best,
> Jim
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

#28480 From: Eric Miraglia <miraglia@...>
Date: Tue Apr 1, 2008 11:32 pm
Subject: Re: Re: Problems with a chart in a tab
ericmiraglia
Send Email Send Email
 
Hollywood and Sanjiv,

For what it's worth (no big claims here), this does seem doable:


This approach works for me in FF2.0.0.13, IE 6 and 7, Opera 9.26, and Safari 3.1.

When I looked at this again this afternoon, I noticed that IE didn't need any special treatment -- so I forked around YAHOO.env.ua.ie to prevent IE from seeing the hack.  There are three things I dislike about this:

  1. The fork is based on UA;
  2. It modifies a private member of the chart's Tab;
  3. The underlying fragility of the Chart isn't addressed.

That said, if you're looking to get this rolling right away, you may want to take a look.  If we come up with a better short-term solution, we'll let you know; meantime, we'll work on the underlying issue wrt to recovering from display:none and visibility:hidden on the Chart itself.

Regards,
Eric


On Apr 1, 2008, at 2:06 PM, Hollywood wrote:

In IE7 the chart appears the first time, but if you tab to a different tab and then back it doesn't display the tab.  Works fine in FF2.
 
----- Original Message -----
Sent: Tuesday, April 01, 2008 3:24 PM
Subject: Re: [ydn-javascript] Re: Problems with a chart in a tab

Eric,
Thanks for taking the time in putting up the sample. Unfortunately your sample doesn't work for me in IE 6 or FF 2. In FF 2, on changing tabs I only see the axes and not the lines of the chart, and in IE that chart doesn't even appear partially.

You suggestion of mychart.set("series", seriesDef);  does redraw the chart, unfortunately the chart DOM removal / move in the prior step to move it out of the tab area results in a JS error which corrupts the chart. (eg skins are lost when moved back to original location).

Looking forward to seeing a working solution for this in your next release as in the current state the charts cant be used in most ajax apps which typically hide / show content.

Thanks again.

Sanjiv

On 4/1/08, Eric Miraglia <miraglia@yahoo-inc.com> wrote:

Sanjiv,


This is undoubtedly problematic, and we need to make it easier.  As Josh mentioned, we'll look at making the chart less brittle against ancestor DOM changes in the next release -- no schedule for you on that yet, but we'll announce it here when we have a target date.

In the meantime, here are a couple of things to look at:

  • I've used mychart.set("series", seriesDef); to force the chart to redraw in my own implementations.  This has not been sufficient to recover a tabbed chart that I've broken via display:none in my tests, but it may work in your example if you've moved the chart in the beforeActiveTabChangeevent.
  • This mockup gets you pretty close to what you're looking for:  http://ericmiraglia.com/yui/demos/tabchart.php . It looks like it works in FF, Safari, and Opera.  I didn't have time to trap the IE6 flow issues, but I suspect they're manageable with some additional fine tuning of the CSS.  Note that this approach hacks the TabView contentVisibleattribute for the chart's tab, preventing display:none from ever being invoked; instead, it moves the contentEl for the chart's tab into negativeland and sets its height to 0px.

Sorry not to have a better answer for you on this.  Hopefully resetting your chart's series attribute will get you the effect you need.

Regards,
Eric


On Mar 31, 2008, at 3:58 PM, Sanjiv Jivan wrote:

Eric,
I'm having troubles with this too. A simple test of moving the chart to a different div (in negetiveland) and then adding it back to its original location results in the chart being displayed really small. When I click on the chart, it ends up reloading / redrawing itself. 

Do you have a working example of this? Is there a way to force the chart to redraw without requiring me to click the chart. I'm not so concerned about the reload, but would like the chart to be displayed right when re-added to the original location. I can see that the "object tag has height and width to 100% and the parent div has the correct dimensions, yet the chart displays 20x 60px when added back to original location.

Thanks,
Sanjiv

On 3/17/08, Eric Miraglia <miraglia@yahoo-inc.com> wrote:

tully_tim,


We don't have a demo of a workaround for you at present, but one thing you might try is using the TabView's event system to move the chart out of the being-hidden tab before it's hidden, and move the chart itself into negativeland (eg, left:-3000).  Then, when the tab is activated again, move the chart back into place.

I would start with the TabView's activeTabChange event and go from there.

Regards,
Eric


On Mar 16, 2008, at 1:03 PM, tully_tim wrote:

Any temporary hacks or workarounds for this? :)

--- In ydn-javascript@yahoogroups.com, "Josh Tynjala" <jtynjala@...>
wrote:
>
> It appears that Flash Player unloads and reloads a SWF (or the browser
> removes Flash Player and reinitializes it) when a parent element's
> display changes to none and then back to block. I've tested with both
> the charts and a very simple SWF to determine that this has nothing to
> do with the charts SWF itself.
> 
> I should be able to detect this problem because the SWF will resend its
> initializing events to JavaScript when it is reloaded. However, I need
> to rework some of the JavaScript code to keep a full copy of the chart
> state so that it may be reinitialized correctly. I expect this won't be
> trivial.
> 
> Josh Tynjala
> 
> Yahoo! Flash Platform
> 
> 
> 
> 
> 
> ________________________________
> 
> From: Eric Miraglia [mailto:miraglia@...] 
> Sent: Tuesday, January 29, 2008 8:47 AM
> To: ydn-javascript@yahoogroups.com
> Subject: Re: [ydn-javascript] Re: Problems with a chart in a tab
> 
> 
> 
> Bernhard,
> 
> 
> 
> There is definitely an issue with showing and hiding the chart canvas.
> I haven't dug deeply, but it seems to me that the Charts Control is
> sensitive to the display style attribute of its parent element changing
> -- so, a toggle between display:none and display:block on the parent
> blanks out the chart canvas and the data cannot be refreshed even by
> resending the DataSource.
> 
> 
> 
> This is a known issue on our end and we're going to investigate it.
> 
> 
> 
> This will cause Charts not to play nicely with TabView and some other
> YUI controls that toggle the display property of containing elements. I
> have had some success showing/hiding the Chart by moving it off the
> viewport (ie, style.left = -3000;) when I want to hide it. I haven't
> tested that solution across the A-Grade as yet.
> 
> 
> 
> Josh Tynjala, the Charts author, will report back to the list once he's
> finished the investigation of the problem.
> 
> 
> 
> Regards,
> 
> Eric
> 
> 
> 
> 
> 
> ______________________________________________
> 
> Eric Miraglia
> 
> Yahoo! User Interface Library
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Jan 28, 2008, at 10:47 PM, bergerbd wrote:
> 
> 
> 
> 
> 
> Me again,
> 
> --- In ydn-javascript@yahoogroups.com
> <mailto:ydn-javascript%40yahoogroups.com> , "bergerbd" <bergerbd@>
> wrote:
> > I'm trying to create a TabView that contains a Chart. Therefor I've
> > merged two of the available samples. The result is a tab containing a
> > chart but after switching to an other tab and back the data isn't
> > display anymore. Is there a solution to this problem? The sample can
> be
> > found at [1]
> 
> Even reloading the datasource on the tabchange-event does not help.
> The Axis are updated but the data is still invisible. :-( 
> 
> Bernhard
> 
> > [1] http://rafb.net/p/rdX5wR14.html <http://rafb.net/p/rdX5wR14.html>
>












Messages 28451 - 28480 of 52481   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help