Jump to content

pcurran

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by pcurran

  1. Thanks. I reduced my onload function to the one line I posted, and it failed.I think the problem relates to the "server of origin" security constraints. I am only using one server, but different subdomains in a way that seems to be illegal - I don't fully understand the constraints involved. I have tried a few work arounds without success, but I think I am getting closer.
  2. I am having a Java script problem that appears to be a security issue. however, I do not know enough about Javascript security issues to resolve it. Can some explain the problem to me, and perhaps a workaround?I am loading an HTML. The first line of the onload function istop.Xx = new Object();(I am pretty sure it is this line that is failing, or perhaps the next one that assigns a value to a property of this object.)This works fine when I load the code and HTML from local files. However, when I load them from a server, I get the error message (Firefox V2.1):Error: uncaught exception: Permission denied to get property Window.Xx(Why this has a capital "W" in Window, I don't know, but I presume it refers to the global object "window," which is equivalent to "top".)Can anyone tell me what the problem here is? Thanks for any assistance.
  3. For the purpose of debugging, I have created XML files, which I load using XMLHttpRequest functions. All works well in Firefox, but not in IE. In IE, the "responseText" field of the response contains the data, but the "responseXML" field does not. Evidently, the content is not being recognized as XML.Ultimately, the content-type header will be set correctly when this comes from the real server, but that is not a practical way for me to develop the code. Can I specify the content type in some other way, since I am not using HTTP? (The file extension is .xml, and the file starts with <?xml version="1.0"?>, but IE doesn't recognize it as XML.Thanks for any help.
  4. Thanks. In this case the default CSS will work adequately. I'm putting in some work-arounds for unused Javascript, but there is only so much that can be done. Yes, that is the situation here.Thanks - I'm going ahead. Everything seems to work fine in the browsers I've tested, which covers the ones most important to me.
  5. I would like some advice on whether the following is valid (legal in, say HTML 4.01 Transitional), and reasonably browser-independent. It appears to be valid according to the DTD (e.g. Tidy doesn't object), and it works on the browsers I have tested (several version of Firefox and IE), but it still feels dodgy, and I would like some opinions before I rely on it.I want to write Javascript code in the HEAD section of an HTML file to generate links to script files and CSS files. For example, something like the following: <script type="text/javascript"> document.write("<script type='text/javascript' src='myjs.js'><\/script>"); document.write("<link rel='stylesheet' type='text/css' href='mystyle.css'>");</script> (Obviously in the real code, the logic is more complicated, with the file names derived from external data, such as the current date.)Anyone see any problem doing this?Thanks for your comments.
×
×
  • Create New...