jQuery: The Write Less, Do More JavaScript Library

Switching domain on upload url and the uploader fails

View: New views
1 Messages — Rating Filter:   Alert me  

Switching domain on upload url and the uploader fails

by steelliberty :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

I built a multiple file uploader using the ajaxSubmit functionality of Ajax. It worked great.. but then I realized that I was uploading to domain.com instead of www.domain.com.

I need to using www.domain.com to get the correct cookies sent to the uploader cgi. But when I switched to www.domain.com to pick up the cookies the ajaxSubmit call back stopped. Meaning the call back response from the uploader is not written to the target object.

for example
var options = { target:target_obj, beforeSubmit:uplObj.setProgress,success:uplObj.Response,url:post,type:"post",clearForm:false,resetForm:false } ;

The target object no longer gets response data. and the success function is never called.  I have verified that the upload completes and the response data is actually returned.  If I change the upload url back to domain.com instead of www.domain.com it works again.

I can provide the code if that is necessary. I need the cookies.. love jquery .. need this to work so thanks for any help..

steelliberty
LightInTheBox - Buy quality products at wholesale price