Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Several submit buttons in HTML page
Message
 
 
To
03/06/2015 13:10:16
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:
01620596
Views:
37
>>I was hoping that adding a focus on the button prior to clicking will solve my problem, but it seems not :(
>>
>>Here is my current code:
>>
>>
>>if (lnKey==13)
>>   {
>>	  var btn = document.getElementById("btnRemoveOverdue");
>>	  if (btn)
>>	  {
>>		btn.focus();
>>		btn.click();
>>	  }
>>
>>What exactly do you suggest in order to get that btnRemove inside the post string?
>
>You need to update the Form tag Action attribute to add any query string you need to be posted.
>
>So, if enter key is pressed, when that function is called, simply do something like:
>
>
>document.getElementById("MyForm").action=document.getElementById("MyForm").action+"MyQueryString"
>
Tried that, but the application still refuses to cooperate :(
if (lnKey==13)
   {
      alert('Testing...');
	  var form = document.getElementById('frmAddItem');
	  
	  form.action = 'btnRemoveOverdue=Remove+Overdue&' + form.action;
	  alert(form.action);		
	  
	  var btn = document.getElementById('btnRemoveOverdue')
	  if (btn)
			btn.click();
			
I also do not see any of the alert messages. May be there is another way to see that my code is being executed? The problem is that it's C++ application using some browser control to display the page that is being send by VFP application.
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