in reply to html output to div tag without submitting the form

The direct equivalent of an image (<img src="">) for HTML is an inline frame (<iframe src=""></iframe>).

You could also use JavaScript to place an HTTP request (AJAX) and insert the returned HTML into a DIV element.

Replies are listed 'Best First'.
Re^2: html output to div tag without submitting the form
by dont_you (Hermit) on Mar 17, 2010 at 05:54 UTC
    I second Ikegami. An easy way to do AJAX is using the Prototype JavaScript library, check the Prototype introduction, under the section "Updating your page dynamically with Ajax.Updater".
    This example makes a post request to "myscript.pl", sending the content of the form with id "myForm" as parameters. The HTML output of the script will be inserted into the div with id "MyDiv". It's not so difficult :)
    function upadateMyDiv() { new Ajax.Updater('myDiv', '/myscript.pl', { parameters : $('myForm').serialize(true), method : 'post', }); }