PHP Alert / Message box – Transparent & Cool! Javascript animated msgbox

Tired of using JavaScript’s ugly Alert() function? Or PHP’s Ugly die() function to display an error or message? You’re in the right place! I’ve prepared a complete Alert Box or Message Box suite to use in javascript or PHP. Checkout the Screen-shot:

Easy to Use!

Just include the source-path and call the my_alert() function with parameters! Lots of optional arguments to spice it up…. you can call same function either in javascript or PHP, it’s up to you! ๐Ÿ˜€

Full Demonstration and code examples

Checkout easy documentations here…

Free Download!

Download

Python Basics: Indent

Previous Article: Beginning Python Prgramming! How to Download, install, compile & run program inย Python

In this post I’ll point out some details about the Python language. Important concepts to be clarified.

Python maintains indention strictly:

In python, you should maintain indention strictly! This is necessary to tell python which portion of code is under a block. For example, consider the loop segment below:

 

As you can see, there is no Curly-braces to identify where a loop starts and where ends! Thus, you must maintain indention strictly.

 

 

This entry will be updated eventually!

Automatic Mouse click, Key Press Script in Java

By Java, you can perform automatic mouse clicks, keyboard press etc. ๐Ÿ™‚

I’ve created a short application by which you can make automatic mouse click in a certain co-ordinate! ๐Ÿ˜‰

Download Source/Executable

Download from GoogleCode (source/executable)

Please note:ย  This is not any professional application, if you want to use professional mouse-recording or macro-recorder for presentation or other tasks, use other software.

If you want only to run the executable file, run the .jar file. You must have JRE installed in your computer ๐Ÿ˜‰

How it works?

Java has a class Robot which dedicated for performing these activities. I simply used the class. More documentation here, and analysis the source code uploaded.

Add Dropdown Country & State List Dynamically into HTML form by Javascript

You can use a JavaScript to add all the country names andย  state names’ Dropdown list. Which is actually done by HTMLand tag. I’ve written a JavaScript which can be simply inserted into your HTML file. Later, call my pre-defined functions and the country and state list will be automatically added into your HTML ๐Ÿ™‚

Live Demo!

Check the code live here

How to use?

1. Copy the JavaScript code from the above link and save it in a file “countries.js”

2. Put this code between yourandsection:

<script type= "text/javascript" src = "countries.js"></script>

3. Put this code between yourandsection:

 Select Country (with states):   <select id="country" name ="country"></select>
Select State: <select name ="state" id ="state"></select>
 <script language="javascript">
populateCountries("country", "state");
 </script>

Please note that, we are using twotags, which are actual drop-down boxes. Here I’ve chosen “country” and “state” as theirID attribute. You can choose any othe id attribute or name attribute as you like. But whatever you choose, you make to pass the correct IDs when calling the JavaScript Functions.

If you only want Country list to appear on the page, Simply use following bit of code in Body section:

Select Country:   <select id="country2" name ="country2"></select>
<script language="javascript">
populateCountries("country2");
 </script>

Open a URL in new Browser window in Flex/ActionScript

ActionScript uses the function navigateToURL(var1:URLRequest,targetWindow:String ) to Open a URL link in a browser.

 

For the simplictiy, there goes a function. Just calling the function with the desired URL as String will open the URL in a new window.

public function jumpTo(jumpLoc:String):void
 {
 navigateToURL(new URLRequest(jumpLoc),"_blank");
 }

Usage:

Call the function defined above with the URL as a String-type parameter.
Example:

jumpTo("http://google.com");

Previously published at my Progmaatic Blog