Button Arrays.

M

MJ

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.
 
E

Evertjan.

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.
 
O

Old Pedant

MJ said:
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.
 
M

MJ

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

Thanks. Btw: RB = shorthand for Radio Button.
 
J

j++coder

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'
 
B

Bob Barrows [MVP]

j++coder said:
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
 
J

j++coder

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.
 
B

Bob Barrows [MVP]

j++coder said:
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.
 
B

Bob Barrows [MVP]

j++coder said:
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
 
J

jai gupta

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
 
B

Bob Barrows [MVP]

jai said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top