sap
sap

Reputation: 1141

Please help me figure out what kind of a scripting language is this

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

Answers (4)

James Easterling
James Easterling

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

JimmiTh
JimmiTh

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

Will Stern
Will Stern

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

Shivan Dragon
Shivan Dragon

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

Related Questions