Hello Manuel,

using a page like:
--------------------
</HEAD>

<BODY BGCOLOR="#FDF5E6">
<H2 ALIGN="CENTER">Test</H2>

<FORM Name="testForm" ACTION="http://localhost:8088/SomeProgram";>
Field 1:
<INPUT TYPE="TEXT" NAME="field1"><BR>
<INPUT TYPE="SUBMIT">
</FORM>

<a href="#"  style="text-decoration:none;"
            onClick="javascript:document.testForm.field1.value='page.jsp';
                     document.testForm.submit()">
                     
                     Test</a>

</BODY>
</HTML>
---------------------------

my server received:

=====================
Here is the request line and request headers sent by your browser:
GET /SomeProgram?field1=page.jsp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
Accept-Language: de
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)
Host: localhost:8088
Connection: Keep-Alive
=========================

I think thats exactly what you are expecting. I think your error is on
the server side. Maybe your actionform?

Thursday, June 5, 2003, 10:04:18 AM, you wrote:


ML> Hi,
ML> I have seen some examples like the one below,
ML> but no one works with struts. I donīt know how to address the form beans
ML> field. And I habe to specify the paramīs name Iīd like to save.
ML> I tried this code, but it doesnīt work:

ML> <a href="#"  style="text-decoration:none;"
ML>             onClick="javascript:document.testForm.fieldname.value
ML> ='page.jsp';
ML>                   document.testForm.submit()">

ML> Where is the error?
ML> How do I save a value in an FormBean by clicking a button?

ML> Manuel



ML> |---------+---------------------------->
ML> |         |                            |
ML> |         |                            |
ML> |         |                            |
ML> |         |"Rochak Sethi"              |
ML> |         |<[EMAIL PROTECTED]>  |
ML> |         |05.06.2003 08:56            |
ML> |         |Bitte antworten an "Struts  |
ML> |         |Users Mailing List"         |
ML> |         |                            |
ML> |---------+---------------------------->
ML>  
ML> 
>----------------------------------------------------------------------------------------------------------------------------|
ML>   |                                                                               
ML>   |     An:      "Struts Users Mailing List" <[EMAIL PROTECTED]>     
ML>   |     Kopie:                                                                    
ML>   |     Thema:   RE: Submitting value with Graphical Buttons                      
ML>  
ML> 
>----------------------------------------------------------------------------------------------------------------------------|





ML> hi ,
ML>              a graphical button can be put inside a hyperlink tag and
ML> onclick() function can be called
ML> eg.
ML>              <a href="something" ><img src="something" onclick=fnSubmitForm
()>></a>

ML> and in javascript u can make this function :

ML>              fnSubmitForm()
ML> {
ML>                          document.formname.submit();
ML> }
ML> i am not too sure if i am tellng u something u dont know but i guess this
ML> shud work.


ML> tc




ML> -----Original Message-----
ML> From: Manuel Lenz [mailto:[EMAIL PROTECTED]
ML> Sent: Thursday, June 05, 2003 12:20 PM
ML> To: Struts Users Mailing List
ML> Subject: Submitting value with Graphical Buttons




ML> Hi to all,
ML> I still have problems with submitting values by clicking graphical buttons.
ML> By using javascript there must be an function named "on click ...." which
ML> sets a value into a FormBean by pressing a graphical button.
ML> To get a forwarding page a submit must be initialized too. A link to this
ML> page might also work.
ML> The value must be a constant one to identiy the page from which the user
ML> has submitted.

ML> Has anybody an idea how this works?

ML> Greetings,
ML> Manuel



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


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







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



-- 
Best regards,
Dirk


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

Reply via email to