Javascript Section Index
I want to close the child window, from parent window using java script.
I want to close the child window, from parent window using java script. I want to close the child window, from parent window using java script. How to do that? Can any one help me on this? Thank...more
Open new window every time Hi, I am trying this example below
Open new window every time Hi, I am trying this example below : On click of the link it creates one window, if i click it again, i do not get a new window( another window) but rather the same wind...more
Read a file in script!! HOw can we Read a file using Java Script.. My requirement is i have to read a file in java script.. Can anyone tell me how to do that..
ActiveX can be used. However, be aware that an increasing number of people are not using internet explorer on windows (either due to alternate browser or due to alternate operating system) so Acti...more
detecting os version using javascript
You should use the navigator object to get info about the OS
below in red are the properties of navigator object and the near cells are the values on my machine.
use the properties as object.pr...more
How can I get a JavaScript menu to dropdown on top of an applet. The ones I have always go behind the applets I have loaded on my page.
You should think of an applet is a self containing page in a page. Because of this, the applets behave like they are different objects in html pages. This is the same for flash movies as well. Try...more
What are the ASCII values of arrow keys?
37(left arrow)
38(up arrow)
39(right arrow)
40(down arrow)
How can we hide the html source code when the user tries to view the source code from the browser's "view source" file menu option?
[Short answer: no, it's not possible, since the source code *is* the response. If the user wants to see your source, he can. However, here's a clever hack... -A]
Yes it's possible, I've done it...more
How do I execute a string whose value is a line of JavaScript code?
Just use eval("your string here");
How can I disable the forward and back buttons in a browser from JavaScript?
You can't. About the best you can do is hide the buttons and disable caching of the pages. Unfortunately, their keyboard equivalents (ALT+Right/Left Arrow) will still work. At least with caching d...more
How do I disable JavaScript in Internet Explorer?
With IE5/5.5, to disable JavaScript you have to change the security settings. You'll find the setting under Tools->Internet Options->Security Tab bar->Custom Level->Disable Active scri...more
What's the difference between JavaScript and Java?
JavaScript is an object-oriented scripting language that allows you to create dynamic HTML pages, allowing you to process/validate input data and maintain data, usually within the browser. Origina...more
How can I display content in the form of a Tree using JSP?
There are a few ways that you could try, although it all depends on any restrictions you have on deployment.
First off, you could use Swing's JTree in a small applet. This would require the use o...more
How can you logout a user (invalidate his Session) when a user directly closes his browser window?
Short answer: you can't. Fortunately, sessions expire automatically after a period of time; check your servlet engine documentation to see how to set this timeout period.
I felt that there should...more
How can I display raw HTML, generated by an applet, without saving it on the server?
You can display HTML dynamically generated by your applet by passing it first to a JavaScript method,
(see also this
FAQ)
that in turn puts the code into the page.
You can overwrite a document fra...more
Is there any way in JSP to set focus on an input field in a HTML form using JSP code, and not JavaScript?
No, there isn't. Remember, JSP is strictly a server-side technology, which is responsible
for generating dynamic content in HTML, DHTML or XML format. Setting focus on
specific input elements wi...more