Text input won't accept spaces when loaded through AJAX
Posted: Fri Feb 04, 2011 7:28 pm
Hello!
I am having some trouble getting my text inputs to accept the space character when I press the spacebar. The text inputs are loaded using the jquery .load() function. I've tried removing all styling and just using a plain
but to no avail! I've also tried wrapping this in a form tag, changing the action and method parameters, changing the names, and many other things as well. This is a wordpress page, and the contact page is being loaded via ajax. However when I just navigate to the contact page, the forms work fine. It is only having this problem when the forms are loaded via ajax.
Any idea what's going on? Here's some of the code that makes the site work:
The Contact Page Content:
The Ajax Loading:
Any idea what's going on? Thanks in advance!
I am having some trouble getting my text inputs to accept the space character when I press the spacebar. The text inputs are loaded using the jquery .load() function. I've tried removing all styling and just using a plain
Code: Select all
<input type="text" name="textinput" />Any idea what's going on? Here's some of the code that makes the site work:
The Contact Page Content:
Code: Select all
<div id="contact_form">
<h3>SEND MESSAGE DIRECTLY</h3>
<div id="contact_form"><form action="" method="" >
<p><input type="text" name="contact_name" class="text_input required" size="40" /></p>
<p><input type="text" name="email-input" class="text_input required" size="40" /></p>
<p><textarea name="message-input" class="text_area required" cols="40" rows="10">Message</textarea></p>
<div id="contact_submit"><input type="submit" value="Send" class="wpcf7-submit" /></div></form></div>
</div>
Code: Select all
$("#contact_link").click( function() {
$(".active").removeClass('active');
$(this).parents("#pages_nav li").addClass('active');
$("#entrycontent").html("<img src='http://www.urlhere.com/wp-content/themes/themename/images/loading.gif' alt='Loading...' />");
$("#entrycontent").load("http://www.urlhere.com/contact");
})