/    Sign up×
Community /Pin to ProfileBookmark

Blinking Solid Square Cursor

I’m a noob when it comes to JavaScript…now that that’s out of the way:

I have a “typewriter script” running on my website. However, I want to personalize it. I want the cursor to become a blinking solid square. The first problem is making it a blinking solid square. At the moment it’s a solid bar or, as xome call it, the pipeline.

The second problem is that when I get remotely close to making it work, the output shows my message and then then <blink>|</blink>. I can’t get the thing to work and I’ve spent hours pouring over different searches I’ve used with google and can’t find the answers to my questions (probably because I’m not asking the right questions and also probably because I can’t explain to a search engine what I mean). All this technology and we still can’t program intent!

Thanks for you help.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@KravvitzDec 14.2005 — Perhaps you could show us the code you have.
Copy linkTweet thisAlerts:
@blah1985Dec 14.2005 — something like

[code=php]<SCRIPT type="text/javascript">
<!--
document.write('<IMG id="hideMouse" border="0" src="PUT BOX IMAGE HERE!" width="7" height="16" style="cursor:text;position:absolute;left:-100px;top:-100px;">');
var mouseRef=document.getElementById("hideMouse");
function hideMouse(e){
if (e) {
mouseRef.style.left=e.pageX-3+"px";
mouseRef.style.top=e.pageY-8+"px";
}
else {
mouseRef.style.left=event.x-5+"px";
mouseRef.style.top=event.y-10+"px";
}
}

document.onmousemove=hideMouse;
//-->
</SCRIPT>[/code]
Copy linkTweet thisAlerts:
@blah1985Dec 14.2005 — btw, I recommend using an animated gif for your image, a 1x1 blinking black->white image
Copy linkTweet thisAlerts:
@ColbyWauthorDec 15.2005 — This is the code I have:

HEAD:

<SCRIPT LANGUAGE="javascript">

var max=0;

function textlist() {

max=textlist.arguments.length;

for (i=0; i<max; i++)

this[i]=textlist.arguments[i];

}

tl=new textlist

("msg1","msg2","msg3","msg4");

var cursor="|";

var x=0; pos=0;

var l=tl[0].length;

function textticker() {

document.tickform.tickfield.value=tl[x].substring(0,pos)+ cursor;

if(pos++==l) { pos=0; setTimeout("textticker()",2000); x++;

if(x==max) x=0; l=tl[x].length; } else

setTimeout("textticker()",100);

}

</SCRIPT>



BODY:

<FORM NAME="tickform" STYLE="margin:0;">

<INPUT ID="typescript" NAME="tickfield" SIZE="40" STYLE="border-style:none;" TYPE="text">

</FORM>

<SCRIPT LANGUAGE="javascript">

textticker();

</SCRIPT>
×

Success!

Help @ColbyW spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...