Java Script to use XMLHttpRequest : readyState, statusText , responseText, responseXML

The below is a simple HTML code containing JAVA script to use the object  XMLHttpRequest to retrieve the contents of a weburl when GET is applied. Simple to say do HTTP GET and show the contents of URL.
<html>
<head>
<script type="text/javascript">
function loadXMLDoc()
{
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  alert('Http State is:' + xmlhttp.readyState);
  alert('HTTP Status is :' + xmlhttp.statusText);
  if (xmlhttp.readyState==4 )
    {
    if ( xmlhttp.status==200 )
    {
       alert('Response data as String :' + xmlhttp.responseText);
       alert('Response data as XML:' + xmlhttp.responseXML);
    }
    }
  }
  try {
      xmlhttp.open("GET","http://www.krishnababug.com/",true);
      xmlhttp.send("");
      }
      catch (e) {
                 alert(e);
                }
}

</script>
</head>
<body>

<h2>How to use XMLHttpRequest object</h2>
<div id="myDiv"></div>
<button type="button" onclick="loadXMLDoc()">Load URL - Click to change state</button>

</body>
</html>

References:
[1] [2]
Note : working only on Internet Explorer


Read more


Top / Best Android apps - My selection on Android 2.3.7

I am using Cyanogen Mod7 (Android 2.3.7) so most of the built-in things are helping me :) Adding to them I have the below best apps for my daily use.

1.  3G Mobile Hotspot
     The best wifi tither app on my phone. Less radiation , less heat and more over easy to use and connect any device. 
2.  Adobe reader
     Nothing to say about it, best pdf reader as always.
3.  Advance English (MSDict Viewer)
     Good English dictionary for quick access.  But till today couldn't locate the dictionary file where it is saving. When ever you go for factory reset you have to re download the dictionary file if you wont take back up of SDCARD.
4.  Andro FTP
     Best app to start FTP server on your phone and share your files with others when wifi enabled, and vice-verse to take files from others.
5.  Android Booster
    Famous app to monitor your GPRS usage, power management and statistics , and managing your memory by killing unwanted apps.
6.  Androzip 
     File manager come zip application for my phone. I use send to bluetooth device option directly from here as I don't see , send via Bluetooth option in normal file manager.
7.  Angry birds
    Nothing to say about it , don't remember how many hours I spent on this :)
8.  Any Post
   Simple, lite app for posting status to multiple social networking sites at  a time. Photo, Map and text options available.
10. Background
When ever I feel boring to see my phone screen I logon to this app to download new beautiful backgrounds for my phone.
11. BookMy show
      Suitable for Indian Android users to book your movies, and special events near your city.
12. Brillinat Quotes
      Want some inspiring quotes every day ? try this app ! 
13. Bubble pop
      Most famous used app by my niece :) time pass bubble breaking game.  
14. ByteConverter
     When I see big numbers to convert between Bytes and bits etc need this.
15. compass
      Helped multiple times to locate sun in new locations :)
16. Documents to go 
      Best office tool I have seen for my phone. Support doc,xls, ppt etc.
17. ES Task Manager
      Helps controlling startup apps or services and cleaning cache memory.
18. Expense Manager
      Password protected app to keep track of your expenses and income with clean analytical charts. 
19. Facebook
      Nothing to say about it , I still don't find the way to share videos I saw from others wall.
20  Full on SMS
      Free SMS sending App works in India, but wont display name on the receiver phone :( with new TROI rules.
21. IBM Leap Manager
      WIFI manager to connect to IBM wifi networks
22. IMDB
      Nothing to say about it , on-time guide to find your favorite movie review.  
23. Indian Rail
      Simple app to find the trains status, PNR status and locating the train etc. Work in India.
24. Mail (Yahoo)
      Mail client for Yahoo.
25. Maps
      Google maps , still don't know how to use voice navigation on this. Any other best maps app for android which can compete with OVI maps.
26. Milage Tracker
    Started recently to keep track of the petrol expenses.  Need time to rate it.
27. MixZing Basic
     Good music player with folder wise section options and categorizing with albums etc. 
28. Mobo Video Player
    Felt happy using it multiple times while playing 720 p videos on my phone and while watching movies with subtitles which sync perfectly with audio and video.
29. MX Video Player
Another best video player like above to watch all videos which needs some soft encoding.
30. NetQin Security
Good Security anti-virus app required for my phone to keep it healthy.
31. NewsHunt
Indian regional news papers with easy use and automatic support of regional language fonts like Telugu, kanada, Tamil, Gujarathi, Marathi,Hindi and many more. I like to read my favorite eenadu Telugu daily on this.  
32. ngpay 
Mall on the phone is the best apt quote for this. Easy to use HDFC and other bank transactions. Book your bus or train ticket on a fly. Order your piza or sweets what not day by day its growing like any thing in India. Safe to use.
33. Nimbuzz
Superb! multi-messenger . 
34. Note Evrything
35. Pansi SMS
36. PVR
37. Quick boot
38. Radio Kushi
39. Ragalahari
40. Sametime
41. skype
42. speed Test
43. Super Manager
44. Tangram Moment
45. Terminal Emulator
46. TM World clock
47. Torch
48. TORI
49. Translate
50. TubeMate
51. Twica
52. Ustream
53. YuppTV

Please try to add your best apps in comments , I would like to tune my list to shift to stable apps.

Read more


How to upgrade to Android 2.3.X (Gingerbread) from 2.1 (Eclair) using CynogenMod 7.1 (CM 7.1) on Motorola Milestone A853 / A953 ?

How to upgrade to Android 2.3.X (Gingerbread) from 2.1 (Eclair) using CynogenMod 7.1 (CM 7.1) on Motorola Milestone A853 / A953 ?

Before following the below steps to flash your phone with new Cynogenmod7 ROM; make sure that you have taken all necessary backups like contacts, SMS and most used apps etc.

Pre-Reqs:
1. Your phone must be rooted before. To root the phone follow the below instructions.(http://www.krishnababug.com/2011/07/root-android-phones-motorola-htc.html)

2. Download the required below files and keep it ready from http://forum.xda-developers.com/showthread.php?t=941346
    a. Open Recovery - OpenRecovery 1.46 - BR 0.3.zip (for update OR1.46_extfs_mmcfix_update.zip )
        Download from link
    b. Google apps - gapps-gb-20110828-newtalk-signed.zip
    c. CynogenMod ROM - update-cm-7.1.0-11.10.12-Milestone-odexed-signed.zip

3. Disable_recovery_check_by_OTA.sh - Search in google and download this file.   

4. Enable USB debugging on your phone from Menu > Settings > Applications > Development and connect it to your computer via USB.

Now Create a Folder structure under sdcard root like below

sdcard
    |
    |__update.zip
    |
    |
    |__OpenRecovery
    |      |
    |      |__scripts
    |      |     |
    |      |     |__Disable_recovery_check_by_OTA.sh
    |      |
    |      |__updates
    |            |
    |            |__update-cm-7.1.0-11.10.12-Milestone-odexed-signed.zip
    |            |
    |            |__gapps-gb-20111012-signed.zip
    |
    |____ Other_Stuff
   

Steps to flash your phone with new Android build by CynogenMod:
1. Once the above tree structure is ready on your phone just power off the phone
2. While you Power on; press X button on the physical keyboard on your milestone.
3. Hold ‘X’ until you see a Triangle with an Exclamation mark on it, and then let go of ‘X’.
4. (If required ) Press & Hold the Volume up button and press the camera button. You'll be taken to Android System Recovery.
5. Using D-Pad as cursor and golden button in the middle as ‘Enter’ , Perform a ‘Wipe Data/Factory Reset’ & ‘Wipe Cache Partition’
6. Once done , apply Sdcard :update.zip.
7. You will be taken to Motorola Milestone Open Recovery Version 1.46 .
8. From menu, go to Nandroid > Backup All. This will place a backup of your current ROM in a folder called Nandroid on your SD Card.
9. Move it to a safe location later.
10. Perform a wipe data/factory reset (In case of CynogenMod updates skip this step)
11. Perform wipe > wipe cache partition and wipe Dalvik cache.
12. Apply Update, scroll to ‘update milestone-signed.zip’ and apply.
13. Now Apply  ‘gapps signed.zip’ and Apply.
14. Go back to Main Menu and reboot system
15. All set to see new CynogenMod logo after Motorola logo :) The first boot may take more time.

Possible errors :
1. E:signature verification failed error - If you get this error , make sure that the file under SDCARD > OpenRecovery > scripts > Disable_recovery_check_by_OTA.sh is fine and readable.
Note : Keep the above tree structure available always on ur sdcard and replace the new updates under updates directory each time when new updates are available.

Reference :

Read more


Websphere 6.1.0.0 to 6.1.0.35 upgrade steps

This post aims to explain the simple steps to upgrade the base build version of Websphere 61.0.0 to 6.10.35

Please follow the below steps one by one ..
How to upgrade WAS 6.1.0.0 to WAS 6.1.0.35 ?


  • Choose the required OS and bit level of hardware and then select both JAVA SDK and AppServer files for upgrade
  • Along with this download the IBM Update Installer V7.0.0.19 for WebSphere Software for Windows.
  • Once you download the required 3 files
6.1.0-WS-WASSDK-WinX32-FP0000035.pak
6.1.0-WS-WAS-WinX32-FP0000035.pak
7.0.0.19-WS-UPDI-WinIA32.zip
  • Extract the update installer, and install it.
  • Once installation created the folder structure
C:\Program Files\ibm\WebSphere 6.1\UpdateInstaller\maintenance

Copy the files 6.1.0-WS-WASSDK-WinX32-FP0000035.pak and 6.1.0-WS-WAS-WinX32-FP0000035.pak to the above path.
then let installer pick this two packages and install it.
All set to go ..now your WebSphere is upgraded :)

Read more

Popular Posts

Enter your email address:

Buffs ...

Tags


Powered by WidgetsForFree