Creating Form Elements with VBScript

Posted on 2006-04-21
Last Modified: 2012-06-21
I am currently reviewing somebody else's code and I am completely stumped.  It seems they are creating form elements in the following way (for example....):

dim objtextfield
set objtextfield = new textfield
   <% response.write objtextfield.write("email_address", 40, 40) %>

Is this possible to create an html textfield (where email_address is the name, 40 is textfield length and the second 40 is max characters) with just the amount of code I have shown?

I can't find where any function is called and the parameters are passed to it.  I also have never heard of any known vbscript function to enable this kind of code.  But there are no other includes or code and it works.  

The reason I ask is because I need to edit this textfield and add the parameter for read-only but I get an error obviously.  

Please help.  Thanks.
Question by:kruegerste
    LVL 19

    Accepted Solution

    This looks like someone has written an HTML generator class and is using it here.  Try looking for an include file somewhere that references textfield.asp.  

    This line: set objtextfield = new textfield is the creation of an object reference variable called objtextfield.  If you can find the source code to the textfield class, you should be able to see how to implement disabled functionality.  

    Perhaps it's something like objtextfield.disabled = true or something?

    Anyways, let me know.

    Phil / peh803
    LVL 4

    Author Comment

    Thanks for the help.  I was thinking of the word "textfield" as the html keyword textfield and not to a class or function.  New textfield was creating a new instance of the class "textfield" and it was in an include.  

    LVL 19

    Expert Comment

    Glad to help! Let me know if I can provide any additional assistance.


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    iis reverse proxy virtual directory 8 74
    SQL Query Join 9 46
    two-way Authentication ASP 3 63
    Help with stored procedure 30 44
    I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
    Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now