Click to See Complete Forum and Search --> : text box delay
ucbones
01-12-2004, 09:31 AM
Hi,
The script below is meant to change the text in a form name fname, in a text field called "box". But it doesn't, any ideas?
function changetext(box){
document.fname.[box].value="testing";
}
dom
Pittimann
01-12-2004, 09:36 AM
Hi!
Not knowing, what parameter is passed to the function (the red "box") => function changetext(box){
take that and leave the rest unchanged for a first result:
document.fname.box.value="testing";
Cheers - Pit
fredmv
01-12-2004, 09:37 AM
Welcome to the forums.function changetext()
{
document.fname['box'].value = "testing";
}
ucbones
01-12-2004, 09:55 AM
OK,
Think I'm halfway there! Basically this script is the result if a username/password combination is entered incorrectly. The page is re-directed to this script, which shows a series of text boxes. Each text-box is whirring through a list of fake ip's, and I want them, in order, to stop. The form is called "iptrace", and the text boxes are named "ip1", "ip2" etc.
<script>
function ranno(){
return Math.floor(Math.random()*255);
}
function myrandomip(){
return ranno() + "." + ranno() + "." + ranno() + "." + ranno();
}
function showip (box) {
ipID = setTimeout("showip(box)",50);
document.iptrace[box].value='Tracing Route: ' + myrandomip();;
}
</script>
the problem appears to be with the line that says showip(box), as it says box is undefined.
I'm attempting to call the function with
<script>
showip('ip1');
</script>
ucbones
01-12-2004, 12:29 PM
fixed it now- if anyone wants I'll post my finished script!