Free Scan: Update Your PC's Outdated Drivers to Optimize Performance
September 2nd, 2008, 02:21 AM
|
#1 (permalink)
| | Senior Member
Join Date: May 2003 Location: Aus, Gold Coast :)
Posts: 793
|
Ok guys, got a problem and would be very surprised if anyone knew of a simple solution. I have 100% dynamic forms (created by any number of people) in PHP/HTML. So you can go into the admin section and create your own form, basically the simple type, checkbox, radio, text, textarea, select and FILE. now here is the problem, using the same file input field they need to be able to conitually upload files with out refreshing the page. (deleting and all that i have covered with AJAX). Unfortunately from what I have read you can't Post files using Ajax and all the examples of using IFRAMES i need to have an embedded form (to allow the input to save) and of course this is a big no-no. Any other ideas?!
Thanks in advance. |
| |
September 5th, 2008, 03:16 AM
|
#2 (permalink)
| | Senior Member
Join Date: May 2003 Location: Aus, Gold Coast :)
Posts: 793
|
i have done this but now am getting a problem...
I have a button for each file after it is uploaded to delete the file if they want. However in Safari and Firefox when click the 'Browse' button associated with the file input, it calls the first 'Delete' button aswell... very frastrating. Easternwell Group - no information is recorded and there is only one input field if u want to have a look at it. |
| |
September 6th, 2008, 12:34 PM
|
#3 (permalink)
| | Member
Join Date: Jul 2008
Posts: 30
|
Sounds like a bug in your code... make sure all of the buttons are coded properly |
| |
September 7th, 2008, 08:17 PM
|
#4 (permalink)
| | Senior Member
Join Date: May 2003 Location: Aus, Gold Coast :)
Posts: 793
|
i have been looking at them for a while now and they look alright to me Code: <div id="i<?= $it;?>a">
<?
if($files != "-1")
{
$files = explode(",", $files);
for($i=0; $i<count($files); $i++)
{
?>
<a href="..<?=$files[$i];?>" target="_blank"><?=$files[$i];?></a>
<input class="field2" type="button" name="fail" id="fail" onclick="sendRequest2('i<?=$it;?>','<?=$files[$i];?>')" value="X"/>
<br/>
<?
}
}
?>
<input type="hidden" name="buffer" value="whatever"/>
<input class="field" type="file" name="i<?= $it;?>" id="i<?= $it;?>" onChange="jsUpload('i<?=$it;?>')"/>
</div> i tried the hidden buffer to see if it would stop/protect the button, $files is a list of files basically saved in the database, they are comma separated, hence the explode... if there is nothing in there -1 is the value
Last edited by exally : September 7th, 2008 at 08:20 PM.
|
| |
September 7th, 2008, 08:57 PM
|
#5 (permalink)
| | Senior Member
Join Date: May 2003 Location: Aus, Gold Coast :)
Posts: 793
|
i have fixed the problem by putting the uploaded files after the file input... this is a wierd problem that stems from Safari and Firefox 3 having default buttons. |
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | |
Posting Rules
| You may post new threads You may post replies You may not post attachments You may not edit your posts HTML code is Off | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |