facebook

Problems with Javascript alert boxes in debugger

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #246282 Reply

    bcichowlas
    Participant

    This 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

    #246312 Reply

    Riyad Kalla
    Member

    Bruce,
    What kind of project is the one that isn’t under the workspace dir?

    #246324 Reply

    bcichowlas
    Participant

    In 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

    #246326 Reply

    Riyad Kalla
    Member

    Bruce,
    I’ve forwarded this to the appropriate folks to look at, let’s wait and see if they’d like the test project.

    #246344 Reply

    Riyad Kalla
    Member

    Bruce,
    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.

    #246490 Reply

    bcichowlas
    Participant

    I just emailed them as requested.

    Bruce

    #246512 Reply

    Riyad Kalla
    Member

    Bruce we got them and will have a look at them, thanks.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Problems with Javascript alert boxes in debugger

You must be logged in to post in the forum log in