View Full Version : Drawing a blank here... set a var within document.XXX

09-13-2008, 07:25 AM
Hey all for some reason i am drawing a blank at how to go about doing this.

var theTxtBox = "txtFName";
var theIFrame = "FNameFrame"

document.FNameFrame.txtFName.value = document.FNameFrame.txtFName.value + '@';

I want to replace the document.FNameFrame.txtFName. with the var's so that i can only change one thing instead of my whole code (which is pretty log already) :)

How can i do this?


Philip M
09-13-2008, 09:14 AM
I don't think it is possible to change the name of an element. It is possible to change the type (e.g. from text to password).