Solved

Javascript version 1.8

Posted on 2013-06-24
6
320 Views
Last Modified: 2013-07-05
Hello,
Is it possible to identify what version the javascript is being programmed by looking at the web page source code?  I would think that knowing of a certain construct used in version 1.8 and that construct being used on that web page, that one could determine what version was being used.
Is there an easier way?

Also,
How much information can be gather from a statement like this;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

I see that the DTD is xhtml, but is there more?
0
Comment
Question by:chima
6 Comments
 
LVL 6

Expert Comment

by:Manuel Marienne-DuchĂȘne
ID: 39273890
may be you want to talk Jquery a librairy for javascript :

http://jquery.com/
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 125 total points
ID: 39273909
You can see the version of the jQuery library in the source code of a page.  But javascript itself is part of the browser and is not generally available separately and neither is the version of it.  Current versions of javascript in browsers are based on ECMAscript.  More info here: https://en.wikipedia.org/wiki/ECMAScript
0
 
LVL 55

Assisted Solution

by:Julian Hansen
Julian Hansen earned 75 total points
ID: 39273916
I am assuming you mean JQuery not Javascript

You can check the version like so
var ver = $().jquery;
alert (ver);

Open in new window

0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 35

Assisted Solution

by:Robert Schutt
Robert Schutt earned 150 total points
ID: 39274071
Assuming you do mean javascript, seems the way to do it is to include the version in the script tag so it's clear for people (and browsers), as shown here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.8 

I'm not sure what is supposed to happen when a browser doesn't support the new version, probably ignore the entire script block.
0
 
LVL 9

Accepted Solution

by:
Sar1973 earned 150 total points
ID: 39274274
Are you looking for navigator properties? See http://www.w3schools.com/js/tryit.asp?filename=try_nav_all
0
 
LVL 55

Assisted Solution

by:Julian Hansen
Julian Hansen earned 75 total points
ID: 39274420
Having re-read your question
s it possible to identify what version the javascript is being programmed by looking at the web page source code?
Are you asking what version the author decided to use or what version is supported by the browser?
From the rest of your question it seems you are trying to work out something about the page and how it was developed.

Maybe tell us what it is you are trying to do - why you need this information - and we might be better able to help you.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question