homepage Welcome to WebmasterWorld Guest from 23.22.252.150
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library : Charter : Moderators: whoisgregg

JavaScript and AJAX Forum

    
JavaScript for placing cursor on form field
How to do it?
Nick_W




msg:1486293
 8:35 am on Jun 28, 2002 (gmt 0)

Hi all

If I have a search box on a page, how might I use JS to put the cursor on it?

I'm afraid JS is not really one of my strong points ;)

Nick

 

ukgimp




msg:1486294
 8:57 am on Jun 28, 2002 (gmt 0)

Hi Nick

take a look at this, i think it is what you are looking for

[idocs.com...]

Richard

luma




msg:1486295
 1:19 pm on Jun 28, 2002 (gmt 0)

This is basically what google uses:
<html><head>
<script>
<!--
function sf(){document.f.q.focus();}
// -->
</script>
</head>
<body onLoad=sf()></body>
</html>

Nick_W




msg:1486296
 1:26 pm on Jun 28, 2002 (gmt 0)

Thanks ukgimp, quite simple really, time I got round to reading the 'definitive guide' JS book my mum got me last B'day!

Nick

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved