1 Replies - 271 Views - Last Post: 20 January 2012 - 08:16 AM

Topic Sponsor:

#1 SittingonDucks  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 64
  • Joined: 23-December 11

XMLHttpRequest continually suggests I like the word 'undefined'

Posted 20 January 2012 - 07:21 AM

I'm almost positive this is the Javascript code, because it was working until I copied and pasted my code into the function for a more efficient method of doing things. Just take a look at it, and tell me if you see something wrong. Javascript error console says nothing.

function yuigo(valname, values, id1, id2, filename) 
{ 
	var val = document.getElementById(id1).value; 
	var callback = {
	  success: function(o) {
			if (o.responseText.substr(0, 4) == "Nice") 
			{ 
				document.getElementById(id1).style.border = "solid green 4px"; 
				document.getElementById(id2).innerHTML = this.responseText; 
			} 
			else 
			{ 
				document.getElementById(id1).style.border = "solid red 4px"; 
				document.getElementById(id2).innerHTML = this.responseText; 
			} 
		},
		failure: function(o) {
			document.getElementById(id1).style.border = "solid red 4px"; 
			document.getElementById(id2).innerHTML = "orlynao"; 
		}
	};
	YAHOO.util.Connect.asyncRequest('POST', filename, callback, valname+"="+values);
} 
function xmlEmail() 
{ 
	var val = document.getElementById("email").value; 
	yuigo('emailadd', val, 'email', 'changer1', 'emailver.php'); 
} 


Is This A Good Question/Topic? 0
  • +

Replies To: XMLHttpRequest continually suggests I like the word 'undefined'

#2 SittingonDucks  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 64
  • Joined: 23-December 11

Re: XMLHttpRequest continually suggests I like the word 'undefined'

Posted 20 January 2012 - 08:16 AM

I'm an idiot. ^.^
I got it working, no worries.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1