ArnisR Posted August 17, 2010 Report Share Posted August 17, 2010 Tātad šis nenostrādā formai ar input type=file laukiem: $.ajax({ type: "POST", url: "upload.php", data: $("#uploadForm").serialize(), dataType: "json", success: function(data) { ... } }); Kādā vēl citā veidā var serializēt formas datus, lai tos varētu apstrādāt nepārlādējot lapu ar $.ajax() funkciju ??? Quote Link to comment Share on other sites More sharing options...
0 briedis Posted August 17, 2010 Report Share Posted August 17, 2010 Failu uploads "ajax"īgs ir diezgan ķēpīgi realizējams. To var provēt realizēt ar java vai flash, vai ifreimiem... Quote Link to comment Share on other sites More sharing options...
0 bubu Posted August 17, 2010 Report Share Posted August 17, 2010 Dokumentāciju jālasa: http://api.jquery.com/serialize/ Data from file select elements is not serialized. Un jālieto google: http://www.google.lv/search?q=jquery+ajax+file+upload Quote Link to comment Share on other sites More sharing options...
0 101111 Posted August 17, 2010 Report Share Posted August 17, 2010 failu uploads ar ajax godīgā veidā nav iespējams, parasti tiek izmantoti ifreimi, lai panāktu tādu efektu it kā būtu fails augšupielādēts ar ajax Quote Link to comment Share on other sites More sharing options...
0 codez Posted August 17, 2010 Report Share Posted August 17, 2010 Jep, bez zpeciālas konfigurācijas broserim vai pluginiem browserim, faila uploads ar ajax nav iespējams, parasti to realizē ar ifreimu vai flash-u. Quote Link to comment Share on other sites More sharing options...
Question
ArnisR
Tātad šis nenostrādā formai ar input type=file laukiem:
$.ajax({
type: "POST",
url: "upload.php",
data: $("#uploadForm").serialize(),
dataType: "json",
success: function(data)
{
...
}
});
Kādā vēl citā veidā var serializēt formas datus, lai tos varētu apstrādāt nepārlādējot lapu ar $.ajax() funkciju ???
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.