Adds Posted June 21, 2012 Share Posted June 21, 2012 Hi, Can anyone help me to fix this issue at all? After placing the code for the live chat addon onto my site it's now showing a Syntax code error with this little bit of code: </script> <script language="JavaScript" type="text/JavaScript"> function clearText(thefield){ if (thefield.defaultValue==thefield.value) thefield.value = "" } </script> Can you see what the issue is at all and how I can fix it? Thanks, Adam. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted June 21, 2012 Share Posted June 21, 2012 Put {literal}...{/literal} tags around the script. also I take it that the closing </script> tag is for a script above that code? 0 Quote Link to comment Share on other sites More sharing options...
Adds Posted June 21, 2012 Author Share Posted June 21, 2012 Sparky, Thanks for the quick reply, but what do you mean? can you place them into the code for me and paste it here? Thanks, Adam. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted June 21, 2012 Share Posted June 21, 2012 replace the 3 dots (...) with your code leaving the literal tags around your code. I do take it that this was for a whmcs tpl file! It also could be that you are missing the closing ; from the end of the if statement. PS. I wont be replying to your PM as it can be answered here. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted June 21, 2012 Share Posted June 21, 2012 replace the 3 dots (...) with your code leaving the literal tags around your code. I do take it that this was for a whmcs tpl file! It also could be that you are missing the closing ; from the end of the if statement. if (thefield.defaultValue==thefield.value) thefield.value = ""; PS. I wont be replying to your PM as it can be answered here. 0 Quote Link to comment Share on other sites More sharing options...
Adds Posted June 21, 2012 Author Share Posted June 21, 2012 Sparky, No it's not within the whmcs tpl file it's within the pages of my website, this has happened ever since I have placed the live chat add on code into the pages. Dream weaver is informing me the error is with this part of the code: if (thefield.defaultValue==thefield.value) Not sure what it is 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted June 21, 2012 Share Posted June 21, 2012 might be that it is wrapping some of that line. It should read if (thefield.defaultValue==thefield.value) thefield.value = ""; 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.