Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use 2 ways: From the parent page you can get access to popup window:</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;script&gt; var popup = window.open('trucksform.php'); popup.onload = function() { popup.document.getElementById("truck_plate_no").focus(); }; popup.moveTo(0,0); popup.resizeTo(318,340); popup.focus(); popup.moveBy(500,200); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Or add initial state to popup (this way better, because you will have reference to element on same page):</p> <pre><code> &lt;div class="mainform"&gt; &lt;form name="addtrucks" id="addtrucks" method="POST" action="&lt;?php echo $editFormAction; ?&gt;"&gt; &lt;label&gt;Truck Plate Number:&lt;/label&gt; &lt;input type="text" name="truck_plate_no" id="truck_plate_no" /&gt; &lt;br/&gt; &lt;input name="button" type="submit" id="button" onclick="MM_validateForm('truck_plate_no','','R');return document.MM_returnValue"/&gt; &lt;input type="hidden" name="MM_insert" value="add" /&gt; &lt;/form&gt; &lt;/div&gt; &lt;script&gt; document.getElementById("truck_plate_no").focus(); &lt;/script&gt; </code></pre> <p><strong>Update for Chrome:</strong> It look as manipulation with popup window is blocking some UI functions. You can add to text input attribute <code>autofocus="autofocus"</code> in popup. To remove manipulation with popup window use parameters for <code>open</code>:</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;script&gt; var popup = window.open('trucksform.php', 'myWindowName', 'left=200,top=500,width=318,height=340'); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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