Hi
I have another strange one since I upgraded to the latest SC version.
Scenario 9.10.021 (2)
- I have a FORM, where there is a dropdown list.
- The chosen value is colour coded based on a lookup to a global array.
- The colouring uses a javascript method that works fine on the onload event
- I need to recolour the value if it changes (To relate to the new selected value’s colour
I have an AJAX onChange event setup that is properly triggered and I can see it works because for testing purposes I change a field to show the correct colour value in hex… so far so good.
I then call a Javascript method…
sc_ajax_javascript(‘test’); // calling javascript
this is a simple method that only shows an alert (and it works fine if I trigger it using the main Javascript events)
Unfortunately nothing happens… it looks like the method is not called.
As part of testing, I then tried to print a message using the sc_ajax_message macro (Using the simple example in the manual.
/**
- Display a message after an AJAX call
*/// Javascript message parameters
$javascript_title = ‘My Message’; // Javascript message title
$javascript_message = ‘This is a test message.’; // Javascript message contents// Display javascript message
sc_ajax_message($javascript_message, $javascript_title);
Again nothing happens…
I’ve checked the simple stuff like scope of the macros (Which looks OK) and there are no console errors.
Any suggestions about what the problem might be?