Jump to content

Script will not run


RobMs

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/236626-script-will-not-run/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.