currently the following code results in a "The page at http://localhost says:" and then displays my message with a yes and no button.
Code: <script language="JavaScript"> function confirm_delete(){ input_box=confirm("Are you sure you want to permanently remove this?"); if (input_box==true) [Code]...
how can i customise where the message says it is coming from?
I'm writing a form and I'm using javascript to validate fields (i.e. numeric, not blank). When my scripts detects an error I want it to put the cursor in the corresponding field. I've tried the focus option, but that doesn't seem to work. This is the code I'm using:
if (TestOk=="N") { alert('Veld mag niet leeg zijn'); veld.select(); veld.focus(); }
The veld.select() does select the error string, the focus, however doesm't seem to work. Anybody got a suggestion?
Am using Struts framework. I want the cursor to be on the first field (text box/select box) when i run the JSP. I've tried with the following command <body onLoad="document.login.userid.focus"> login is my form name and userid is text box name where I want the cursor to be but it didnt work.
I would like to find out the followings: 1) how to set the cursor to a particular textbox depending on the value entered (after the alert message or without alert message)
2) how to make the prg to execute the js function in 2nd textbox (in textbox2row1) if the values changes in textbox1(textbox1row1) but the value in the current textbox(textbox2row1) no change.
I have this script that when run will search a form field (pricenum) and make sure that only a period or numbers are entered. If anything else is found, the script should clear the field, display an alert and then return the cursor to that form field. Everything works perfect except that the cursor will not return to the "pricenum" field after the alert popup is closed.
My users are requesting that when they goto my search page, that the cursor already be blinking in the keyword field. Currently you have to click in there with your mouse. Is there an easy way to do this with PHP or even HTML?
I've got an image for the Name & Email field in a form I've made. On click, I've got the images fade out, and replaced with the text field. The problem I have, is having the cursor go in the text field. I know it works if the text field was there when I click on it, but because clicking causes an event to put it in, it does't act like I clicked on the text field. So what I'm looking to do is at the end of the replaceWith(#name_field), I want it to simulate a click so that the cursor would automatically be in there.
Here is my js... $("#name_img").click -> $(this).fadeOut("slow").replaceWith $("#name_form") $("#name_form").fadeIn "slow"
Is there any way that I can get the first text input field to be active and READY for input.I am trying to save the user the trouble of clicking on the text input field before the user can type any information there. It is one extra step especially when using a touch screen that I would like to avoid.
I found the precursor of this script online, I modified a few small things, I ran the results through jslint, I fixed the apparent errors, and then I formatted it. This is what I came up with:
function clearText(thefield){ if (thefield.defaultValue == thefield.value){ thefield.value = ""; } } function echeck(str){ [Code]....
I'm trying to get this code to work correctly. What I want it to do is to place a value in the field box then when the curser clicks there the field becomes blank.Ok, that part works.But I want it to display an alert if the submit button is clicked while the value is being displayed.Also, i want it to display an alert if the field has become blank and the submit button has been clicked.
I want to get the cursor start and end position of a selected range in a text-field or text-area. i tried lot of functions in various forums. but when the last character of the selection is a new line character JavaScript ignore it in IE6. any one having idea ?
Code: <script language="JavaScript"> var checkobj function agreesubmit(el){[code]....
i need to make it like if the button is clicked and there the agreement checkbox is not checked.. it should give an alert that the alert is not checked.. i know that would require a if and else statement but i cant figure out how to do it
I use Google Chrome because of the Javascript debugger that comes included and I keep getting the following errors with my AJAX script
Code:
Uncaught TypeError: Cannot call method 'getElementsByTagName' of null option.html:23 Uncaught TypeError: Cannot call method 'getElementsByTagName' of null option.html:40
[Code]....
What is supposed to happen is I press either button then it calls either getoptions1() or getoptions2() which then lists the options using listoption() Then the user selects a color and setoption() gets called. I'm having a problem with either getoption function or the listoption function.
I've boiled down my code to the essence of the problem; a variable which serves as a parameter to a function keeps coming up as 'undefined'. The code is quite simple:
I have tried to get an event listener to listen for when the user presses Control-D on their keyboard. This would trigger a confirm delete function - if you've ever used QuickBooks Ctrl-D is the command that does this and this is a financial application.
Problem is that in FireFox, Ctrl-D means bookmark the page and this window pops up. I want to "return false" before this happens.
On this subject I would also like to take over Ctrl-C and Ctrl-V eventually but with Ctrl-D it will work for anything. here is what I have. Again, IT WORKS, but doesn't stop the natural event (bookmark page) fromhappening:
Code:
function AddOnkeypressCommand(strCommand){ //---- version 1.0, by , last edit 2004-12-14 //add to array of commands: m_onkeypressCmds[m_onkeypressCmds.length] = strCommand;
In my website i am planning to do portfolio things in that i gave fade in fade for all images this is working with same size of image.But i have images like this sizes 500/300, 300/150 like if i give this images into portfolio that time if one image fading to another one means that time small size imGE is going top or bottom like that ,I alighed as center.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
I have a single page with a single form, but I have split the form into 3 divs for styling purposes. I have some java script that is supposed to pull values from the text fields, and put them in a selct box using 'document.forms[0].name.value', but nothing is happening. I am wondering if having the form split into to divs is causing the JS to not be able to find the fields, using the forms array? Here is the form portion of the html code: