Skip to main content

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:

<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; }; " /> <option value="">Add to page..</option> [more options with values here]</select> <script type="text/javascript"> 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;</script> <iframe name="hiddenFrame" style="display:none;" src="adminsrc="frame.php?p=products-addProductToPage"p=addProductToPage" onload="bCanAddMore = true;"></iframe> 

the php code generating the page that is being called above:

if( $a$_GET['p'] == 'addProductToPage' ){ // content for hidden iframeform inprocessing  products list if(!empty($_POST['iAddToPage'])) { //.. do something with it..  }  print(' <html> <body> <form name="formFrame" id="formFrameId" style="display:none;" method="POST" action="adminaction="frame.php?p=products-addProductToPage"p=addProductToPage" > <input type="hidden" name="iProduct" value="" /> <input type="hidden" name="iAddToPage" value="" /> </form> </body> </html>  '); } 

}

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 some of the above posters pointing me the right direction, that's the only reason I am posting here:

<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; }; " /> <option value="">Add to page..</option> [more options with values here]</select> <script type="text/javascript"> 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;</script> <iframe name="hiddenFrame" style="display:none;" src="admin.php?p=products-addProductToPage" onload="bCanAddMore = true;"></iframe> 

the php code generating the page that is being called above:

if( $a == 'addProductToPage' ){ // content for hidden iframe in products list if(!empty($_POST['iAddToPage'])) { .. do something with it.. } print(' <html> <body> <form name="formFrame" id="formFrameId" style="display:none;" method="POST" action="admin.php?p=products-addProductToPage" > <input type="hidden" name="iProduct" value="" /> <input type="hidden" name="iAddToPage" value="" /> </form> </body> </html> '); 

}

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:

<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; }; " /> <option value="">Add to page..</option> [more options with values here]</select> <script type="text/javascript"> 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;</script> <iframe name="hiddenFrame" style="display:none;" src="frame.php?p=addProductToPage" onload="bCanAddMore = true;"></iframe> 

the php code generating the page that is being called above:

if( $_GET['p'] == 'addProductToPage' ){ // hidden form processing  if(!empty($_POST['iAddToPage'])) { //.. do something with it..  }  print(' <html> <body> <form name="formFrame" id="formFrameId" style="display:none;" method="POST" action="frame.php?p=addProductToPage" > <input type="hidden" name="iProduct" value="" /> <input type="hidden" name="iAddToPage" value="" /> </form> </body> </html>  '); } 
added 4 characters in body
Source Link
Tyler
  • 349
  • 4
  • 11

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 some of the above posters pointing me the right direction, that's the only reason I am posting here:

<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; }; " /> <option value="">Add to page..</option> [more options with values here]</select> <script type="text/javascript"> 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;</script> <iframe name="hiddenFrame" style="display:none;" src="admin.php?p=products-addProductToPage" onload="bCanAddMore = true;"></iframe> 

the php code generating the page that is being called above:

if( $a == 'addProductToPage' ){ // content for hidden iframe in products list if(!empty($_POST['iAddToPage'])) { .. do something with it.. } print(' <html> <body> <form name="formFrame" id="formFrameId" style="display:none;" method="POST" action="admin.php?p=products-addProductToPage" > <input type="hidden" name="iProduct" value="" /> <input type="hidden" name="iAddToPage" value="" /> </form> </body> </html> '); 

}

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 some of the above posters pointing me the right direction, that's the only reason I am posting here:

<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; }; " /> <option value="">Add to page..</option> [more options with values here]</select> <script type="text/javascript"> 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;</script> <iframe name="hiddenFrame" style="display:none;" src="admin.php?p=products-addProductToPage" onload="bCanAddMore = true;"></iframe> 

the php code generating the page that is being called above:

if( $a == 'addProductToPage' ){ // content for hidden iframe in products list if(!empty($_POST['iAddToPage'])) { .. do something with it.. } print(' <html> <body> <form name="formFrame" id="formFrameId" style="display:none;" method="POST" action="admin.php?p=products-addProductToPage" > <input type="hidden" name="iProduct" value="" /> <input type="hidden" name="iAddToPage" value="" /> </form> </body> </html> '); 

}

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 some of the above posters pointing me the right direction, that's the only reason I am posting here:

<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; }; " /> <option value="">Add to page..</option> [more options with values here]</select> <script type="text/javascript"> 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;</script> <iframe name="hiddenFrame" style="display:none;" src="admin.php?p=products-addProductToPage" onload="bCanAddMore = true;"></iframe> 

the php code generating the page that is being called above:

if( $a == 'addProductToPage' ){ // content for hidden iframe in products list if(!empty($_POST['iAddToPage'])) { .. do something with it.. } print(' <html> <body> <form name="formFrame" id="formFrameId" style="display:none;" method="POST" action="admin.php?p=products-addProductToPage" > <input type="hidden" name="iProduct" value="" /> <input type="hidden" name="iAddToPage" value="" /> </form> </body> </html> '); 

}

removed some unnecessary code for this example
Source Link
Tyler
  • 349
  • 4
  • 11

Hey, 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 some of the above posters pointing me the right direction, that's the only reason I am posting here:

<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; }; " /> <option value="">Add to page..</option> [more options with values here]</select> <script type="text/javascript"> 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;</script> <iframe name="hiddenFrame" style="display:none;" src="admin.php?p=products-addProductToPage" onload="bCanAddMore = true;"></iframe> 

the php code generating the page that is being called above:

if( $a == 'addProductToPage' ){ // content for hidden iframe in products list if(isset($_POST) && !empty($_POST['iAddToPage'])) { .. do something with it.. } print(' <html> <body> <form name="formFrame" id="formFrameId" style="display:none;" method="POST" action="admin.php?p=products-addProductToPage" > <input type="hidden" name="iProduct" value="" /> <input type="hidden" name="iAddToPage" value="" /> </form> </body> </html> '); exit; 

}

Hey, 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 some of the above posters pointing me the right direction, that's the only reason I am posting here:

<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; }; " /> <option value="">Add to page..</option> [more options with values here]</select> <script type="text/javascript"> 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;</script> <iframe name="hiddenFrame" style="display:none;" src="admin.php?p=products-addProductToPage" onload="bCanAddMore = true;"></iframe> 

the php code generating the page that is being called above:

if( $a == 'addProductToPage' ){ // content for hidden iframe in products list if(isset($_POST) && !empty($_POST['iAddToPage'])) { .. do something with it.. } print(' <html> <body> <form name="formFrame" id="formFrameId" style="display:none;" method="POST" action="admin.php?p=products-addProductToPage" > <input type="hidden" name="iProduct" value="" /> <input type="hidden" name="iAddToPage" value="" /> </form> </body> </html> '); exit; 

}

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 some of the above posters pointing me the right direction, that's the only reason I am posting here:

<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; }; " /> <option value="">Add to page..</option> [more options with values here]</select> <script type="text/javascript"> 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;</script> <iframe name="hiddenFrame" style="display:none;" src="admin.php?p=products-addProductToPage" onload="bCanAddMore = true;"></iframe> 

the php code generating the page that is being called above:

if( $a == 'addProductToPage' ){ // content for hidden iframe in products list if(!empty($_POST['iAddToPage'])) { .. do something with it.. } print(' <html> <body> <form name="formFrame" id="formFrameId" style="display:none;" method="POST" action="admin.php?p=products-addProductToPage" > <input type="hidden" name="iProduct" value="" /> <input type="hidden" name="iAddToPage" value="" /> </form> </body> </html> '); 

}

deleted 4 characters in body; added 1 characters in body
Source Link
Tyler
  • 349
  • 4
  • 11
Loading
added 134 characters in body; added 35 characters in body
Source Link
Tyler
  • 349
  • 4
  • 11
Loading
Source Link
Tyler
  • 349
  • 4
  • 11
Loading