2 Replies - 1109 Views - Last Post: 27 March 2012 - 03:41 AM

#1 ritotombe   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 13-March 12

jquery ajax problem

Posted 27 March 2012 - 03:18 AM

I dont know why this script only run on chrome.. anybody can help me?

$(document).ready(function(){
	
	$("#searchButton").click(function(e) {
		look();
		e.preventDefault();
		
	});
	
});


function look()
{
	hideshow("loading",1);
	var search = $("#search").val();
	var dataString = 'search='+ search;
	$.ajax({
		type: "GET",
		url: "content.php",
		data: dataString,
		timeout: "10000",
		success: function(server_response){
			$("#maincontent").html(server_response).show();
			$("#maincontent").css("background-image","none");
			hideshow("loading",0);
			}
	       });
}


function hideshow(el,act)
{
	if(act) $("#"+el).css("visibility","visible");
	else $("#"+el).css("visibility","hidden");
}


the script supposed to return the respons from content.php into #maincontent

Is This A Good Question/Topic? 0
  • +

Replies To: jquery ajax problem

#2 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4241
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: jquery ajax problem

Posted 27 March 2012 - 03:33 AM

Did you check the error console in the other browsers to see if it's logging any errors? It would be especially helpful if you installed Firebug on Firefox and used that to examine the actual AJAX request, assuming it actually happens.
Was This Post Helpful? 0
  • +
  • -

#3 ritotombe   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 13-March 12

Re: jquery ajax problem

Posted 27 March 2012 - 03:41 AM

thanks for the help, i see my script was right, the problem was the html, i forgot to close a tag..
but i still got problem, how can i make my custom scroll bar? because when the content is so much, then the standard y-scrollbar coming up..
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1