Wednesday 10 October 2012

Handling flash player on multiple divisions

Hello all,

If you got a situation to handling flash player on multiple div on same page, Then i have a better idea to handle the situation.
i.e.
Don't hide the div's containing player. if you hide the div except in fire-fox, all other browser's removes the player from the page and whenever you shows div player is again downloaded from the server.
Instead of hiding div move div to off screen.        

Handling json data on ajax

Hi all,

Whenever you send json data on ajax you should use encodeURIComponent() method to encode json data other wise special chars in json data like '&,?' may disturbs the url data posting to the server.
i.e
$.ajax({

url: 'ajax/test-page.php',
data: 'usr_data='+encodeURIComponent(frmdata)

});