May 24, 2001 #1 jossi Programmer May 24, 2001 8 PE Help me!!!! i nees to put the focus at the end of a word in a input text.... how can i do?? pleaseeeeeeeeeeeee!!!!!!!!!!!!!!!!
Help me!!!! i nees to put the focus at the end of a word in a input text.... how can i do?? pleaseeeeeeeeeeeee!!!!!!!!!!!!!!!!
May 24, 2001 1 #2 tleish Programmer Jan 17, 2001 619 US I know of a way to do this in IE, but I don't think it can be done in NS. Do you need this one cross browser? - tleish Upvote 0 Downvote
I know of a way to do this in IE, but I don't think it can be done in NS. Do you need this one cross browser? - tleish
May 24, 2001 Thread starter #3 jossi Programmer May 24, 2001 8 PE Hi Tlesh... i use IE.. please could you tell me how can i do it in IE?? i need it...it's so important.. Thanks a lot Jossi Upvote 0 Downvote
Hi Tlesh... i use IE.. please could you tell me how can i do it in IE?? i need it...it's so important.. Thanks a lot Jossi
May 24, 2001 #4 PepperPepsi Programmer Aug 3, 2000 241 US Hi Jossi, try this, it works for IE and Netscape6, except Netscape4.x <html> <head> <script Language="JavaScript"> function setDefault() { document.MyForm.MyText.focus(); document.MyForm.MyText.value = document.MyForm.MyText.value; } </script> </head> <body onload="setDefault()"> <form name="MyForm"> <input type="text" size="30" value="Say No to Netscape 4!" name="MyText"> </form> </body> </html> hope this helps, Chiu Chan WebMaster & Software Engineer emagine solutions, inc http://www.emagine-solutions.comcchan@emagine-solutions.com Upvote 0 Downvote
Hi Jossi, try this, it works for IE and Netscape6, except Netscape4.x <html> <head> <script Language="JavaScript"> function setDefault() { document.MyForm.MyText.focus(); document.MyForm.MyText.value = document.MyForm.MyText.value; } </script> </head> <body onload="setDefault()"> <form name="MyForm"> <input type="text" size="30" value="Say No to Netscape 4!" name="MyText"> </form> </body> </html> hope this helps, Chiu Chan WebMaster & Software Engineer emagine solutions, inc http://www.emagine-solutions.comcchan@emagine-solutions.com
May 24, 2001 Thread starter #5 jossi Programmer May 24, 2001 8 PE PepperPepsi Thank so much ...i do it...it really works :-D Thanks a lot jossi Upvote 0 Downvote
May 24, 2001 #6 tleish Programmer Jan 17, 2001 619 US Sorry, I was aeay for a while. PepperPepsi showed you pretty much the same script I was going to do. I would set it up so that you could pass the form element to the function, so that you can use it with more than one form element: <html> <head> <SCRIPT LANGUAGE="JavaScript"> <!-- function endFocus(vTextField) { vTextField.focus(); vTextField.value += ""; } //--> </SCRIPT> </head> <body onload="endFocus(document.MyForm.MyText)"> <form name="MyForm"> <input type="text" size="30" value="Say No to Netscape 4!" name="MyText"> </form> </body> </html> - tleish Upvote 0 Downvote
Sorry, I was aeay for a while. PepperPepsi showed you pretty much the same script I was going to do. I would set it up so that you could pass the form element to the function, so that you can use it with more than one form element: <html> <head> <SCRIPT LANGUAGE="JavaScript"> <!-- function endFocus(vTextField) { vTextField.focus(); vTextField.value += ""; } //--> </SCRIPT> </head> <body onload="endFocus(document.MyForm.MyText)"> <form name="MyForm"> <input type="text" size="30" value="Say No to Netscape 4!" name="MyText"> </form> </body> </html> - tleish