You could also use two different forms with two different submit buttons. Each form can have a hidden disabled text field that contains the text, so when it is submitted with the button you can read the form field that is attached to that form and find out if it is an ON or an OFF... or you could skip all of this and use javascript with JSON.
Good luck. On Jun 19, 4:26 am, AsmanCom <d.as...@web.de> wrote: > Yeah, that gos in the right direction, > I am already using an JQuery "Toggle" Button: > > jQuery(".my_button").toggle(function(){ > jQuery(this).val("On"); > jQuery("#anything").stop(true,true).show("slow");},function(){ > > jQuery(this).val("Off"); > jQuery("#anything").stop(true,true).hide("slow"); > > }); > > But i need to make client side Value available vor a server-side > Callback without submitting the form. > > I thought i could some how read the value the button holds. > > But may i´ve to use a workaround by changing the value of an hidden > form elemet with Button onclick event (How can I do this ??????), > client-side. > > And then i can do request.vars.formelemt > > How can i change the Value of this, without submitting the form: > > form = SQLFORM.factory(Field('switch', > requires=IS_IN_SET(['On','Off']), > default="Off", > widget=SQLFORM.widgets.radio.widget)) > > THX > > Dieter Asman > > On 19 Jun., 12:52, David Marko <dma...@tiscali.cz> wrote: > > > > > For the form based applications I like Dojo Toolkit, especially > > declarative mode. See the Checkbox widget > > here:http://www.dojotoolkit.org/reference-guide/dijit/form/ToggleButton.ht... > > > David > > > On 19 čvn, 11:25, AsmanCom <d.as...@web.de> wrote: > > > > I don´t think so, but I need to receive the Value contained in the > > > Button. > > > > Checkbox would be the Solution, but it must look like a Button. > > > > Any Ideas? > > > > THX > > > > Dieter Asman > > > > On 19 Jun., 02:30, Richard <richar...@gmail.com> wrote: > > > > > can buttons post form data? > > > > > Are you perhaps after a checkbox instead? > > > > > On Jun 19, 3:11 am, AsmanCom <d.as...@web.de> wrote: > > > > > > Hi, > > > > > > I need to retrieve the request.vars from an JavaScript Object. > > > > > > controller code: > > > > > > form.append(INPUT( _id="buttonid", _type="button", _class="my_button", > > > > > _name="buttonName", _value="Off")) > > > > > > and then i want to get the value from this, like so: > > > > > > if request.vars.buttonName == "Off": > > > > > do anything > > > > > > But it doesn´t work. > > > > > > Could you explain how to achieve this? > > > > > > TXH > > > > > > Dieter Asman