Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Firefox script

Firefox script

Scheduled Pinned Locked Moved ASP.NET
javascripttoolsquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mr Sam
    wrote on last edited by
    #1

    I am using document.scripts[i].src = "TreeClientBehaviour.js" in IE. What is its alternative in firefox.

    Bye

    G P 2 Replies Last reply
    0
    • M Mr Sam

      I am using document.scripts[i].src = "TreeClientBehaviour.js" in IE. What is its alternative in firefox.

      Bye

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      The document.scripts collection is a non-standard property that doesn't exist in any other browser. What is it that you are trying to accomplish?

      --- "Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things." -- Douglas Adams

      1 Reply Last reply
      0
      • M Mr Sam

        I am using document.scripts[i].src = "TreeClientBehaviour.js" in IE. What is its alternative in firefox.

        Bye

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        If you're trying to dynamically run a script, you can do this:

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html>
        <head>
        <title>Dynamically Loading JavaScript :: Loading thru Src</title>
        <script type="text/javascript">
         function dynamicLoadJS(scriptName) {
        	var head = document.getElementsByTagName("head")[0];
        	script = document.createElement('script');
        	script.id = "DynaScript";
        	script.type = 'text/javascript';
        	script.src = scriptName;
        	head.appendChild(script);
         	document.getElementById("LoadJS").disabled="true";
        	document.getElementById("CallJS").disabled="";
        }</script>
        </head>
        <body>
        	<button id="LoadJS" onclick="dynamicLoadJS('./onDemandJs.js');">Load JavaScript</button>
        	<button id="CallJS" onclick="showHtml();" disabled="disabled">Call method from new load</button>
        </body>
        </html>
        

        Deja View - the feeling that you've seen this post before.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups