Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Several submit buttons in HTML page
Message
 
 
To
02/06/2015 16:53:37
General information
Forum:
HTML5
Category:
HTML
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01620499
Message ID:
01620545
Views:
35
There seems to be a difference between when I manually click on the button or either try to use form's submit or call click() event of the button in code.

In the first case scenario, the passed string has
<btnRemoveOverdue>Remove+Overdue</btnRemoveOverdue>
inside it and in the other case it doesn't.

I am wondering if that string in the post string comes from some code in C++ application or it's a standard browser behavior? Is it possible to somehow add this part to the passed post string?

>>Can you show some related code? I think this may be an approach we can take.
>>
>>Say, this is part of the current HTML:
>>
>>
>><INPUT TYPE="hidden" NAME="txtAuthAction" ID="txtAuthAction" VALUE="RemoveOverdue">
>><INPUT TYPE="hidden" NAME="txtAuthScan"   ID="txtAuthScan"   VALUE="<<This.cAuthItem>>">
>><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=90% align=right>
>><TR><TD WIDTH=25%> </TD>
>><TD WIDTH=25%> </TD>
>><TD WIDTH=20% ALIGN=right
>> STYLE='font-size:10.0pt;font-family:Arial'>Password: </TD>
>>  <TD><INPUT TYPE="PASSWORD" NAME="txtRemoveOverduePWD" ID="txtRemoveOverduePWD" WIDTH=30></TD>
>>  <TD ALIGN=left><INPUT NAME="btnRemoveOverdue" CLASS='button' ID="btnRemoveOverdue" TYPE="submit" VALUE="Remove Overdue"></TD>
>></TR></TABLE><BR/><BR/>
>>
>>So, when we enter password in that password textbox and hit Enter key, the button should fire and submit the form.
>
>Here is an example:
>
>
><input name="Title_S" type="text" maxlength="40" id="Title_S" onkeypress="FormKeyPress(event)" style="width:300px;" />
>
>
>Then, in the FormKeyPress() function, you may have something like this:
>
>
>function FormKeyPress(toEvent)
>{
>   if (window.event)
>   {
>      lnKey=window.event.keyCode
>   }
>   else
>   {
>      if (toEvent)
>      {
>         if (toEvent.keyCode)
>         {
>            lnKey=toEvent.keyCode
>         }
>         else
>         {
>            lnKey=toEvent.charCode
>         }
>      }
>      else
>      {
>      }
>   }
>   if (lnKey==13)
>   {
>      document.getElementById("Form1").submit()
>      if (window.event)
>      {
>         window.event.keyCode=0
>      }
>      else
>      {
>         if (toEvent)
>         {
>            if (toEvent.keyCode)
>            {
>               toEvent.keyCode=0
>            }
>            else
>            {
>               toEvent.charCode=0
>            }
>         }
>         else
>         {
>         }
>      }
>      if (window.event)
>      {
>         event.returnValue=false
>      }
>      else
>      {
>         toEvent.preventDefault()
>      }
>   }
>
>}
>
>// Enable support for Mozilla
>if (document.layers)
>{
>   document.captureEvents(Event.KEYPRESS)
>}
>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform