Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>this is exactly how it CAN work without jQuery and AJAX and it's working very well using a simple iFrame. I LOVE IT, works in Opera10, FF3 and IE6. Thanks to some of the above posters pointing me the right direction, that's the only reason I am posting here:</p> <pre><code>&lt;select name="aAddToPage[65654]" onchange=" if (bCanAddMore) { addToPage(65654,this); } else { alert('Could not add another, wait until previous is added.'); this.options[0].selected = true; }; " /&gt; &lt;option value=""&gt;Add to page..&lt;/option&gt; [more options with values here]&lt;/select&gt; &lt;script type="text/javascript"&gt; function addToPage(iProduct, oSelect){ iPage = oSelect.options[oSelect.selectedIndex].value; if (iPage != "") { bCanAddMore = false; window.hiddenFrame.document.formFrame.iProduct.value = iProduct; window.hiddenFrame.document.formFrame.iAddToPage.value = iPage; window.hiddenFrame.document.formFrame.submit(); } } var bCanAddMore = true;&lt;/script&gt; &lt;iframe name="hiddenFrame" style="display:none;" src="frame.php?p=addProductToPage" onload="bCanAddMore = true;"&gt;&lt;/iframe&gt; </code></pre> <p>the php code generating the page that is being called above:</p> <pre><code>if( $_GET['p'] == 'addProductToPage' ){ // hidden form processing if(!empty($_POST['iAddToPage'])) { //.. do something with it.. } print(' &lt;html&gt; &lt;body&gt; &lt;form name="formFrame" id="formFrameId" style="display:none;" method="POST" action="frame.php?p=addProductToPage" &gt; &lt;input type="hidden" name="iProduct" value="" /&gt; &lt;input type="hidden" name="iAddToPage" value="" /&gt; &lt;/form&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. 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.
    3. 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