- This topic has 6 replies, 2 voices, and was last updated 18 years, 9 months ago by Riyad Kalla.
-
AuthorPosts
-
bcichowlasParticipantThis is from Build id: 20060122-4.1-GA (Windows XP)
I had a project folder from one of the milestone builds that I had built as a MyEclipse J2EE project. It had only two added files: index.html and requestResponse.xml . (This example was originally derived from chapter 3 of the Apress Fundamentals of Ajax book.)
index.html is this:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
<html>
<head>
<title>index.html</title>
<meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″>
<meta http-equiv=”description” content=”this is my page”>
<meta http-equiv=”content-type” content=”text/html; charset=UTF-8″>
<!–<link rel=”stylesheet” type=”text/css” href=”./styles.css”>–>
<script type=”text/javascript”>
var xmlHttp;function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject(“Microsoft.XMLHTTP”);
}
else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
}function startRequest() {
alert(‘start Request start’);
createXMLHttpRequest();
xmlHttp.onreadystatechange = handleStateChange;
xmlHttp.open(“GET”, “simpleResponse.xml”, true);
xmlHttp.send(null);
alert(‘start Request finish’);
}function handleStateChange() {
alert(‘handleStateChange start’);
if(xmlHttp.readyState == 4) {
if(xmlHttp.status == 200) {
alert(“The server replied with: ” + xmlHttp.responseText);
}
}
alert(‘handleStateChange finish’);
}</script>
</head><body>
<INPUT type=button value=button name=button onclick=”startRequest()”>
This is my HTML page.
<br>
</body>
</html>When I run this through a foreign project directory (not under the workspace), the alert boxes come out wrong. Some have buttons with no legend. Others are just plain white. I’ve seen problems like this before, but they are very repeatable under these circumstances.
On the other hand, if I then create a new MyEclipse J2EE Web project in the workspace and copy the two files into this workspace, the alert boxes display correctly.
I have no application servers installed in this workspace. I am only right-clicking on the index.html file and selecting Debug As…Javascript Application
Of course, I am expecting trouble when it gets to the ‘open’ and ‘send’ part (see my post in the MyEclipse Ajax forum). However, these ‘alert’ problems show up before it gets that far and only when using the project directory not contained under the workspace.
Bruce
Riyad KallaMemberBruce,
What kind of project is the one that isn’t under the workspace dir?
bcichowlasParticipantIn my previous post, I said that the project from outside the workspace had been created under a milestone build, but that was wrong. Both were created with the ‘GA’ build mentioned.
To clarify, both projects were made under the same build, which I had installed one place on my system and then re-installed the same build in an entirely different space with its own workspace. Both projects were created as MyEclipse J2EE Web Projects. Both have the same two files. The contents of index.html are shown above. The other file, simpleResponse.xml simply contains:
<b> Hello </b>
The projects are small. I could send zips somewhere if you’d like.
Bruce
Riyad KallaMemberBruce,
I’ve forwarded this to the appropriate folks to look at, let’s wait and see if they’d like the test project.
Riyad KallaMemberBruce,
Could you send us the projects to support@genuitec.com ATTN Riyad? Please include a link to this thread so I know why I’m getting the message.
bcichowlasParticipantI just emailed them as requested.
Bruce
Riyad KallaMemberBruce we got them and will have a look at them, thanks.
-
AuthorPosts