| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Embedded page with dynamic data problem | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I have an app that I'm trying to bring in using an embedded page. This pulls data in from a MySQL database totally separate from X-Cart. I have the whole script (PHP + Javascript) wrapped with the {literal}{/literal} tags. The data doesn't display.
I put the script into a php test file in the same directory and it works fine. Is something in Smarty preventing the access to the database? What would you suggest? I already set all the variable global at the top and I changed the variables for username, password, etc to a slightly different word so it wouldn't be a conflict. Sure appreciate any help. ![]() Thanks!!!
__________________
X-Cart 4.1.8 |
|||||||
#2
|
|||||||
|
|||||||
![]() what is the layout of the code? are you passing php variables to javascript, javascript to php, smarty to javascript, etc
|
|||||||
#3
|
|||||||
|
|||||||
![]() I'm passing php variables to javascript so that within the javascript there are php tags with while loops, then back to js, then pull in x1 php variable, back to js, pull in x2 php variable, etc. It's messy. But I inherited it and it works outside of X-Cart/Smarty.
I've got it to show the basic data now but part of the function is that a choice in one field updates another field (onchange). That part is not working. Is X-Cart preventing an onchange event or is something in the function being interefered with? This line: <select name="itemlist" size="10" onchange="chlist()"> Is calling this js function: function chlist() { e=document.orderfrm; var p=e.itemlist.selectedIndex; e.prodid.value=pid[p]; e.desc.value=pdesc[p]; e.amount.value=pprice[p]; if(p==0) { alert("Please select an Item"); return false; } }
__________________
X-Cart 4.1.8 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|