User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 373,551 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,808 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

how do i keep a blinking cursor on the site?

Join Date: Feb 2002
Location: Long Island, NY
Posts: 1,134
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Rep Power: 12
Solved Threads: 2
Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: how do i keep a blinking cursor on the site?

  #12  
Jan 11th, 2004
The best way is to do it with a GIF editor. You would need two frames. One with a "|" graphic and one without one. If you don't want a graphic, you could try something like this, but the only flaw is when the user clicks somewhere else, they would need to click back on this "invisible input box" to see the blinking cursor. This is the simplest way to do it. It's better to go with an animated GIF.

<html>
<head>
<script language="JavaScript">
 function setFocus() {
  document.someform.blinkcursor.focus(); 
 }
</script>
<style>
 input.cursor { 
  /* makes the inputbox borders disappear */
  border:none; 
 }
</style>
</head>
<body onLoad="setFocus()">
<form name="someform">
 The following is a blinking cursor <input type="text" class="cursor" size="1" maxlength="0" name="blinkcursor">
</form>
</body>
</html>
_.:: my websites ::._
blog @ www.samaru.net * engi No Jutsu @ www.narutorp.net * portfolio @ shinylight.com
deviantART: inscissor
Reply With Quote  
All times are GMT -4. The time now is 7:07 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC