Microsoft
Software
Hardware
Network
Question : How to send a POST value with javascript onKeyPress
Hi experts.
I have a booking calendar navigation done using submit buttons which send a post value. Now I'd like to be able to control this navigation using the keyboard arrow keys (left for last day/week and right for next day/week). How could this be done?
I found something like this which sends a form on key press
<script language="JavaScript">
function submitonEnter(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode
if(charCode == "39"){
document.dprev.submit();
}
}
</script>';
But I believe the problem here is that I cannot just send the right form, since in php I'm checking which submit button within a single form was being submitted. So instead of just submitting a right form I believe I need to send the post value directly using Javascript.
The simple HTML looks something like this:
<form action="#" method="post">
<input class="prev" name="dprev" value=" " type="submit" />
<input class="next" name="dnext" value=" " type="submit" />
</form>
Thank you in advance.
Answer : How to send a POST value with javascript onKeyPress
To not to make controls transparent but only the form, use TransparencyKey property like:
public Form2()
{
InitializeComponent();
//this.Opacity = 0.5;
this.TransparencyKey = BackColor;
}
Random Solutions
jQuery - AJAX Call when a Checkbox is Checked
VB.NET simple SendMail program error: System.Net.Mail.SmtpExcept
ion: Failure sending mail
Batch File Wildcards
Windows 7, Domain: Admin cannot save to C drive from Outlook.
Big DNS problem, some internet servers reporting non-existent domain
GPO to ensure no users are able to bypass the Proxy when browsing the Internet (IE:7 and IE:8)
How do I embed ajax calendar extender in asp.net gridview correctly?
Can I use a sql query file (.sql) with bcp.exe?
bootable usb
TRANSACT SQL: COALESCE FUNCTION - DATE RANGES AND NULL VALUES