lamy Posted February 20, 2006 Posted February 20, 2006 suppose i made a custom control with a textbox controls, when its rendered it would have (Me.ID + $ + textbox name), IE allows object names with "$" sign, so theres no problem finding/altering the object, but in FF it doesnt, so doing this wouldnt work with FF. document.getElementById("myControl$Textbox1").disable = false; anyone knows how to resolve this? Quote slow down when you need to hurry, stop when you need to move on, look back when you need to forget, or you might slip and leave sanity
Administrators PlausiblyDamp Posted February 20, 2006 Administrators Posted February 20, 2006 Just tried it here and FireFox worked ok. If you really can't get it to work could you not choose a different character? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
lamy Posted February 21, 2006 Author Posted February 21, 2006 actually i didnt choose the $ sign, it was like so when it got rendered to html, is there a way to change that? hmnn... it worked for you in FF, now im totally lost coz it keeps returning undefined Quote slow down when you need to hurry, stop when you need to move on, look back when you need to forget, or you might slip and leave sanity
lamy Posted February 23, 2006 Author Posted February 23, 2006 oops, my mistake, i didnt notice that its rendered differently with attribute Name and ID Name = MyControl$Textbox1 ID = MyControl_Textbox1 i guess the error was on document.forms[0].MyControl$Textbox and not on getElementById i guess id have to change it to this document.getElementById('MyControl_Textbox1') Quote slow down when you need to hurry, stop when you need to move on, look back when you need to forget, or you might slip and leave sanity
Joe Mamma Posted February 23, 2006 Posted February 23, 2006 oops, my mistake, i didnt notice that its rendered differently with attribute Name and ID Name = MyControl$Textbox1 ID = MyControl_Textbox1 i guess the error was on document.forms[0].MyControl$Textbox and not on getElementById i guess id have to change it to this document.getElementById('MyControl_Textbox1')when rendering the ID of a control, the rendered ID is simple Control.UniqueID. so to render a document.getElementById - Dim Script as String = String.Format("var ctrl = document.getElementById({0});", Me.ThisControl.UniqueID) Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
lamy Posted February 23, 2006 Author Posted February 23, 2006 thanks Joe Mamma, ill keep that in mind :) Quote slow down when you need to hurry, stop when you need to move on, look back when you need to forget, or you might slip and leave sanity
Joe Mamma Posted February 24, 2006 Posted February 24, 2006 should have read: [font=Courier New][color=#0000ff]Dim[/color] Script [color=#0000ff]as[/color] [color=#0000ff]String[/color] = String.Format("var ctrl = document.getElementById(""{0}"");", Me.ThisControl.UniqueID)[/font][font=Verdana][/font] Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.