473,395 Members | 1,441 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,395 software developers and data experts.

NS 4.7 and field html into usercontrol

Max
i need to access an textbox defined into my usercontrol.
the render of the textbox is myASCX:myTextbox.

How can i access this field in js client envirnoment with NETSCAPE 4.7 ?
Thanks
Nov 19 '05 #1
6 879
Maybe this:
<script language="JavaScript">
<!--
function GetObject(obj)
{
if (document.getElementById) {
obj = document.getElementById(obj);
} else if (document.all) {
obj = document.all.item(obj);
} else {
obj = null;

}
return obj;
}//-->
</script>

Clint Hill
H3O Software
http://www.h3osoftware.com
Max wrote:
i need to access an textbox defined into my usercontrol.
the render of the textbox is myASCX:myTextbox.

How can i access this field in js client envirnoment with NETSCAPE 4.7 ?
Thanks

Nov 19 '05 #2
Max
Sorry but your code is not execute corretly with ns 4.7 (6.0 yes).
I have an textbox control that's name is myascx:mytextbox.

The js function not run.

Thanks
"Clint Hill" <cl********@nospamath3osoftware.com> ha scritto nel messaggio
news:%2****************@TK2MSFTNGP09.phx.gbl...
Maybe this:
<script language="JavaScript">
<!--
function GetObject(obj)
{
if (document.getElementById) {
obj = document.getElementById(obj);
} else if (document.all) {
obj = document.all.item(obj);
} else {
obj = null;

} return obj;
}//-->
</script>

Clint Hill
H3O Software
http://www.h3osoftware.com
Max wrote:
i need to access an textbox defined into my usercontrol.
the render of the textbox is myASCX:myTextbox.

How can i access this field in js client envirnoment with NETSCAPE 4.7 ?
Thanks

Nov 19 '05 #3
in netscape 4, to access a textbox, you need to know the name (not the id)
attribute. then use the dom 1.0 model.

document.forms[0].elements['textboxname'];

note: this syntax is supported by all browsers.

-- bruce (sqlwork.com)

"Max" <ma*******@hotmail.com> wrote in message
news:uB**************@tk2msftngp13.phx.gbl...
i need to access an textbox defined into my usercontrol.
the render of the textbox is myASCX:myTextbox.

How can i access this field in js client envirnoment with NETSCAPE 4.7 ?
Thanks

Nov 19 '05 #4
Max
sorry it's not correct.

i have an dropdown into my user control.
the render is :
<SELECT name="BolloAutoEdit1:cboAnno" id="BolloAutoEdit1_cboAnno">
</SELECT>

document.forms[0].elements['BolloAutoEdit1:cboAnno'].value NOT CORRECT, is
NULL

thanks
"Bruce Barker" <br******************@safeco.com> ha scritto nel messaggio
news:%2******************@TK2MSFTNGP11.phx.gbl...
in netscape 4, to access a textbox, you need to know the name (not the id)
attribute. then use the dom 1.0 model.

document.forms[0].elements['textboxname'];

note: this syntax is supported by all browsers.

-- bruce (sqlwork.com)

"Max" <ma*******@hotmail.com> wrote in message
news:uB**************@tk2msftngp13.phx.gbl...
i need to access an textbox defined into my usercontrol.
the render of the textbox is myASCX:myTextbox.

How can i access this field in js client envirnoment with NETSCAPE 4.7 ?
Thanks


Nov 19 '05 #5


Max wrote:

i have an dropdown into my user control.
the render is :
<SELECT name="BolloAutoEdit1:cboAnno" id="BolloAutoEdit1_cboAnno">
</SELECT>

document.forms[0].elements['BolloAutoEdit1:cboAnno'].value NOT CORRECT, is
NULL


But that is correct, in Netscape 4's object model the value of a
<select> element object is always null.
You need to read out the value of a or the selected option e.g.
var form, select, value;
if ((form = document.forms[0]) && (select =
form.elements['BolloAutoEdit1:cboAnno'])) {
if (select.selectedIndex > 0) {
value = select.options[select.selectedIndex].value;
}
}
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 19 '05 #6
Max
grazie 1000 !!!

"Martin Honnen" <ma*******@yahoo.de> ha scritto nel messaggio
news:%2****************@tk2msftngp13.phx.gbl...


Max wrote:

i have an dropdown into my user control.
the render is :
<SELECT name="BolloAutoEdit1:cboAnno" id="BolloAutoEdit1_cboAnno">
</SELECT>

document.forms[0].elements['BolloAutoEdit1:cboAnno'].value NOT CORRECT,
is NULL


But that is correct, in Netscape 4's object model the value of a <select>
element object is always null.
You need to read out the value of a or the selected option e.g.
var form, select, value;
if ((form = document.forms[0]) && (select =
form.elements['BolloAutoEdit1:cboAnno'])) {
if (select.selectedIndex > 0) {
value = select.options[select.selectedIndex].value;
}
}
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Nov 19 '05 #7

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

Similar topics

3
by: Dave McCracken | last post by:
I am hosting .Net UserControls in HTML pages with Object Tags. These UserControls are clients of remotable objects that run on the same machine. The remote objects execute callbacks via sponsor...
0
by: ATS | last post by:
PRB: Can not get UserControl/HTML/OBJECT to work on XP/SP2/IIS/IE6 Please help, I can not get my UserControl to work from a simple OBJECT tag in a simple HTML web page on Windows XP with SP2...
4
by: ATS | last post by:
BUG/PRODUCTION-DOWN: UserControl running from HTML not working. Someone please help, I have a production down situation. For whatever reason, UserControls are not owkring from HTML/IE. When...
2
by: Jason Kester | last post by:
I have a UserControl living on MyPage.aspx. How would MyPage.aspx go about retrieving the HTML content generated by that UserControl as a string? I've looked into two options, neither of which...
1
by: Jo Yoshida | last post by:
http://groups.google.com/groups?hl=en&lr=&threadm=F9A88B8F-6DDD-405C-9559-B2379ABE8CA7%40microsoft.com&rnum=1&prev=/groups%3Fq%3DSystem.MissingFieldException:%2BField%2Bnot%2Bfound%26hl%3Den%26lr%3D%2...
3
by: yogib | last post by:
Got my main form test.aspx This opens a new window with window.open everything works. I now want to update the parent window with the following code...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
2
by: Filippo Bettinaglio | last post by:
Hi, I use, VS2005 C# I have a Windows Forms UserControl hosted within Internet Explorer According to MIcrosoft documentation: ...
3
by: matt | last post by:
hello, i have a usercontrol in my app that draws a DropDownList and some text. elsewhere, i have a need to extract the control's HTML as if it had been rendered in-page. typically, when i...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.