473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

How to pass parameters in document.form.submit()

1
hi,

In my javaScript function iam using

document.ReportListForm.submit(); for form submision

My ReportListForm contains

<form name="RoleListForm" method="Post" action="RIRoleList.do?PageCount=<%= rptBean.getPageCount() %>">

How do i pass parameters in javascript function such that i should able to get value using
request.getParameter("name"); in jsp
Sep 16 '06 #1
1 87205
franks
3
One way to post values in your submission is to include hidden fields in your form and to set these fields with the values that you want to submit in your javascript.

The html would be:

Expand|Select|Wrap|Line Numbers
  1. <input type="hidden" name="yourFieldName" value="">
  2.  
Then in your javascript you can set the value (assuming that there is only one form on the page) using the following code:

Expand|Select|Wrap|Line Numbers
  1. document.forms[0].yourFieldName.value = "yourValue";
  2.  
Sep 18 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Chris | last post by:
Heres my problem: <a href="javascript:void(document.buysell.submit())" target="_parent" onMouseOver="MM_swapImage('members','','images/membersf2.gif',1)" onMouseOut="MM_swapImgRestore()"><img...
2
by: Alex | last post by:
Hello, I use the following script inside a page. My page contains : 1 FORM, Some Hidden fields, and one line of JAVASCRIPT in order to instantly post the Form. The problem is that under...
8
by: Ed Jay | last post by:
Is there a way to use 'document.form.submit()' to submit a form to a url other than that specified in the Form element? -- Ed Jay (remove M to respond by email)
4
by: dschruth | last post by:
Hello. Can anybody solve this problem? I am using a server-side language (PERL) to *try* to POST data to a HTTPS login script that doesn't have a standard "submit" button. The form appears...
2
by: alan_atwood | last post by:
Hello all. I am having a problem with the submit() method that is driving me nuts. I'm using document.form.submit() with large text fields (approx. 2000 characters) and am getting a "Invalid...
5
by: therjs | last post by:
i am trying to submit the form multipple times within a loop, if i have an alert() coded, it works, but, when i take the alert() out, it only does the submit the last time through the loop.
2
by: Arif Bangash | last post by:
Hi All, I have a form like this <form id="frmworld" name ="frm" method=POST action "https://select.worldpay.com/wcc/purchase" > <input type="hidden" name="instId" value="135242"> ...
3
by: epfmy | last post by:
Hi I want to ask... A report is using a query as record source. That query has parameters and . A command button in a form open that report. That form contains 2 textbox for date. How...
1
by: Chandra Bhushan | last post by:
I am new in ASP.Net programming, Please tell me why we use Document.Form.Submit(),, & how we can take advantage of this code ?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.