Hi Mona -

I'm glad the javascript worked out for you, but now that I have a solid idea of what you're trying to do, I should tell you that what you're doing may not be a good idea. When you construct a URL and pass it to window.open or location.href=, you are issuing a GET request. GET requests are limited to about 2000 characters, which is much easier to hit than you might think. A better way might be to put those checkboxes in a form and then have your link work like this:

<form name="something" action="your.action.goes.here" method="post" target="_blank">
<!-- checkboxes here -->
</form>
<a href="document.myCheckboxesForm.submit();">click here</a>


If you need the link to display in a new window then include the target="_blank" in your form definition, or if it is supposed to go to the same window, get rid of target="_blank".

Matt

Alawadhi, Mona wrote:

Yes, that's right. I actually tried it - it works.
The hashMap is just to pass those parameters to the link.

For example, can't I have a Vector capturing all the employee Ids checked,
and then put the values of the Vector into a hashMap, to be able to pass the
params using the <html:link/> taglibs.

But the javascript way definately works.
Thank you, Matt

-----Original Message-----
From: Sgarlata Matt [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2003 11:00 AM
To: Struts Users Mailing List
Subject: Re: Vertical Checkboxes..


I'm kind of confused as to exactly what you are trying to do because you keep saying HashMap. I think what you want to do is write a JavaScript function that loops through all the checkboxes, determines which are checked, builds a URL based on the values that are checked, and then opens a new window using the URL that was built. Which part of that process are you having trouble with?


Assuming you build and return the URL using a javascript function named getUrL you can do something like the following:
<a href="javascript:location.href=getUrL();">click here</a>


Does that help? What are you trying to do?

Matt

Alawadhi, Mona wrote:


No, it's not magic at all. Yes, you're right. Many people don't 'view source' to see that.

Just like I applied the idea of the indexed properties( and I didn't know
about it before someone from this mailing list infromed me), I thought

that


there might be a taglib to use with the hashmap that I stored the

parameters


in.

Say we submit the page at the onclick of the link, or a button. How can I

do


that?

-----Original Message-----
From: Adam Levine [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2003 10:40 AM
To: [EMAIL PROTECTED]
Subject: RE: Vertical Checkboxes..


Struts taglibs is not some magical device, and I think this is a point

many


people don't quite realize. Struts taglibs allows you to programmatically


generate HTML components from within your JSP, pulling in data from your session object. Look at the pages that are rended -- it's just HTML. If


you can't do it within the confines of HTML/HTTP (and perhaps

javascript),


struts/taglibs isn't going to make it magically work.


From: "Alawadhi, Mona" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Subject: RE: Vertical Checkboxes.. Date: Thu, 14 Aug 2003 09:36:08 -0500

Yes, it works with JavaScript - I use an onclick method.
I was just wondering if there is a way to do it in struts taglibs.

I actually was thinking of doing it a different way: have an onclick

method


to submit the page as the user clicks on the link, at the same time put

all


of the checked parameters in a hashmap and pass them over.

Any other ideas?

-----Original Message-----
From: Adam Levine [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 14, 2003 10:32 AM
To: [EMAIL PROTECTED]
Subject: Re: Vertical Checkboxes..


How would you do this in CGI? or any other HTML/HTTP manipulator? You really can't.

If you want to submit information using a link (a href), that information
must already be built when the link is rendered.  This is a standard GET
format (ie,    a href="http://foo.com/submit.cgi?param1=blah&param2=boo";).

If you want to submit data that a user has manipulated, ie from a form,

you


must use a FORM structure and use a submit button so that you end up with

a


POST.

If you insist on using a link to submit entries a user has manipulated,
you're going to have to use JavaScript and essentially do a form

post/submit


when a link is clicked.

hth.


From: "Alawadhi, Mona" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Subject: Vertical Checkboxes.. Date: Thu, 14 Aug 2003 08:52:02 -0500

Hello Everyone,

I have a situation where I'm displaying fields in the JSP by iterating
through a Vector of an object (let's call it A)- in a table format.

At the beginning of each table row (which is a different A object), I have

a


checkbox. I set 'Employee ID' to be the value captured if the checkbox is
checked.

How can I capture the values of the checkboxes selected (meaning, all the
employee IDs selected) and have them be as parameters going to another
action through a link (a link, without submitting the page)?

Thank you in advance,

Mona




****************************************************************************


*
The information in this email is confidential and may be legally

privileged.


It is intended solely for the addressee. Access to this email by anyone

else


is unauthorized.

If you are not the intended recipient, any disclosure, copying,

distribution


or any action taken or omitted to be taken in reliance on it, is

prohibited


and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed

in


the governing KPMG client engagement letter.


****************************************************************************


*


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

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


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




****************************************************************************


*
The information in this email is confidential and may be legally

privileged.


It is intended solely for the addressee. Access to this email by anyone

else


is unauthorized.

If you are not the intended recipient, any disclosure, copying,

distribution


or any action taken or omitted to be taken in reliance on it, is

prohibited


and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed

in


the governing KPMG client engagement letter.


****************************************************************************


*


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

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



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




**************************************************************************** *

The information in this email is confidential and may be legally

privileged.


It is intended solely for the addressee. Access to this email by anyone

else


is unauthorized.

If you are not the intended recipient, any disclosure, copying,

distribution


or any action taken or omitted to be taken in reliance on it, is

prohibited


and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed

in


the governing KPMG client engagement letter.


**************************************************************************** *


--------------------------------------------------------------------- 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]


*****************************************************************************
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized.


If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter. *****************************************************************************



--------------------------------------------------------------------- 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]



Reply via email to