Re: Submit button in toolbar?

2012-06-05 Thread Giacomo Balli
how are you linking the action to the real button?

On Jun 5, 4:01 am, sblair s.bl...@ieee.org wrote:
 I basically need to add a submit button to the toolbar.

 Ideally I'd like to be able to set which pages it goes on without too
 much trouble but even getting it to function at all right now would
 help.

 The button shows up right now but it doesn't work.  Here's my toolbar
 code below.  The commented out button is the normal submit button I
 had at the bottom of the form which did work.

 I'm guessing my issue is because the toolbar button isn't in the
 within the form /form tags.  Any suggestions?

    div class=toolbar
       h1 id=pageTitle/h1
       a id=backButton class=button href=#/a
       a class=button blueButton type=submit
 onclick=(function(event) {return true;})()Send/a
     !--  a class=whiteButton type=submit
 onclick=(function(event) {return true;})()Send/a --
    /div

-- 
You received this message because you are subscribed to the Google Groups 
iPhoneWebDev group.
To post to this group, send email to iphonewebdev@googlegroups.com.
To unsubscribe from this group, send email to 
iphonewebdev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.



Re: Submit button in toolbar?

2012-06-05 Thread Remi Grumeau 
You're right and wrong :)
Between form  /form, an input type=submit does submit the form it 
belongs to. An input, not a a.

Here, submit is in toolbar div, so outside the form. so you need to call the 
form externally. To do so, you need to give your form a name attribute, and the 
button needs to target it properly.

using beforetransition / aftertransition listener, you can deal with the 
show/hide of buttons in the toolbar (or using tbdmod plugin). 

Then, if you only have a few forms or a defined list of form, you can set your 
submit button href to:
javascript:myFormName.submit()
with the form being form name=myFormName method=  ... /form

If it's all dynamic, you can use iui.getSelectedPage().name to get myFormName 
value dynamiquely. 


Remi

On 5 juin 2012, at 04:01 AM, sblair s.bl...@ieee.org wrote:

 I basically need to add a submit button to the toolbar.
 
 Ideally I'd like to be able to set which pages it goes on without too
 much trouble but even getting it to function at all right now would
 help.
 
 The button shows up right now but it doesn't work.  Here's my toolbar
 code below.  The commented out button is the normal submit button I
 had at the bottom of the form which did work.
 
 I'm guessing my issue is because the toolbar button isn't in the
 within the form /form tags.  Any suggestions?
 
   div class=toolbar
  h1 id=pageTitle/h1
  a id=backButton class=button href=#/a
  a class=button blueButton type=submit
 onclick=(function(event) {return true;})()Send/a
!--  a class=whiteButton type=submit
 onclick=(function(event) {return true;})()Send/a --
   /div
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 iPhoneWebDev group.
 To post to this group, send email to iphonewebdev@googlegroups.com.
 To unsubscribe from this group, send email to 
 iphonewebdev+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/iphonewebdev?hl=en.
 

-- 
You received this message because you are subscribed to the Google Groups 
iPhoneWebDev group.
To post to this group, send email to iphonewebdev@googlegroups.com.
To unsubscribe from this group, send email to 
iphonewebdev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.