-
Blinking in HTML using jQuery
Sample code to blink any of the html element, using jQuery library. Currently supports all the browsers. -
navigateToURL(urlReq, ‘_blank’);
Above code will open a new tab, but the url will be the SourcePage+www.shaikhmohsin.com This happens because there was no protocol attached before the URL. Below code will open the website properly when the protocol is attached to it. -
Reading Parameters in AS3
Couple of ways to read parameters from the Config or URL with DisplayObject and without DisplayObject Below is the way we can access the parameters for the case where we are extending the class from Sprite, and there is no display list. Below is the way we can access the parameters for the case where the class is within displaylist -
AS3 JSON POST example
A very simple piece of code which demonstrates the following 1) HTTP call in AS3 2) POST http data 3) JSON object to be posted used URLVariables -
Remove Pipe and Disable multiple sorting and Hide number on header ADG
1) Removing the pipe sign from the header in an advanced datagrid – 2) Disabling multiple column sort – 3) Hiding the number “1” on the header of the column – Code to test the above listed potins:- -
Timer in javascript
A simple example of adding timer control code in javascript Adding event listener to initiate the timer Functions where the actual action happens -
Access parent element or parent node in html
I recently had a situation where I had to add couple of event listeners to the parent HTML element which was unknown, as it was dynamically added. My code was to be embedded in a parent application which i had no clue about. Simple way of adding an event listener to an html element Adding event listener to unknown parent html element -
assign !important through javascript
In general, we usually do change the style of an DOM element through javascript by getting them by id like But what if we want to add “!important” along with the value. Using the above way to add !important to the height, will not really work. for making it work, I’ve used the following available method -
Ajax – XMLHttpRequest Object
XMLHttpRequest Object Properties readyState A number representing the current state of the request: 0 – UNINITIALIZED 1 – LOADING 2 – LOADED 3 – INTERACTIVE 4 – COMPLETE status The numeric HTTP status code returned by the web server. statusText The text associated with the above HTTP status code. For example, 200 means “OK” and 404 means “Not found”. responseText A string containing the response data returned from the... -
Sprite height and width issue
In order to set the height and width of the Sprite, it needs at least one child component inside it. If you are setting the height and width of an empty sprite, and then trying to add the child to that sprite, then the sprite will scale down to 0. So first add the children and then set the height and width of the sprite container.