Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Menu Button submitting wrong value   Message List  
Reply | Forward Message #36442 of 52121 |
Re: [ydn-javascript] Menu Button submitting wrong value

Djalma -

What is the type of the Button you are using?

- Todd

Djalma Fadel Junior wrote:
>
> Thank you Todd,
>
> It sets the button value and I can get it through oButton.get("value").
>
> The problem now resides on posting the form where the button is in.
>
> I'm using
>
> oButton.addHiddenFieldsToForm();
>
> to post button value to the server via Connection Manager.
>
> But the button is not being posted.
>
> Is it possible to set the button value using method .set() and post
> its value through asyncRequest?
>
> thanks in advance,
>
> Em Wed, 20 Aug 2008 11:17:04 -0700
> Todd Kloots <kloots@... <mailto:kloots%40yahoo-inc.com>>
> escreveu:
>
> > Djalma -
> >
> > To set the value of a Button, use the "value" property:
> >
> > oButton.set("value", "somevalue");
> >
> > The other bug is a bug in Menu that will be resolved in the upcoming
> 2.6
> > release of YUI.
> >
> > - Todd
> >
> > Djalma Fadel Junior wrote:
> > >
> > > I'm facing the same problem. Was it solved?
> > >
> > > Another question is. How to set the 'value' and the 'text label' of a
> > > button?
> > >
> > > just setting
> > >
> > > myMenuButton.set("label", "option 2");
> > >
> > > doesn't set the value for posting.
> > >
> > > thx
> > >
> > > Em Thu, 07 Aug 2008 08:51:22 -0000
> > > "yui_bill" <yui_bill@... <mailto:yui_bill%40yahoo.com>
> <mailto:yui_bill%40yahoo.com>> escreveu:
> > >
> > > > I am using the example from
> > > >
> http://developer.yahoo.com/yui/examples/button/btn_example07.html
> <http://developer.yahoo.com/yui/examples/button/btn_example07.html>
> > > <http://developer.yahoo.com/yui/examples/button/btn_example07.html
> <http://developer.yahoo.com/yui/examples/button/btn_example07.html>>
> > > >
> > > > I copy-pasted the entire code into an ASPX page, and added an ASP
> > > > button to submit the form.
> > > >
> > > > The problem is with the Javascript-created menubutton with the
> > > > values "one", "two", "three".
> > > >
> > > > First, if I submit the form without touching the menubutton, no
> value
> > > > at all is submitted for this button.
> > > >
> > > > Secondly, if I open the menu, choose the value "two" and then submit
> > > > the page, the value is correctly submitted as "two". However, if I
> > > > open the menu, choose the value "two", and then re-open the menu and
> > > > hover over another option WITHOUT selecting it, close the menu by
> > > > clicking elsewhere on the page (the value on the button is
> > > > still "two") and then submit the page, the value is now beeing
> > > > submitted as the value of the last "hovered" menu item instead
> of the
> > > > value on the button.
> > > >
> > > > Any thoughts on this? Is it a bug, or am I using the control
> > > > incorrectly?
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > > --
> > > Djalma Fadel Junior
> > > Diretor Técnico
> > > Ferasoft Corporation Ltda
> > > Soluções em Tecnologia da Informação
> > > +55 (19) 3542-3490
> > >
> > >
> >
>
> --
> Djalma Fadel Junior
> Diretor Técnico
> Ferasoft Corporation Ltda
> Soluções em Tecnologia da Informação
> +55 (19) 3542-3490
>
>




Thu Aug 21, 2008 1:33 am

toddkloots
Offline Offline
Send Email Send Email

Forward
Message #36442 of 52121 |
Expand Messages Author Sort by Date

I am using the example from http://developer.yahoo.com/yui/examples/button/btn_example07.html I copy-pasted the entire code into an ASPX page, and added an ASP...
yui_bill
Offline Send Email
Aug 7, 2008
8:51 am

I'm facing the same problem. Was it solved? Another question is. How to set the 'value' and the 'text label' of a button? just setting ...
Djalma Fadel Junior
dfadel@...
Send Email
Aug 13, 2008
8:26 pm

Djalma - To set the value of a Button, use the "value" property: oButton.set("value", "somevalue"); The other bug is a bug in Menu that will be resolved in the...
Todd Kloots
toddkloots
Offline Send Email
Aug 20, 2008
6:17 pm

Thank you Todd, It sets the button value and I can get it through oButton.get("value"). The problem now resides on posting the form where the button is in. I'm...
Djalma Fadel Junior
phadell2001
Offline Send Email
Aug 20, 2008
8:32 pm

Djalma - What is the type of the Button you are using? - Todd...
Todd Kloots
toddkloots
Offline Send Email
Aug 21, 2008
1:34 am

Todd, I'm using the menu button type. thanks. Em Wed, 20 Aug 2008 18:33:59 -0700 ... -- Djalma Fadel Junior Diretor Técnico Ferasoft Corporation Ltda ...
Djalma Fadel Junior
phadell2001
Offline Send Email
Aug 21, 2008
5:32 pm

Djalma - Going back to your original question regarding the Menu button. Seems like you were getting inconsistent results in your post data: the name and...
Todd Kloots
toddkloots
Offline Send Email
Aug 22, 2008
4:56 am

Todd, Sorry. I wasn't much clear about the problem. If I set the value of the menu button clicking on it, everything works fine. The menu label is set and the...
Djalma Fadel Junior
phadell2001
Offline Send Email
Aug 22, 2008
12:15 pm

Djalma - Are you following the instructions on the Button landing page and calling Button's "YAHOO.widget.Button.addHiddenFieldsToForm" method before using...
Todd Kloots
toddkloots
Offline Send Email
Aug 29, 2008
4:43 pm

"yui_bill" - It is indeed a bug, one that will be fixed in the upcoming 2.6 release of YUI. - Todd...
Todd Kloots
toddkloots
Offline Send Email
Aug 20, 2008
6:14 pm
Advanced

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