Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Another question
Another question [message #1690557] Sat, 28 March 2015 19:45 Go to next message
Michael Prentiss is currently offline Michael PrentissFriend
Messages: 7
Registered: March 2015
Junior Member
Why does eclipse support html files if you cannot see what they do inside of eclipse? If you were not following my last post, this is my revised code that I believe to be correct:

<!doctype html>
<html>
<meta charset="UTF-8">
<head>
<title>Example</title>
<script type="text/javascript">
<script>
alert('hello world');
</script>
</head>
</html>

When I choose Open With > Web Browser, nothing happens. All I see is a blank window.

I know this is off topic but I don't know how to create a html file with working code on Mac OS X without eclipse. How do I do this?

I would like an answer to both questions.
Re: Another question [message #1690569 is a reply to message #1690557] Sun, 29 March 2015 03:13 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Are you using the internal web browser for this? Alerts in particular may not work there.

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Another question [message #1690570 is a reply to message #1690569] Sun, 29 March 2015 04:53 Go to previous messageGo to next message
Michael Prentiss is currently offline Michael PrentissFriend
Messages: 7
Registered: March 2015
Junior Member
Nitin Dahyabhai wrote on Sun, 29 March 2015 03:13
Are you using the internal web browser for this? Alerts in particular may not work there.


That is what I am using. Is html the best to use, should I use a JavaScript Source File, or something else? My goal is to create a text based website game.
Re: Another question [message #1691227 is a reply to message #1690570] Fri, 03 April 2015 15:16 Go to previous messageGo to next message
Michael Prentiss is currently offline Michael PrentissFriend
Messages: 7
Registered: March 2015
Junior Member
Can someone please tell me what is wrong with my code? The Alert is not working in eclipse or in a html file I have saved on my Mac OSX.
Re: Another question [message #1691241 is a reply to message #1691227] Fri, 03 April 2015 18:39 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
Try this, it works on my OS X and Linux:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Example</title>
</head>
<body>
<script type="text/javascript">
alert("Hello world");
</script>
</body>
</html>


--

Tauno Voipio
Previous Topic:mr
Next Topic:Web Socket support in JBoss 7 using Jetty Server's Web Socket Library
Goto Forum:
  


Current Time: Fri Apr 26 04:11:20 GMT 2024

Powered by FUDForum. Page generated in 0.07964 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top