Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have learned more through this forum than I did on a two day course. Thanks to everyone for their help and other postings that I have found useful..."

Geography

Where in the world do Tek-Tips members come from?

Error Message: Missing ; Before Statement

getjbb (MIS)
16 Jun 12 1:50
I am getting back the error: Missing ; before statement


chkBox.innerHTML = "<input type=checkbox onclick=is_checked() id="cbox + index" name="cbox + index">"+field1+"";

And it is pointing to the cbox that is bolded.

Whatever help given will be appreciated.

The piece of code is within a function and the index variable is calculated and the field1 variable is being passed in.

getjbb
ChrisHirst (IS/IT--Management)
16 Jun 12 6:25
The " before cbox signifies the end of the string.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

vacunita (Programmer)
16 Jun 12 10:59
As pointed out above your string is incorrectly constructed.

To Js your string ends when it finds a second set of double quotes, so it expects a semi colon to end the instruction before anything else.

CODE

chkBox.innerHTML = "<input type=checkbox onclick=is_checked() id='cbox + index' name='cbox + index'>"+field1+"";

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech

getjbb (MIS)
18 Jun 12 12:38
Thank you all so much.

getjbb

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close