Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Need AJAX help, action on click on image, update DB
Old 12-29-2007, 01:59 AM Need AJAX help, action on click on image, update DB
J0ker's Avatar
Skilled Talker

Posts: 61
Trades: 0
Ok so I want it so when you click on one of two images it updates the database with a different value. If you click the first is updates the database with one value, and the other updates a different one. In terms of php/mysql this is no problem it is the AJAX that I don't know well. I already made an HTML form with a text field that would update one of two values depending on which on you enter but I dont know how to do this with just an image and no submit button.

So when you press the button it has to set the variable to either 1 or 2 depending on whether you press the first or second image, then it needs to activate the function I have for the ajax sending to the php file. Once it sets the variables and initiates the ajax function I can do it from there.
__________________

Please login or register to view this content. Registration is FREE
- Free Gaming Forum/Arcade

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by J0ker; 12-29-2007 at 02:24 AM..
J0ker is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-29-2007, 04:11 AM Re: Need AJAX help, action on click on image, update DB
J0ker's Avatar
Skilled Talker

Posts: 61
Trades: 0
I figured it out, you can set variables in the function like so:

functionname(var1, var2, var3)

Then call to them when initiating the function like so

functionname(var1info, something, whatever)
__________________

Please login or register to view this content. Registration is FREE
- Free Gaming Forum/Arcade

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
J0ker is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need AJAX help, action on click on image, update DB
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.83540 seconds with 12 queries