AJAX Request

Username (e.g. epiz_XXX) or Website URL

squavero.epizy.com

(please specify the website or account you are asking about)

Error Message

(please share the FULL error message you see)

Other Information

AJAX request is not working
(other information and details relevant to your question)

Below is the code

			                 		<button type='button' class='col-xs-4 col-md-2 btn btn-md btn-default' style='border:1px solid black!important; margin-top:3px!important;' onclick='user_$p()'><em class='fa fa-search'></em></button>
			                 	</div>
			              </div>								              
				          	<div class='panel panel-default'>
				          		<div class='panel-body'>	
					         			<p style='font-size:70%; width:100%;'>Search results</p>
											  <div style='background:rgba(240,240,240,0.1);height:200px; max-height:270px; overflow-y:scroll;'>
									        	<table class='table table-striped no-pad'>
															<tbody id='res_$p'>
									        		</tbody>
									        	</table>
											  </div>
											</div>
									  </div>
									  <script type='text/javascript'> 
									  		
				                function user_$p()
				                {
                                   
				                  var key=document.getElementById('search_users_$p').elements[2].value;
				                  var acc=document.getElementById('search_users_$p').elements[1].value;
				                  var go='form-manager.php?lookup=1&all_users=1&find='+key+'&check='+acc;
				                    
				                  params  = 'url=https://www.mysquavero.ga/';
				                  nocache = '&nocache=' + Math.random() * 1000000 ;     
				                  request = new ajaxRequest()  ;    
				                  request.open('GET', go + nocache, true);
				                   
				                  request.onreadystatechange = function(){        
				                    if (this.readyState == 4)
				                    {          
				                      if (this.status == 200)
				                      {            
				                        if (this.responseText != null)
				                        {   
				                          document.getElementById('res_$p').innerHTML =this.responseText            
				                        }         
				                     	}
				                    } 	      
				                  }
				                   
				                  request.send(params)
				                }
				                function ajaxRequest()
				                {        
				                	try{          
				                    var request = new XMLHttpRequest()        
				                  }        
				                  catch(e1)        
				                  {          
				                     try{            
				                        request = new ActiveXObject('Msxml2.XMLHTTP')          
				                     }          
				                     catch(e2)
				                     {            
				                        try{              
				                           request = new ActiveXObject('Microsoft.XMLHTTP')            
				                        }            
				                        catch(e3){              
				                           request = false            
				                        }          
				                     }        
				                  }        

				                  return request      
				                }
									                
									    </script>								       
						        	<div class='form-group'>
						        		<hr>
						        		<p style='font-size:80%; color:red;'>Confirm with the password of the account in which the number is currently held.</p>
						        			<input type='hidden' name='transfer_what' value='phone'>
						        			<input type='password' class='form-control' name='transfer_password' placeholder='Enter Password' data-toggle='tooltip' data-placement='top' title='Enter the password of this account to transfer $p to your account.'>
						        			<button type='submit' class='button' name='transfer' style='width:100%;margin-top:7px;' onclick='btnmsg_$p()'>Transfer</button>
						        	</div>
				        	</form>
				        	
				        	<script  type='text/javascript'>
				        				
				                function btnmsg_$p()
				                {		
				                	var y='yo';
				                	document.getElementById('final_res_$p').innerHTML =y;			                	
				                  var acc=document.getElementById('search_users_$p').elements[1].value;
				                  var key=document.getElementById('search_users_$p').elements[2].value;
				                  var new=document.getElementById('search_users_$p').elements[3].value;
				                  var radio=document.getElementById('search_users_$p').elements[4].value;
				                  var pass=document.getElementById('search_users_$p').elements[5].value;
				                  var pita='show.php?new='+new+'&radio='+radio+'&pass='+pass;

				                  params  = 'url=https://www.mysquavero.ga/'
				                  nocache = '&nocache=' + Math.random() * 1000000      
				                  request = new ajaxRequest()      
				                  request.open('GET', pita + nocache, true)
				                   
				                  request.onreadystatechange = function(){        
				                    if (this.readyState == 4)
				                    {          
				                      if (this.status == 200)
				                      {            
				                        if (this.responseText != null)
				                        {   
				                          document.getElementById('final_res_$p').innerHTML =this.responseText            
				                        }         
				                     	}
				                    } 	      
				                  }
				                   
				                  request.send(params)
				                }
				                function ajaxRequest()
				                {        
				                	try{          
				                    var request = new XMLHttpRequest()        
				                  }        
				                  catch(e1)        
				                  {          
				                     try{            
				                        request = new ActiveXObject('Msxml2.XMLHTTP')          
				                     }          
				                     catch(e2)
				                     {            
				                        try{              
				                           request = new ActiveXObject('Microsoft.XMLHTTP')            
				                        }            
				                        catch(e3){              
				                           request = false            
				                        }          
				                     }        
				                  }        

				                  return request      
				                }
				        	</script>

“It’s not working” is not going to help us help you. Can you share the error message, as well as what the code is trying to do?
Thanks

1 Like
			              <div class='panel panel-default'>
			                 	<input type='hidden' name='acc' value='$user_manager->acc'>
			                	<input type='hidden' name='check' value='$user_manager->user_type'>
			                 	<div class='panel-body'>
				                 	<div class='col-md-offset-3 col-md-4 col-xs-8'>						                
				                 		<input type='text' name='find' id='search_user_field_$p' placeholder='Find New Owner' class='form-control' autocomplete='off'>
				                		<input type='hidden' name='phone_number' value='$p'>
				                		<input type='hidden' name='current_owners_id' value='$id'>
				                	</div>
			                 
			                 		<button type='button' class='col-xs-4 col-md-2 btn btn-md btn-default' style='border:1px solid black!important; margin-top:3px!important;' onclick='user_$p()'><em class='fa fa-search'></em></button>
			                 	</div>
			              </div>								              
				          	<div class='panel panel-default'>
				          		<div class='panel-body'>	
					         			<p style='font-size:70%; width:100%;'>Search results</p>
											  <div style='background:rgba(240,240,240,0.1);height:200px; max-height:270px; overflow-y:scroll;'>
									        	<table class='table table-striped no-pad'>
															<tbody id='res_$p'>
									        		</tbody>
									        	</table>
											  </div>
											</div>
									  </div>
									  <script type='text/javascript'> 
									  		
				                function user_$p()
				                {
                                   
				                  var key=document.getElementById('search_users_$p').elements[2].value;
				                  var acc=document.getElementById('search_users_$p').elements[1].value;
				                  var go='form-manager.php?lookup=1&all_users=1&find='+key+'&check='+acc;
				                    
				                  params  = 'url=https://www.mysquavero.ga/';
				                  nocache = '&nocache=' + Math.random() * 1000000 ;     
				                  request = new ajaxRequest()  ;    
				                  request.open('GET', go + nocache, true);
				                   
				                  request.onreadystatechange = function(){        
				                    if (this.readyState == 4)
				                    {          
				                      if (this.status == 200)
				                      {            
				                        if (this.responseText != null)
				                        {   
				                          document.getElementById('res_$p').innerHTML =this.responseText            
				                        }         
				                     	}
				                    } 	      
				                  }
				                   
				                  request.send(params)
				                }
				                function ajaxRequest()
				                {        
				                	try{          
				                    var request = new XMLHttpRequest()        
				                  }        
				                  catch(e1)        
				                  {          
				                     try{            
				                        request = new ActiveXObject('Msxml2.XMLHTTP')          
				                     }          
				                     catch(e2)
				                     {            
				                        try{              
				                           request = new ActiveXObject('Microsoft.XMLHTTP')            
				                        }            
				                        catch(e3){              
				                           request = false            
				                        }          
				                     }        
				                  }        

				                  return request      
				                }
									                
									    </script>								       
						        	<div class='form-group'>
						        		<hr>
						        		<p style='font-size:80%; color:red;'>Confirm with the password of the account in which the number is currently held.</p>
						        			<input type='hidden' name='transfer_what' value='phone'>
						        			<input type='password' class='form-control' name='transfer_password' placeholder='Enter Password' data-toggle='tooltip' data-placement='top' title='Enter the password of this account to transfer $p to your account.'>
						        			<button type='submit' class='button' name='transfer' style='width:100%;margin-top:7px;' onclick='btnmsg_$p()'>Transfer</button>
						        	</div>
				        	</form>
				        	
				        	<script  type='text/javascript'>
				        				
				                function btnmsg_$p()
				                {		
				                	var y='yo';
				                	document.getElementById('final_res_$p').innerHTML =y;			                	
				                  var acc=document.getElementById('search_users_$p').elements[1].value;
				                  var key=document.getElementById('search_users_$p').elements[2].value;
				                  var new=document.getElementById('search_users_$p').elements[3].value;
				                  var radio=document.getElementById('search_users_$p').elements[4].value;
				                  var pass=document.getElementById('search_users_$p').elements[5].value;
				                  var pita='show.php?new='+new+'&radio='+radio+'&pass='+pass;

				                  params  = 'url=https://www.mysquavero.ga/'
				                  nocache = '&nocache=' + Math.random() * 1000000      
				                  request = new ajaxRequest()      
				                  request.open('GET', pita + nocache, true)
				                   
				                  request.onreadystatechange = function(){        
				                    if (this.readyState == 4)
				                    {          
				                      if (this.status == 200)
				                      {            
				                        if (this.responseText != null)
				                        {   
				                          document.getElementById('final_res_$p').innerHTML =this.responseText            
				                        }         
				                     	}
				                    } 	      
				                  }
				                   
				                  request.send(params)
				                }
				                function ajaxRequest()
				                {        
				                	try{          
				                    var request = new XMLHttpRequest()        
				                  }        
				                  catch(e1)        
				                  {          
				                     try{            
				                        request = new ActiveXObject('Msxml2.XMLHTTP')          
				                     }          
				                     catch(e2)
				                     {            
				                        try{              
				                           request = new ActiveXObject('Microsoft.XMLHTTP')            
				                        }            
				                        catch(e3){              
				                           request = false            
				                        }          
				                     }        
				                  }        

				                  return request      
				                }
				        	</script>

The form input has id=search_users_$p, the code transfers a phone number from one account to the other.

Please advice if the site is good for production purpose as well

It would be a lot safer to use PHP, and get rid of the hidden fields, because both the JavaScript and the “hidden” fields can be easily changed by the browser user, allowing someone to bypass your password check, or even change some other information.

Also, using a lot of AJAX will get your account suspended for 24 hours since it requires a lot of server power.

1 Like

Alright, under stood.

And now I cant access my database, try opening the link and see

I’ll be moving to the paid hosting plan next month, could you assist me in getting my site unspammed on facebook?

We don’t own Facebook, nor are affiliated with them in any way. However, we do know that Facebook does not seem to like free subdomains, so buying a custom domain (Only about $10 a year) should fox that.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.