473,406 Members | 2,293 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,406 software developers and data experts.

Accessing an Object's Methods

I have a javascript function that needs to access methods of a java
object(localTag). In my JSP I'm trying to include hidden fields for
the Strings returned from the getter method calls of the object like
so:

<html:hidden name="FrmCustomerHolding" property='<%=
"localTag.getTagName()" %>' />
<html:hidden name="FrmCustomerHolding" property='<%=
"localTag.getTagValue()" %>' />

If I can do something like this, what is the correct syntax and how do
I access this property in my javascript? When I have a hidden field
that is just a String, I access it in the javascript like
"document.getElementById("theString").value" and it works fine, but I
can't seem to find how to access the String value of a method call.

Thanks for any help!

Sep 8 '05 #1
2 1335
mi********@hotmail.com wrote:
<html:hidden name="FrmCustomerHolding" property='<%=
"localTag.getTagName()" %>' />
<html:hidden name="FrmCustomerHolding" property='<%=
"localTag.getTagValue()" %>' />


What happens when you omit the double quotes?

<html:hidden name="FrmCustomerHolding"
property='<%= localTag.getTagName() %>' />
JW

Sep 8 '05 #2
mi********@hotmail.com a écrit :
I have a javascript function that needs to access methods of a java
object(localTag). In my JSP I'm trying to include hidden fields for
the Strings returned from the getter method calls of the object like
so:

<html:hidden name="FrmCustomerHolding" property='<%=
"localTag.getTagName()" %>' />
<html:hidden name="FrmCustomerHolding" property='<%=
"localTag.getTagValue()" %>' />

If I can do something like this, what is the correct syntax and how do
I access this property in my javascript?
elementReference.tagName
DOM 2 Core:
http://www.w3.org/TR/DOM-Level-2-Cor...l#ID-104682815
The return value will be uppercased in HTML (not sure about XHTML but I
think it should be lowercase).

DOM 3 Core:
http://www.w3.org/TR/2004/REC-DOM-Le...l#ID-104682815
The return value will be uppercased in HTML (not sure about XHTML but I
think it should be lowercase).

When I have a hidden field that is just a String, I access it in the javascript like
"document.getElementById("theString").value" and it works fine, but I
can't seem to find how to access the String value of a method call.
document.getElementById("theString").tagName
Thanks for any help!

--
Gérard
--
remove blah to email me
Sep 8 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Tom Meuzelaar | last post by:
Hello: I'm using VB6 in VS enterprise. I'd like to place an HTML form inside a VB container, have a user fill out the form information, click a submit button, and then have the program capture...
1
by: Bryan Ray | last post by:
I am trying to write an inheritance function, so I can call a base classes method that has been overridden in the derived class. I want to get rid of the ugly 'call()' syntax that would be used....
8
by: Piro | last post by:
I have a class that I want to make accessible to a web service. This class does some work in its constructor method and sets some class variables in its various methods. The problem I am having...
6
by: Alfred B. Thordarson | last post by:
I have a problem accessing a DLL using C#. I'm using C/FRONT with Navision's CFRONT.DLL, which contains the method: DBL_S32* DBL_NextKey(DBL_HTABLE hTable, DBL_S32* Key); typedef signed long...
3
by: Alex | last post by:
I'm having a problem porting an ASP solution to ASPX. In the ASP solution I'm accessing a DCOM server, create sub DCOM objects and call functions from VB script on the ASP pages. The DCOM object...
13
by: Joseph Garvin | last post by:
When I first came to Python I did a lot of C style loops like this: for i in range(len(myarray)): print myarray Obviously the more pythonic way is: for i in my array: print i
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
6
by: David Hearn | last post by:
I have a property in a user control that I am setting: Private strPageName as String Public Property PageName() as String Get Return strPageName End Get Set(byVal Value as String)...
1
by: DelphiLover | last post by:
Hi. I'm reading and reading, testing and testing, trying to figure out how to do things, how to do things according to best practises and how to do things in the best object oriented way. ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.