Skip to main content

Posts

Showing posts from May, 2007

What Javascript can't do

Javascript cannot read from or write to files on the server . Because Javascript is running in the web browser after the web page has been copied from the server, it therefore cannot interact with the server (the computer that the web page was copied from) in any way. Javascript cannot interact with server side scripts . Any server side scripts are run before the web page is downloaded to the browser. This means that a server side scripting language such as PHP or ASP can update the content of your Javascript code before it is downloaded. Since the Javascript itself isn't run until after the page has been downloaded the Javascript is not able to affect the server side script because that has already finished running. The only way that Javascript can pass information back to a server side script would be to reload the page passing the required information from Javascript as a query string on the end of the page address. avascript cannot read from or write to files in the client . Ev...

Improve your website's user interface using javascript

Hi friends, This is after a very long time. I was so busy now the days. Now i am sharing some client side javascript functions. Now the days most of the companies wants to give the as much as possible functionalite in the web applications like desktop applications. & one can achive this with the help of javascript. Another thing that comes into picture is AJAX. But now i will not talk about AJAX in this article. here i will describe some javascript techniques by which you can improve your web sites user interface & create it more user friendly. Lets start some basic tests: Blank String Test: String.prototype.IsBlank=function(){ var flag=true; for(var i=0;i<this.length;i++){var temp=this.substring(i,i+1); if(temp != " "){ flag=false; break; } } if(flag==true){return true;} else {return false;} }; Another Blank String Test: Enter Your Name: String.prototype.CheckBlank=function(fname){if(this.IsBlank()){alert(fname+genblnk);return true;}return false;}; String Revers...