Wednesday, July 9, 2008

More Security on Gmail now


This is what is expected since long.May be Gmail is safe as we think but excessive usage of Ajax and java script can be injurious to privacy and security!

I read this on gmailblog.They have added support for remote log off now.If you had logged in from another PC last time and forgot to log off,next time it will show you the IP address with a link for more details. On details, you will get more details regarding concurrent access to the account and recent activities.Which will show account type, access type and IP addresses with time of access.

More @ GmailBlog

Wednesday, May 14, 2008

Blogger: Most visited posts widget script...

This script finds your most visited posts and gives you back theresult in html.I found this from bloggerbuster and it uses pipes.yahoo.com to get the ratings.
So now you don't need to put your features post links.Just put the script in new widget,change the url,change the number of posts you want to show, and done!
<script type="text/javascript">
function pipeCallback(obj) {
document.write('<font ><ol style="text-transform: capitalize;">');
var i;
for (i = 0; i < obj.count ; i++)
{
var href = "'" + obj.value.items[i].link + "'";
var item = "<li>" + "<a href=" + href + ">" + obj.value.items[i].title + "</a> </li>";
document.write(item);
}
document.write('</ol></font>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback
&_id=1cf38ae68efbe859c4ba1ee239cec099&url=http%3A%2F%2Fwww.techlads.com&num=10" type="text/javascript"></script>

In the url, only below part is important. Change the url to your one and change the num param to what you want.I made it only top 10 posts.
url=http://www.techlads.com&num=10

Wednesday, February 20, 2008

Reviews: Starbox - rating stars for prototype

Starbox allows you to easily create all kinds of rating boxes using just one PNG image. The library is build on top of the Prototype javascript framework. For some extra effects you can add Scriptaculous as well. Check the demos below to see what Starbox is all about and read on for more information on how to customize your own Starboxes.

Features:

  • Rerating allows you to adjust your previous rating.
  • You can easily save your rating with Ajax using the build in callback.
  • Improvements to the CSS model, allowing you to style the Starbox based on status (hover, rated and locked).
  • Better seperation of Javascript, CSS and images.
  • A ghosting bar that tracks your average.
  • Custom event 'starbox:rated' is fired when your rate.
  • Batched building of Starboxes based on cached overlay images.

Tuesday, February 19, 2008

Reviews: Modalbox - javascript modal dialog/popup library

ModalBox is a JavaScript technique for creating modern (Web 2.0-style) modal dialogs or even wizards (sequences of dialogs) without using conventional popups and page reloads. It’s inspired by Mac OS X modal dialogs. And yes, it may also be useful for showing larger versions of images.


ModalBox is built with pure JavaScript and is based on Sam Stephenson’s excellent Prototype JavaScript Framework, script.aculo.us and valid XHTML/CSS. ModalBox uses AJAX to load content.

more @ wildBit.com

Friday, February 15, 2008

Java - Javascript interaction

Many of us using javascript in daily coding.I am a java developer and using ajax with applet also.And i need to call applet methods from javascript.

Actually i knew this while i was facing a strange problem (ofcourse it was strange for me becasue i was not aware of this!). The applet used is compiled in JRE 1.4.0.And whenever anyone having JRE version newer than 1.4.0 tried accessing that applet, the call from javascript to applet method gives error "Object doesn't support this property". So i was very much tired of compiling applet with different versions of Jre but no luck.

So once i found the <param> tags for <Object> element which is now used for applet in HTML code.And then i used these tags for java and javascript interaction.

we will look at what parameters we should use the applet and object tags to 'switch on' the java-js communications.

According to the java 5 documentation, if you use the APPLET tag, you do not need any special parameters to allow a javascript to call the applet's method. On the other hand if you use the OBJECT tag you need to use the scriptable parameter. Things use to be slightly different in the older versions.

For an applet to call javascript methods, all you need to do is add the mayscript parameter

so the tags are

<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width= "290" height= "290" style="border-width:0;" id="rup" name="rup"
codebase="http://java.sun.com/products/plugin/autodl/
jinstall-1_4_1-windows-i586.cab#version=1,4,1">

<param name="archive" value="jsapplet.jar">
<param name="code" value="com.raditha.articles.JSHelloWorld">
<param name="mayscript" value="yes">
<param name="scriptable" value="true">
<param name="name" value="jssapplet">
</object>


The object tag can actually cause the most recent version of the java plug in to be downloaded if the user does not have it installed or if the version present is older than the minimum requirement (in this case 1.4.1). If you want to be able to do the same for Netscape Navigator the object tag has to change slightly:


<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width= "290" height= "290" style="border-width:0;" id="rup" name="rup"
codebase="http://java.sun.com/products/plugin/autodl/
jinstall-1_4_1-windows-i586.cab#version=1,4,1">

<param name="archive" value="jsapplet.jar">
<param name="code" value="com.raditha.articles.JSHelloWorld">
<param name="mayscript" value="yes">
<param name="scriptable" value="true">
<param name="name" value="jsapplet">
</object>


Calling applet method from javascript is simple. You just need to do document.getElementById("appletid").methodName();
But calling javascript from Applet is somewhat tricky.

In order to call javascripts we need to get hold of a JSObject. But first things first, we need to import the netscape.javascript.JSObject into our class.

public void init()
{
jsObj= JSObject.getWindow(this);
}


All that remains to do is to add the JButton to our applet. Then we add an ActionListener to the JButton, and it's actionPerformed method calls the javascript.


public void actionPerformed(ActionEvent e) {
if(jsObj != null )
try {
jsObj.call("updatePage", new String[] {txt.getText()});
}
catch (Exception ex) {
ex.printStackTrace();
}
}


thats it! it will call the method from jsObj.

hope this helps someone like me for first time.Enjoy!

Wednesday, December 5, 2007

Coloured Labels Now Available on Gmail

Back in the Paleolithic Era, the world was a very different kind of place. People were hunter-gatherers, lived in caves, and kept all their email in folders*. You can't really blame them. Between tracking woolly mammoths, fashioning crude stone tools, and auditioning for commercials, having a highly tuned system for organizing email wasn't their highest priority.

But people changed. We moved out of caves and into skyscrapers. We hunt for bargains at the corner grocery. And we play video games simulating ourselves playing video games.

Today, we're happy to announce the next evolution of labels: the colored label. Until now the label has been a little inconspicuous creature, subtly suggesting categorical associations in its simple green coat. Oh, we've seen the colored label here and there, its precursors surfacing in various experiments and Greasemonkey scripts; but the label has never before been so brazen, so bold. How will it use its new colors? Will it disguise itself with the chameleon's camouflage or clamor for attention with the monarch butterfly's vivid contrast?

Official Gmail Blog

Monday, October 15, 2007

Eclipse offers AJAX server

The Eclipse Foundation will make available Monday Eclipse RAP (Rich Ajax Platform) 1.0, an AJAX (Asynchronous JavaScript and XML) server for building and deploying rich Internet applications. Leveraging the Eclipse component model that based on the OSGi (Open Services Gateway initiative) standard, RAP 1.0 is suited for enterprises and enables development of component-based applications that can integrate with existing systems. RAP 1.0 is freely downloadable.

With RAP, developers can build AJAX applications "completely in Java," said Jochen Krause, project leader for RAP at Innoopract."The benefit is many developers know [how] to write Java code," he said. "If you look at enterprise IT, you find very few people that are seasoned in JavaScript."

infoWorld

Monday, June 11, 2007

wForms - A Javascript Extension to Web Forms

wForms is an open-source, unobtrusive javascript library that adds commonly needed behaviors to traditional web forms without the need for any programming skill.

Download @ Here

Thursday, May 31, 2007

Prototype - Best JavaScript Framework!

Prototype is a JavaScript Framework that aims to ease development of dynamic web applications.

Featuring a unique, easy-to-use toolkit for class-driven development and the nicest Ajax library around, Prototype is quickly becoming the codebase of choice for web application developers everywhere.

Home Page

Google Gears...Great thing!

Google Gears (BETA) is an open source browser extension that enables web applications to provide offline functionality using following JavaScript APIs:

Store and serve application resources locally

Store data locally in a fully-searchable relational database

Run asynchronous Javascript to improve application responsiveness

Home Page

Friday, May 11, 2007

Increasing User Experience With Javascript

Using the javascript library MooTools with some other free libraries, this tutorial series teaches how to increase user experience with some simple javascript. Using a fictional "blog" as the test site, subscribers will learn how to enhance the blog with modern web techniques such as:
  • LightBox type photo gallery
  • Expanding sub-menus
  • AJAX loaded pages
  • Sliding image menus
  • Reflecting images without having to touch Photoshop
  • Condensing a web page with Fx.Styles and Sliding Tabs
  • ...and more
Full artcile @ Here

Wednesday, March 21, 2007

Microsoft joins AJAX alliance

Microsoft Corporation has joined the OpenAjax Alliance, a group focused on accelerating the use of Asynchronous JavaScript and XML technologies. Microsoft said it agreed to join the alliance to work with other vendors to evolve AJAX, a method of rich Internet applications that ensure interoperability. The company said that its membership in the alliance is another indication that it wants to provide Web developers with technology that works across different browsers and platforms.

The alliance also announced that it has signed up 30 new members in recent weeks, bringing the total to 72 vendors. The group was formed last February to create a set of requirements for AJAX technologies, products and applications to ensure interoperability among tools built by different vendors. The group also wants to create requirements that can speed delivery times and cut the cost of Web 2.0 applications. In addition to working on the interoperability standards, the group has formed task forces to address AJAX security, IDE integration, server integration and client-side server communications, said David Boloker, chairman of the OpenAjax steering committee.

Source: ComputerWorld

Friday, February 23, 2007

Pioneer launches AVIC-D3BT

Hot on the heels of England posting SAT NAV warning signs to help motorists rely less on their GPS and more on the read ahead of them comes Pioneer latest, are the firm is unleashing a UK-based head unit that does a little navigatin' while holding down your multimedia demands. The AVIC-D3BT is a double-DIN unit that boasts a 6.1-inch touchscreen display, Bluetooth for handsfree calling, and a slick "iBus" iPod interface that actually gives users an on-screen scroll wheel to mimic the control scheme Pod users know so well. Additionally, it'll come bundled with European maps, 12 million POIs, multicolor illumination to customize the glow, and will play nice with MP3, WMA, AAC, DivX and even DVD discs. Slated to hit British stores in mid-March, the AVIC-D3BT is listed at £1,300 ($2,538), but savvy shoppers should it a few hundred pounds cheaper if snooping around.

More @ Here

Wednesday, February 21, 2007

News Bar Wizard - Google News on Your Web Page

The Google AJAX Search API lets you put Google Search in your web pages with JavaScript. You can embed a simple, dynamic search box and display search results in your own web pages or use the results in innovative, programmatic ways.

It gives 3 options for search:
- Web Search
- Video Search
- Local Search

More @ Google

Friday, February 2, 2007

Ajax - Javascript feed Reader

Save the code as HTML file and enjoy :).

 <html><head>  
 <script type= "text/javascript">  
 var strArr = ['http://www.thinkdigit.com/forum/external.php?type=RSS','http://www.snapfiles.com/feeds/sf20fw.xml',
'http://www.download.com/3410-2001-0-10.xml','http://www.download.com/3412-2001-0-10.xml',
'http://www.download.com/3412-2003-0-25.xml','http://www.videohelp.com/rss/tools',
'http://www.videohelp.com/rss/forum','http://www.pcstats.com/rss/rss.xml'  
 ];  
 var newArr = [];  
 var isXml = true;  
 var isSet = 0;  
 var XMLHttpRequestObject=false;  
 function togleTab(obj){  
     var currStyleClass = obj.className;  
     var applyStyleClass = "tabActive"  
     for(i=0; i < obj.parentNode.cells.length; i++){  
         obj.parentNode.cells[i].className = 'tabInactive';  
     }  
     obj.parentNode.cells[obj.cellIndex].className=applyStyleClass;      
 }  
 function loadXml(){  
     var index = Math.floor(Math.random()*strArr.length);  
     getData(strArr[index]);  
 }  
 //loadXml();  
 function processXmlData() {  
   var divObj = document.getElementById('targetDiv');  
   if(XMLHttpRequestObject.readyState!=4 ) {  
     divObj.innerHTML = "Loading ...";  
   } else if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) {  
     var response = XMLHttpRequestObject.responseXML;  
         var _link = response.getElementsByTagName('link')[0].firstChild.nodeValue;  
 //        var _title = "<a href='"+_link+"'>"+XMLHttpRequestObject.responseXML.getElementsByTagName('title')[0].firstChild.nodeValue+"</a>";  
         var _title = response.getElementsByTagName('title')[0].firstChild.nodeValue;  
         var _desc = response.getElementsByTagName('description')[0].firstChild.nodeValue;  
         var items = response.getElementsByTagName('item');  
         var info = "<Table width='100%' style='font-size:12px;font-weight:normal;'><tr style='background:#dddddd;'><td width='30%'><b>"+_title+"</b></td><td width='70%'>"+_desc+"</td></tr>";          
         var colorCounter = 0;  
         for(var i=0;i<items.length;i++){  
             colorCounter++;  
             var link = items[i].getElementsByTagName("link")[0].firstChild.nodeValue;  
             var tr = "<tr style='background:#fafafa;'>";  
             if(colorCounter%2==0){  
                     tr = "<tr style='background:#E9D2BC;'>";  
             }  
             var title = tr+"<td width='40%'><Font color='#000000' style='size:100px;'><a href='"+ link+"'>" + items[i].getElementsByTagName("title")[0].firstChild.nodeValue+"</a></Font></td>";  
             var desc = "<td width = '60%'>"+items[i].getElementsByTagName("description")[0].firstChild.nodeValue +"</td></tr>";  
                 info += title+desc ;  
       }  
     var dataToShow = info+"</Table>";      
     //newArr[isSet]= dataToShow;  
       alert(dataToShow);  
     divObj.innerHTML = dataToShow;  
     isSet++;  
     } else if(XMLHttpRequestObject.status==204 ||XMLHttpRequestObject.status==404 ||XMLHttpRequestObject.status==400 ||XMLHttpRequestObject.status==415 ||   XMLHttpRequestObject.status==505 ){  
     obj.innerHTML = "error";  
   }   
 }  
 function getData(dataSource) {    
     if (!XMLHttpRequestObject && typeof XMLHttpRequest !='undefined') {  
         netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");  
         XMLHttpRequestObject = new XMLHttpRequest();  
         XMLHttpRequestObject.overrideMimeType('text/xml');  
     } else if (window.ActiveXObject) {  
         XMLHttpRequestObject = new ActiveXObject("MSXML2.XMLHTTP");  
     }  
   XMLHttpRequestObject.open("GET", dataSource,true);   
   var func = processXmlData;  
   XMLHttpRequestObject.onreadystatechange = func;              
   XMLHttpRequestObject.send(null);       
 }  
 function cleartDiv(divId){  
   var obj = document.getElementById(divId);  
   if(obj){  
     //obj.style.display = 'none';  
     obj.innerText="";  
   }  
 }  
 </script>  
 </head>  
 <body>  
   <select onchange="if(this.options[this.selectedIndex].value!=0)  
   {getData(this.options[this.selectedIndex].value);}  
   else{cleartDiv('targetDiv');}" size="1" style="width:25%;">  
   <option value='0' selected="selected">Please Select</option>  
   <option value='http://www.thinkdigit.com/forum/external.php?type=RSS'>ThinkDigit.com</option>  
   <option value='http://www.snapfiles.com/feeds/sf20fw.xml'>SnapFiles.com</option>  
   <option value='http://www.articlecity.com/xml/main.xml'>ArticleCity.com</option>  
   <option value='http://www.download.com/3410-2001-0-10.xml'>Download.com populars</option>  
   <option value='http://www.download.com/3412-2001-0-10.xml'>Download.com New</option>  
   <option value='http://www.download.com/3412-2003-0-25.xml'>Download.com 25 New Titles</option>  
   <option value='http://techdudes.blogspot.com/feeds/posts/default'>TechDudes</option>  
   <option value='http://funngyan.com/feed/'>fungyan</option>    
   </select>  
   <div id="linkDiv" style="width:98%;height:25px;overflow:auto;"></div>  
   <div id="targetDiv" style="border:dashed 1px;background:#fafafa;width:70%;height:450px;overflow:auto;font-family:verdana;font-size:10px;"></div>  
 </body>  
 </html>