Jump to content

Recommended Posts

I'm going to host my site on lunarpages.  I have their basic plan to start off with.  I don't see AJAX support.

But I guess if my site becomes popular and I'm able to make some money to upgrade the plan, that is something I would like to get.

 

That seems like a major improvement over php and asp.  Being able to get javascript to make a call back to the server, that is freakin awesome.

 

Thanks for the info, guys.

There's no such thing as Ajax support server-side (as long as your hosting has some support for server-side scripting - PHP included). Ajax is just JavaScript talking to server :)

 

really....awesome....

I'm using wamp server 5.2.6 as my test machine....is there anything I need to do to get AJAX going?

But I guess if my site becomes popular and I'm able to make some money to upgrade the plan, that is something I would like to get.

 

You don't need money just knowledge of how to do it.

 

Being able to get javascript to make a call back to the server, that is freakin awesome.

 

Yes, it is awesome!  I also think it makes your site look more professional and faster for people to get/do what they want.

So, to get AJAX to do what digg does with their counter being updated, I guess I'll need to learn xml as well?

 

Not necessarily.  You can use pre-formatted HTML or JSON to format your data instead of XML.

 

(Mchl, I know you just posted but I'm posting mine anyway!  :P )

Ok, so basically, when someone clicks on vote, I want the vote number to update itself.

Basically, it will be a query to select select songID FROM vote where songID = $songID.

$voteCount=mysql_affected_rows();

 

Can you guys help me to do this, or do I need to read up on AJAX first.

 

Thanks

 

JSON is probably the niftiest method and it's very easy to do with PHPs built in json_encode and json_decode.

 

That's right, and that's the one I use. It was a bit awkward in the beginning, but now I think it's the best solution. Besides it's been designed to work with JavaScript, so it is faster.

 

@Maq: I do this kind of thing all the time. Why waste what's been written anyways? ;)

 

@limitphp: It would be really good if you got some knowledge about AJAX before you start using it. The basics are pretty simple, and you can go through tutorials in less than a day.

You definitely need to read up on AJAX first.  Also, use jQuery.  You can see an example making an AJAX request in jQuery here: http://docs.jquery.com/Ajax/jQuery.get#urldatacallbacktype

 

So do you use jQuery instead of the xmlHttp.open?:

xmlHttp.onreadystatechange=stateChanged

xmlHttp.open("GET",url,true)

xmlHttp.send(null)

 

you don't get anyone to write a complete script for you on PHPfreaks, Google beginners to AJAX and come back with questions. Remember to post your question in the right forum. This is strictly for PHP.

 

My 2cent contribution

you don't get anyone to write a complete script for you on PHPfreaks

 

He never asked anyone to write the whole script for him.  And yes you can have people write a whole script for you, it's called the freelance section.

 

Google beginners to AJAX and come back with questions

 

Looking at his last post it looks like he did Google AJAX and is now asking for specific help.

 

Remember to post your question in the right forum. This is strictly for PHP.

 

You're right, I think there is an AJAX section, you may have better luck starting a whole new thread devoted to your next question.

It's not like he asked for anyone to code anything... And I'm sure mods will move this topic if they'll find it necessary.

 

I don't think it has to be moved.  Just end it here and start a new one in the appropriate section.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.