The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[SOLVED] Updating Product setting through ajax call
Solved with a little help from a friend
Code:
WHERE varname = 'drc_fl' So I have a link on my forumhome that only I can see, and when I click this link I'm trying to make it toggle the setting from on to off and vice versa. this is how I have it setup. the links code on forumhome: HTML Code:
<div id="drc_fl_container"> <if condition="$vboptions[drc_fl] == 1"> <div id="drc_fl_on" class="drc_fl_common">ON <div class="drc_fl_fltr"> <a href="#" onclick="drcfl_off()">Switch</a> <else /> <div id="drc_fl_off" class="drc_fl_common">OFF <div class="drc_fl_fltr"> <a href="#" onclick="drcfl_on()">Switch</a> </if> </div> </div> </div> Code:
function drcfl_off(){ $.ajax({ type: "GET", url: "?do=drcfloff" }); } function drcfl_on(){ $.ajax({ type: "GET", url: "?do=drcflon" }); } PHP Code:
product is attached. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|