Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does anyone know... 1

Status
Not open for further replies.

MikeBarone

Programmer
Mar 1, 2001
354
US
...why these will not work in Netscape? I am trying to setup an onClick inline select function. Thanks.

Code:
<form name=&quot;form1&quot; method=&quot;POST&quot; action=&quot;actionhere&quot;>
  <textarea onClick=&quot;javascript:this.focus();this.select();&quot; rows=&quot;3&quot; name=&quot;field1&quot; cols=&quot;50&quot;>TEXT</textarea>
</form>

-=OR=-

<form name=&quot;form1&quot; method=&quot;POST&quot; action=&quot;actionhere&quot;>
  <textarea onClick=&quot;javascript:document.form1.field1.focus();document.form1.field1.select();&quot; rows=&quot;3&quot; name=&quot;field1&quot; cols=&quot;50&quot;>TEXT</textarea>
</form>
Mike Barone
FREE CGI/Perl Scripts & JavaScript Generators
Ace PopUp Generator Software - Totally FREE
 
try leaving out the javascript: before this.focus()

===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
Works in Netscape 6 --- doesn't seem to recoginize the event handler in Netscape 4...weird. ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
I appreciate the response, I noticed the same thing.

I can get the textarea to focus using a remote call (button, image, or link to focus, select) but I can't get the textarea to &quot;self focus&quot; in earlier versions of NS. Mike Barone
FREE CGI/Perl Scripts & JavaScript Generators
Ace PopUp Generator Software - Totally FREE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top