manipualting a select list from within an event handler

2008-09-24 Thread Robert Welz
Manipulating checkboxes from withing an onchange event handler works  
but I'd like to manipulate a select list like in this code example,
but without luck? I'd appreciate some little help, that would be  
fantastic.



Thank's for some input here ;)

kind regards,

Robert


function CheckAuswahl(currForm)
{   

a = document.form_addresses.form_protocol.value;

if(a==33554432)
{

for(var x=0; x  currForm.elements.length; x++) {
var y = currForm.elements[x];

y.checked = currForm.form_exch_enabled.checked;

if (y.name == form_exch_enabled) {
y.checked = true;
//alert(y.name);
}

if (y.name == form_exch_name) {
if(y.value == ) {
y.value = ggg;
}
}

if (y.name == form_exch_pass) {
if(y.value == ) {
y.value = ggg;
}
}

if (y.name == form_permitted_rcv) {
//var a=y.createElement('option');
//a.name=TEST;
//y.focus();
y.add('Test',null);
alert(y.size);
}
}
}
}


td%=Label_Protocol%/td
  td
%
  int intProtocol = Integer.parseInt(Value_Protocol);
%
select name=form_protocol  
onchange=CheckAuswahl(this.form) %=Label_State%


option % if ( intProtocol == sysProtocol_ZModem) {%selected%}%
value=%=sysProtocol_ZModem% 
%=Value_Protocol_ZModem%/option


---
Robert Welz
Pro2col Limited
Weinheimer Strasse 64
D-68309 Mannheim

t  0621 724 5837
f  0621 724 5782
w  http://www.pro2col.de
e  [EMAIL PROTECTED]
skype  ro.welz

Pro2col Technischer Support
[EMAIL PROTECTED]
Tel.: +49 621 724 5837


Apple Solution Expert - Print  Publishing

File transfer  workflow specialists for the graphic art  prepress  
industry


Distributors for DevZeroG, Hermstedt  OneVision within the UK and  
Ireland


Pro2col's legal position regarding Internet communications can be  
found at http://pro2col.com/about/legal.asp







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] RE: manipualting a select list from within an event handler

2008-09-24 Thread Peter Crowther
 From: Robert Welz [mailto:[EMAIL PROTECTED]
 Manipulating checkboxes from withing an onchange event handler works
 but I'd like to manipulate a select list like in this code example,
 but without luck? I'd appreciate some little help, that would be
 fantastic.

[Javascript elided]

Ask on a Javascript list?

- Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] RE: manipualting a select list from within an event handler

2008-09-24 Thread Robert Welz

Oops, sorry...

Robert

Am 24.09.2008 um 16:56 schrieb Peter Crowther:


From: Robert Welz [mailto:[EMAIL PROTECTED]
Manipulating checkboxes from withing an onchange event handler works
but I'd like to manipulate a select list like in this code example,
but without luck? I'd appreciate some little help, that would be
fantastic.


[Javascript elided]

Ask on a Javascript list?

   - Peter

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---
Robert Welz
Pro2col Limited
Weinheimer Strasse 64
D-68309 Mannheim

t  0621 724 5837
f  0621 724 5782
w  http://www.pro2col.de
e  [EMAIL PROTECTED]
skype  ro.welz

Pro2col Technischer Support
[EMAIL PROTECTED]
Tel.: +49 621 724 5837


Apple Solution Expert - Print  Publishing

File transfer  workflow specialists for the graphic art  prepress  
industry


Distributors for DevZeroG, Hermstedt  OneVision within the UK and  
Ireland


Pro2col's legal position regarding Internet communications can be  
found at http://pro2col.com/about/legal.asp







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: manipualting a select list from within an event handler

2008-09-24 Thread Johnny Kewl


- Original Message - 
From: Robert Welz [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, September 24, 2008 4:20 PM
Subject: manipualting a select list from within an event handler


Manipulating checkboxes from withing an onchange event handler works  but 
I'd like to manipulate a select list like in this code example,
but without luck? I'd appreciate some little help, that would be 
fantastic.



Thank's for some input here ;)

kind regards,

Robert


function CheckAuswahl(currForm)
{
  a = document.form_addresses.form_protocol.value;
if(a==33554432)
  {

for(var x=0; x  currForm.elements.length; x++) {
var y = currForm.elements[x];

y.checked = currForm.form_exch_enabled.checked;

if (y.name == form_exch_enabled) {
y.checked = true;
//alert(y.name);
}

if (y.name == form_exch_name) {
if(y.value == ) {
y.value = ggg;
}
}

if (y.name == form_exch_pass) {
if(y.value == ) {
y.value = ggg;
}
}

if (y.name == form_permitted_rcv) {
//var a=y.createElement('option');
//a.name=TEST;
//y.focus();
y.add('Test',null);
alert(y.size);
}
}
  }
}


td%=Label_Protocol%/td
  td
%
  int intProtocol = Integer.parseInt(Value_Protocol);
%
select name=form_protocol 
onchange=CheckAuswahl(this.form) %=Label_State%


option % if ( intProtocol == sysProtocol_ZModem) {%selected%}%
value=%=sysProtocol_ZModem% 
%=Value_Protocol_ZModem%/option


---


Robert just looking at it... you passing a form element and the select in 
not in one...

Have a look at this example...

http://www.mredkj.com/tutorials/tutorial005.html

and Javascript is a mine field so get yourself FireFox at least and the 
plugin so you can see the whole DOM and what params are available...
Then make it work just in a normal HTML editor... then stick it in JSP... 
else its difficult...
Like for example... look at that example... can you see they making special 
allowances for IE... because microsoft are on their own mission.


Google for Javascript stuff... W3 Schools is quite good, but there are tons 
of tut sites out there
Javascript is something you really want to use in moderation... its not easy 
getting it cross browser compat...


And you'll get crapped out if you ask here ;)
Kinda fun though ;)

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---








-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]