Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Help with Prototype Ajax.Updater?
Old 11-02-2006, 09:59 AM Help with Prototype Ajax.Updater?
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
Trades: 0
I'm trying to post form data using prototype and it's bombing out. I think the root of the problem is that it's not sending the header/content type. Now, I'm still trying to learn how all this works so I might be using the wrong "class". I've done some reading and looked at the prototype.js. The Ajax.Updater inherates the functions from Ajax.Request. It looks like if you specify 'post' it should call a function to include RequestHeaders, but I dont think it's working. Should I use another class?
Code:
<script>
	function postBook()
	{
	var url = 'postdata.asp';
	var pars = Form.serialize($('chkbook'));
	
	var myAjax = new Ajax.Updater(
		{success: 'placeholder'}, 
		url, 
		{
		method: 'post', 
		parameters: pars, 
		onFailure: reportError
		})
	}

	function reportError(request)
	{
	alert('Sorry. There was an error.');
	}
</script>
__________________

Please login or register to view this content. Registration is FREE

"I think therefore I am, I think." <!-- George Carlin
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
 
Register now for full access!
Old 11-09-2006, 04:29 AM Re: Help with Prototype Ajax.Updater?
seomumbai's Avatar
Skilled Talker

Posts: 98
Trades: 0
i think you try that with get then you can get better results.
seomumbai is offline
Reply With Quote
View Public Profile
 
Old 04-11-2007, 12:23 AM Re: Help with Prototype Ajax.Updater?
Novice Talker

Posts: 5
Name: Moses
Trades: 0
Alert the pars variable and check wheather it is in the format of valid
query string
mosesdinakaran is offline
Reply With Quote
View Public Profile
 
Old 04-11-2007, 08:20 AM Re: Help with Prototype Ajax.Updater?
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
Trades: 0
Thanks. I solved the issue by using Ajax.Request instead of Ajax.Updater
__________________

Please login or register to view this content. Registration is FREE

"I think therefore I am, I think." <!-- George Carlin
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Old 04-11-2007, 11:11 AM Re: Help with Prototype Ajax.Updater?
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
Dan I just saw your site.
Its good to see another 12 bang bang.
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 04-11-2007, 04:14 PM Re: Help with Prototype Ajax.Updater?
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
Trades: 0
You were an Engineer? That's awesome!
Where were you stationed?
I need to take that info off the site... i think it's a little too much
__________________

Please login or register to view this content. Registration is FREE

"I think therefore I am, I think." <!-- George Carlin
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Reply     « Reply to Help with Prototype Ajax.Updater?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.53493 seconds with 12 queries