Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery .post () giving error message "missing : after property id"
    primarykey
    data
    text
    <p>I have written a form using the jQuery .post() function to post the data to a php file. The error I keep getting is "missing : after property id". Any help would be appreciated. </p> <p>Here is the form code:</p> <pre><code> &lt;form id="ev-form" name="ev-form" action="/new_event_submit.php" method="post"&gt; &lt;fieldset&gt; &lt;ol&gt; &lt;li&gt; &lt;label for="ev-name"&gt;Event&lt;/label&gt; &lt;input type="text" id="ev-name" name="ev-name" class="text" /&gt; &lt;/li&gt; &lt;li&gt; &lt;label for="ev-date"&gt;Date &amp;amp; Time&lt;/label&gt; &lt;input type="text" id="ev-date" name="ev-date" class="text" /&gt; &lt;/li&gt; &lt;li&gt; &lt;label for="ev-desc"&gt;Description&lt;/label&gt; &lt;textarea id="ev-desc" name="ev-desc" cols="" rows="" class="textarea"&gt;&lt;/textarea&gt; &lt;/li&gt; &lt;li&gt; &lt;input type="submit" id="ev-submit" value="Submit Event" class="submit" /&gt; &lt;/li&gt; &lt;/ol&gt; &lt;/fieldset&gt; &lt;div id="load-icon"&gt;&lt;/div&gt; &lt;/form&gt; </code></pre> <p>The javascript .post() function is as below:</p> <pre><code>$j(document).ready(function(){ //Setup on the click event $j('#ev-form input.submit').click(function(){ //Setup some variable with needed values var input_name = $j('input:eq(0)').val(), input_date = $j('input:eq(1)').val(), input_desc = $j('#ev-form textarea').val(), ajax_loader = '&lt;img src="ajax-loader.gif" alt="Loader" /&gt;'; //Hide and previous response $j('#response').hide(); //show the loader $j('#load-icon').html(ajax_loader); $j.post('new_event_submit.php', {ev-name: input_name, ev-date: input_date, ev-desc: input_desc}, function(data) { //Hide the loader $j('#load-icon img').hide(1000, function() { $j('#ev-form').append('&lt;div id="response"&gt;' + data + '&lt;/div&gt;'); }); }); return false; }); </code></pre> <p>});</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload