Friday, 28 October 2011

window opener property

The opener property returns a reference to the window that created the window.For example to get the id of the element present in the parent window, we should use like this

window.opener.document.getElementById('video')

Reference: http://www.w3schools.com/jsref/prop_win_opener.asp

Tuesday, 25 October 2011

PNG transparency problem in IE6

I think most of the web developers have headache using PNG image in IE6 when the client asks for IE6 support.
To overcome this issue please refer the beow link.
http://www.dillerdesign.com/experiment/DD_belatedPNG/

The idea here is let say you are placing a  image in a div or tag. We need to pass the id or class to the javascript function like this DD_belatedPNG.fixPng(yourElement).

Please refer http://support.microsoft.com/kb/294714 for microsoft's approach to the problem.

When applying this fix , you may encounter error in IE8 like this (Message: Invalid argument. Line: 13 Char: 461). To avoid this, add a meta tag forcing IE in to compatibility mode(http://wordpress.org/support/topic/js-error-messages-in-ie8).

meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"

Below are the other remedies for this problem
http://jquery.khurshid.com/ifixpng.php
http://jquery.andreaseberhard.de/pngFix/
http://plugins.jquery.com/project/iepngfix

Thursday, 16 June 2011

Selenium

Integrating Selenium with HTTPFox (Firefox plugin) for HTTP traffic manipulation
http://sejq.blogspot.com/2008/12/automate-httpfoxhttpwatch-test-case-for.html
http://httpfox.googlecode.com/svn/trunk/chrome/content/HttpFox.js

PHPUnit and Selenium
http://www.phpunit.de/manual/current/en/selenium.html

goto, gotoIf and while loop functionality in Selenium IDE.
http://51elliot.blogspot.com/2008/02/selenium-ide-goto.html

Automating Selenium IDE tests : If frames are not workable, use the option &multiWindow=true in the query string. To post the results to a remote url use &resultsUrl=[path]
http://wiki.openqa.org/display/SIDE/Automating+Selenium+IDE+tests

Selenium Core
http://wiki.openqa.org/display/SEL/Home

Selenium RC browser launchers
http://stackoverflow.com/questions/2569977/list-of-selenium-rc-browser-launchers

Tuesday, 14 June 2011

Granting Javascript access to clipboard

By default , Firefox don't allow javascript to read or set the clipboard data for privacy and security reasons. But this can be overcome by following the steps given in the below url.
http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard

Monday, 13 June 2011

Eclipse is running in a jre, but a jdk is required

We receive this error because the JVM is not specified in the eclipse.ini file. Please see here http://wiki.eclipse.org/Eclipse.ini on how to set it.

Drawing Garph in PHP

Drawing Graph in PHP is made very simple by the following two PHP libraries
http://jpgraph.net/
http://naku.dohcrew.com/libchart/pages/introduction/

Capturing the IP address using SSI and Javascript

Copy to Clipboard using Flash and Javascript

Here is a cool way to provide the "copy to clipboard" functionality using http://code.google.com/p/zeroclipboard/

Aborting a Shell script

To exit the shell script use the option "set -e". It Exits immediately if a simple command exits with a non-zero status, unless the command that fails is part of an until or while loop, part of an if statement, part of a && or || list, or if the command's return status is being inverted using !.
Reference:
http://www.gnu.org/software/bash/manual/bashref.html#The-Set-Builtin
http://ss64.com/bash/set.html