aeroswat Posted December 7, 2009 Share Posted December 7, 2009 echo "<input type='checkbox' value='1' name='ordSupply' id='ordSupply' onclick='disChange('hidSupply');' " . ($ordSupply=='1' ? 'checked' : '') . "/>"; there is an error with my javascript function on this page. Is it because i have multiple sets of single quotes? Link to comment https://forums.phpfreaks.com/topic/184316-is-this-bad-syntax/ Share on other sites More sharing options...
premiso Posted December 7, 2009 Share Posted December 7, 2009 This is bad syntax for Javascript/HTML: onclick='disChange('hidSupply');' As you are using single quotes inside of single quotes. Replace the below code in your code and it will fix your JS error: onclick=\"disChange('hidSupply');\" Link to comment https://forums.phpfreaks.com/topic/184316-is-this-bad-syntax/#findComment-973080 Share on other sites More sharing options...
aeroswat Posted December 7, 2009 Author Share Posted December 7, 2009 Thankyou. Link to comment https://forums.phpfreaks.com/topic/184316-is-this-bad-syntax/#findComment-973083 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.