...

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



StealthRT
09-13-2008, 06: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?

Thanks!
David

Philip M
09-13-2008, 08: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).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum