Advertisement

Experts have come up with some helpful tips for getting a solution to your problem fast.

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Time Tested JavaScript Solutions: 1 - 25 of 10886
 
There is no HTML submit button, just an image.  I'm looking for the easiest (least amount of code) way to get the form to submit when somebody hits enter on this page.  Thanks.
<a href="javascript:expand()">  and <a href="#" onclick="javascript:expand()"> what's the difference? i know the href="#" is the more standard way nowdays to do it. my problem is i have a s...
string = "{6} 123 Main St {7} Vancouver CA {3}" I have to find the {6}  {7}  {3} in the string and replace it with ' # '   ' , '   and  ' '  (Hash,Comma,Space)  {6}  =  #  {7}  = ,  {3} ...
AFAIK, to retrieve the selected value for <SELECT> in a single line javascript, I have the following code: this.form.areaID.options[this.form.areaID.selectedIndex].value If I were wanted t...
I'm trying to compare 2 dates on a form. What is the simplest way to do this?  Here's what I have so far: <html> <script> function Compare() { if (document.frmTest.startDate.va...
Currently I am taking a value from a text box, validating that it is a known value(only certain values can be entered), then if it is not within the select box I add the value to the select bo...
I saw a few questions that didn't really make any sense to me so I'm hoping that there's a really simple solution to my problem here. I have this code. onKeyPress="if (event.keyCode==45)...
how can I disable the browser's "Back" button in a HTML page? I do not want to create JavaScript window to avoid showing any toolbar,etc. In regular HTML page, is there any way to disable t...
Hi, I would like to know if it is possible to use JavaScript to write to a text file. I tried using FileSystemObject in JavaScript. However, it gives the following error : "Automation serve...
As you might guess from the question title, I would appreciate someone showing me how to get a browser window to - load to a specified size - at a specified position - have no toolbars ...
Does any body know of a way using JavaScript to remove or hide a browser's address bar or toolbar on the fly? You can obviously use a script to pop open a new window and set the properties of ...
Hi, I want to wait few seconds between 2 operations in javascript. Is there a way to do it (something like sleep in Java or wait in c)? I'm using the setTimeout(), but the problem is t...
I have a form with 200 plus checkboxes.  When the checkbox is checked onClick passes (this) to a Javascript function.  I need to get the element array ID of the just checked checkbox into a nu...
Hey guys, There are different varience of this question posted previously but none of the solutions have helped me(most of them were to get a radio button or check box to work) I'm havin...
I'm trying to use OnFocus and Onblur to focus on a textbox when I click in the field.  When I click in the textbox the value for the textbox disappears so I can type what I want to enter. The ...
I have a hidden field which contains a value.  I have a SELECT/OPTION list that has no selected options.  After the select is written to the browser, I want to make to option, corresponding to...
Hi I have to open a save as file dialog box using javascript on a click of button. I am able to do that with the below code. <a href="#" onclick="javascript: document.execCommand('SaveA...
I'm trying to get the SelectedValue from a DropDownList (WebControl) so I can enable / disable other controls based on the values the user has selected.  My form is called Form1 and my dropdow...
Dear experts, This is the HMTL code <select name="id[7]"> <option value="21">False (+S$200.00)</option> <option value="20">True (+S$123.00)</option> </select> If user select first op...
Hello guys: I need a function to CENTER a popup window according the BROWSER SIZE AND POSITION AND STAYS ON TOP. Also, the function must work without passing the width and height parameters...
I'd like the cursor style to switch to 'hand' onmouseover of particular images on a page, i.e., wherever the images minus.gif or plus.gif appear on the page, I'd like onMouseOver="style.cu...
Hi Experts. Can any of you tell me how do I manage the window.onClose event in Internet Explorer, What I really need is to control when the user closes the window, but without using events ...
I'd like to use a function to get all elements by a css class name and change their class, or attributes. In the one function or the way I've envisaged it if possible. similar to document.g...
I'm trying to find work out if a screen is maximised or not and then if it's not, move and resize the window.  Here's what I have so far: <script> var scr_w = screen.availWidth; var scr...
How can I open the href location in a new window and still keep onclick=location.href as shown in the code below?  I don't want to use the html <a> construct such as <a href="contact.asp">Cont...