Wierd error in Internet Explorer

Discussion in 'JavaScript' started by Luke Watson, Oct 25, 2010.

  1. #1
    Hey i've been developing a javascript program and it works fine in every browser except Internet Explorer. When you load it in Internet Explorer i get a message saying this,

    The website is using a scripted window to ask you for information. If you trust this website, click here to allow scripted windows

    Here is my code,

    
    <!-- SalesPerson Status -->
    <html>
     <head>
      <title>SalesPerson Status</title>
      <style type="text/css">
       body {
             background-color: #000000;
             color: #FFFFFF;
             text-align: center;
             font-size: 30;
            }
      </style>
     </head>
     <body>
      <script type="text/javascript">
       var wage, stroutput;
       stroutput = "";
       document.write("<h1>SalesPerson Status</h1>");
       status = prompt ("Please type 's' if you are a Senior Salesperson","");
       if(status == "s") 
        {
         stroutput = stroutput + "Senior Salary is $400";
        }
       else if(status == null)
        {
         stroutput = stroutput + "Nothing will be displayed";
        }
       else if(status == "")
        {
         stroutput = stroutput + "Nothing has been entered";
        }
       else
        {
         stroutput = stroutput + "Junior Salary is $275";
        }
       alert(stroutput);
       document.write("<br/><br/><br/>");
       document.write("<input type='button' name='cmdReload'");
       document.write(" value='Do Another One' onclick='window.location.reload()' />");
      </script>
     
     </body>
    </html>
    
    Code (markup):
    Is there a bit of code i'm missing or need to add for Internet Explorer? Please help me, thankyou.:)
     
    Luke Watson, Oct 25, 2010 IP
  2. JeezMGeez

    JeezMGeez Member

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    Not really any help but its just typical that it works in all browsers but IE.
     
    JeezMGeez, Oct 26, 2010 IP
  3. Bigcats82

    Bigcats82 Greenhorn

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    This may be a security setting within IE. Or it could be due to not running it from a web server. Sometimes with IE you get additional warning messages when you try opening a webpage with javascript through your file system rather than through IIS or some other web server.
     
    Bigcats82, Oct 26, 2010 IP