Archive for the ‘ Javascript ’ Category
In Javascript, How to Text From Your Clipboard?
on April 30, 2010
It is true, text you last copied for pasting (copy & paste) can be stolen when you visit web sites using a combination of JavaScript and ASP (or PHP, or CGI) to write your possible sensitive data to a database on another server.
Are You Concerned that Older Browsers Don't Support JavaScript and Thus Exclude a Set of Web Users, Individual Users?
on April 28, 2010
Fragmentation of the installed base of browsers will only get worse. By definition, it can seldom improve unless absolutely everyone on the planet threw away their elderly browsers and upgraded to the latest gee-whiz versions. But even then, there’s lots of discrepancies between the scripting of the latest Netscape Navigator and Microsoft Net Explorer. The situation makes scripting a challenge, for newcomers who …
How About 3+4+"8" in Javascript?
on April 25, 2010
Since 3 and 4 are integers, these are number arithmetic, since 8 is a string, it’s concatenation, so 78 is the result.
In javascript, What is the Difference Between a Confirmation Box and An Alert Box?
on April 24, 2010
The Confirm box displays two buttons namely OK and Cancel whereas an Alert box displays only one button which is the OK button.
How Do We Get JavaScript onto a Web Page?
on April 16, 2010
You can use several different methods of placing javascript on your pages. You can directly add a script element inside the body of page. 1. For example, to add the “last updated line” to your pages, In your page text, add the following: <p>blah, blah, blah, blah, blah.</p> <script type="text/javascript" > <!– Hiding from old browsers document.write("Last Updated:" + document.lastModified); document.close(); // –> …
How to Read and Write a File Using Javascript?
on April 15, 2010
I/O operations like reading or writing a file is not possible with client-side JavaScript. However, this can be done by coding a Java applet that reads files for the script.
How to Detect the Operating System on the Client Machine?
on April 14, 2010
In order to detect the operating system on the client machine, the navigator.appVersion string (property) should be used.
How Can We Define SESSION Variable in JAVASCRIPT?
on March 24, 2010
It’s not possible to set any session variables directly from java-script as it is purely a client side technology. You can use AJAX though to asynchronous.
Enable and Disable Text Box through a Checkbox in JS
on March 12, 2010
Here is code: <html> <head> <title>Untitled-1</title> <script language="JavaScript"> function enable_text(status) { status=!status; document.f1.other_text.disabled = status; } </script> </head> <body onload=enable_text(false);> <form name=f1 method=post> <input type="checkbox" name=others onclick="enable_text(this.checked)" >Others <input type=text name=other_text> </form> </body> </html>
How Can You Reload / Refresh a Page With Jquery?
on February 21, 2010
Okay I assume that you have a button REFRESH, which reloads the page when you click on it. Here is the code // Use location.reload() in jquery to reload a page <input name="refreshPage" type="button" id="refreshPage" value="Refresh" onClick="location.reload();">

