Button Arrays.

Discussion in 'ASP General' started by MJ, Sep 11, 2008.

  1. MJ

    MJ Guest

    Hi all, not sure if this is the right forum,but I'd like to create an array
    of Radio Buttons for a web page.

    I understand how to create an array, but I need one for RB specifically and
    know how to access them.

    Searching the web is great, but I'm winding up with too many pages that take
    me off on a winding road, with no precise solution.

    Any help would be appreciated.

    Thanks.
     
    MJ, Sep 11, 2008
    #1
    1. Advertising

  2. MJ

    Evertjan. Guest

    MJ wrote on 11 sep 2008 in microsoft.public.inetserver.asp.general:

    > Hi all, not sure if this is the right forum,but I'd like to create an
    > array of Radio Buttons for a web page.


    Radio buttons are html objects, an array is a computer language thing.
    Perhaps an array of pointers to radio buttons?

    but then, ASP is a platform for serverside languages, and radio buttons are
    clientside things.

    I think you are in the wrong NG.

    > I understand how to create an array, but I need one for RB
    > specifically and know how to access them.


    What is RB?

    > Searching the web is great, but I'm winding up with too many pages
    > that take me off on a winding road, with no precise solution.


    For a precise solution, you need a precise concept,
    you did not show one, in my view.

    Please shoe some ASP code you have in mind.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Sep 11, 2008
    #2
    1. Advertising

  3. MJ

    Old Pedant Guest

    "MJ" wrote:

    > Hi all, not sure if this is the right forum,but I'd like to create an array
    > of Radio Buttons for a web page.


    Are you asking for ASP or ASP.NET???

    This forum is for ASP (old style), not ASP.NET. And in ASP since there is
    no tight coupling between the server code and the client code, your question
    is pretty much a non sequitir.

    I should also point out that, as rendered in HTML, there's no such thing as
    "an array of Radio Buttons". Each button is and must be an independent HTML
    control within an HTML <FORM>. Now, it's true that if you give multiple
    radio buttons the same name then they are treated as an array by JavaScript
    code on the page, but that's not directly an HTML issue. And, further, the
    JavaScript array may or may not resemble any array you created on the server.

    Again, ASP.NET hides a lot of this. But if you are asking about ASP.NET
    then you'd be better off asking in the MSDN forums and/or at www.asp.net
    and/or at any of the many other .NET forums.
     
    Old Pedant, Sep 11, 2008
    #3
  4. MJ

    MJ Guest

    Well of course I am, what a dummy. Don't know what I was thinking.

    Thanks. Btw: RB = shorthand for Radio Button.
    "Evertjan." <> wrote in message
    news:Xns9B16DCF83A4F3eejj99@194.109.133.242...
    > MJ wrote on 11 sep 2008 in microsoft.public.inetserver.asp.general:
    >
    >> Hi all, not sure if this is the right forum,but I'd like to create an
    >> array of Radio Buttons for a web page.

    >
    > Radio buttons are html objects, an array is a computer language thing.
    > Perhaps an array of pointers to radio buttons?
    >
    > but then, ASP is a platform for serverside languages, and radio buttons
    > are
    > clientside things.
    >
    > I think you are in the wrong NG.
    >
    >> I understand how to create an array, but I need one for RB
    >> specifically and know how to access them.

    >
    > What is RB?
    >
    >> Searching the web is great, but I'm winding up with too many pages
    >> that take me off on a winding road, with no precise solution.

    >
    > For a precise solution, you need a precise concept,
    > you did not show one, in my view.
    >
    > Please shoe some ASP code you have in mind.
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)
    >
     
    MJ, Sep 11, 2008
    #4
  5. MJ

    j++coder Guest

    how to use j# com dll (vs 2005) in classical ASP

    Hi,

    i had converted a j++ dll into j# com dll(VS 2005) . In global.asa of
    classic asp when i am trying to set the application variable with the dll
    object it is not setting up.





    Dim o

    Set o = CreateObject("MyClass")



    Application("myappObj") = o



    but if i am setting it at session level then i am able to set it.

    i.e.

    Session("oo") = acd





    I tried to call all these methods from the console application just to make
    sure that the dll is build correctly, and it is working fine.





    in my main class i have the constructor method defined which i used to
    create the instance of other classes

    using



    MyClass.ConstructClass("ClassName", 1)



    in the constructclass method i have the following code

    {

    Class conClass = Class.forName(ClassName);
    Class conParms[] = new Class[5];
    conParms[0] = Class.forName("java.sql.Connection");
    conParms[1] = Class.forName("java.lang.String");
    conParms[2] = Class.forName("java.lang.String");
    conParms[3] = Class.forName("java.lang.String");
    conParms[4] = Class.forName("java.lang.String");

    Constructor ObjConstructor = conClass.getConstructor(conParms);
    Object conObj[] = new Object[5];
    conObj[0] = this.dbConn;

    conObj[1] = new String(this.IPaddress);
    conObj[2] = new String(this.Userid);
    conObj[3] = new String(this.BR);
    conObj[4] = new String(this.SessionID);

    return ObjConstructor.newInstance(conObj);

    }



    if i am using the constructclass method in console application then it is
    behaving in the right manner i.e. if a object of some other class is created
    using ConstructClass then i am able to call the method's of that class
    comfortably but if i am using it in ASP then it is raising an error "Object
    required'
     
    j++coder, Oct 14, 2008
    #5
  6. Re: how to use j# com dll (vs 2005) in classical ASP

    j++coder wrote:
    > Hi,
    >
    > i had converted a j++ dll into j# com dll(VS 2005) . In global.asa of
    > classic asp when i am trying to set the application variable with the
    > dll object it is not setting up.
    > Dim o
    > Set o = CreateObject("MyClass")
    >
    > Application("myappObj") = o


    You left out the "Set" keyword

    > but if i am setting it at session level then i am able to set it.
    > i.e.
    > Session("oo") = acd


    If acd is an object, this should not have worked


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Oct 14, 2008
    #6
  7. MJ

    j++coder Guest

    Re: how to use j# com dll (vs 2005) in classical ASP

    thanks for the quick reply.

    The set keyword is used but still it is not setting it in Application
    variable

    Dim o , sLogFileDir
    Set sLogFileDir = "c:\log"
    Set o = CreateObject("MyClass")
    Call o.StartLog (sLogFileDir)
    Set Application("myappObj") = o

    MyClass is an J# (2005) com visible Dll Class , if it is j++ dll then it is
    happening but not with j# dll.
     
    j++coder, Oct 15, 2008
    #7
  8. Re: how to use j# com dll (vs 2005) in classical ASP

    j++coder wrote:
    > thanks for the quick reply.
    >
    > The set keyword is used but still it is not setting it in Application
    > variable
    >
    > Dim o , sLogFileDir
    > Set sLogFileDir = "c:\log"
    > Set o = CreateObject("MyClass")


    ************************************************
    > Call o.StartLog (sLogFileDir)

    ************************************************

    Is this the line that raised the "object required" error? If so, that
    indicates to me that
    a. You have failed to register the dll on the machine using regsvr32.exe
    b. this is not really a COM dll


    > Set Application("myappObj") = o
    >
    > MyClass is an J# (2005) com visible Dll Class , if it is j++ dll
    > then it is happening but not with j# dll.


    Is it free-threaded? If not, you don't want to be storing it in Application
    or Session anyway.

    Have you verified that you can use this dll in a COM environment? A simple
    ..vbs file should be sufficient to tell you this.

    --
    Microsoft MVP - ASP/ASP.NET - 2004-2007
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Oct 15, 2008
    #8
  9. Re: how to use j# com dll (vs 2005) in classical ASP

    j++coder wrote:
    > thanks for the quick reply.
    >
    > The set keyword is used but still it is not setting it in Application
    > variable
    >
    > Dim o , sLogFileDir
    > Set sLogFileDir = "c:\log"
    > Set o = CreateObject("MyClass")
    > Call o.StartLog (sLogFileDir)
    > Set Application("myappObj") = o
    >
    > MyClass is an J# (2005) com visible Dll Class , if it is j++ dll
    > then it is happening but not with j# dll.


    Oh wait. I just reread your original message and saw that you said you did
    successfully store the dll in Session, although that statement is
    contradicted by this one:

    but if i am using it in ASP then it is raising an error "Object
    required'

    So maybe it does seem you have a usable COM object. So I guess the only
    thing is to establish where in global.asa you are attempting to store it in
    Application. Excuse the question, but ... hopefully you put the above code
    in the application_onstart event handler sub in global.asa ...

    If the above lines are the only lines of code in global.asa, they will never
    fire ... you probably knew this already but I have to eliminate all
    possibilities

    --
    Microsoft MVP - ASP/ASP.NET - 2004-2007
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Oct 15, 2008
    #9
  10. MJ

    jai gupta Guest

    Re: how to use j# com dll (vs 2005) in classical ASP

    Hi

    Thanks for the reply.

    i do certainly had many things that are set at application level apart
    from the above mentioned line.

    apart from above issue i have some more :-
    1. Whenever i am trying to call the J# com dll overloaded method from
    asp it throws the error of Wrong / Invalid arguments error. though if i
    change the signature of those
    methods they work fine.

    2. whenver i try to pass a object in a j# com dll object from asp it
    thrwos the error of "Variable uses an Automation type not supported in
    VBScript". e.g.
    Set o = CreateObject("License")
    Set m = CreateObject("MyClass")
    Call m.getAllScreens(o)

    it throws the above mentioned error.



    please help.
    thanks in advance.

    j++Coder





    *** Sent via Developersdex http://www.developersdex.com ***
     
    jai gupta, Oct 23, 2008
    #10
  11. Re: how to use j# com dll (vs 2005) in classical ASP

    jai gupta wrote:
    > Hi
    >
    > Thanks for the reply.
    >
    > i do certainly had many things that are set at application level apart
    > from the above mentioned line.
    >
    > apart from above issue i have some more :-
    > 1. Whenever i am trying to call the J# com dll overloaded method from
    > asp it throws the error of Wrong / Invalid arguments error. though
    > if i change the signature of those
    > methods they work fine.
    >
    > 2. whenver i try to pass a object in a j# com dll object from asp it
    > thrwos the error of "Variable uses an Automation type not supported in
    > VBScript". e.g.
    > Set o = CreateObject("License")
    > Set m = CreateObject("MyClass")
    > Call m.getAllScreens(o)
    >
    > it throws the above mentioned error.
    >
    >
    >

    Remember, vbscript deals in variants. All I can do is point you at the
    guidelines that were provided by MS for creating COM objects intended to be
    consumed by vbscript:

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;244012
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;197956

    Building COM Components That Take Full Advantage of Visual Basic and
    Scripting
    http://msdn.microsoft.com/library/techart/msdn_vbscriptcom.htm

    Q218454 - HOWTO: Implement Array Arguments in Visual C++ COM Objects for
    Active Server Pages
    http://support.microsoft.com/default.aspx?kbid=218454

    --
    Microsoft MVP - ASP/ASP.NET - 2004-2007
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Oct 23, 2008
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alexandra Stehman
    Replies:
    5
    Views:
    30,918
    Chris Smith
    Jun 17, 2004
  2. Bill Reyn
    Replies:
    3
    Views:
    2,344
    Bob Hairgrove
    Jun 22, 2004
  3. Mantorok Redgormor

    initializing arrays of arrays

    Mantorok Redgormor, Sep 10, 2003, in forum: C Programming
    Replies:
    4
    Views:
    590
  4. kelvSYC

    Arrays and Pointers to Arrays

    kelvSYC, Sep 26, 2003, in forum: C Programming
    Replies:
    2
    Views:
    407
  5. Philipp
    Replies:
    21
    Views:
    1,190
    Philipp
    Jan 20, 2009
Loading...

Share This Page