473,387 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Script Attribute Definitions...

Hi,
I am trying to find "clear" definitions of the "type" attribute in the
<script> element.

<script language="javascript" type="text/C#">

Specifically, I am trying to find out:
1) Why it is necessary to specify a "type"? (it seems redundant to
"language").
2) Why am I able to specify a type that I can't specify in the language (see
above).
3) Is it possible to write client side script in C#?
Thanks,
- Mike
Jan 25 '06 #1
3 1091
A type attribute is not required for the script tag. For example,
right-click-view-source on this web page.
Jan 25 '06 #2
Brad,
You are correct. When I set it up in the Source view of the .aspx page, it
shows the red squiggle under the script tag and it says that I need to add a
type attribute, but it runs fine without it.
Thanks,
- Mike

"Brad Roberts" wrote:
A type attribute is not required for the script tag. For example,
right-click-view-source on this web page.

Jan 25 '06 #3
in html 4.0 and xhtml the language attribute is obsolete and been replaced
with the type attribute which specifies the language and the encoding (mime
content type). in an html 4.0 compliant browser (which IE isn't) it will
override the any specfieid language attribute.

so if you want to be html 4.0 or xhtml compliant and support non complaint
browers you should specify both.
-- bruce (sqlwork.com)
"Mike Rand" <Mi******@discussions.microsoft.com> wrote in message
news:34**********************************@microsof t.com...
Hi,
I am trying to find "clear" definitions of the "type" attribute in the
<script> element.

<script language="javascript" type="text/C#">

Specifically, I am trying to find out:
1) Why it is necessary to specify a "type"? (it seems redundant to
"language").
2) Why am I able to specify a type that I can't specify in the language
(see
above).
3) Is it possible to write client side script in C#?
Thanks,
- Mike

Jan 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
3
by: pantagruel | last post by:
The following does not work in firefox: <script defer="defer"> var x=document.getElementsByName("repositoryNamespace") alert(x.length + " elements!")
33
by: patrick_woflian | last post by:
hey guys, im just writing a basic calculation at the moment, before building on it for an A-Level piece of work. i can add/divide etc... two numbers together yet i am having a major problem with...
1
by: TPK | last post by:
Here is what I want to do with javascript. On a page with text place a javascript link that: 1) When a user clicks the link (onClick) a new browser window opens (the easy part) NewWindow =...
12
by: Iddo | last post by:
Hi, I am having a strange problem... I have an HTML file which has 2 script tags: 1) <script language="javascript" id="ABC" src="ABC.js" /> 2) <script id="general" language="javascript">...
5
by: Soledad Vel | last post by:
Hi All, i write this code: var sliderwidth=100; var sliderheight = 100; var div1 = document.createElement('div'); div1.setAttribute('id','d5'); div1.setAttribute('style',...
4
by: Eric | last post by:
Attached is an example of my question. Note the "values" attribute is optional. Also the <valuesub-element is optional. Here, the XML can contain, 1 or both or neither. I would like to allow...
3
by: Bubba | last post by:
Hi all, I've got an XSD file that I need to add support to for an optional ID attribute on elements. After many hours of tweaking all that I get to work in my XML file is: <Container...
8
by: John | last post by:
Hi, gurus, How can I implement the following feature in C#: Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ", group") For Each objMember In objGroup.Members...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.