469,322 Members | 1,567 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,322 developers. It's quick & easy.

Button Arrays.

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.
Sep 11 '08 #1
8 1695
"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.

Sep 11 '08 #2
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'
Oct 14 '08 #3
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.
Oct 14 '08 #4
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.


Oct 15 '08 #5
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"
Oct 15 '08 #6
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"
Oct 15 '08 #7
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 ***
Oct 23 '08 #8
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...b;EN-US;244012
http://support.microsoft.com/default...b;EN-US;197956

Building COM Components That Take Full Advantage of Visual Basic and
Scripting
http://msdn.microsoft.com/library/te...bscriptcom.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"
Oct 23 '08 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by PhilM | last post: by
29 posts views Thread by Tom wilson | last post: by
2 posts views Thread by Eric Layman | last post: by
6 posts views Thread by sgottenyc | last post: by
2 posts views Thread by rookiejavadude | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.