RE: Javascript question...

2003-11-05 Thread Ramadoss Chinnakuzhandai
Try this simple...

document.write('select NAME='+optionName+'');
document.write('option value=yearYear/option');
for (var i=(year-4);i(year+4);i++ ) {
document.write('option value=' + i +'' + i+'/option');
if(i==defaultValue) {
document.write('option value=' + i + ' selected' + i + 
'/option');
 }
}
document.write('/select');

-Ram


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 9:04 PM
To: Struts Users Mailing List
Subject: RE: Javascript question... 


Oh... thanks buddy... I actually created an option object and finished this... 
After you saying I checked and yes how stupid I am !!! simple mistakes need an other 
eye... Thanks again...
 
I did something like this -- this works fine too...
 
var s = document.forms[0];
 function generateYear(optionName,defaultValue) {
  var today = new Date();
  var year = today.getYear();
  document.write('select NAME='+optionName+'');
  document.write('option value=yearYear/option');
  for (var i=(year-4);i(year+4);i++ ) {
   if(defaultValue == i) {
yearOption = new Option();
yearOption.text= i; 
yearOption.value= i; 
s.elements[optionName].options[s.elements[optionName].options.length]=yearOption; 
yearOption.selected = true;
   } else {
document.write('option value='+i+''+i+'/option');
   }
  }
  document.write('/select');
 }

Joe Krause [EMAIL PROTECTED] wrote:
You need to put a space in front of the word selected. Right now your HTML
output will contain:

2005

This makes the value equal to 2005selected. By putting a space in between
the quote and the word selected - you will change the value to 2005 and
selected will be picked up correctly.

document.write('' + i + '');

You should put double quotes around the value parameter - its cleaner HTML:

document.write('' + i + '');

You might have to escape those - I'm not sure.

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 5:00 PM
To: Struts Users Mailing List
Subject: RE: Javascript question... 

Richard...

I find this list to be more user friendly in terms of responding to
questions... Also, not that I do not use Struts at all... for this
particular requirement of an old project under maintenance, I am trying to
do this... I consider this to be very much knowledge sharing list and hence
post questions whenever I have any... thanks is advance...

Now, getting back to your question... this is the code...


 function generateYear(optionName,defaultValue) {
  var today = new Date();
  var year = today.getYear();
  document.write('');
  document.write('Year');
  for (var i=(year-4);i   if(defaultValue == i) {
document.write('' + i+'');
   } else {
document.write('' + i+'');
   }
  }
document.write('');
 }



 generateYear(optStartDtYear,2005);



My idea is to make '2005' selected when the page loads... The above code
fails to make '2005' selected!!! If you can make me know the reason, it'd be
great... Thanks! 

Yee, Richard K,,DMDCWEST wrote:
Jacob,
You wrote: unfortunately we aren't using Struts here...?
If you aren't using Struts then
a) why are you asking this question on a Struts mailing list
b) What do you mean then when you write Now if I have values of day, month,
year executing an action. How can I default those values in the select
box???

Regards,

Richard


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Javascript question...

2003-11-05 Thread Yee, Richard K,,DMDCWEST
Jacob,
Have you considered using/writing a JSP custom tag to display the select
boxes and select an item for you? That way the page may still work if
JavaScript is turned off on the browser.

-Richard


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 5:00 PM
To: Struts Users Mailing List
Subject: RE: Javascript question... 


Richard...
 
I find this list to be more user friendly in terms of responding to
questions... Also, not that I do not use Struts at all... for this
particular requirement of an old project under maintenance, I am trying to
do this... I consider this to be very much knowledge sharing list and hence
post questions whenever I have any... thanks is advance...
 
Now, getting back to your question... this is the code...
 
script language=javascript
 function generateYear(optionName,defaultValue) {
  var today = new Date();
  var year = today.getYear();
  document.write('select NAME='+optionName+'');
  document.write('option value=yearYear/option');
  for (var i=(year-4);i(year+4);i++ ) {
   if(defaultValue == i) {
document.write('option value=' + i +'selected' + i+'/option');
   } else {
document.write('option value=' + i +'' + i+'/option');
   }
  }
document.write('/select');
 }

html
script language=javascript  generateYear(optStartDtYear,2005);
/script
/html
 
My idea is to make '2005' selected when the page loads... The above code
fails to make '2005' selected!!! If you can make me know the reason, it'd be
great... Thanks! 

Yee, Richard K,,DMDCWEST [EMAIL PROTECTED] wrote: Jacob, You wrote:
unfortunately we aren't using Struts here...? If you aren't using Struts
then
a) why are you asking this question on a Struts mailing list
b) What do you mean then when you write Now if I have values of day, month,
year executing an action. How can I default those values in the select
box???

Regards,

Richard


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Javascript question...

2003-11-04 Thread Jacob Wilson
Hi Folks...
One more javascript question...
 
I have a page that consists of date fields as select boxes... say optionDay, 
optionMonth, optionYear... I fill the selectboxes calling a javascript function... 
 
Now if I have values of day, month, year executing an action. How can I default those 
values in the select box??? I mean how can I make that particular option 'selected'??? 
I know we can do that by calling a funtion on the load event...
 
But, I don't want to do it that way as my body tag is generic across all pages...
I am trying something like this...
 
script language=javascript
 function generateYear(optionName,defaultValue) {
  var s = document.forms[0].elements[optionName];
  var today = new Date();
  var year = today.getYear();
  document.write('select NAME='+optionName+'');
  document.write('option value=yearYear/option');
  for (var i=(year-4);i(year+4);i++ ) {
   document.write('option value=' + i +'' + i+'/option');
  }
  document.write('/select');
 }

 function generateDay(optionName,defaultValue){
  document.write('select NAME='+optionName+'');
  document.write('option value=dayDay/option');
  for (var i=1;i=31;i++ ) {
   document.write('option value=' + i +'' + i+'/option');
  }
  document.write('/select');
 }

 function generateMonth(optionName,defaultValue){
  document.write('select NAME='+optionName+'');
  document.write('option value=monthMon/option');
  document.write('option value=01Jan/option');
  document.write('option value=02Feb/option');
  document.write('option value=03Mar/option');
  document.write('option value=04Apr/option');
  document.write('option value=05May/option');
  document.write('option value=06Jun/option');
  document.write('option value=07Jul/option');
  document.write('option value=08Aug/option');
  document.write('option value=09Sep/option');
  document.write('option value=10Oct/option');
  document.write('option value=11Nov/option');
  document.write('option value=12Dec/option');
  document.write('/select');
 }
/script
 
and in my html...
 
I say 
 
script language=javascript
 generateMonth(optStartDtMonth,12);
 generateDay(optStartDtDay,05);  
 generateYear(optStartDtYear,2000);
/script
 
I want to make 12, 05, 2000 selected on the load of the page... how do I do that???
 
I am trying doing something like this...
var s = document.forms[0].elements[optionName];
if ( s.options[i].value == defaultValue) {
   s.options[i].selected = true; 
}
 
On the click of some thing it works -- if I put the code in the generate year or month 
or day, if fails to recognize the form element!!!
 
Any suggestions appreciated...
 
Thanks in advance...
-Jacob


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

RE: Javascript question...

2003-11-04 Thread Yee, Richard K,,DMDCWEST
Jacob,
Why are you doing this in JavaScript to begin with? Why don't you use the
struts html tags to display the select boxes and populate the options lists
from collections. You can then set attributes in your form bean and have
these fields be defaulted automatically.

-Richard


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 4:06 PM
To: [EMAIL PROTECTED]
Subject: Javascript question... 


Hi Folks...
One more javascript question...
 
I have a page that consists of date fields as select boxes... say optionDay,
optionMonth, optionYear... I fill the selectboxes calling a javascript
function... 
 
Now if I have values of day, month, year executing an action. How can I
default those values in the select box??? I mean how can I make that
particular option 'selected'??? I know we can do that by calling a funtion
on the load event...
 
But, I don't want to do it that way as my body tag is generic across all
pages... I am trying something like this...
 
script language=javascript
 function generateYear(optionName,defaultValue) {
  var s = document.forms[0].elements[optionName];
  var today = new Date();
  var year = today.getYear();
  document.write('select NAME='+optionName+'');
  document.write('option value=yearYear/option');
  for (var i=(year-4);i(year+4);i++ ) {
   document.write('option value=' + i +'' + i+'/option');
  }
  document.write('/select');
 }

 function generateDay(optionName,defaultValue){
  document.write('select NAME='+optionName+'');
  document.write('option value=dayDay/option');
  for (var i=1;i=31;i++ ) {
   document.write('option value=' + i +'' + i+'/option');
  }
  document.write('/select');
 }

 function generateMonth(optionName,defaultValue){
  document.write('select NAME='+optionName+'');
  document.write('option value=monthMon/option');
  document.write('option value=01Jan/option');
  document.write('option value=02Feb/option');
  document.write('option value=03Mar/option');
  document.write('option value=04Apr/option');
  document.write('option value=05May/option');
  document.write('option value=06Jun/option');
  document.write('option value=07Jul/option');
  document.write('option value=08Aug/option');
  document.write('option value=09Sep/option');
  document.write('option value=10Oct/option');
  document.write('option value=11Nov/option');
  document.write('option value=12Dec/option');
  document.write('/select');
 }
/script
 
and in my html...
 
I say 
 
script language=javascript  generateMonth(optStartDtMonth,12);
 generateDay(optStartDtDay,05);  
 generateYear(optStartDtYear,2000);
/script
 
I want to make 12, 05, 2000 selected on the load of the page... how do I do
that???
 
I am trying doing something like this...
var s = document.forms[0].elements[optionName];
if ( s.options[i].value == defaultValue) {
   s.options[i].selected = true; 
}
 
On the click of some thing it works -- if I put the code in the generate
year or month or day, if fails to recognize the form element!!!
 
Any suggestions appreciated...
 
Thanks in advance...
-Jacob


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Javascript question...

2003-11-04 Thread Jacob Wilson
unfortunately we aren't using Struts here... This is an requirement that comes across 
all pages -- thinking of making it more generic and Im trying this...

Yee, Richard K,,DMDCWEST [EMAIL PROTECTED] wrote:Jacob,
Why are you doing this in JavaScript to begin with? Why don't you use the
struts html tags to display the select boxes and populate the options lists
from collections. You can then set attributes in your form bean and have
these fields be defaulted automatically.

-Richard


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 4:06 PM
To: [EMAIL PROTECTED]
Subject: Javascript question... 


Hi Folks...
One more javascript question...

I have a page that consists of date fields as select boxes... say optionDay,
optionMonth, optionYear... I fill the selectboxes calling a javascript
function... 

Now if I have values of day, month, year executing an action. How can I
default those values in the select box??? I mean how can I make that
particular option 'selected'??? I know we can do that by calling a funtion
on the load event...

But, I don't want to do it that way as my body tag is generic across all
pages... I am trying something like this...


 function generateYear(optionName,defaultValue) {
  var s = document.forms[0].elements[optionName];
  var today = new Date();
  var year = today.getYear();
  document.write('');
  document.write('Year');
  for (var i=(year-4);i   document.write('' + i+'');
  }
  document.write('');
 }

 function generateDay(optionName,defaultValue){
  document.write('');
  document.write('Day');
  for (var i=1;i   document.write('' + i+'');
  }
  document.write('');
 }

 function generateMonth(optionName,defaultValue){
  document.write('');
  document.write('Mon');
  document.write('Jan');
  document.write('Feb');
  document.write('Mar');
  document.write('Apr');
  document.write('May');
  document.write('Jun');
  document.write('Jul');
  document.write('Aug');
  document.write('Sep');
  document.write('Oct');
  document.write('Nov');
  document.write('Dec');
  document.write('');
 }


and in my html...

I say 

  generateMonth(optStartDtMonth,12);
 generateDay(optStartDtDay,05);  
 generateYear(optStartDtYear,2000);


I want to make 12, 05, 2000 selected on the load of the page... how do I do
that???

I am trying doing something like this...
var s = document.forms[0].elements[optionName];
if ( s.options[i].value == defaultValue) {
s.options[i].selected = true; 
}

On the click of some thing it works -- if I put the code in the generate
year or month or day, if fails to recognize the form element!!!

Any suggestions appreciated...

Thanks in advance...
-Jacob


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

RE: Javascript question...

2003-11-04 Thread Yee, Richard K,,DMDCWEST
Jacob,
You wrote: unfortunately we aren't using Struts here...?
If you aren't using Struts then
a) why are you asking this question on a Struts mailing list
b) What do you mean then when you write Now if I have values of day, month,
year executing an action. How can I default those values in the select
box???

Regards,

Richard


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 4:44 PM
To: Struts Users Mailing List
Subject: RE: Javascript question... 


unfortunately we aren't using Struts here... This is an requirement that
comes across all pages -- thinking of making it more generic and Im trying
this...

Yee, Richard K,,DMDCWEST [EMAIL PROTECTED] wrote:Jacob, Why are you
doing this in JavaScript to begin with? Why don't you use the struts html
tags to display the select boxes and populate the options lists from
collections. You can then set attributes in your form bean and have these
fields be defaulted automatically.

-Richard


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 4:06 PM
To: [EMAIL PROTECTED]
Subject: Javascript question... 


Hi Folks...
One more javascript question...

I have a page that consists of date fields as select boxes... say optionDay,
optionMonth, optionYear... I fill the selectboxes calling a javascript
function... 

Now if I have values of day, month, year executing an action. How can I
default those values in the select box??? I mean how can I make that
particular option 'selected'??? I know we can do that by calling a funtion
on the load event...

But, I don't want to do it that way as my body tag is generic across all
pages... I am trying something like this...


 function generateYear(optionName,defaultValue) {
  var s = document.forms[0].elements[optionName];
  var today = new Date();
  var year = today.getYear();
  document.write('');
  document.write('Year');
  for (var i=(year-4);i   document.write('' + i+'');
  }
  document.write('');
 }

 function generateDay(optionName,defaultValue){
  document.write('');
  document.write('Day');
  for (var i=1;i   document.write('' + i+'');
  }
  document.write('');
 }

 function generateMonth(optionName,defaultValue){
  document.write('');
  document.write('Mon');
  document.write('Jan');
  document.write('Feb');
  document.write('Mar');
  document.write('Apr');
  document.write('May');
  document.write('Jun');
  document.write('Jul');
  document.write('Aug');
  document.write('Sep');
  document.write('Oct');
  document.write('Nov');
  document.write('Dec');
  document.write('');
 }


and in my html...

I say 

  generateMonth(optStartDtMonth,12);
 generateDay(optStartDtDay,05);  
 generateYear(optStartDtYear,2000);


I want to make 12, 05, 2000 selected on the load of the page... how do I do
that???

I am trying doing something like this...
var s = document.forms[0].elements[optionName];
if ( s.options[i].value == defaultValue) { s.options[i].selected = true; 
}

On the click of some thing it works -- if I put the code in the generate
year or month or day, if fails to recognize the form element!!!

Any suggestions appreciated...

Thanks in advance...
-Jacob


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Javascript question...

2003-11-04 Thread Jacob Wilson
Richard...
 
I find this list to be more user friendly in terms of responding to questions... Also, 
not that I do not use Struts at all... for this particular requirement of an old 
project under maintenance, I am trying to do this... I consider this to be very much 
knowledge sharing list and hence post questions whenever I have any... thanks is 
advance...
 
Now, getting back to your question... this is the code...
 
script language=javascript
 function generateYear(optionName,defaultValue) {
  var today = new Date();
  var year = today.getYear();
  document.write('select NAME='+optionName+'');
  document.write('option value=yearYear/option');
  for (var i=(year-4);i(year+4);i++ ) {
   if(defaultValue == i) {
document.write('option value=' + i +'selected' + i+'/option');
   } else {
document.write('option value=' + i +'' + i+'/option');
   }
  }
document.write('/select');
 }

html
script language=javascript
 generateYear(optStartDtYear,2005);
/script
/html
 
My idea is to make '2005' selected when the page loads... The above code fails to make 
'2005' selected!!! If you can make me know the reason, it'd be great... Thanks! 

Yee, Richard K,,DMDCWEST [EMAIL PROTECTED] wrote:
Jacob,
You wrote: unfortunately we aren't using Struts here...?
If you aren't using Struts then
a) why are you asking this question on a Struts mailing list
b) What do you mean then when you write Now if I have values of day, month,
year executing an action. How can I default those values in the select
box???

Regards,

Richard


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

RE: Javascript question...

2003-11-04 Thread Joe Krause
You need to put a space in front of the word selected. Right now your HTML
output will contain:

option value=2005selected2005/option

This makes the value equal to 2005selected. By putting a space in between
the quote and the word selected - you will change the value to 2005 and
selected will be picked up correctly.

document.write('option value=' + i + ' selected' + i + '/option');

You should put double quotes around the value parameter - its cleaner HTML:

document.write('option value=' + i + ' selected' + i + '/option');

You might have to escape those - I'm not sure.

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 5:00 PM
To: Struts Users Mailing List
Subject: RE: Javascript question... 

Richard...
 
I find this list to be more user friendly in terms of responding to
questions... Also, not that I do not use Struts at all... for this
particular requirement of an old project under maintenance, I am trying to
do this... I consider this to be very much knowledge sharing list and hence
post questions whenever I have any... thanks is advance...
 
Now, getting back to your question... this is the code...
 
script language=javascript
 function generateYear(optionName,defaultValue) {
  var today = new Date();
  var year = today.getYear();
  document.write('select NAME='+optionName+'');
  document.write('option value=yearYear/option');
  for (var i=(year-4);i(year+4);i++ ) {
   if(defaultValue == i) {
document.write('option value=' + i +'selected' + i+'/option');
   } else {
document.write('option value=' + i +'' + i+'/option');
   }
  }
document.write('/select');
 }

html
script language=javascript
 generateYear(optStartDtYear,2005);
/script
/html
 
My idea is to make '2005' selected when the page loads... The above code
fails to make '2005' selected!!! If you can make me know the reason, it'd be
great... Thanks! 

Yee, Richard K,,DMDCWEST [EMAIL PROTECTED] wrote:
Jacob,
You wrote: unfortunately we aren't using Struts here...?
If you aren't using Struts then
a) why are you asking this question on a Struts mailing list
b) What do you mean then when you write Now if I have values of day, month,
year executing an action. How can I default those values in the select
box???

Regards,

Richard


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard


RE: Javascript question...

2003-11-04 Thread Jacob Wilson
Oh... thanks buddy... I actually created an option object and finished this... 
After you saying I checked and yes how stupid I am !!! simple mistakes need an other 
eye... Thanks again...
 
I did something like this -- this works fine too...
 
var s = document.forms[0];
 function generateYear(optionName,defaultValue) {
  var today = new Date();
  var year = today.getYear();
  document.write('select NAME='+optionName+'');
  document.write('option value=yearYear/option');
  for (var i=(year-4);i(year+4);i++ ) {
   if(defaultValue == i) {
yearOption = new Option();
yearOption.text= i; 
yearOption.value= i; 
s.elements[optionName].options[s.elements[optionName].options.length]=yearOption; 
yearOption.selected = true;
   } else {
document.write('option value='+i+''+i+'/option');
   }
  }
  document.write('/select');
 }

Joe Krause [EMAIL PROTECTED] wrote:
You need to put a space in front of the word selected. Right now your HTML
output will contain:

2005

This makes the value equal to 2005selected. By putting a space in between
the quote and the word selected - you will change the value to 2005 and
selected will be picked up correctly.

document.write('' + i + '');

You should put double quotes around the value parameter - its cleaner HTML:

document.write('' + i + '');

You might have to escape those - I'm not sure.

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 5:00 PM
To: Struts Users Mailing List
Subject: RE: Javascript question... 

Richard...

I find this list to be more user friendly in terms of responding to
questions... Also, not that I do not use Struts at all... for this
particular requirement of an old project under maintenance, I am trying to
do this... I consider this to be very much knowledge sharing list and hence
post questions whenever I have any... thanks is advance...

Now, getting back to your question... this is the code...


 function generateYear(optionName,defaultValue) {
  var today = new Date();
  var year = today.getYear();
  document.write('');
  document.write('Year');
  for (var i=(year-4);i   if(defaultValue == i) {
document.write('' + i+'');
   } else {
document.write('' + i+'');
   }
  }
document.write('');
 }



 generateYear(optStartDtYear,2005);



My idea is to make '2005' selected when the page loads... The above code
fails to make '2005' selected!!! If you can make me know the reason, it'd be
great... Thanks! 

Yee, Richard K,,DMDCWEST wrote:
Jacob,
You wrote: unfortunately we aren't using Struts here...?
If you aren't using Struts then
a) why are you asking this question on a Struts mailing list
b) What do you mean then when you write Now if I have values of day, month,
year executing an action. How can I default those values in the select
box???

Regards,

Richard


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

RE: [OT] RE: javascript question...

2003-10-30 Thread Paul McCulloch
I'm pretty sure you can do it:

  var newwin=window.open(a.html?Name= + namVal);


Paul

-Original Message-
From: James Childers [mailto:[EMAIL PROTECTED]
Sent: 29 October 2003 21:41
To: Struts Users Mailing List
Subject: [OT] RE: javascript question...


No, you can't do it that way. But you could create an otherwise unused
hidden form element in your parent document, set it with the value you want
from within your JavaScript function, and then reference that value from the
child window.

-= J

 -Original Message-
 From: Jacob Wilson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2003 3:37 PM
 To: [EMAIL PROTECTED]
 Subject: javascript question...
 
 
 Hi...
  
 Is it possible to send a value of a form element from the 
 parent window to the child window like this???
  
 script
 function go() {
  var namVal = document.fm1.txtName.value;
  var newwin=window.open(a.html?Name=namVal);
 }
 /script
  
 form name=fm1 onSubmit=go()
  input type=text name=txtName 
  input type=submit value=go
 /form
  
 The above does not work... it will give me 'namVal' as the 
 value rather than the actual typed in value when I try to get 
 request.getParameter
  
 How can I achieve this functionality??? I need to pass a form 
 element value when opening a new window. This value is 
 essential at this point coz I perform an action based on this 
 value and then bring the pop up page
  
 Suggestions requested please...
  
 Thanks!
  
 Jacob
 
 
 -
 Do you Yahoo!?
 Exclusive Video Premiere - Britney Spears
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: javascript question...

2003-10-30 Thread Syed, Nazeer
Try this 


script
function go() {
 var namVal = document.fm1.txtName.value;
 var newwin=window.open(a.html?Name=+namVal);
}
/script




Thanks
Nazeer


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2003 4:37 PM
To: [EMAIL PROTECTED]
Subject: javascript question...

Hi...
 
Is it possible to send a value of a form element from the parent window
to the child window like this???
 
script
function go() {
 var namVal = document.fm1.txtName.value;
 var newwin=window.open(a.html?Name=namVal);
}
/script
 
form name=fm1 onSubmit=go()
 input type=text name=txtName 
 input type=submit value=go
/form
 
The above does not work... it will give me 'namVal' as the value rather
than the actual typed in value when I try to get
request.getParameter
 
How can I achieve this functionality??? I need to pass a form element
value when opening a new window. This value is essential at this point
coz I perform an action based on this value and then bring the pop up
page
 
Suggestions requested please...
 
Thanks!
 
Jacob


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



javascript question...

2003-10-29 Thread Jacob Wilson
Hi...
 
Is it possible to send a value of a form element from the parent window to the child 
window like this???
 
script
function go() {
 var namVal = document.fm1.txtName.value;
 var newwin=window.open(a.html?Name=namVal);
}
/script
 
form name=fm1 onSubmit=go()
 input type=text name=txtName 
 input type=submit value=go
/form
 
The above does not work... it will give me 'namVal' as the value rather than the 
actual typed in value when I try to get request.getParameter
 
How can I achieve this functionality??? I need to pass a form element value when 
opening a new window. This value is essential at this point coz I perform an action 
based on this value and then bring the pop up page
 
Suggestions requested please...
 
Thanks!
 
Jacob


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

[OT] RE: javascript question...

2003-10-29 Thread James Childers
No, you can't do it that way. But you could create an otherwise unused hidden form 
element in your parent document, set it with the value you want from within your 
JavaScript function, and then reference that value from the child window.

-= J

 -Original Message-
 From: Jacob Wilson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2003 3:37 PM
 To: [EMAIL PROTECTED]
 Subject: javascript question...
 
 
 Hi...
  
 Is it possible to send a value of a form element from the 
 parent window to the child window like this???
  
 script
 function go() {
  var namVal = document.fm1.txtName.value;
  var newwin=window.open(a.html?Name=namVal);
 }
 /script
  
 form name=fm1 onSubmit=go()
  input type=text name=txtName 
  input type=submit value=go
 /form
  
 The above does not work... it will give me 'namVal' as the 
 value rather than the actual typed in value when I try to get 
 request.getParameter
  
 How can I achieve this functionality??? I need to pass a form 
 element value when opening a new window. This value is 
 essential at this point coz I perform an action based on this 
 value and then bring the pop up page
  
 Suggestions requested please...
  
 Thanks!
  
 Jacob
 
 
 -
 Do you Yahoo!?
 Exclusive Video Premiere - Britney Spears
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: javascript question...

2003-10-29 Thread Prashanth Narayanan
try 
var newwin=window.open(a.html?Name=+namVal);

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 4:37 PM
To: [EMAIL PROTECTED]
Subject: javascript question...


Hi...
 
Is it possible to send a value of a form element from the parent window to
the child window like this???
 
script
function go() {
 var namVal = document.fm1.txtName.value;
 var newwin=window.open(a.html?Name=namVal);
}
/script
 
form name=fm1 onSubmit=go()
 input type=text name=txtName 
 input type=submit value=go
/form
 
The above does not work... it will give me 'namVal' as the value rather than
the actual typed in value when I try to get request.getParameter
 
How can I achieve this functionality??? I need to pass a form element value
when opening a new window. This value is essential at this point coz I
perform an action based on this value and then bring the pop up page
 
Suggestions requested please...
 
Thanks!
 
Jacob


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: javascript question...

2003-10-29 Thread Jacob Wilson
Thanks Narayanan -- I tried this b4, but this will throw an error... Actually, you 
need to pass a total string into the open method

Prashanth Narayanan [EMAIL PROTECTED] wrote:try 
var newwin=window.open(a.html?Name=+namVal);

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 4:37 PM
To: [EMAIL PROTECTED]
Subject: javascript question...


Hi...

Is it possible to send a value of a form element from the parent window to
the child window like this???


function go() {
 var namVal = document.fm1.txtName.value;
 var newwin=window.open(a.html?Name=namVal);
}



 [input] 
 [input] 


The above does not work... it will give me 'namVal' as the value rather than
the actual typed in value when I try to get request.getParameter

How can I achieve this functionality??? I need to pass a form element value
when opening a new window. This value is essential at this point coz I
perform an action based on this value and then bring the pop up page

Suggestions requested please...

Thanks!

Jacob


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

Re: [OT] RE: javascript question...

2003-10-29 Thread Jacob Wilson
You are right... We can reference it using the window opener event and get the value 
in the child window...
 
But, my problem is that -- inorder to populate the child window I need to execute an 
action and fetch values from the backend using this value... 
 
Is there any other way to solve this???

James Childers [EMAIL PROTECTED] wrote:
No, you can't do it that way. But you could create an otherwise unused hidden form 
element in your parent document, set it with the value you want from within your 
JavaScript function, and then reference that value from the child window.

-= J

 -Original Message-
 From: Jacob Wilson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2003 3:37 PM
 To: [EMAIL PROTECTED]
 Subject: javascript question...
 
 
 Hi...
 
 Is it possible to send a value of a form element from the 
 parent window to the child window like this???
 

 function go() {
  var namVal = document.fm1.txtName.value;
  var newwin=window.open(a.html?Name=namVal);
 }
  
 
 
  [input] 
  [input] 
 
 
 The above does not work... it will give me 'namVal' as the 
 value rather than the actual typed in value when I try to get 
 request.getParameter
 
 How can I achieve this functionality??? I need to pass a form 
 element value when opening a new window. This value is 
 essential at this point coz I perform an action based on this 
 value and then bring the pop up page
 
 Suggestions requested please...
 
 Thanks!
 
 Jacob
 
 
 -
 Do you Yahoo!?
 Exclusive Video Premiere - Britney Spears
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

RE: [OT] javascript question...

2003-10-29 Thread Rabago, Hubert
What error were you getting here?

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2003 3:44 PM
To: Struts Users Mailing List
Subject: RE: javascript question...


Thanks Narayanan -- I tried this b4, but this will throw an error...
Actually, you need to pass a total string into the open method

Prashanth Narayanan [EMAIL PROTECTED] wrote:
try 
var newwin=window.open(a.html?Name=+namVal);

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 4:37 PM
To: [EMAIL PROTECTED]
Subject: javascript question...


Hi...

Is it possible to send a value of a form element from the parent window
to the child window like this???


function go() {
 var namVal = document.fm1.txtName.value;
 var newwin=window.open(a.html?Name=namVal);
}



 [input] 
 [input] 


The above does not work... it will give me 'namVal' as the value rather
than the actual typed in value when I try to get
request.getParameter

How can I achieve this functionality??? I need to pass a form element
value when opening a new window. This value is essential at this point
coz I perform an action based on this value and then bring the pop up
page

Suggestions requested please...

Thanks!

Jacob


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: javascript question...

2003-10-29 Thread Prashanth Narayanan
actually you can - just not the way i said it though ... sorry

try this ...

function go() {
 
 var namVal = document.fm1.txtName.value;
 var newWinStr = 'a.html?Name='+namVal;
 var newwin=window.open(newWinStr);
}

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 4:44 PM
To: Struts Users Mailing List
Subject: RE: javascript question...


Thanks Narayanan -- I tried this b4, but this will throw an error...
Actually, you need to pass a total string into the open method

Prashanth Narayanan [EMAIL PROTECTED] wrote:try 
var newwin=window.open(a.html?Name=+namVal);

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 4:37 PM
To: [EMAIL PROTECTED]
Subject: javascript question...


Hi...

Is it possible to send a value of a form element from the parent window to
the child window like this???


function go() {
 var namVal = document.fm1.txtName.value;
 var newwin=window.open(a.html?Name=namVal);
}



 [input] 
 [input] 


The above does not work... it will give me 'namVal' as the value rather than
the actual typed in value when I try to get request.getParameter

How can I achieve this functionality??? I need to pass a form element value
when opening a new window. This value is essential at this point coz I
perform an action based on this value and then bring the pop up page

Suggestions requested please...

Thanks!

Jacob


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] javascript question...

2003-10-29 Thread Jacob Wilson
Im sorry guys... this way works... 
 
var newwin=window.open(a.html?Name=+namVal);



Rabago, Hubert [EMAIL PROTECTED] wrote:
What error were you getting here?

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2003 3:44 PM
To: Struts Users Mailing List
Subject: RE: javascript question...


Thanks Narayanan -- I tried this b4, but this will throw an error...
Actually, you need to pass a total string into the open method

Prashanth Narayanan 
wrote:
try 
var newwin=window.open(a.html?Name=+namVal);

-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 4:37 PM
To: [EMAIL PROTECTED]
Subject: javascript question...


Hi...

Is it possible to send a value of a form element from the parent window
to the child window like this???


function go() {
var namVal = document.fm1.txtName.value;
var newwin=window.open(a.html?Name=namVal);
}



[input] 
[input] 


The above does not work... it will give me 'namVal' as the value rather
than the actual typed in value when I try to get
request.getParameter

How can I achieve this functionality??? I need to pass a form element
value when opening a new window. This value is essential at this point
coz I perform an action based on this value and then bring the pop up
page

Suggestions requested please...

Thanks!

Jacob


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

[OT] off topic, but I have a quick JavaScript question please...

2003-09-26 Thread Mick Knutson
I have a function function tooltips() and the call to that function is return 
tooltip('tooltip.msg.name', 'tooltip.title.name');

in my function, how do I access each of the arguments? Is it something like args[0], 
and args[1]?

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---


RE: [OT] off topic, but I have a quick JavaScript question please...

2003-09-26 Thread Daniel Smeltzer
In your function definition, just declare the input parameters and use
those names to refer to them, i.e.:

Function tooltips(message, title) {
  // now the input parameters are available as message and title
}

Daniel

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 26, 2003 10:50 AM
To: struts
Subject: [OT] off topic, but I have a quick JavaScript question
please...


I have a function function tooltips() and the call to that function is
return tooltip('tooltip.msg.name', 'tooltip.title.name');

in my function, how do I access each of the arguments? Is it something
like args[0], and args[1]?

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---



Statement of Confidentiality

This e-mail message, and any attachments, is confidential and is intended solely for 
the addressees named above.  If you are not a named recipient, an individual 
specifically authorized to receive this communication, or if this message has been 
addressed to you in error, do not read, disclose, reproduce,  or otherwise use this 
transmission in any manner.  If you have received this transmission in error, please 
alert the sender by replying to the e-mail or by contacting the sender by phone.  We 
also request that you immediately delete this message, and attachments, if any.  This 
disclaimer shall not be construed in any way to grant permission to transmit 
confidential information via this firm's e-mail system. 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] off topic, but I have a quick JavaScript question please...

2003-09-26 Thread Kevin Peters
There should be an arguments object.  Try arguments[0] and arguments[1].

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 11:50 AM
To: struts
Subject: [OT] off topic, but I have a quick JavaScript question
please...


I have a function function tooltips() and the call to that function is return 
tooltip('tooltip.msg.name', 'tooltip.title.name');

in my function, how do I access each of the arguments? Is it something like args[0], 
and args[1]?

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] off topic, but I have a quick JavaScript question please...

2003-09-26 Thread Mick Knutson
Thank you, but now another issue:

How do I dynamically use that argument in my bean:message???

function tooltip( tooltip_key )
{
return overlib(  'bean:message key=tooltip_key
bundle=TOOLTIP_RESOURCES_KEY /'
, STICKY, CAPTION
, 'bean:message key= +tooltip_key + 
bundle=TOOLTIP_RESOURCES_KEY /'
, CENTER
  );
}


---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---

- Original Message - 
From: Daniel Smeltzer [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, September 26, 2003 8:52 AM
Subject: RE: [OT] off topic, but I have a quick JavaScript question
please...


In your function definition, just declare the input parameters and use
those names to refer to them, i.e.:

Function tooltips(message, title) {
  // now the input parameters are available as message and title
}

Daniel

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 10:50 AM
To: struts
Subject: [OT] off topic, but I have a quick JavaScript question
please...


I have a function function tooltips() and the call to that function is
return tooltip('tooltip.msg.name', 'tooltip.title.name');

in my function, how do I access each of the arguments? Is it something
like args[0], and args[1]?

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---



Statement of Confidentiality

This e-mail message, and any attachments, is confidential and is intended
solely for the addressees named above.  If you are not a named recipient, an
individual specifically authorized to receive this communication, or if this
message has been addressed to you in error, do not read, disclose,
reproduce,  or otherwise use this transmission in any manner.  If you have
received this transmission in error, please alert the sender by replying to
the e-mail or by contacting the sender by phone.  We also request that you
immediately delete this message, and attachments, if any.  This disclaimer
shall not be construed in any way to grant permission to transmit
confidential information via this firm's e-mail system.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] off topic, but I have a quick JavaScript question please...

2003-09-26 Thread Daniel Smeltzer
Well, the bean:message tag would need to be where the function is
called, not where it is defined.  The struts tags will execute on the
server side and the JavaScript executes on the client side.  When the
JavaScript runs, all the struts tags will have been executed and
converted into text.  So, you'd need something like:

function tooltip(message) {
return overlib(message, STICKY, CAPTION, message, CENTER);
}


And somewhere else:

... onMouseOver=return tooltip('bean:message key=tooltip_key
bundle=TOOLTIP_RESOURCES_KEY/') ...


Daniel

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 26, 2003 10:59 AM
To: Struts Users Mailing List
Subject: Re: [OT] off topic, but I have a quick JavaScript question
please...


Thank you, but now another issue:

How do I dynamically use that argument in my bean:message???

function tooltip( tooltip_key )
{
return overlib(  'bean:message key=tooltip_key
bundle=TOOLTIP_RESOURCES_KEY /'
, STICKY, CAPTION
, 'bean:message key= +tooltip_key + 
bundle=TOOLTIP_RESOURCES_KEY /'
, CENTER
  );
}


---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---

- Original Message - 
From: Daniel Smeltzer [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, September 26, 2003 8:52 AM
Subject: RE: [OT] off topic, but I have a quick JavaScript question
please...


In your function definition, just declare the input parameters and use
those names to refer to them, i.e.:

Function tooltips(message, title) {
  // now the input parameters are available as message and title }

Daniel

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 10:50 AM
To: struts
Subject: [OT] off topic, but I have a quick JavaScript question
please...


I have a function function tooltips() and the call to that function is
return tooltip('tooltip.msg.name', 'tooltip.title.name');

in my function, how do I access each of the arguments? Is it something
like args[0], and args[1]?

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---



Statement of Confidentiality

This e-mail message, and any attachments, is confidential and is
intended solely for the addressees named above.  If you are not a named
recipient, an individual specifically authorized to receive this
communication, or if this message has been addressed to you in error, do
not read, disclose, reproduce,  or otherwise use this transmission in
any manner.  If you have received this transmission in error, please
alert the sender by replying to the e-mail or by contacting the sender
by phone.  We also request that you immediately delete this message, and
attachments, if any.  This disclaimer shall not be construed in any way
to grant permission to transmit confidential information via this firm's
e-mail system.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Statement of Confidentiality

This e-mail message, and any attachments, is confidential and is intended solely for 
the addressees named above.  If you are not a named recipient, an individual 
specifically authorized to receive this communication, or if this message has been 
addressed to you in error, do not read, disclose, reproduce,  or otherwise use this 
transmission in any manner.  If you have received this transmission in error, please 
alert the sender by replying to the e-mail or by contacting the sender by phone.  We 
also request that you immediately delete this message, and attachments, if any.  This 
disclaimer shall not be construed in any way to grant permission to transmit 
confidential information via this firm's e-mail system. 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] off topic, but I have a quick JavaScript question please...

2003-09-26 Thread Mick Knutson
It just makes my code much cleaner inside my function. But I do understand
the way you described.

Thanks

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---

- Original Message - 
From: Daniel Smeltzer [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, September 26, 2003 9:06 AM
Subject: RE: [OT] off topic, but I have a quick JavaScript question
please...


Well, the bean:message tag would need to be where the function is
called, not where it is defined.  The struts tags will execute on the
server side and the JavaScript executes on the client side.  When the
JavaScript runs, all the struts tags will have been executed and
converted into text.  So, you'd need something like:

function tooltip(message) {
return overlib(message, STICKY, CAPTION, message, CENTER);
}


And somewhere else:

... onMouseOver=return tooltip('bean:message key=tooltip_key
bundle=TOOLTIP_RESOURCES_KEY/') ...


Daniel

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 10:59 AM
To: Struts Users Mailing List
Subject: Re: [OT] off topic, but I have a quick JavaScript question
please...


Thank you, but now another issue:

How do I dynamically use that argument in my bean:message???

function tooltip( tooltip_key )
{
return overlib(  'bean:message key=tooltip_key
bundle=TOOLTIP_RESOURCES_KEY /'
, STICKY, CAPTION
, 'bean:message key= +tooltip_key + 
bundle=TOOLTIP_RESOURCES_KEY /'
, CENTER
  );
}


---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---

- Original Message - 
From: Daniel Smeltzer [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, September 26, 2003 8:52 AM
Subject: RE: [OT] off topic, but I have a quick JavaScript question
please...


In your function definition, just declare the input parameters and use
those names to refer to them, i.e.:

Function tooltips(message, title) {
  // now the input parameters are available as message and title }

Daniel

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 10:50 AM
To: struts
Subject: [OT] off topic, but I have a quick JavaScript question
please...


I have a function function tooltips() and the call to that function is
return tooltip('tooltip.msg.name', 'tooltip.title.name');

in my function, how do I access each of the arguments? Is it something
like args[0], and args[1]?

---
Thanks
Mick Knutson
http://www.baselogic.com

+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---



Statement of Confidentiality

This e-mail message, and any attachments, is confidential and is
intended solely for the addressees named above.  If you are not a named
recipient, an individual specifically authorized to receive this
communication, or if this message has been addressed to you in error, do
not read, disclose, reproduce,  or otherwise use this transmission in
any manner.  If you have received this transmission in error, please
alert the sender by replying to the e-mail or by contacting the sender
by phone.  We also request that you immediately delete this message, and
attachments, if any.  This disclaimer shall not be construed in any way
to grant permission to transmit confidential information via this firm's
e-mail system.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Statement of Confidentiality

This e-mail message, and any attachments, is confidential and is intended
solely for the addressees named above.  If you are not a named recipient, an
individual specifically authorized to receive this communication, or if this
message has been addressed to you in error, do not read, disclose,
reproduce,  or otherwise use this transmission in any manner.  If you have
received this transmission in error, please alert the sender by replying to
the e-mail or by contacting the sender by phone.  We also request that you
immediately delete this message, and attachments, if any.  This disclaimer
shall not be construed in any way to grant permission to transmit
confidential information via this firm's e-mail system.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] off topic, but I have a quick JavaScript question please...

2003-09-26 Thread Jason Lea
If you are not worried about older browsers there is another way to get 
tooltips without using JavaScript.  Browsers with good HTML4.01 support 
will display 'title' attributes as tooltips.  Form tags (and lots of 
other tags in HTML 4.01) allow you to specify a title.

If you use Struts tags you can use 'titleKey' to look up the key from 
the message bundle...  eg

html:text property=name titleKey=tooltip.title.name/

Mick Knutson wrote:
It just makes my code much cleaner inside my function. But I do understand
the way you described.
Thanks

---
Thanks
Mick Knutson
http://www.baselogic.com
+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---
- Original Message - 
From: Daniel Smeltzer [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, September 26, 2003 9:06 AM
Subject: RE: [OT] off topic, but I have a quick JavaScript question
please...

Well, the bean:message tag would need to be where the function is
called, not where it is defined.  The struts tags will execute on the
server side and the JavaScript executes on the client side.  When the
JavaScript runs, all the struts tags will have been executed and
converted into text.  So, you'd need something like:
function tooltip(message) {
return overlib(message, STICKY, CAPTION, message, CENTER);
}
And somewhere else:

... onMouseOver=return tooltip('bean:message key=tooltip_key
bundle=TOOLTIP_RESOURCES_KEY/') ...
Daniel

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 10:59 AM
To: Struts Users Mailing List
Subject: Re: [OT] off topic, but I have a quick JavaScript question
please...
Thank you, but now another issue:

How do I dynamically use that argument in my bean:message???

function tooltip( tooltip_key )
{
return overlib(  'bean:message key=tooltip_key
bundle=TOOLTIP_RESOURCES_KEY /'
, STICKY, CAPTION
, 'bean:message key= +tooltip_key + 
bundle=TOOLTIP_RESOURCES_KEY /'
, CENTER
  );
}
---
Thanks
Mick Knutson
http://www.baselogic.com
+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---
- Original Message - 
From: Daniel Smeltzer [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, September 26, 2003 8:52 AM
Subject: RE: [OT] off topic, but I have a quick JavaScript question
please...

In your function definition, just declare the input parameters and use
those names to refer to them, i.e.:
Function tooltips(message, title) {
  // now the input parameters are available as message and title }
Daniel

-Original Message-
From: Mick Knutson [mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 10:50 AM
To: struts
Subject: [OT] off topic, but I have a quick JavaScript question
please...
I have a function function tooltips() and the call to that function is
return tooltip('tooltip.msg.name', 'tooltip.title.name');
in my function, how do I access each of the arguments? Is it something
like args[0], and args[1]?
---
Thanks
Mick Knutson
http://www.baselogic.com
+001(805) 563-0666 Office
+001 (708) 570-2772 Fax
---


--
Jason Lea
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Struts and Javascript question

2001-11-13 Thread Nocera, Robert

Hello all,

I was wondering if anyone knows how to access a form element in javascript
that has a . in the name of it.

For example, if I have a data bean included in a form beanm, I can access
fields in the data bean through tags using the . notation as:
html:text property=data.fieldname /
This create an input text box with the name data.fieldname.
How can I access that object in Javascript?

var mydataobj = document.formname.data.fieldname;

doesn't work because the dot seems to be throwing off the parser (at least
in IE 5.0).

Any ideas besides creating an accessor in the form bean itself?

Thanks,
Rob


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. 
It is intended for the addressee(s) only. Access to this E-mail by anyone else is 
unauthorized. If you are not an addressee, any disclosure or copying of the contents 
of this E-mail or any action taken (or not taken) in reliance on it is unauthorized 
and may be unlawful. If you are not an addressee, please inform the sender immediately.

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Struts and Javascript question

2001-11-13 Thread Anil Kumar Kona

May be u can try something like this

var doneForm = document.getElementById('doneForm');

doneForm.elements['data.fieldName'].value

-Anil


-Original Message-
From: Nocera, Robert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 1:47 PM
To: Struts Users Mailing List (E-mail)
Subject: Struts and Javascript question


Hello all,

I was wondering if anyone knows how to access a form element in javascript
that has a . in the name of it.

For example, if I have a data bean included in a form beanm, I can access
fields in the data bean through tags using the . notation as:
html:text property=data.fieldname /
This create an input text box with the name data.fieldname.
How can I access that object in Javascript?

var mydataobj = document.formname.data.fieldname;

doesn't work because the dot seems to be throwing off the parser (at least
in IE 5.0).

Any ideas besides creating an accessor in the form bean itself?

Thanks,
Rob


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be
privileged. It is intended for the addressee(s) only. Access to this E-mail
by anyone else is unauthorized. If you are not an addressee, any disclosure
or copying of the contents of this E-mail or any action taken (or not taken)
in reliance on it is unauthorized and may be unlawful. If you are not an
addressee, please inform the sender immediately.

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Struts and Javascript question

2001-11-13 Thread Jon Wall

Hi Rob - 

Haven't tried tried this with dots, but I had this
problem a long time ago with spaces.  Here's the three
ways (that I know of) to access a form element in
JavaScript:

document.formname.fieldname
document.formname.elements[fieldnum]
document.formname.elements['fieldname']

Using the field number is probably way too brittle for
your purposes, so I'd stick with:

document.formname.elements['data.fieldname']


FYI - you can do this with any javascript object. Chew
on that for a bit, when I did I had a javascript
object model epiphany.  

Hope this helps,
-jon


--- Nocera, Robert [EMAIL PROTECTED]
wrote:
 Hello all,
 
 I was wondering if anyone knows how to access a form
 element in javascript
 that has a . in the name of it.
 
 For example, if I have a data bean included in a
 form beanm, I can access
 fields in the data bean through tags using the .
 notation as:
 html:text property=data.fieldname /
 This create an input text box with the name
 data.fieldname.
 How can I access that object in Javascript?
 
 var mydataobj = document.formname.data.fieldname;
 
 doesn't work because the dot seems to be throwing
 off the parser (at least
 in IE 5.0).
 
 Any ideas besides creating an accessor in the form
 bean itself?
 
 Thanks,
 Rob
 
 
 LEGAL NOTICE
 Unless expressly stated otherwise, this message is
 confidential and may be privileged. It is intended
 for the addressee(s) only. Access to this E-mail by
 anyone else is unauthorized. If you are not an
 addressee, any disclosure or copying of the contents
 of this E-mail or any action taken (or not taken) in
 reliance on it is unauthorized and may be unlawful.
 If you are not an addressee, please inform the
 sender immediately.
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Struts and Javascript question

2001-11-13 Thread Nekkalapudi, Viplava

You can try passing field using this.
And get the object name mapped to this.
Something like this:

function getObject(myField) {
// myField is your dataObject
} 

And in form use this as the parameter to JavaScript.
html:text proeprty=data.fieldname onBlur=getObject(this) /

-- Viplava

-Original Message-
From: Nocera, Robert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 3:47 PM
To: Struts Users Mailing List (E-mail)
Subject: Struts and Javascript question


Hello all,

I was wondering if anyone knows how to access a form element in javascript
that has a . in the name of it.

For example, if I have a data bean included in a form beanm, I can access
fields in the data bean through tags using the . notation as:
html:text property=data.fieldname /
This create an input text box with the name data.fieldname.
How can I access that object in Javascript?

var mydataobj = document.formname.data.fieldname;

doesn't work because the dot seems to be throwing off the parser (at least
in IE 5.0).

Any ideas besides creating an accessor in the form bean itself?

Thanks,
Rob


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be
privileged. It is intended for the addressee(s) only. Access to this E-mail
by anyone else is unauthorized. If you are not an addressee, any disclosure
or copying of the contents of this E-mail or any action taken (or not taken)
in reliance on it is unauthorized and may be unlawful. If you are not an
addressee, please inform the sender immediately.

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Struts and Javascript question

2001-11-13 Thread Nocera, Robert


Thanks all, that did it.
I wasn't familiar with the document.formname.elements['fieldname'] notation.

-Rob

-Original Message-
From: Jon Wall [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 13, 2001 4:56 PM
To: Struts Users Mailing List
Subject: Re: Struts and Javascript question


Hi Rob - 

Haven't tried tried this with dots, but I had this
problem a long time ago with spaces.  Here's the three
ways (that I know of) to access a form element in
JavaScript:

document.formname.fieldname
document.formname.elements[fieldnum]
document.formname.elements['fieldname']

Using the field number is probably way too brittle for
your purposes, so I'd stick with:

document.formname.elements['data.fieldname']


FYI - you can do this with any javascript object. Chew
on that for a bit, when I did I had a javascript
object model epiphany.  

Hope this helps,
-jon


--- Nocera, Robert [EMAIL PROTECTED]
wrote:
 Hello all,
 
 I was wondering if anyone knows how to access a form
 element in javascript
 that has a . in the name of it.
 
 For example, if I have a data bean included in a
 form beanm, I can access
 fields in the data bean through tags using the .
 notation as:
 html:text property=data.fieldname /
 This create an input text box with the name
 data.fieldname.
 How can I access that object in Javascript?
 
 var mydataobj = document.formname.data.fieldname;
 
 doesn't work because the dot seems to be throwing
 off the parser (at least
 in IE 5.0).
 
 Any ideas besides creating an accessor in the form
 bean itself?
 
 Thanks,
 Rob
 
 
 LEGAL NOTICE
 Unless expressly stated otherwise, this message is
 confidential and may be privileged. It is intended
 for the addressee(s) only. Access to this E-mail by
 anyone else is unauthorized. If you are not an
 addressee, any disclosure or copying of the contents
 of this E-mail or any action taken (or not taken) in
 reliance on it is unauthorized and may be unlawful.
 If you are not an addressee, please inform the
 sender immediately.
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]