|
 |
access_asp thread: referencing an object
Message #1 by "Jerry Brown" <jbrown@b...> on Mon, 24 Feb 2003 21:07:47
|
|
with what syntax do you reference an object on a page? in access, if i
have a field named companyid, and for example i want to make another field
equal to it, i could say Text3.value= Me.companyid. how do you do that in
ASP???
Thanks,
JB
Message #2 by "Josh Katsaros" <katsarosj@y...> on Mon, 24 Feb 2003 22:17:42
|
|
Using vbscript:
document.FormName.FormObjectName1.value =
document.FormName.FormObjectName2.value
In javascript I believe it is:
FormName.FormObjectName1.value ==
FormName.FormObjectName2.value
But check the javscript one, it may not be correct.
JK
> with what syntax do you reference an object on a page? in access, if i
h> ave a field named companyid, and for example i want to make another
field
e> qual to it, i could say Text3.value= Me.companyid. how do you do that
in
A> SP???
> Thanks,
> JB
Message #3 by "Josh Katsaros" <katsarosj@y...> on Mon, 24 Feb 2003 22:24:15
|
|
Sorry,
I believe the correct syntax for javascript is:
document.FormName.FormObjectName1.value == FormName.FormObjectName2.value
And I actually think this is what you are looking for:
You need to establish your database and recordset connections. Then in
the value for a textbox, for example, use the following:
<INPUT TYPE="text" NAME="txtBox" VALUE="<% response.write RS("CompanyID") %
>" SIZE=35 MAXLENGTH=50 >
Hope this helps.
JK
Message #4 by "Ken Schaefer" <ken@a...> on Tue, 25 Feb 2003 14:33:40 +1100
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Jerry Brown" <jbrown@b...>
Subject: [access_asp] referencing an object
: with what syntax do you reference an object on a page? in access, if i
: have a field named companyid, and for example i want to make another field
: equal to it, i could say Text3.value= Me.companyid. how do you do that in
: ASP???
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi Jerry,
Where do you want to do this "referencing"? On the client-side or the
server-side?
On the client-side (ie in the browser), all you have is a stock standard
HTML page which ASP has generated. You reference HTML elements (such as form
<input> elements) using a client-side scripting language such as Javascript.
The browser's DOM (Document Object Model) exposes the various objects within
the page.
For more advice, you're best off subscribing to a client-side list, since
doing this type of thing really has nothing to do with ASP or Access.
Cheers
Ken
|
|
 |