Irish SEO,  Marketing & Webmaster Discussion

 
Make money - save the planet!

sending Ajax POST variables

This is a discussion on sending Ajax POST variables within the Coding Help forums, part of the Webmaster Help category; hey every1, just one small question I have this AJAX script (which I think some1 here wrote a while back...not ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 26-09-2007, 04:23 PM
Coder
Recent Blog:
 
Join Date: Mar 2007
Location: Kildare Ireland
Posts: 59
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Ciarán Mc Cann will become famous soon enough
Send a message via MSN to Ciarán Mc Cann
Default sending Ajax POST variables

hey every1, just one small question I have this AJAX script (which I think some1 here wrote a while back...not sure) but anyway, yea it handles $_GET, but I need it to work with $_POST, I have tryed to modify it myself but cant get it to work. any1 know how?

PHP Code:
function ewd_getcontent(urlcontainerid){
    var 
xmlhttp_obj false;
    if (
window.XMLHttpRequest// if Mozilla, Safari etc
        
xmlhttp_obj = new XMLHttpRequest();
    else if (
window.ActiveXObject){ // if IE
        
try {
        
xmlhttp_obj = new ActiveXObject("Msxml2.XMLHTTP");
        } 
        catch (
e){
            try{
                
xmlhttp_obj = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (
e){}
        }
    }
    else
    return 
false;
    
document.getElementById(containerid).innerHTML="<img src='images/loading.gif' /> <b>Loading Data...</b>" ;
    
xmlhttp_obj.onreadystatechange=function(){
        
ewd_loadpage(xmlhttp_objcontainerid);
    }
    
xmlhttp_obj.open('GET'urltrue);
    
xmlhttp_obj.send(null);
}

function 
ewd_loadpage(xmlhttp_objcontainerid){
    if ( 
xmlhttp_obj.readyState == && xmlhttp_obj.status==200 )
        
document.getElementById(containerid).innerHTML=xmlhttp_obj.responseText;

__________________
http://simple2web.ie/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 26-09-2007, 04:51 PM
Forbairt's Avatar
respect my AW-THOR-IT-AYY
Recent Blog: Geansai Gorm
 
Join Date: Jun 2007
Location: My Office, Dublin
Posts: 2,101
Nominated 2 Times in 1 Post
Nominated TOTW/F/M Award(s): 1
Forbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enough
Send a message via AIM to Forbairt Send a message via MSN to Forbairt Send a message via Yahoo to Forbairt Send a message via Skype™ to Forbairt
Default

Just having a quick glance at it ...


Code:
xmlhttp_obj
Code:
.open('GET', url, true); 


I presume changing that to POST ... don't do the trick for you ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 26-09-2007, 04:54 PM
Coder
Recent Blog:
 
Join Date: Mar 2007
Location: Kildare Ireland
Posts: 59
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Ciarán Mc Cann will become famous soon enough
Send a message via MSN to Ciarán Mc Cann
Default

no it isnt as simple as that, I have been googling around and found solutions but I cannot find one that I can use in the script I am using.

Thanks anyway
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 26-09-2007, 04:59 PM
Forbairt's Avatar
respect my AW-THOR-IT-AYY
Recent Blog: Geansai Gorm
 
Join Date: Jun 2007
Location: My Office, Dublin
Posts: 2,101
Nominated 2 Times in 1 Post
Nominated TOTW/F/M Award(s): 1
Forbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enough
Send a message via AIM to Forbairt Send a message via MSN to Forbairt Send a message via Yahoo to Forbairt Send a message via Skype™ to Forbairt
Default

The script you're sending it to is set to handle post items as well ... ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 26-09-2007, 05:00 PM
Coder
Recent Blog:
 
Join Date: Mar 2007
Location: Kildare Ireland
Posts: 59
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Ciarán Mc Cann will become famous soon enough
Send a message via MSN to Ciarán Mc Cann
Default

oh right hmm..ok I will try it again, thanks.

Edit: Got to work, thanks very much

Last edited by Ciarán Mc Cann; 26-09-2007 at 05:02 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 26-09-2007, 05:03 PM
Forbairt's Avatar
respect my AW-THOR-IT-AYY
Recent Blog: Geansai Gorm
 
Join Date: Jun 2007
Location: My Office, Dublin
Posts: 2,101
Nominated 2 Times in 1 Post
Nominated TOTW/F/M Award(s): 1
Forbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enough
Send a message via AIM to Forbairt Send a message via MSN to Forbairt Send a message via Yahoo to Forbairt Send a message via Skype™ to Forbairt
Default

no problem ... its what I'm here for ... that and increasing my post count
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 26-09-2007, 09:36 PM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,048
Nominated 5 Times in 3 Posts
Nominated TOTW/F/M Award(s): 1
louie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enough
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

that looks like one of my scripts.
Where did you get it from?
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 26-09-2007, 09:39 PM
Coder
Recent Blog:
 
Join Date: Mar 2007
Location: Kildare Ireland
Posts: 59
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Ciarán Mc Cann will become famous soon enough
Send a message via MSN to Ciarán Mc Cann
Default

yea i think it might be yours alright, thanks again
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 26-09-2007, 09:46 PM
Forbairt's Avatar
respect my AW-THOR-IT-AYY
Recent Blog: Geansai Gorm
 
Join Date: Jun 2007
Location: My Office, Dublin
Posts: 2,101
Nominated 2 Times in 1 Post
Nominated TOTW/F/M Award(s): 1
Forbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enoughForbairt will become famous soon enough
Send a message via AIM to Forbairt Send a message via MSN to Forbairt Send a message via Yahoo to Forbairt Send a message via Skype™ to Forbairt
Default

Quote:
Originally Posted by louie View Post
that looks like one of my scripts.
Where did you get it from?


Quote:
Originally Posted by Ciarán Mc Cann View Post
yea i think it might be yours alright, thanks again
I'm expecting an exit stage left .. to go with that post
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 27-09-2007, 11:33 AM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,048
Nominated 5 Times in 3 Posts
Nominated TOTW/F/M Award(s): 1
louie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enough
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

The script is available on my website.
I put it up for someone here in the forum: Ajax Sample
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
ajax, post, sending, variables

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
allow more than 4 images per post paul Forum Feedback, Development and Competitions 2 10-09-2007 11:10 AM
Sticky post per Category EdenWeb Blogs & Blogging 0 15-08-2007 10:38 PM
Paid to post Cormac Blogs & Blogging 5 30-05-2007 09:31 PM
'First Unread Post' button? ButtermilkJack Forum Feedback, Development and Competitions 1 28-03-2007 06:22 PM
AJAX and Accessibility? blacknight Coding Help 8 29-10-2006 01:31 PM


Sponsored links

Paid On Results


All times are GMT +1. The time now is 05:04 AM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger