Ajax Post & IE8


 
Thread Tools Search this Thread
Top Forums Web Development Ajax Post & IE8
# 1  
Old 07-08-2011
Ajax Post & IE8

I have an Ajax script that runs on IE9 & FF but not IE8...well it runs but there is some sort of memory leak so the script runs slower and slower with each consecutive click because the code being processed is not being cleared each time, or something. I found some articles online and tried them but with no luck. How do I stop the cycle?

Code:
 if (window.XMLHttpRequest){xmlhttp=new XMLHttpRequest(); }
        // code for IE
        else if (window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }
        if (xmlhttp!=null){
            
            $.ajax({type: "POST", url:"/load-content/", global: false, data:({img:showcase, clicked:click_name, off:off_name,menuv:aname}), async:true, dataType: "html", success: function(xml) {
                   // format and output result  
               
                   nshow = jQuery("div p.p2").html(xml);
                
            xmlhttp= null;
            }
        });

        return false;
        }

Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Red Hat

Server health Checks pre & post Rebooting

Hi, Earlier we used to reboot servers based on adhoc request, never checked anything on it pre-reboot., But now i need to reboot regularly but most of the info is not available, I need to know want to make sure that server to be rebooted without any issues, so I want to do few prechecks which will... (5 Replies)
Discussion started by: nanz143
5 Replies

2. Post Here to Contact Site Administrators and Moderators

kindly reconsider my post in shell & scripting forum

Hi, this is regarding my post "ksh: how to extract strings from each line based on a condition" . Its not a home work or an assigment. I actually work in retail domain. The data I handle is very complex and confidential.So I can't divulge the actual patterns. In order to explain my problem, I have... (1 Reply)
Discussion started by: angie1234
1 Replies

3. Web Development

Sending Post Parameters With Ajax

Hi!!! I'm having a little problem with a web application I'm developing. I need to send a query to a php script using post method of Ajax. I created the variable where the query is stored and it looks like this: consulta= barrio="Monserrat" or barrio="Palermo"&buscar=1; this is in a... (2 Replies)
Discussion started by: Sandia_man
2 Replies

4. SCO

XML Import & HTTP Post

this may be very basic to some but all new to me I have an application running on SCO Unix server which issues an HTTP Post request to a server with the results being returned in I.E browser window in XML format I need to import these results into my customers application and dont know how to... (1 Reply)
Discussion started by: ccarcher
1 Replies
Login or Register to Ask a Question
HTML::Prototype::Js(3pm)				User Contributed Perl Documentation				  HTML::Prototype::Js(3pm)

NAME
HTML::Prototype::Js - prototype library, embedded in perl SYNOPSIS
our $prototype = do { package HTML::Prototype::Js; local $/; <DATA> }; DESCRIPTION
This is the actual Prototype library embedded in a perl __DATA__ section, for easy inclusion in HTML::Prototype. NEW SYNTAX
The prototype library provides some functions and classes which effectively change the basic syntax of the JavaScript you write. $(element) This function takes an element / element list and gets all string elements using document.getElementbyId. This is probably one of the most common functions when using javascript for web development, so it will save you a lot of typing. Class This uses fucntion references to allow namespace-like Class structures in javascript. Object.extend Simple inheritance for javacsript. Will set all properties of the child in the parent. Function.bind Allow function refs to be full object method references, through the use of extend and apply Try.these Simple try/catch for a list of functions, will return the return value of the first that doesn't throw an exception. Array.push implement push for arrays. returns number of elements in result. Function.apply Call a function on a given object, using eval. JS OBJECTS
The Prototype library provides a number of classes you can use to improve interaction with the end user. Ajax Provides one useful function, getTransport. This function will return a XMLHttpRequest object suitable for your browser. Ajax.Base An abstract base class for the Ajax objects described below. Sets some common options for Ajax objects; method: http method, defaults to post. asynchronous: process in the background, true/false, defaults to true. parameters: extra parameters, defaults to blank. Ajax.Updater a subclass of Ajax.Base, this class uses Ajax.Request to populate a container in your web page. Takes container, url and Ajax.Base options as paramters. Ajax.Request This object represents a plain ajax request. It extends base to add a constructor, as well as some events to handle events. The constructor takes an url, as well as the options described in Ajax.Base. Currently handles the following events: 'Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete' Effect.Appear Takes an element, and makes that element appear through a fade. Effect.ContentZoom Takes an element, and zooms the content of that element. Effect.Fade Takes an element, and makes that element fade out and disappear. Effect.Highlight Takes an element, and does a highlight of that element. Effect.Puff Takes an element, and makes that element "blow up" and disappear. (As in disappear in a puff of smoke). Effect.Scale Takes an element, and a size, in percent, and scales that element to the given size. If it's a div, the initial size will have to be given in EM. No such restrictions for pictures. Effect.Squish Takes an element, and shrinks that element until it disappears. Element A collection of functions related to basic elements. takes one or more elements. toggle: Toggles the element display style. hide: Turns off the element's display style. show: Turns on the element's display style. remove: Delete this element from the DOM. getHeight: Get the element height. Also provides a convenience object, Toggle, with one method display which aliases to toggle, so you can call it as Toggle.display(element) Field Adds some useful functions to HTML Fields with several elements: clear: remove all content. focus: Give the element focus. present: returns true if all arguments are filled in, false otherwise. select(element): Select the given element in a form. activate(element): give the selected element focus, and select it. Form Some useful utilies for HTML Forms. all of these take a form element as sole argument. serialize: returns a URL serialized version of a given form. getElements: returns all elements in the form. disable: blurs and disables every element in the form. focusFirstElement: Give first element in the form focus. reset: reset all form elements. Form.Element Some useful objects for Form Field Elements. These take an element as the sole argument. serialize: url encode the element for use in a URI string. getValue: returns the value of the given element. Form.Element.Observer Form.Element.Serializers Serializers for various element types. Takes the input element as argument. input: determines the element type, and chooses the right serializer. inputSelector: serialize checkbox/radio. Form.Element.Observer Insertion This can be used in place of a innerHTML, to insert the content into the dom. Insertion.Before Puts content before a given dom node. Insertion.Top Puts content at the top of a given dom node. Insertion.Bottom Puts content at the bottom of a given dom node. Insertion.After Puts content after a given dom node. PeriodicalExecuter This object takes two parameters, a reference to a callback function, and a frequency in seconds. It will execute the callback every <frequency> second. SEE ALSO
HTML::Prototype, Catalyst::Plugin::Prototype <http://prototype.conio.net/> AUTHOR
Sebastian Riedel, "sri@oook.de" Marcus Ramberg, "mramberg@cpan.org" Built around Prototype by Sam Stephenson. Much code is ported from Ruby on Rails javascript helpers. LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as perl itself. perl v5.10.1 2009-12-02 HTML::Prototype::Js(3pm)