Hi!
In the past whilst working with AJAX-submitted forms, I have always created the forms in HTML and used the forms own POST function to submitting the actual data to a specific url. - This far is everything is the same as any non-AJAX form.
From that point I have used the jQuery Form plugin together with some basic jQuery code to rem...
I'm got a comment form for an article and i'd to prevent re-submission. I notice that Worpdress handles this very well (going back doesn't cause the browser to request a form re-submission), but I can't figure out how they do it, even though our methods are very similar.
My Script
User visits mydomain.com/article/1/article_title.html
...
How I can add my own field types to formtastic ?
For exemple, I need to have a custom datetime input, and I want something like this:
<%= f.input :start_date , :as => :my_date %>
This obviously doesn't work because formtastic doesn't know the :my_date (only :boolean, :string, :datetime and so on...)
But how can I add additional inpu...
I'd like to make the background image for my input field disappear once the user has typed any amount of text in it. Is there a simple way to do that in javascript? I can get it so the bg disappears while the field is focused, but then it returns once they move on to the next field.
HTML:
Call me at <input name="phone" type="text" ...
i have a win form named A , A contains lots of different controls ,first contains a main groubbox and this groupbox countains lots of table and others group boxes. i want to find a control which has tab index 9(example) in form A but i dont know which groubox contains this control. how i found this control.
regards
Shailesh
...
I have an html form that has the following structure:
<input type="text" name="title" />
<input type="text" name="persons[0].name" />
<input type="text" name="persons[0].color" />
<input type="text" name="persons[1].name" />
<input type="text" name="persons[1].color" />
I would like to serialize this into the following json:
{
...
I have between 1-three checkboxes and by default they are all disabled. In order for the submit button to be active ove checkbox minumum must be selected. Can someone help me with a jquery snippet to achieve this? My markup looks like this and the site used jquery 1.42. Please and thankyou!
<form action="/cart/add" method="post" id="pfo...
I have a page where a user can "share" the page with other people. I want the email to be formatted with html.
I'm using javascript to send the email. Any Idea's?
...
Does the serialize function in jQuery replace dots ('.') with underscores?
For example, I have a form field such as:
<input id="Project.name" name="Project.name" type="text">
When the form is POSTed, I'm serializing the form data and sending it to another PHP file to save. The dots seem to be converted to underscores. Is this norma...
I got a simple increment function like this:
$(function(){
$("#inc").click(function(){
var value = parseInt($(":text[name='ice_id']").val()) + 1;
$(":text[name='ice_id']").val(value);
});
$("#dec").click(function(){
var value = parseInt($(":text[name='ice_id']").val()) - 1;
$(":text[name='ic...
Hi,
with this piece of code
$feOnline = New Zend_Form_Element_Radio('online');
$feOnline->setValue($article->online)
->addMultiOptions(array(0=>'offline', 1=>'online'))
->setLabel('Online');
this html is generated
<dd id="online-element">
<label for="online-0">
<input type="radio" checked="checked" value="0" id="...
Hi,
im using the following to send a contact us type form, iv looked into security and only found that you need to protect the From: bit of the mail function, as ive hardcoded this does that mean the script is spamproof / un-hijackable
$tenantname = $_POST['tenan'];
$tenancyaddress = $_POST['tenancy'];
$alternativename = $_POST['alter...
Hi all.
I have a form in a shadowbox, and when the user clicks the submit button (or a link with an onclick, i don't mind) i want to step in, close the shadowbox, then submit the form data from the parent window. Can anyone tell me how to do this? I can't work it out.
Something like this semi-pseudocode...
$("#my_form").submit(funct...
Hi everyone,
I'm using ASP.Net but my question is a little more general than that. I'm interested in reading about strategies to prevent users from fooling with their HTML form values and links in an attempt to update records that don't belong to them.
For instance, if my application dealt with used cars and had links to add/remove i...
Hi Folks,
Trying to debug something that basically .trim()'s, .val()'s and .length's a textarea input as HTML below (truncated):
<form id="Kontaktanfrage" method="post" action="tests/testform/">
...
<textarea cols="50" rows="8" id="el_12" name="FORM[Kontaktanfrage][el_12]" title="Ihre Nachricht: *" class="textarea required"></textarea>
...
Hi,
I have a working contact form in Joomla however when the user submits the form they are taken to a page that doesn't exist so they see the 404 error.
Is it possible to change the page they are taken to after they click submit?
It's a contact page made from a contact in the Contact Manager...
Thanks a lot,
Steph
...
I have a php page that has a form that asks for an e-mail. When you press the send button, it gets to another php page, which gets the form data and does its stuff. I need to then be able to go back to the old page (the one that contained the form) and give it some data so that it will be able to change itself and say "You've sent your e...
Ive gotten some great help here and I am so close to solving my problem that I can taste it. But I seem to be stuck.
I need to scrape a simple form from a local webserver and only return the lines that match a users local email (i.e. onemyndseye@localhost). simplehtmldom makes easy work of extracting the correct form element:
forea...
I would like to use formtastic instead of standard Rails helpers for my forms, however I currently submit them using Ajax (with remote_form_for). I suppose I could use the jQuery form plugin to Ajax-ify formtastic forms, but would it be the best approach?
...
I have the following JavaScript in my HTML page referencing an HTML form on the page:
<script type="text/javascript">
<!--
var myForm = document.myForm;
function validateForm() {
if (myForm.myInput == "")
alert("Please input some text.");
return false;
}
myForm.submit();
}
function showFormInput() {
...