• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 420
  • Last Modified:

vs2010 and html5

I have downloaded sp1 with vs2010 and I want to run html5 apps.
Now on top left I change the  target schema to html5 in drop down box.

The code works fine if I run it in FF but when I click F5 to run it in VS2010 virtual browser then I get an error with JScript


I cant run html5 in virtual broswer in vs2010
<!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">
<body>

<canvas id="myCanvas" width="300" height="300" style="border:1px solid #c3c3c3;">
Your browser does not support the canvas element.
</canvas>

<script type="text/javascript">

    var c = document.getElementById("myCanvas");
    var ctx = c.getContext("2d");
    ctx.fillStyle = "#FF0000";
    ctx.fillRect(0, 0, 200, 200);

</script>

</body>
</html>

Open in new window

0
jagguy
Asked:
jagguy
  • 5
  • 3
1 Solution
 
COBOLdinosaurCommented:
Ironic that you should be using a microsoft tool to do HTML5.  Of all browser manufacturers IE has the lowest compliance with HTML5 standards(less than50%) all other modern browsers are around 90%.

Given that You might want to start by changing the doctype to <!DOCTYPE HTML5>

You may find that using a tool from a low compliance source to be limiting, or it may produce code that doesnot work cross-browser.


Cd&
0
 
jagguyAuthor Commented:
ok bad idea.

well i used notepad and what else?
0
 
COBOLdinosaurCommented:
I didn't say it was a bad Idea, I was just urging caution.  HTML5 is still only a proposed standard and there are still issues to be worked out.  There is not a lot of tools ready for prime time yet.

However This site

Has some impressive effects for canvas and the code is opened for use.



Cd&
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
COBOLdinosaurCommented:
If you really want to see possibilities Check out this



Cd&
0
 
jagguyAuthor Commented:
ok so i am using notepad because i cant get this working in aloha or aptana
0
 
COBOLdinosaurCommented:
I looked at the sites of both Aloha an Aptana and neither one indicates support for HTML5.  In fact both of them are still using XHTML doctypes on the site.  That is the current standard and best practice.  Companies that supply development tools, environments and platforms are not going to race to market while there are still issues with what the actual HTML5 standard will look like.  There is some inconsistent proprietary support in browsers, and a few of us in the Q and A community are trying to understand how things will work, but a developer trying to jump out ahead of the standard is going to be pretty much on his own for at least another year.  

Given what we have seen historically, the first tools that claim to be "HTML5 compliant" will be crap, and incomplete; much the same as it was when we transitioned to XHTML.

I wish I could be a lot more help, but we here at EE and other help sites are learning this stuff as we go.

Cd&
0
 
jagguyAuthor Commented:
yes both have html 5 support as I found them on 'html5 editors list'

given people have created games with html5 there must be a IDE somewhere
0
 
COBOLdinosaurCommented:
If you look around you will see that a lot of it is experimental and when you look at the code it is custom, rather than coming out of a box.  There may be something, but nothing has made enough of an impact to be known.  I think it is still mostly the hardcore geeks playing with it.  Canvas is a technology trying to find a practical business and commerce application.  Games and special effects are not going to present the kind of profit potential necessary for investment in developing tools.


Cd&
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now