DeveloperBarn Forums

DeveloperBarn

Programming & IT forum

ajax return undefined

This is a discussion on ajax return undefined within the JavaScript Programming forums, part of the Programming & Scripting category; showing line on body tag.so line no is not relevent.but when i add this code then only get error.may be ...

Go Back   DeveloperBarn Forums > Programming & Scripting > JavaScript Programming

  #11  
Old November 20th, 2008, 11:01 AM
guddu's Avatar
Barn Enthusiast
 
Join Date: Jul 2008
Location: Oxford UK
Posts: 334
Rep Power: 2
guddu is on a distinguished road
Default

showing line on body tag.so line no is not relevent.but when i add this code then only get error.may be brackets are not matching .not sure.
__________________
Love is physical attraction and mental destruction
Reply With Quote
  #12  
Old November 20th, 2008, 11:09 AM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Real name: Jason
Location: Washington, D.C.
Posts: 1,964
Blog Entries: 8
Rep Power: 15
jmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud of
Default

I'm not sure about this PrototypeJS stuff...I've never used it. I've always used XmlHttpRequest object.

For what reason do you want to avoid XmlHttpRequest?

I guess the best way to troubleshoot this is to look at their documentation: Prototype JavaScript framework: Ajax.Ajax.Request
__________________
jmurrayhead
If you agree with me... click the icon!
If my post solved your problem, click the button in the lower right-hand corner of the post.

If you like it here...throw us a few bones to help
support us.

Join our Folding team: DeveloperBarn Folding

Reply With Quote
  #13  
Old November 20th, 2008, 11:16 AM
guddu's Avatar
Barn Enthusiast
 
Join Date: Jul 2008
Location: Oxford UK
Posts: 334
Rep Power: 2
guddu is on a distinguished road
Default

ok now gotted the problem i used below function .and problem is with unterminated string in my code.thanks Jmh.cheers!!
Code:
window.onerror = trap_error;

		function trap_error(error, url, line) {
		alert("There was an error from '" + url + "' at line '" + line +
		"'.\n\n" + error);
		return true;
		}
Code:
var ajaxReq = new Ajax.Request(
																						sTarget,
																						{
																						method: 'get',
																						parameters: true,
																						evalScripts:true,
																						onSuccess: function(request) {
																						alert(request.responseText);
																						},
																						onException: function(req,exception) {
																						alert("The request had a fatal exception thrown.\n\n" +
																						exception.message);
																						return true;
																						},
																						onFailure: function(request) {
																						return reloadPage();
																						}
																						}
																						);
Reply With Quote
Reply

  DeveloperBarn Forums > Programming & Scripting > JavaScript Programming

Bookmarks

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


Similar Threads

Thread Thread Starter Forum Replies Last Post
triple combo ajax dragon rider ASP Development 0 October 16th, 2008 04:34 PM
.Net And Ajax smithcarvo .Net Development 2 August 20th, 2008 07:50 AM
Return Default Date If Null jmurrayhead SQL Development 16 June 8th, 2008 10:30 PM
Using AJAX Auto Complete Extender with Database richyrich .Net Code Samples 0 March 26th, 2008 07:59 AM
Dynamic Content in AJAX Extender richyrich .Net Development 3 March 17th, 2008 12:14 PM


All times are GMT -4. The time now is 01:47 AM.


Copyright ©2008-2010, DeveloperBarn

Content Relevant URLs by vBSEO 3.3.2