This code works when running the application, but Dreamweaver is giving a syntax error. It doesn't like the question mark there. I like DW to be syntax error free. Is there a different way to write this? I have DW cs5.5 I can't upgrade Dreamweaver version.
if ( $('#postage6').val() == "Your Permit Standard" ) {
$('#postage6rate').val('<?php echo $your_permit_standard; ?>');
}
Putting a backslash before the question mark just makes it print like this, which is not right.
if ( $('#postage6').val() == "Your Permit Standard" ) {
$('#postage6rate').val('<\?php echo $your_permit_standard; ?>');
}
when it renders, there is supposed to be a value like this:
if ( $('#postage6').val() == "Your Permit Standard" ) {
$('#postage6rate').val('0.333');
}
Also this doesn't work:
if ( $('#postage6').val() == "Your Permit Standard" ) {
var somevar = "<?php echo $your_permit_standard; ?>";
$('#postage6rate').val(somevar);
}
The syntax error just transfers from the line where the PHP variable was to the new line where the PHP variable is.
*.php) file, otherwise it wont work!