13, February 2012

Using XMLHttpRequest to upload images without refresh - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  JavaScript
Topic: Using XMLHttpRequest to upload images without refresh
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Using XMLHttpRequest to upload images without refresh  (Read 3677 times)
Community Supporter ?
What a dork
*
Posts: 17
114 credits
Members referred : 0


« on: Oct 02, 2007, 08:53:46 am »

It looks like it is possible with setting the header and possibly encoding the image with jscript.
After a few hours my head just got fuzzier.

I'm trying to do it raw or without Ajax since it looks like Ajax uses those methods above anyway.
Please correct me if wrong of course.

req=new XMLHttpRequest or ActiveXObject("Msxml2.XMLHTTP") or ActiveXObject("Microsoft.XMLHTTP");

params are the parameters to send a post this way.
params = 'var1=value1&var2=value2'

req.send(params)

But little is explained about images. if anyone knows please post as it is an alternative to hidden iframe
This saves some issues with the iframes php page to do it this way.
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5778
46265 credits
Members referred : 3



« Reply #1 on: Oct 02, 2007, 09:07:50 am »

Hi apple2 and welcome to webdigity Smiley

Why don't you use a javascript library for AJAX (like scriptaculous or moo effects)?

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Oct 02, 2007, 11:06:56 am »

Hi apple2 and welcome to webdigity Smiley

Why don't you use a javascript library for AJAX (like scriptaculous or moo effects)?

because he need to use the post array (uploading files)


Last blog : A new Wordpress theme for our blog
Community Supporter ?
What a dork
*
Posts: 17
114 credits
Members referred : 0


« Reply #3 on: Oct 02, 2007, 04:24:56 pm »

Hi apple2 and welcome to webdigity Smiley
Why don't you use a javascript library for AJAX (like scriptaculous or moo effects)?

Thanks!

I'd like not to be dependent on a library which is simply using browser languages because I'd be including functions I do not understand and would be programming without a transparant view of what is going on. By coding from the ground up I'm expecting not to need libraries for much except things which are a real pain with browser compatability.

Please correct my mentality where wrong. I've coded from 1983 to about 2002 lots then 2003 till now ran a company and just did enough php/web/jscript to get by.

When I hear to use Ajax and try to use Ajax I haven't gotten anywhere.
If I download Ajax then there is a big library.

Should I be doing it with Ajax then pick apart the code used to optimize?
It sure seems more right to understand the code the guys used who wrote Ajax.
Am I going about this backwards? Again when I try to go the Ajax route I'm not aware of how to use the functions and am stuck not only learning commands but someones library.
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Oct 02, 2007, 04:49:04 pm »

I used only XAJAX in the past (yeah its based on some javascript lib) check this thread
http://community.xajaxproject.org/viewtopic.php?pid=15363

here is another example for uploading a file with xajax:
http://wiki.xajaxproject.org/Xajax_0.2:_Tips_and_Tricks:_File_Upload_in_0.2.4
« Last Edit: Oct 02, 2007, 04:50:41 pm by Olaf »


Last blog : A new Wordpress theme for our blog
Community Supporter ?
What a dork
*
Posts: 17
114 credits
Members referred : 0


« Reply #5 on: Oct 03, 2007, 05:02:47 am »

The Ajax sites are great links thanks!
I need to speed up to understand them or go through them without feeling intimidated.
Also the sites I pulled up on xhttp looked a bit like you can post an image with it!
For my current needs an Iframe will do but adding the ability to do it without one makes coding easier.

Here is a link to a thread starting with basic iframe attachments that will cover more fancy attachments.
Thats how I get re-warmed up to hard core coding then I'll come back here and rip apart the xhttp objects, dom or whatever once I see document.write in my nightmares.
Should be 4 days Smiley

http://www.webdigity.com/index.php/topic,7181.0.Attachment+research+log.html
Community Supporter ?
What a dork
*
Posts: 17
114 credits
Members referred : 0


XMLHttpRequest to upload images?
« Reply #6 on: Oct 10, 2007, 05:34:41 am »

Do you think it can? I'm still not sure and resorting to an Iframe attachment model at this point.
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Oct 10, 2007, 06:58:47 am »

Do you think it can? I'm still not sure and resorting to an Iframe attachment model at this point.

I thought you posted a solution to the other thread...


Last blog : A new Wordpress theme for our blog
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7178
Tags : forum attach without refresh Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  JavaScript
Topic: Using XMLHttpRequest to upload images without refresh
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb 13, 2012, 09:21:30 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.