locked
Permission Denied RRS feed

  • Question

  • When I run the following page I get a Microsoft JScript runtime rrror: Permission denied.  I've placed  the p360.js file in the header as well as the body with no luck.  If I run the JS minus the function call at the end of the body, it works.  I'm building this page using VS2008 and IIS7.  I also tried running it in VS2008 with the built-in web-server.  I even tried in FireFox.  After scanning the internet there were several reference to frames but I'm not using frames.  I'm unable to post images to this forum, but looking as I step through the JS the page loads, then the JS runs.  The first run through the counter cI=0 works.  The second run cI=1 I get the permission denied error.  Any idea?  Thanks.

     

    <body>

     

    <form id="myForm" runat="server">

    What's your favorite color?

    <br />

     

    <input type="radio" name="favColor" value="red" />Red<br />

     

    <input type="radio" name="favColor" value="blue" />Blue<br />

     

    <input type="radio" name="favColor" value="green" />Green<br />

     

    <input type="radio" name="favColor" value="orange" />Orange<br />

     

    </form> 

     

    <script src="p360.js" type="text/javascript"></script>

     

    </body>

    function

     

    init()

    {

     

    var favColorGroup = document.getElementsByName("favColor");

     

    for(var cI = 0; cI < favColorGroup.length; cI++)

    {

    document.write(

    'Color: ' + favColorGroup[cI].value + '<br />');

    }

    }

    window.onload=init;

    Saturday, May 22, 2010 10:48 PM

All replies

  • Hi,
     
    Based on the code I am not seeing a lot that should be causing the
    error. It seems like it has to be something in the p360.js file. Can you
    post the p360.js file? Also, does the error occur if you remove the
    script tag for the p360.js file?
     
     

    -- Mike Burr
    Tuesday, June 22, 2010 1:52 PM