How to create next button

  • (2 Pages)
  • +
  • 1
  • 2

20 Replies - 556 Views - Last Post: 16 March 2014 - 09:22 AM Rate Topic: -----

#16 ben_jamin  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 74
  • Joined: 10-March 14

Re: How to create next button

Posted 14 March 2014 - 11:37 AM

Guys,
I found dreamincode very helpful compare to stackexchnage.
Over there it is so hard to submit and most of the time they shout at you 'duplicate' or just block you.

Thanks, my site is much faster now and working :bananaman:
Was This Post Helpful? 0
  • +
  • -

#17 ben_jamin  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 74
  • Joined: 10-March 14

Re: How to create next button

Posted 15 March 2014 - 03:08 PM

I thought i am ok here but apperantly not yet.
How can ajax/jquery return more then one results.

My code is:

<script>
function total_properties()
{
	$.post('ajax/entire_list.php', {start:0}, function(data)
	{
		$('#feedback').html(data);
	});
}
</script>



so the html(data)displays the list of rows. fine.
But what if i want also to reutrn a value with the table, lets say the $start counter.
Was This Post Helpful? 0
  • +
  • -

#18 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3554
  • View blog
  • Posts: 10,335
  • Joined: 08-June 10

Re: How to create next button

Posted 15 March 2014 - 04:38 PM

just write it with PHP in the return value. apparently data is a chunk of HTML and PHP must therefore be responsible for creating it.

unless of course you want the value separated, then you do what you would always do ... put both bits of information in an object/array
Was This Post Helpful? 0
  • +
  • -

#19 ben_jamin  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 74
  • Joined: 10-March 14

Re: How to create next button

Posted 16 March 2014 - 08:43 AM

View PostDormilich, on 15 March 2014 - 04:38 PM, said:

just write it with PHP in the return value. apparently data is a chunk of HTML and PHP must therefore be responsible for creating it.

unless of course you want the value separated, then you do what you would always do ... put both bits of information in an object/array


Currently i dont have any return at all So where exactly i put return in my ajax/php file and what is the syntax?
Was This Post Helpful? 0
  • +
  • -

#20 ge∅  Icon User is offline

  • D.I.C Addict

Reputation: 80
  • View blog
  • Posts: 575
  • Joined: 21-November 13

Re: How to create next button

Posted 16 March 2014 - 09:18 AM

He was talking about your HTML output, not the "return" keyword : you can either mix your $counter variable with your HTML or decide to output JSON, XML or any custom format instead and parse it in your AJAX callback function before displaying it in your document.
Was This Post Helpful? 0
  • +
  • -

#21 ben_jamin  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 74
  • Joined: 10-March 14

Re: How to create next button

Posted 16 March 2014 - 09:22 AM

I will create new thread. its getting mess over here.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2