View RSS Feed

All Blog Entries

  1. "Operation Aborted" error in IE when inserting new elements into the DOM, and fix

    The DOM lets you dynamically create and add elements to the page, such as the following, which creates an image on the fly and adds it to the end of the document:

    Code:
    var img=document.createElement("img")
    img.setAttribute('src', 'dd.gif')
    document.body.appendChild(img)
    Ideally such an operation should be done after the document has loaded, though in most browsers, I noticed you can get away with it. In IE6 and IE7, however, things get a lot more ...

    Updated 06-04-2009 at 12:45 AM by ddadmin

    Categories
    Web Design issues
  2. Document.write issues

    The Ajax Includes Script given at http://www.dynamicdrive.com/dynamici...axincludes.htm uses document.write for including external content. Advantage: you don't have to explicitly bring the js belonging to the external file(s) to the main page. But beware the results in certain cases! In IE, (external) scripts added to the page using document.write are not run until after the document.write that adds them has finished. Non-IE browsers will run them straight away. So
    Code:
    <script type="text/javascript">
    ...

    Updated 05-16-2009 at 11:55 PM by molendijk (Forgot to mention category)

    Categories
    JavaScript & Ajax
  3. Randomizing Fading Scroller

    The script does not have a randomizing option on the scroller, and due to a recent thread I made. (http://www.dynamicdrive.com/forums/s...70&postcount=2).

    Your new code should look like this:
    Code:
    <script type="text/javascript">
    
    /***********************************************
    * Fading Scroller-  Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit
    ...
    Categories
    Uncategorized
  4. Tab Content script- Getting it to stop auto rotating after x cycles

    Original Script: DD Drop Down Panel v1.01

    By default, when the script is set to auto cycle through the tabs, it does this indefinitely until the user clicks on one of the tabs. With the following modified version of the .js file, you can have it automatically stop after x cycles, even if the user doesn't click on a tab during this time. Simply use the following modified .js file. If you wish to change the # of cycles from 2 to something else, change the part in red below inside it: ...
    Categories
    DD Scripts Mods
    Attached Thumbnails Attached Files
  5. Extract external HTML via a hidden text/html-object

    In the head:
    Code:
    <!--[if IE]>
    <script type="text/javascript">
    document.write('<object type="text/html" id="object_id" width="0" height="0" data="menu.html"><\/object>');
    onload=function(){
    document.getElementById('main_page_id').innerHTML = document.getElementById('object_id').object.documentElement.innerHTML;
    }
    </script>
    <![endif]-->
    <!--[if
    ...

    Updated 05-05-2009 at 10:49 PM by molendijk (Correction)

    Categories
    Post a JavaScript
Page 14 of 18 FirstFirst ... 41213141516 ... LastLast