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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.