Current Position:Home > Html:link submit and passing parameters

Html:link submit and passing parameters

Update:11-30Source: network consolidation
Advertisement
I need to submit the form when the <html:link ..... > is clicked/pressed and also need to pass parameters.
<jsp:useBean id="mapParams" class="java.util.HashMap"/>
<c:set target="${mapParams}" property="theKey" value="${theValue}"/>
<c:set target="${mapParams}" property="theKey1" value="${theValue1}"/>
<html:link href="javascript:document.myform.submit()" name="mapParams" >
<c:out value="${custItr.empName}"/>
</html:link>
When i click on the link getting javascript error which says "syntax error". when I remove the "name" attribute in <html:link> there is no error but I need to have the name attribute to pass the parameters.
How to do both the submit and passing of parameters using <html:link>? Your help is appreciated.
Thanks.

The Best Answer

Advertisement
Parameters can only be passed like that to an actual URL. eg http://localhost:8080/myApp/showEmployee?id=123&dept=Sales
In this case, you are using the link tag to invoke javascript - not a url. URL Parameters don't apply to this string
If you are indeed submitting a form, I would suggest that you instead go with putting hidden fields on the form to submit the value.
Use <html:hidden>
  • Html:link submit and passing parameters Update:11-30

    I need to submit the form when the <html:link ..... > is clicked/pressed and also need to pass parameters. <jsp:useBean id="mapParams" class="java.util.HashMap"/> <c:set target="${mapParams}" property="the

  • Error when passing parameters in a link Update:11-30

    Hi: i have a report and a form. i've created a link that will point to the form from the report. So i've associated the link to a field of the report and edited it so that a key field in the form will be equal to a value passed from the report's key

  • Pass parameters from hbj link Update:11-30

    Hi,     I want to pass parameters from hbj link to the component where the event method is going to be called. And also when I click the event how it is going to redirect other jsp. Regards, Suresh.BHello Reinuka, It is possible to send parameter to

  • Linking form and report and passing parameters Update:11-30

    Is it possible to call a link with parameter from form to report? Let's say I have a form based on EMP table and when user clicks on DEPT_ID label I want to pass DEPT_ID as a parameter to a report showing detailed information about this department. A

  • Passing Parameters between 2 Portlets on 1 Page Update:10-11

    Hi, I'm new to this portlet stuff and I might miss something important, but: I "just" want to send parameters from one form on one Page to a portlet on the same page... PassAllParameters is already set to true... I also have read the "Prime

  • Passing parameters between portlets with in the same page Update:10-11

    Hello, I have created a Form and a report. The form allows a user to make some selection values, and then upon submit it passes the selected values to the report to query the database. The results from the query are displayed in a new - seperate - wi

  • Passing parameters to Update page Update:10-11

    Hi, I created the search/create/update page going by the instructions in the tutorial exercise. My primary key is a combination of employee number AND sequence number. When I query the employee in the search page and if the employee has more than one

  • How to open a page from a Form and pass parameters to the form on that page Update:10-11

    I found a similar example on this forum, but it did not work for me: declare l_names owa.vc_arr; l_values owa.vc_arr; i number; begin PORTAL.wwpro_api_parameters.retrieve(l_names, l_values); FOR i in 1..l_names.count LOOP htp.p(l_names(i) || ' ' || l

  • Unable to pass parameters from APEX to Oracle EBusiness suite R12 forms Update:10-11

    Hi We are trying to access a standard Oracle EBusiness form i.e. service request and are invoking this Form through a link from APEX. We are trying to pass parameters via this URL http://abc.oneapps.com:8010/OA_HTML/RF.jsp?function_id=2037&resp_id=50

  • OAF: passing parameters to report from OAF page and running concurrent prog Update:10-11

    Hi Everyone, i have an OAF page with 10 fields after filling those fields i need to press "Submit" button. On pressing Submit button 5 parameters i have to pass to the xml publisher report to run the concurrent program and display the output in