I'm rather aware that nested forms are invalid, I am building a simple form with php and which needs to contain another form that controls an ajax image upload box so that i can feed the filepath into the original form.
example code below;
<form>
<fieldset>
<input>
</fieldset>
<fieldset>
<input>
</fieldset>
<form action="js/ajaxupload.php" method="post" name="sleeker" id开发者_开发百科="sleeker" enctype="multipart/form-data">
<input type="hidden" name="maxSize" value="9999999999" />
<input type="hidden" name="maxW" value="400" />
<input type="hidden" name="fullPath" value="http://192.168.10.10:8080/intranet/dashboard/uploads/" />
<input type="hidden" name="relPath" value="../uploads/" />
<input type="hidden" name="colorR" value="255" />
<input type="hidden" name="colorG" value="255" />
<input type="hidden" name="colorB" value="255" />
<input type="hidden" name="maxH" value="200" />
<input type="hidden" name="filename" value="filename" />
<input type="file" name="filename" style="float:left; width:40% !important;" onchange="ajaxUpload(this.form,'js/ajaxupload.php?filename=name&maxSize=9999999999&maxW=200&fullPath=http://192.168.10.10:8080/intranet/dashboard/uploads/&relPath=../uploads/&colorR=255&colorG=255&colorB=255&maxH=300','upload_area','File Uploading Please Wait…<br /><img src=\'images/loader_light_blue.gif\' width=\'128\' height=\'15\' border=\'0\' />','<img src=\'images/error.gif\' width=\'16\' height=\'16\' border=\'0\' /> Error in Upload, check settings and path info in source code.'); return false;" />
</form>
<fieldset>
<input>
</fieldset>
<fieldset>
<input>
</fieldset>
<submit>
</form>
In previous project's I have just placed the image upload below the original form and fed the hidden inputs back into the original form, unfortunately that won't be possible for this project,
any ideas to get around this issue would be appreciated!
Is there any system to parse the External_form.pl to Internal_form.pl. For example:
Form.html
<html> .... .... <form ... method="post" action="External_form.pl"> .... .... </form>
This form post values to External_form.pl
External_form.pl
It validates the Posted_Data and send this value again to Another Form Internal_Form.pl
Internal_Form.pl
It finally sends the data to (External.pl or to the Form.html) and processed the validated date at the backend.
精彩评论