T
tshad
I am trying to access my textbox in javascript but I can't seem to do it by
the ID set up in my aspx page: ID = MyText.
I can access it this way:
function ClipBoardTest() {
var txt = document.getElementById('ctl00$ContentPlaceHolder1$MyText');
window.clipboardData.setData("Text", txt.value);
}
Is there an easier way to get to it? I don't know what the name will be
since it could be different on different pages.
Thanks,
Tom
the ID set up in my aspx page: ID = MyText.
I can access it this way:
function ClipBoardTest() {
var txt = document.getElementById('ctl00$ContentPlaceHolder1$MyText');
window.clipboardData.setData("Text", txt.value);
}
Is there an easier way to get to it? I don't know what the name will be
since it could be different on different pages.
Thanks,
Tom