![]() |
Sergey Kornilov admin 2/17/2012 |
Here is the link to sample code that can change the image based on dropdown box selection: |
S
|
siro author 2/18/2012 |
Hi admin
|
C
|
cgphp 2/18/2012 |
If you want to dynamically load images from the database you need to modify your code to make an AJAX call. |
S
|
siro author 2/18/2012 |
If you want to dynamically load images from the database you need to modify your code to make an AJAX call.
|
C
|
cgphp 2/19/2012 |
The server side code you will call with the AJAX call should be put in a external file or in the "List page: Before process" event. I will opt for the second solution: {$president_photo}
$xt->assign('president_photo',"<span id='president_photo'></span>");
$("#dropdown_id").change(function(e){
if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest') |
S
|
siro author 2/20/2012 |
The server side code you will call with the AJAX call should be put in a external file or in the "List page: Before process" event. I will opt for the second solution: On the Add page, near the dropdown, enter a template var like this: {$president_photo}
$xt->assign('president_photo',"<span id='president_photo'></span>");
$("#dropdown_id").change(function(e){
if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest')
|
C
|
cgphp 2/20/2012 |
Change the SQL query according to your table structure. |
S
|
siro author 2/20/2012 |
Change the SQL query according to your table structure.
|
C
|
cgphp 2/21/2012 |
If you can send me a demo link (as a PM if it is more comfortable), I will try to fix the error for you. |
S
|
siro author 2/22/2012 |
If you can send me a demo link (as a PM if it is more comfortable), I will try to fix the error for you.
|
C
|
cgphp 2/22/2012 |
S
|
siro author 2/24/2012 |
http://xlinesoft.com/phprunner/docs/what_is_demoaccount.htm
|
L
|
laonian 2/24/2012 |
Joel, |
S
|
siro author 2/24/2012 |
Joel, When you get your problem solved, do you mind sharing the final working code with us? Thanks!
|
![]() |
Sergey Kornilov admin 2/24/2012 |
Joel, |
S
|
siro author 2/27/2012 |
Joel, you need to contact support directly in this regard. Open ticket at http://support.xlinesoft.com sending your sending your project file.
|