Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>EDIT: Just noticed you're using asp textboxes. With asp the ID of the elements changes. Try using regular <code>&lt;input&gt;</code>textboxes if you have no intention of accessing those values from the server.</p> <p>instead of this</p> <pre><code>idx++; inputArray[idx] = 'city:' + $("txtcity").val(); </code></pre> <p>you should just use the array.push function.</p> <pre><code>var inputArray = []; inputArray.push('Address1:' + $("#txtAddress1").val()); inputArray.push('Address2:' + $("#txtAddress2").val();) inputArray.push('city:' + $("txtcity").val()); </code></pre> <p>also here instead of invoking a clickfunction in your code, just give it the reference to another function</p> <pre><code>$(function () { $('#dialog').dialog({ draggable: true, resizeable: false, autoOpen: false, height: 700, width: 550, modal: true, top: 0, left: 0, title: 'Edit Information', buttons: { 'Save': save(), 'Cancel': function () { $(this).dialog('close'); } } }).parent().css('z-index', '1005'); }); function save(){ var inputArray = []; inputArray.push('Address1:' + $("#txtAddress1").val()); inputArray.push('Address2:' + $("#txtAddress2").val()); inputArray.push('city:' + $("#txtCity").val()); var json = { "inputArray": inputArray}; inputArrayList = JSON.stringify(json); //ajax stuff } </code></pre> <p>also you have 2 document ready functions so you could combine those. both of these are ways of declaring a document ready.</p> <pre><code>$(document).ready(function(){}); $(function () {}); </code></pre>
    singulars
    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.
    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