473,382 Members | 1,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 1781
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: PhilM | last post by:
perhaps I am just a little tired, but I am having trouble with my form buttons. Firstly I name them like this name=\"round".$counter."heats\" which results in variables $round1heats...
8
by: Raymond H. | last post by:
Hello, 1- How to see, in a Label, the URL of a link that the mouse pass over? (in the WebBrower control in a vb projet). 2- How to create a menu and a submenu via a button Command1? and...
2
by: Harlin | last post by:
I have an array of Appnames. Let's say they are 'Monkeys', 'Cats', 'Birds'. I would like create a button array with these: ---Start Code--- # Constructing and displaying buttons for a in...
15
by: tabonni | last post by:
I want to check each button groups and save the checked value into a 2 dimensional array. But, it doesn't work. Could anyone tell me what's wrong with my code. My code is as follow: <html>...
29
by: Tom wilson | last post by:
I can't believe this is such an impossibility... I have an asp.net page. It accepts data through on form fields and includes a submit button. The page loads up and you fill out some stuff. ...
3
by: Amelyan | last post by:
When we want radio button to belong to a group name we say, radio1.GroupName="GroupA". In this case, radio1 will be unselected if another radio button is selected in "GroupA". Is there a way...
9
by: Michael D. Ober | last post by:
In VB 6, you can create control arrays for your option groups and scan with the following code dim opt as OptionButton for each opt in OptionGroup ' Do something next opt I know VB 2005...
2
by: Eric Layman | last post by:
Hi, I have a radio button and a combo box. Upon changing a value for radio button, the combo box values will be dynamically updated. I have an idea on how to go abt doing it but Im stuck...
6
by: sgottenyc | last post by:
Hello, If you could assist me with the following situation, I would be very grateful. I have a table of data retrieved from database displayed on screen. To each row of data, I have added...
2
by: rookiejavadude | last post by:
I'm have most of my java script done but can not figure out how to add a few buttons. I need to add a delete and add buttong to my existing java program. Not sure were to add it on how. Can anyone...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.