I wrote this simple piece of code to prevent a form from being submitted more than once.
jQuery.fn.preventDoubleSubmit = function() {
this.find(":submit").each(function() {
$(this).click(function() {
this.originalValue = this.value;
this.disabled = true;
this.beenClicked = true;
});
});
// [...]
retu...
What restrictions should I impose on usernames? why?
What restrictions should I not impose on usernames? why?
P.S. db is via best-practice PDO so no risk of sql injection
Thanks
...
I am catching the enter on keypress in my form to prevent it from submitting the form unless it is the last input; otherwise, it acts as a tab (finds the next input and focuses on it).
Any ideas on how to not trigger event.preventDefault() if the browser auto-complete is being selected?
...
I have a model called Details, and two controller methods new and create. New method displays a form to create Details (in new.html.erb), which gets posted to the Create method that saves it. (when it succesffully saves, it it renders the new.html.erb file with the details.) This works as expected.
Now i want a separate page with a link...
In GWT, I would like to do something like a form submission that takes me to a new page, with new style sheet and new static elements, and when I get there, be able to extract the values of GWT variables still in GWT. In other words, I want to do most of the form processing on the client side instead of sending it to a servlet to be pro...
I Would like to know if there is anyway I can check if a form has been modified.
eg. If one of the inputs has been changed I would like to display a button to submit the changes.
...
I'd like to create a user registration form where the user ticks some boxes that do not connect to the model.
For example, there might be a 'terms & conditions' box that I don't want to have a boolean field in the User model saying 'ticked Terms & Conditions'. Instead I want to create a record somewhere else (like a transaction) that re...
Hi,
I have created an authetication provider and went to central administration >> Authentication Providers and changed the authentication settings to Forms and filled in Membership provider and Role manager details.
Now, when i go to create a site collection under the above mentioned web application, the people picker in the create s...
I am looking for a secure way to do accept a username and password in a form, and after they successfully log in, I want to use a piece of that information for a subsequent query.
<form METHOD="POST" action="2.asp">
<blockquote>
<table>
<tr>
<th ALIGN="right" nowrap><em><font size="2">User ID:</font></em></th>
<td><...
Hi friends,
I have an issue with js. I have form like below. Add button is adding li with input box and Remove button is removing... it is working very well. the issue is, it is creating the li after ul, out of ul :/ you can see it clearly at the screenshot below. any idea about solution? appreciate!!! thanks!!!
*
ps, how can I nam...
I have a secure form (attribute action="https://...") in an unsecured (http) page. The purpose is to transmit data securely while avoiding mixed content warnings ("some items are unsecured") due to unsecured Google Maps element on my page.
When the form posts and succeeds, everything is fine. However, if the form fails, my user ends u...
Hi Masters Of Web Development.
I have a not that simple question this time. I have got a simple external HTML page, that I want to include in my site. The HTML page contains a submit form or something like that, and I wish to send this data from the form, without to reload the whole page. So I decided to put HTML page inside iframe. But...
The input fields in my dialog box aren't being posted, and i'm not sure why...
i've tested it on mac firefox and safari, and windows IE & firefox with the same results, so i don't think it's the browser, and the fields post fine if I disable the dialog box.
I've re-read the jquery ui docs and can't find what i'm doing wrong... It seems...
Hello is it possible to have an ASP.NET MVC form that uses the routes defined in Global.asax to post its values (via a GET request)? I have the form defined like this:
<% using (Html.BeginForm("CanviaOpcions","Sat",FormMethod.Get))
{ %>
<fieldset>
<legend>Opciones</legend>
<%= Html.DropDownList("nomSat")%>
...
I don't want to create an object because it won't affect my visible form. How can I call a method so it does its thing in the visible side of things.
public class foo
{
public void SetString(string foo)
{
label1.Text = foo;
}
}
Inside another class:
foo X = new foo();
X.SetString("testlololol");
This will set the la...
Hey guys. I'm new-ish to rails development and have hit a bit of a wall. The application I'm working on is a scheduling solution that requires updating a join model, but not in a simple 1:1 sort of way.
The app is laid out as follows:
class Route < ActiveRecord::Base
has_many :markers, :foreign_key => 'source_id'
has_many :schedu...
Hi, I have a form with a name and an email address. I want a simple icon to appear to the right of the form if the user types anything in the field, even one character. If there is anything present in the field, I want the success icon to appear. If the user advances to the next field with no input, I want the fail icon to appear. Does a...
Guys, I'm trying to call a function from a form within the same .php file, but when the Submit button is hit, the table doesn't get generated.
Here's the code:
<p>
<?php
function selectQuery()
{
$con = mysql_connect("localhost","readonly","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_s...
how can i get a form to work properly when it is loaded in the html injected by ajax? im using jquery if its any help...
...
I have a form with this inputs:
<input name="person[name]" value="">
<input name="person[surname]" value="">
<input name="person[age]" value="">
when I submit, how can i assign that html array to a variable, cause request.POST.getlist('person') doesn't work, i been checking for other post but the only one i found doesn't have anything...