Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 514135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:29:36+00:00 2026-05-13T07:29:36+00:00

Apologies if this is a stupid question as Im completly new to JAvascript and

  • 0

Apologies if this is a stupid question as Im completly new to JAvascript and web programming!

I’m currently using Dreamweaver to do some test scripts and the internal JS editor is highlighting a syntax error with my script. The only problem is that there is no indication as to what the error is or what I might need to do to fix it!

When I paste this code directly into the web page, the script seems to work without issue!

My script is as follows (saved in an external .js file):

1  // JavaScript Document
2  <script type="text/javascript">
3  
4  function coloralternatetablerows(id)
5  {
6      // If the tag exists within the document
7      if(document.getElementsByTagName)
8      {  
9          // rest of the script ommitted for clarity
10     }
11 }        

The synax error is highlighted as line 7.

Can anyone help me figure this out?!

More importantly… can anyone direct me to a good resource to help me with this sort of issue in the future?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:29:36+00:00Added an answer on May 13, 2026 at 7:29 am

    Your Javascript code is in a seperate .js file so you don’t need the <script> tag in there.

    Get rid of the <script> tag completely.

    In your HTML page you’ll be loading in your external .js file using
    <script type="text/javascript" src="myscript.js"></script> but the .js file its self should have no HTML in it (like the <script> tag)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Apologies if this is a stupid question, I'm relatively new to Matlab. I've got
I'm new to Python so apologies in advance if this is a stupid question.
Apologies if this is a dumb question. In previous ASP.NET projects, I've been using
I'm still fairly new to symfony, so my apologies if this is a stupid
Apologies if this is a stupid question - I'm an Android and Ant newbie.
My apologies if this is a stupid question, however I can't find any information
Apologies for the massively stupid question but I am curious how to get this
Apologies if this is a stupid/easy question, but still getting used to everything in
This is a stupid question, and I know it is, but for some reason
Apologies if this ends up being a stupid question, but I was just wondering

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.