Heya, here's my prefered method for multiple submit buttons on a single form.
 
Let's say the form is named "thisform"
 
<input type=submit value="Button A" >
 
<input type=submit value="Button B" > 
<input type=submit value="Button C" >
 
I think you get the idea (:
 
in the action you set onClick you can put whatever you want and when the button is pressed, it will go to the page you specify and any arguments that are part of the form will be passed as well.
 
On 5/10/06, Dan Stein <[EMAIL PROTECTED]> wrote:
If anyone has code they used to work around this or accomplish some other way having one form that can have multiple submit buttons and passing a value based on which button is clicked I would really appreciate it.

I am major weak on _javascript_ so even though Ben seems to be pointing me in the right direction I don't know how to get this to then give me a value I can check for in the Witango Action.



on 5/10/06 17:18, Ben Johansen at [EMAIL PROTECTED] wrote:

1 thing i noticed about calling the submit() method, is it seem to totally ignore that you have a onSubmit designated in the form tag
so you need to encapsulate the functionality of code that you were doing in the onSubmit.

i recommend making another function that you call from the onClick of your image button

function doThenSubmit()
{
process validations code here
form.submit()
}

Hope this helps

Ben

On May 10, 2006, at 2:06 PM, Dan Stein wrote:

Ben that seems to be on the right track. How do I get it to send a value though. There is just one form.
 
 I should be able to use the onclick somehow.
 
 In this case we have people looking at there cart.
 
 We have no idea if the have changed the quantity of any item in the cart.
 
 So before the can continue shopping or go to checkout we need to update the cart.
 
 So the button first of the same action in the taf file the update cart. After it does that it looks to see if the submit value ( or whatever we can accomplish with on-click) passes shopping or checkout and then branches where it needs to go.
 
 So I am wondering what syntax I can use with that onclick hopefully using
Inline HTML    <ELEMENT onclick = "handler" ... >    All platforms because of the all platforms thing that will accomplish this.
 
 

 
 
 on 5/10/06 16:55, Ben Johansen at [EMAIL PROTECTED] wrote:
 
 
Yes, you are, right, i realized it just after I sent.
 
 have you tried onClick(document.formname.submit();)
 
 Ben
 
 On May 10, 2006, at 1:28 PM, Dan Stein wrote:
 
 
I think you really do have all the information you need it is not passing the value of the submit button in IE as Scott says because the button is an image.
  
  You are welcome to go ahead and visit the site it is all in demo and a work in process.
  

  
  You will need to add some items to your cart and then click on proceed to checkout.
  
  Not sure that will help but when I put on debug I can see it is doing w2hat I said. Passing the value in the button on browsers other than IE.
  
  I tried to see if I could use the x, y which is passed but it is different in IR depending on the ize of your window so tthat will not help at all.
  
  on 5/10/06 15:36, Ben Johansen at [EMAIL PROTECTED] wrote:
  
  
 
You didn't give enough information, on submit, there are many factors and your assuming it is JS.
  
  Do you have a URL so we can see the full page?
  
  Ben
  
  
  On May 10, 2006, at 12:05 PM, Dan Stein wrote:
  
  
 
I am having trouble with a submit button in IE that has a value=checkout. In FireFox on windows and safari on Mac it works fine I can see in the debug that it is passing the arg submit=checkout. On IE it refuses to pass submit at all.
   
  The _javascript_ is nothing to fancy it is generated by DreamWeaver 8.
   
  
<script type="text/_javascript_">
  
<!--
  function MM_swapImgRestore() { //v3.0
    var i,x,a= document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src="">  }
   
  function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
      var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
      if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src="">  }
   
  function MM_findObj(n, d) { //v4.01
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x= d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById ) x=d.getElementById(n); return x;
  }
   
  function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
     if ((x=MM_findObj(a[i]))!=null){ document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src="">  }
  //-->
  
</script>
  
 
   
  The button looks like this
   
  
                    <div align="right" >
   
  <INPUT
TYPE=IMAGE BORDER=0 SRC= "">"<@appfilepath>images/continue_to_checkout.gif" width='108' height='18' border='0'  NAME="Submit" Value=checkout><br />
                      </div>
   
   
  Anyone see my error? Anyone seen this before? Is there are work around?
   
   
  
 
  
________________________________________________________________________
  TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
  
  
 

  
  ________________________________________________________________________
  TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
  
  
 

  
  --
  Dan Stein
  FileMaker 7 Certified Developer
  Digital Software Solutions
  799 Evergreen Circle
  Telford PA 18969
  Land: 215-799-0192
  Cell: 610-256-2843
  Fax 413-410-9682
  FMP, WiTango, EDI,SQL 2000, MySQL, CWP
  [EMAIL PROTECTED]

  
  "I destroy my enemies when I make them my friends."   
  
  Abraham Lincoln
  
  
     
 ________________________________________________________________________
 TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
 

 
 ________________________________________________________________________
 TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
 
 

 
 --
 Dan Stein
 FileMaker 7 Certified Developer
 Digital Software Solutions
 799 Evergreen Circle
 Telford PA 18969
 Land: 215-799-0192
 Cell: 610-256-2843
 Fax 413-410-9682
 FMP, WiTango, EDI,SQL 2000, MySQL, CWP
 [EMAIL PROTECTED]
  www.dss-db.com <http://www.dss-db.com>  
 
 Men do not care how nobly they live, but only how long they live, although it is within the reach of every man to live nobly, but within no man's power to live long.  Brian Haig Private Sector
 
 
    
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf


 

--
Dan Stein
FileMaker 7 Certified Developer
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
Land: 215-799-0192
Cell: 610-256-2843
Fax 413-410-9682
FMP, WiTango, EDI,SQL 2000, MySQL, CWP
[EMAIL PROTECTED]
www.dss-db.com


    "There is a larger frame to the painting than the one that bounds our life's events."
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to