[thelist] js cursor position in a form

Brian Cummiskey Brian at hondaswap.com
Thu Jan 5 10:55:17 CST 2006


Peter Brunone (EasyListBox.com) wrote:
> Okay, I understand how that goes.  Just for the record, though, this 
> script seemed to work 

I copied and pasted that in, and now it works.  Go figure..  :P
must've been something in there.

All I changed was i added a focus() to the repid field after the 
select() as the select box was still in focus.

Thanks for all the help.

Case closed :)



function populaterep() {

	var theform = document.getElementById("frmdefault");
	var oRange = theform.repid_number.createTextRange();
	
	if (theform.office_code.value!="")
	{
		theform.repid_number.value = theform.office_code.value + " ";
	
		oRange.moveStart("character", 4);
		oRange.select();
		theform.repid_number.focus();
		
	}
}




More information about the thelist mailing list