Jump to content

Syntax Code Error


Adds

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated