Yes, I am referencing 0 and 1 because I am running both forms on the same
page (simultaneously).
The 0 is for the struts form and the 1 is for the non-struts form.
I can programmatically, submit no problem on the non-struts form but not on
the struts form.

The struts form tag in the generated html looks like this:

<form name="personalInfoForm" method="POST"
action="/LAPS1/VirtualClassroomWAR/editPersonalInfo.do" id="form1">

the non-struts form looks like this:

<form id=f1>

Because I can submit the second form using the index 1, this means that the
page recognizes that there is something in position 0, but that it seems
that it has somehow been rendered in such a way that it can't be
programmatically submitted using javascript.

I have also tried using the form name instead of the index and the results
are the same.
What has struts done to my form to make it not work?  I don't know....

Has anyone else out there been able to make this work?

Thanks,
Michelle


----- Original Message -----
From: "Norman Timmler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Michelle Popovits"
<[EMAIL PROTECTED]>
Sent: Thursday, June 21, 2001 4:55 AM
Subject: Re: unable to programmatically perform a submit


> hi michelle,
>
> i see a main difference between your struts version and your non-struts
> version. on the struts version you have forms[0] referencing your form and
> on the second one you have forms[1].
> the secure way to talk to forms by JavaScript is to reference the form by
> name.
>
> document.formName.submit();
>
> or
>
> document.formName.elementName.value = "something";
>
> hope this will help you.
> norman
>
> ----- Original Message -----
> From: "Michelle Popovits" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 20, 2001 11:19 PM
> Subject: unable to programmatically perform a submit
>
>
> Hi,
>
> I am trying to get an image map working that does a submit.
> The image map itself works.
> However, when I click on the image area it complains when trying to
execute
> the submit.
>
> Error:  object doesn't support this property or method.
>
> I have tried just performing a submit without the event assignment, like
so:
> <MAP NAME="MyMap">
>   <AREA SHAPE="Rect" NOHREF COORDS="82,2 163,23"
> OnClick="document.forms[0].submit();">
> </MAP>
>
>
> This works in my non-struts form version.
>
>
> Here is the html output:
>
> <MAP NAME="MyMap">
>   <AREA SHAPE="Rect" NOHREF COORDS="82,2 163,23"
>
OnClick="document.forms[0].event.value='SELECT_COURSE';document.forms[0].sub
> mit();">
> </MAP>
>
> <img src="/LAPS1/VirtualClassroomWAR/images/tab1a.gif" border="0"
> usemap="#MyMap">
>
> struts version
>
> <strutshtml:html>
> ....
> <strutshtml:form action="editPersonalInfo.do" name="personalInfoForm"
> type="com.bmo.ifl.laps.forms.PersonalInfoForm">
> ....
> <MAP NAME="MyMap">
>   <AREA SHAPE="Rect" NOHREF COORDS="82,2 163,23"
>
OnClick="document.forms[0].event.value='SELECT_COURSE';document.forms[0].sub
> mit();">
> </MAP>
>
> <strutshtml:img usemap="#MyMap"  pageKey="page.editPersonalInfo.tabImage"
> border="0" />
> ...
> </strutshtml:form>
>
> </strutshtml:html>
>
>
>
> non-struts version - this works
>
> <form id=f1>
> <MAP NAME="MyMap2">
>   <AREA SHAPE="Rect" NOHREF COORDS="82,2 163,23"
> OnClick="document.forms[1].event.value='SELECT_COURSE';f1.submit();">
> </MAP>
>
>
> <img USEMAP="#MyMap2" SRC="<%= request.getContextPath()
%>/images/tab1a.gif"
> BORDER="0" >
> <input type=text name=event value=UPDATE_PERSONAL_INFO>
>
> </form>
>
> I don't believe the image map is the problem.
> I think that there is just some reason why it will not except a submit()
> programmatically.
>
> Thanks,
> Michelle
>

Reply via email to