TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-04-2008, 08:42 PM   #1 (permalink)
The Contributor
 
Join Date: Dec 2007
Posts: 27
Thanks: 0
crazyryan is on a distinguished road
Default Ajax Request Help

Hey

Could anyone guide me in the right direction on this:

I want something like: Amazon.com Coupon Codes - all coupons, discounts and promotion codes for amazon.com

The part, 'Did this coupon work for you'

I want that, so when yes or no is clicked, the new percentage is brought back.

Someone said I need to do:
Onclick on worked button, send url to php script via ajax that adds +1 to the database and then use mysql and stuff on the php script to return the value of percentage.

However, I'm kinda new to this stuff so .. Can anyone do the javascript bit and I'll do the PHP page?

Thanks, help much appreicated.
crazyryan is offline  
Reply With Quote
Old 03-04-2008, 10:09 PM   #2 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

All that can be done through an XMLHttpRequest (AJAX) call. What have you tried so far? Are you a complete neophyte when it comes to using XHR? What JS experience do you have? Ever use any frameworks like jQuery or Prototype?
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote
Old 03-04-2008, 10:14 PM   #3 (permalink)
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default

To start off, I should suggest Mootools SOCK. But jQuery helped me out a bit and I've learned a lot from it as well, so the choice is up to you crazyryan. I suggest you start off building up some knowledge about AJAX/JS before you bite off more than you can chew.
__________________
"Life is a bitch, take that bitch on a ride"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote
Old 03-04-2008, 10:36 PM   #4 (permalink)
The Contributor
 
Join Date: Dec 2007
Posts: 27
Thanks: 0
crazyryan is on a distinguished road
Default

Oops, forgot to mention, I'd like to use jquery if possible because I'm using it for some effects on my site (I didn't code them, someone else helped me)

I have no experience with javascript or AJAX, totally clueless. :p
crazyryan is offline  
Reply With Quote
Old 03-04-2008, 11:17 PM   #5 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

Ok; I'd start with the jQuery AJAX API and tutorials, there is plenty of documentation on how to do this. Just for kicks, take some time to read the Wikipedia article on XHR as well to get a good understanding of the underlying technology.

I'm familiar with (and use) either the hardcoded XHR calls or jQuery, if you need some help let me know.
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote
Old 03-05-2008, 03:11 PM   #6 (permalink)
The Contributor
 
Join Date: Dec 2007
Posts: 27
Thanks: 0
crazyryan is on a distinguished road
Default

Okay, I'm really confused lol ... I have no idea what to do with this, SOCK - any chance you can explain it a bit :D
crazyryan is offline  
Reply With Quote
Old 03-05-2008, 04:09 PM   #7 (permalink)
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

Sure, send me a PM, or post what you're having trouble with so we can all take a look.
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:41 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design