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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

forms[0].input0.select() in liquid, molten blue

Status
Not open for further replies.

leehinkleman

Programmer
Feb 14, 2002
83
NZ
The line,
writeln('eval("document.f.q"+wi+".select()");');
selects document.f.q0 through ...q8 on the tested page, but could someone please tell me how to simulate the 'liquid' blue look for the selected text input?
The question isn't just cosmetic, because overwriting the blued value of the text input seems to be a problem, too.
Thanks for your help.
 
Thanks, Jeff, and please excuse my inadequate adjectives used to describe what I see when I single-click in this browser's address bar, and perceive a blue rectangle enclosing the url's string, from 'http' to '586834', with the rectangle's right boundary moving left 1 pixel, right 1 pixel, left 1 pixel, ..., ..., ..., ..., ..., ..., ...
with a periodicity of 1/2 second...I think.
When I try select() on my form's text inputs, as stated above, but only 1 at a time, the text inside the inputs is enclosed in a blue rectangle, but the rectangle's right boundary is static...what's worse is that I can't seem to 'replace' the blued text with new values.
I hope that helps to explain?
 
wow...that confused the heck out of me. Especially the part about "with the rectangle's right boundary moving left 1 pixel, right 1 pixel, left 1 pixel, ..., ..., ..., ..., ..., ..., ".

I could be way, way off but are trying to say that the browser you're using animates the selection box when you select something?

Adam
while(woman.width>woman.height && wallet.value>0){beer++;vision.blur()};
 
sounds like you're describing the selected state of the text in the location bar, with the cursor flashing at the right.

i can't help with simulating the flashing cursor, but you should have no problem replacing the value:

<form>
<input type=&quot;text&quot; name=&quot;foo&quot; value=&quot;foo&quot;/>
<input type=&quot;button&quot; value=&quot;select&quot; onclick=&quot;this.form.foo.select();&quot; />
<input type=&quot;button&quot; value=&quot;change&quot; onclick=&quot;this.form.foo.value = 'bar';&quot; />
</form>


=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
 
Adam:
Sorry to have been so confusing;
Jemminger: yes, just that simple 'cursor flashing' we see every day in Windows widgets of all kinds, when text or number values are entered into(for example) the width/height values I can type into PhotoImpact4.2, when defining a selections pixel dimensions.
And I seem to have fixed the problem, at least with IE5+ and Netscape/Mozilla 5+.
The selection still looks static, if that isn't reduntant, but this function seems to work:
writeln('function cI(vi,tb,wi){');
writeln('if(bl>0){');
//writeln('blur(tb);');
writeln('clearTimeout(itv);');
writeln('eval(&quot;document.f.q&quot;+wi+&quot;.focus()&quot;);');
writeln('eval(&quot;document.f.q&quot;+wi+&quot;.select()&quot;);');
writeln('}');
writeln('inc=vi;');
writeln('rq=0;');
writeln('itv=0');
writeln('bl=0');
writeln('}');
In a previous version, the commented line to blur 'this button' seemed to help IE4.01 figure out that a mouseout event over that button was supposed to cause this function to stop another function Q(), which is called from onmousedown, and increasing the integer values of an input box...IE4.01 can't seem to do it as it's now written, but no one's worried about IE4.01 users, right?
Thanks for your help.

 
jemminger:
those functions previously were in frame src pages but, because all the pages were so similar, I used document.write-ing to make them appear in the 'content' frame window instantly, and also because changing values had to be displayed on them...and it was easier for me to copy the lines intact.
Thanks again.
Lee

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top