RobMs Posted May 17, 2011 Share Posted May 17, 2011 Hi all, I am using almost identical pages, with almost identical scripts. However I can only get one to run. Works on display_client.php: if ($clientList[0]['client_id'] != Null) { echo "<script type='text/javascript'> showClient('".$clientList[0]['client_id']."'); </script>"; Doesnt Work on display_brand.php: if ($brandList[0]['brand_id'] != Null) { echo "<script type='text/javascript'>showBrand('".$brandList[0]['brand_id']."');</script>"; Both scripts are used elsewhere, and work fine, and I know showBrand('".$brandList[0]['brand_id'] gets the right value, as I have checked with an echo statement. It just seems that I cannot get the function to run using the above statement. Are there issues with running two scripts like this at the same time? It is probably easier to understand looking at the code, so Background info: Javascript file: scripts.js client.php ----> loads data from: display_client.php display_client.php ----> loads data from: display_brand.php Code: client.php http://pastebin.com/4EFn9YRf display_client.php http://pastebin.com/BGZAKre2 display_brand.php http://pastebin.com/0a4Pg3gg scripts.js http://pastebin.com/er4dkmPc Quote Link to comment https://forums.phpfreaks.com/topic/236626-script-will-not-run/ Share on other sites More sharing options...
RobMs Posted May 17, 2011 Author Share Posted May 17, 2011 It appears not to use things from the <head> section, in my dynamic content. Is there something I can do, so that it does? Quote Link to comment https://forums.phpfreaks.com/topic/236626-script-will-not-run/#findComment-1216534 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.