Asked by:
VBScript won't acknowledge new radio buttons

Question
-
User-2038673722 posted
I have an asp.net application which was originally made in VS 2002 or 2003. The app has been built via several newer versions of Visual Studio since. I've been able to make minor edits to it with VS 2017 but adding another set of radio buttons isn't working. The new radio selections appear on the form. They can be clicked and activate their button handler subroutine which runs on the client. VBScript doesn't seem to acknowledge the new radio button objects.
The original two radio buttons are rdoBTN. The three new buttons are rdoForm. The code below displays a blank popup (no error message) using the original button, rdoBTN. Then using the rdoForm button, it displays a popup with, "object doesn't support this property or method". That is the simplest piece of code I could make fail. Of course, I also can't use anything like 'document.form1.rdoForm("rdoReg").checked' either. Any ideas?
From VBScript:sub rdoForm_OnClick On Error Resume Next err.Clear Dim foobar 'this works Set foobar = document.form1.rdoBTN oWsh.popup err.Description 'but this does not (why?): object doesn't support this property or method Set foobar = document.form1.rdoForm oWsh.popup err.Description end sub
Markup below; The testnet checkbox is work in progress. I only included it because it is in the same tab as existing buttons.<td class="auto-style8" valign="middle"> New/Rebuild<input class="style4" id="rdoReg" onclick="rdoForm_OnClick" type="radio" value="rdoReg" name="rdoForm"/> SOCS<input class="style4" id="rdoSOCS" onclick="rdoForm_OnClick" type="radio" value="rdoSOCS" name="rdoForm"/> BreakFix<input class="style4" id="rdoBreakFix" type="radio" value="rdoBreakFix" name="rdoForm"/> </td> <td class="style4" valign="middle"> Yes<input class="style4" id="YES" onclick="rdoBTN_OnClick" type="radio" value="YES" name="rdoBTN" disabled="disabled"/> No<input class="style4" id="NO" onclick="rdoBTN_OnClick" type="radio" value="NO" name="rdoBTN" disabled="disabled"/> Test Net?<input class="style4" id="testnet" onclick="rdoBTN_OnClick" type="checkbox" value="true" name="testnet" disabled="disabled"/> </td>
Wednesday, January 23, 2019 5:23 PM
All replies
-
User283571144 posted
Hi fearless96,
Could you please tell me what is your asp.net application .netfarmework verison? V1 or V2?
According to the asp.net support lifecycle policies, old version asp.net application we don't support now.
I suggest you could create a new web form with vb.net as below article:
https://www.w3schools.com/asp/webpages_examples.asp
Best Regards,
Brando
Thursday, January 24, 2019 5:14 AM -
User-2038673722 posted
Disregard this. The existing buttons were in a section of the page that was inside a form tag but the new buttons were outside of that section and had no form tag.
Thursday, January 24, 2019 2:07 PM -
User753101303 posted
Hi,
From what you posted there is no sign of this being an ASP.NET application (could be) but it definitively seems you are using client VBScript which according to https://blogs.windows.com/msedgedev/2017/07/07/update-disabling-vbscript-internet-explorer-11/ is not enabled only in the "Intranet" and "Trusted Sites" zones.
Unless it will be ever be used from within your company it seems you should really consider switching to JavaScript.
Thursday, January 24, 2019 2:24 PM