3 Replies - 1091 Views - Last Post: 06 December 2009 - 05:19 AM

#1 morcomm   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 75
  • Joined: 28-March 08

Ajax call

Post icon  Posted 26 November 2009 - 03:44 AM

Hi, I have done this script myself. I am not sure how to impliment a Ajax call (whatever method) for each of the elements that will be displayed. This is for a very extensive file directory and it would be good if I could rather call data via ajax as it is requested rather than wasting bandwidth.

<script type="text/javascript">
  $(document).ready(function(){
							 
	$(".company").hide();
	$(".comp_expand").click(function () {
	  $(".company").slideToggle("slow");  
	});
	
	$(".comp_expand").hover(function () {
	  $(this).addClass("comp_expand_hl");
	}, function () {
	  $(this).removeClass ("comp_expand_hl");
	 
	});

	
	$("#panel001").hide();
	$("#tab001").click(function () {
	  $("#panel001").slideToggle("slow");  
	});
	
	$("#panel002").hide();
	$("#tab002").click(function () {
	  $("#panel002").slideToggle("slow");  
	});
	
  });
</script>


Is This A Good Question/Topic? 0
  • +

Replies To: Ajax call

#2 girasquid   User is offline

  • Barbarbar
  • member icon

Reputation: 109
  • View blog
  • Posts: 1,825
  • Joined: 03-October 06

Re: Ajax call

Posted 26 November 2009 - 08:30 AM

You may want to take a look at jQuery's get() function, which should do exactly what you need.
Was This Post Helpful? 0
  • +
  • -

#3 morcomm   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 75
  • Joined: 28-March 08

Re: Ajax call

Posted 26 November 2009 - 01:14 PM

I know, but where do I put it?
Was This Post Helpful? 0
  • +
  • -

#4 Wimpy   User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: Ajax call

Posted 06 December 2009 - 05:19 AM

In your code where you want the request to be sent should be a good place! :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1