struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "raghu_c" <>
Subject RE: Submit issue for new form with struts
Date Thu, 05 Jun 2003 13:05:09 GMT

have a hard coded .do

the documnt.forms['frm'].submit throws a object doesnt support method or property
when used in conjunction with struts - it works fine with plain ol' html

essentially this is what i wish to do 

function fnOpenDetails(RecClicked,RecNum)
	var msgCategory = 'IS41';
	document.forms[0].strMessageCategory.value = msgCategory


I am unable to push the values i am setting in the script - eg intRecordCount 
into my FormBean
so i need a submit



> essentially a table of values (list of records) retrieved from the
> db - on the action of the first jsp
> on dbl clicking the list,

That still doesn't answer the question about text or text boxes, so for now
I'll assume this is text.

> i have a javascript function that captures the record index
> and tries opening another window(a popup type) that queries the db for
> further data based on the record dbl clicked,


> As of now, I am able to configure the submit by giving the
> instead of plain action="popupdetails" (w/o the '.do')
> this somehow calls the execute method of the corresponding action class!!

So you've hard-coded ".do" on your page?

> now, i have a different issue  :(
> i want to pass the record index into the popupdetails jsp
> and i do not want to construct a url with a request parameter since that
makes the url editable and all.
> i thought i will use a property of the originating jsp formbean to hold
the record index
> (of the dblclicked record - hidden variable and all)
> my doubt is : how can one set a property in the bean on dblclick of the

I posted some sample html yesterday that (almost) demonstrates how to do

<form name="frm" action="?same-page" method="GET">
<input type="hidden" name="action" value=""/>
<input type="checkbox" name="users" value="Test1">Test1<br>
<input type="checkbox" name="users" value="Test2">Test2<br>
<input type="checkbox" name="users" value="Test3">Test3<br>
<input type="checkbox" name="users" value="Test4">Test4<br>
<input type="checkbox" name="users" value="Test5">Test5<br>

<a href="JavaScript:doForm('users.actions.add')">Add</a> |
<a href="JavaScript:doForm('users.actions.delete')">Remove</a>

function doForm(action){


...modify this to work for your situation:
- add target="_new" to the form
- open your new window (with params) from the doForm function

> Or is there an alternative?
> Thanx in Advance,
> Raghu


James Mitchell
Software Developer/Struts Evangelist

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message