src/main/webapp/jsFiles/index.js
//Calls SimpleServlet to get the "Hello World" message
Calls SimpleServlet to get the "Hello World" message
Calls SimpleServlet to get the " Hello World " message
function addItem(){
	var name='?name='+document.getElementById('name').value;
	xhrGet("SimpleServlet"+name, function(responseText){
	responseVal=responseText;	
	document.body.style.background = 'url(images/'+responseText+'.jpg)'
	document.body.style.backgroundSize = "cover";
	document.getElementById('div1').style.visibility = 'hidden';  
	document.getElementById('div1').style.display = 'none'; 
	document.getElementById("div2").innerHTML="Help us "+document.getElementById('name').value+" !";
	if(responseText=="party")
	document.getElementById("myPopup").innerHTML="While making the dollhouse we forget homework. Solve it for us princess";
	 document.getElementById("div2").style.display = 'block';
}, function(err){
	console.log(err);
});
}
function addItem ( ) { var name = '?name=' + document . getElementById ( 'name' ) . value ; xhrGet ( "SimpleServlet" + name , function ( responseText ) { responseVal = responseText ; document . body . style . background = 'url(images/' + responseText + '.jpg)' document . body . style . backgroundSize = "cover" ; document . getElementById ( 'div1' ) . style . visibility = 'hidden' ; document . getElementById ( 'div1' ) . style . display = 'none' ; document . getElementById ( "div2" ) . innerHTML = "Help us " + document . getElementById ( 'name' ) . value + " !" ; if ( responseText == "party" ) document . getElementById ( "myPopup" ) . innerHTML = "While making the dollhouse we forget homework. Solve it for us princess" ; document . getElementById ( "div2" ) . style . display = 'block' ; } , function ( err ) { console . log ( err ) ; } ) ; }
Calls SimpleServlet to get the "Hello World" message
Calls SimpleServlet to get the " Hello World " message