Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You misunderstand how the <code>$.ajax</code> method with <code>$("#oven").html(data)</code> inside of <code>success</code> work. In the way you <strong>can't load just new HTML page</strong> as per setting new value for <code>windows.location</code>. If you load the page per <code>$.ajax</code> no scripts will be run at least because of <a href="http://en.wikipedia.org/wiki/Same_origin_policy" rel="nofollow">the security reason</a>. Moreover you can't just set the <em>whole</em> HTML page inclusive <code>&lt;html&gt;</code>, <code>&lt;head&gt;</code> <code>&lt;body&gt;</code> and so on inside on another part of HTML page. So with respect of <code>$.ajax</code> method <strong>you can only load a HTML fragment and not the whole HTML page</strong>.</p> <p>So you should redesign your program and not use <code>$.ajax</code> in such way.</p> <p>Another remark. If you even seen something if you load <code>oven.php</code> <strong>the page have many errors</strong>. Here are only the most important:</p> <ul> <li>Your page have to start with <code>&lt;!DOCUMENT html ...&gt;</code> statement. Without the statement you have HTML page in <a href="http://en.wikipedia.org/wiki/Quirks_mode" rel="nofollow">quirks mode</a> which is not supported by jQuery UI or jqGrid. You have to include the line like <code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;</code> (see <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3afirst_grid#html_file" rel="nofollow">here</a>) or HTML5 <code>&lt;!DOCTYPE html&gt;</code></li> <li>You can't include the same implementation of the same functions or objects more as one time. You code first include <code>jquery-1.6.2.min.js</code>, then <code>jquery-1.4.2.min.js</code>. It's heavy error. You include jqGrid code <strong>3 times (!!!???)</strong>. See <code>jquery.jqGrid.min.js</code>, then <code>grid.base.js</code> till <code>grid.jqueryui.js</code> and then one more time <code>jquery.jqGrid.min.js</code>. You can't do this!</li> </ul> <p>The rest code which define jqGrid contain some errors and some not optimal code (very old style of code).</p> <ul> <li>you should replace the line <code>var lastsel2 =</code> to <code>var lastsel2;</code>, which should just define <code>lastsel2</code> with <code>undefined</code> value.</li> <li>the usage of <code>addRowData</code> <em>after</em> the grid definition is not good. It's very old style. Much better will be to move the definition of <code>mydata2</code> before the jqGrid creation and use additional parameters <code>data: mydata2</code> and <code>gridview: true</code> in the grid.</li> </ul>
 

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