Reputation: 1141
I just ran across a html page which has some scripts. The script tag starts with the following line:
<script type="text/IMAN">
my question is what is a IMAN script?
I know javascript usually starts with <script type="text/javascript">
I changed to , now the page shows all the code.
Upvotes: 3
Views: 367
Reputation: 1
I know this is an old post, but the tag
<script type='text/IMAN'>
is the start (open tag) for writing imanscript. Imanscript is a proprietary scripting language used by Siemens Teamcenter PLM. The scripting language is sort of like VBscript, but strictly for the web api programming. The original scripting language was originally called imanscript, but in the latest version of Teamcenter it is referred to as tcscript.
Upvotes: 0
Reputation: 7449
You can specify any valid MIME type (which basically just means "two identifiers separated by a slash") for the script type and the browser will ignore the content, if it doesn't recognize the type. Likely it's an HTML template or something else that the developer wants to access from Javascript but wants the browser itself to ignore. The IMAN name? Probably some injoke by the programmer.
In jQuery (for example), you could access it like:
$("script[type*=IMAN]").each(function()
{
// Do something with $(this).text() or .html() or whatever
});
Upvotes: 1
Reputation: 17579
Giving a browser a mime type that it doesn't understand is a great way tell it to ignore your code...allowing you to store code snippets for later - this is most commonly used in templating like https://github.com/janl/mustache.js. Here is how it is used to store content:
<script type="text/template" id="template">
<div>this is my hidden content for a popup</div>
</script>
var content = $('#template').html();
$('#popup').html(content).show();
Upvotes: 2
Reputation: 15219
It's an invalid MIME type. The "type" attr. in an HTML <script>
tag should contain a valid HTML mime-type. Usually its value text/javascript
(for a Javascript resource). At any rate, there's no mime-type called text/IMAN.
Upvotes: 0