Skip to main content



      Home
Home » Newcomers » Newcomers » Another question
Another question [message #1690557] Sat, 28 March 2015 15:45 Go to next message
Eclipse UserFriend
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] Sat, 28 March 2015 23:13 Go to previous messageGo to next message
Eclipse UserFriend
Are you using the internal web browser for this? Alerts in particular may not work there.
Re: Another question [message #1690570 is a reply to message #1690569] Sun, 29 March 2015 00:53 Go to previous messageGo to next message
Eclipse UserFriend
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 11:16 Go to previous messageGo to next message
Eclipse UserFriend
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 14:39 Go to previous message
Eclipse UserFriend
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>
Previous Topic:mr
Next Topic:Web Socket support in JBoss 7 using Jetty Server's Web Socket Library
Goto Forum:
  


Current Time: Thu May 22 19:37:47 EDT 2025

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

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

Back to the top