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

  • SEARCH
  • Home
  • 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 7578247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:23:13+00:00 2026-05-30T17:23:13+00:00

For some complicated reason, I need to mark some Javascript as special, like this:

  • 0

For some complicated reason, I need to mark some Javascript as “special”, like this:

<script type="text/javascript" someattribute="special">
  var special = "I'm special!";
</script>

<script type="text/javascript" someattribute="special" src="special.js">
</script>

Is it possible to do this in way that complies with XHTML standards? According to http://www.w3schools.com/tags/tag_script.asp, all attributes for the script tag have very specific functions. But is there a workaround?

The idea is to pick up the tags as XML elements and put them in anther page, at server level, before it gets to the browser, so I need the special mark in the actual XML of the page. Adding it once the page has loaded, at browser level, using Javascript, will not work.

Any ideas?


Edit:

For the sake of standards-compliance, I can’t use HTML5. The whole system I’m trying to be compliant with is XHTML 1.0.

Now that I’ve had time to think about it, I think that adding a GET variable or an anchor in the src of the script might just do the trick. For example, instead of the previous example, do

<script type="text/javascript" src="special.js?special"></script>

or

<script type="text/javascript"  src="special.js#special"></script>

I’ll try it now.

  • 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-30T17:23:14+00:00Added an answer on May 30, 2026 at 5:23 pm

    I’m looking back a this post a long time later. This is just to say that what I wrote in my edit did work and was standards-compliant.

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

Sidebar

Related Questions

For some complicated reason, I want to convert any supported type T (coming from
I am writing some and I need to pass a complicated data structure to
This is a beginner's question but for some reason I cannot find the answer
For some reason, I need to compile and test my project on a remote
I have a function which isn't so complicated, but for some reason, each time
I'm having trouble finding a good answer to this. For some reason I thought
I found a site with some complicated C puzzles. Right now I'm dealing with
I have some really complicated legacy code I've been working on that crashes when
I'm trying to optimize up some horrendously complicated SQL queries because it takes too
I'm attempting to put together some basic report screens. I've got some fairly complicated

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.