Dynamic page form
I have a HTML form created as a dynamic page in portal
the structure is as below
<html>
<script>
some javascript ....for form validation
</script>
<body>
<form>
--form elements ..
</form>
</body>
</html>
When i have this dy page included in Portal page as portlet along with templates for the header foooter etc ..
I cannot get my form to submit or the javascript to work ..
as i think portal is putting the dynamic page code as is
and so the portal generated html has multiple html/body tags ..
whats is the right way to do this ..
Hi,
You can see the html source of a form with javascript when put on a page. You should do something similar for the dynamic page you write.
-Sharmila
Similar Messages
-
Basic question: how to submit a dynamic page form to a procedure?
I am trying to submit a form created in a dynamic page to a procedure in portal. For some reason the procedure doesn't seem to execute. Can anyone give me a hint?
Here is my code for the form:
<html>
<body>
<oracle>
begin
htp.formOpen('portal_public.submit', 'post');
htp.formText('textbox');
htp.formSubmit('submit', 'submit');
htp.formClose;
end;
</body>
</html>
I have created a procedure called "submit" in the portal_public schema...
Create or Replace PROCEDURE PORTAL_PUBLIC.SUBMIT
p_textbox_string IN VARCHAR2 DEFAULT 'default')
as
begin
htp.print(p_textbox_string);
exception
when others then
null;
end;
When I submit the form I get a generic IE "cannot be found" page.
Can someone tell me what I'm doing wrong, I'm kinda new to this.I am trying to do the same type of thing. I want to have multiple rows on a form with checkboxes and use a plsql stored procedure to process the rows that are checked. The thing I have found is that is works with form method of 'GET'. I really need to use 'POST' though since I can have many rows to pass. GET attaches the passed variables to the URL. So, in your example, the actual URL would look something like portal_public.submit?p_textbox_string=whateveryoutypedin. Try changing your formOpen to use 'get' and hopefully you'll see what I mean.
Anyone know anything about the difference on GET vs POST please let us know. Thanks! -
Passing value from dynamic page to form.....
I have a portal page that has a dynamic page where I've created an html form. Also on this same page in different regions are three other forms which were created by the form wizard. From the dynamic page form I want to pass a session value to the other forms on the same page. Is this possible? I know it's possible from form to form using session apis. I've search the forum and have not found what I'm looking for. Can anyone be of any help on this topic?
Melissa,
It seems we have the same type issue.
Session variable how to's are what I need also.
There is a site with more information on it...a continuation of the Portal Handbook by Vandivier and Cox at home.covad.net/~idbexperts called an "Unpublished Case Study" - I don't know if it'll hit your needs on the head, but it may help to see it.
I believe I am trying to hold session variables over til users complete a 4 part form across several pages (may be a space problem we have). Do you know how I start this?
I don't know how to put p_session variables together, when or where the parameters are necessary and whether a procedure is necessary or not!!!
If you would like to correspond offline, I am at [email protected] and would appreciate your insights.
Mary -
Urgent: how to add dynamic page created by portal to your as a portlet in page
i want to add a component i made by portal like dynamic page as a portlet into page in my application. please the answer is so important
thanksHI,
its easy to do.
1.Create an application.
2.Publish it as Application Provider.
3.In that Application,create objects like dynamic pages,forms or report.
4.Publish Dynamic page as a portlet.
5.Create New Page or edit existing one.
6.Click on add portlet tab and you will see ur dynamic page name in the portlet repository List.
Thats it.
null -
How to create a form based on table using dynamic page?
Hi,
I need to create a form using dynamic page. How do you pass values from the html form to a oracle procedure that will get executed on submission of the form ? I could not find any documents which shows how to do that. Can anyone please help me out with an example ?
thanks,
MainakHi,
Something seems to get added to the form action because of "http". Hence I am removing it.
You need to write a procedure with the values in the as parameters. Say for example you want to insert a record into dept
table then
Dynamic page code
<html>
<body>
<form action="portalschema.insert_dept">
<input type="text" name="p_deptno">
<input type="text" name="p_dname">
<input type="submit" name="p_action" value="save">
</form>
</body>
</html>
Procedure code.
create or replace procedure insert_dept
(p_deptno in number,
p_dname in varchar2,
p_action in varchar2)
is begin
if p_action = 'save' then
insert into scott.dept(deptno,dname) values(p_deptno,p_dname);
commit;
end if;
end;
grant execute on insert_dept to public;
Hope this helps.
Thanks,
Sharmila -
How to get form fields in a dynamic page as a portlet
I have a dynamic page(publish as portlet and added to a portal page) with a html form that has many radio button created dynamically (query a table and create as many radio button as records I found) and the name of each radio button is the id of the record from the table it represents.
When I click the submit button of my form it will recall the same portal page and then I have to check which radio buttons where selected to update the database depending on it.
The problem is that I can't get the radio buttons inside the dynamic page because they are created dynamically so I can't make them portlet parameters to be associated with page parameters.
So How can I tell which radio buttons have been selected?
Please help me.Hi,
Write a procedure which will be called as the form action. This procedure should take an array of parameters like p_arg_names and p_arg_values. For example
<html>
<form>
<input type="checkbox" name="p_radio">
<input type="checkbox" name="p_radio">
</form>
procedure submit_form(p_radio in wwv_utl_api_types.vc_arr)
begin
for i in 1..p_radio.count
loop
htp.p(p_radio(i));
end loop;
wwv_redirect.url(<page_url>);
end;
Hope that helps.
Thanks,
Sharmila -
How to make dynamic PDF form flowable across 2 pages in LiveCycle?
I have a dynamic PDF form that is flowable on each page but not both. By that I mean that the fields on the 2nd page won't move to the 1st page if there is available space. How can I make the entire document flowable? I am using Adobe LiveCycle ES2 Designer to create the form. Thank you in advance.
Hi,
you need just one page which is flowable and allows page breaks. -
How to create a MD form using dynamic page ?
Rahul and Sharmila,
You have answered several of my queries earlier and I am thankful for them.
I have been trying to creating a MD form using dynamic page and I haven't fiqured it out. I need help. You both advised me on creating a simple form using dynamic page. The complexity changes drastically when I have to create a MD form. Has no body ever tried to create a MD form with dynamic page?
I haven't heard from you anything either. I am stuck with this and I need help urgently. Would you kindly tell me if this is possible and how ? Otherwise, I will stop crying for help on this.
Thanks for your kind attention.
MainakHi,
I have replied to this in the morning.
Re: Oracle portal and JSR 168 compliance
Hope it helps.
Thanks,
Sharmila -
Form in Dynamic page not working when checkbox is used.
I have created a form using dynamic page. The form most have display fields and a checkbox field. When I check a box, it assigns 'Y' value and when unclick, it assign 'N' to the database field.
When I submit the form, the procedure which is supposed to save the form data never gets executed. Well, at least it says, page not found HTTP 404 error.
Interestingly if I make this field a text box and manually enter 'Y' or 'N', and then submit the form, the procedure is executed. Data gets saved.
Is the checkbox not supposed to be used for a database field because checkbox value can be assigned only using javascript and the procedure never get that value ?
Can you please tell me how to use a checkbox for a database field using dynamic page ?
thanks,
MainakSharmila,
When I said, the form does not get submitted, I meant that the procedure does not work. The form gets submitted but the procedure does not work. It gives HTTP 404 error. That is what perplexes me. I am unable to understand why the procedure does not work when I click a checkbox.
May be you can make this work. I am hopeless about this.
Here is the code for the procedure sumbit_form:
NOTE: I ADDED TWO FIELDS CALLED PROMOT VARCHAR2(1), PROMOTID NUMBER(4) TO THE EMP TABLE AND CREATED A NEW TABLE CALLED PROMOTEMP. THIS IS A TEST CASE.
create or replace procedure sumbit_form
(p_empno IN portal30.wwv_utl_api_types.vc_arr, p_promot IN portal30.wwv_utl_api_types.vc_arr, p_action IN VARCHAR2)
is
begin
if p_action = 'save' then
for i in 1..p_empno.count LOOP
update scott.promotemp
set promot = p_promot(i)
where empno = p_empno(i);
END LOOP;
end if;
commit;
htp.p('<b>Saved Successfully</b>');
htp.p('<table border=1 bordercolor="red">');
for c1 in (select * from promotemp where promot='Y')
LOOP
htp.p('<tr><td>');
htp.p(c1.ename);
htp.p('</td><td>');
htp.p(c1.job);
htp.p('</td><td>');
htp.p(c1.mgr);
htp.p('</td><td>');
htp.p(c1.sal);
htp.p('</td><td>');
htp.p(c1.deptno);
htp.p('</td></tr>');
end loop;
htp.p('</table>');
EXCEPTION
when others then
raise;
end;
Here is the code for the dynamic page.
<HTML>
<HEAD>
<TITLE>Promot Emp</TITLE>
<script language="JavaScript1.1">
function include(form) {
var thisform = form;
for (var i=0; i<thisform.length; i++) {
if (thisform.elements.type == 'checkbox') {
if (thisform.elements[i].checked) {
thisform.elements[i].value = 'Y'; }
else { thisform.elements[i].value = 'N'; }
form.submit();
function show(form) {
var thisform = form;
for (var i=0; i<thisform.length; i++) {
if (thisform.elements[i].type == 'checkbox') {
if (thisform.elements[i].value = 'Y') {
thisform.elements[i].checked = true; }
else { thisform.elements[i].checked = false; }
</script>
</HEAD>
<BODY>
<FORM action="scott.sumbit_form" method="post">
<table border=1 bordercolor="red">
<tr>
<td> </td>
<td>Name</td>
<td>Job</td>
<td>Manager</td>
<td>Hire Date</td>
<td>Commission</td>
<td>Department#</td>
<td>Include</td>
</tr>
<ORACLE>declare
i number;
begin
i := 0;
for c1 in (select * from scott.promotemp where promotid = :promotid)
loop
htp.p('<tr><td>');
htp.p('<input type="hidden" name="p_empno" value='||c1.empno||'>');
htp.p('</td><td>');
htp.p(c1.ename);
htp.p('</td><td>');
htp.p(c1.job);
htp.p('</td><td>');
htp.p(c1.mgr);
htp.p('</td><td>');
htp.p(c1.hiredate);
htp.p('</td><td>');
htp.p(c1.comm);
htp.p('</td><td>');
htp.p(c1.deptno);
htp.p('</td><td>');
if (c1.promot = 'Y') then
htp.p('<SELECT NAME="p_promot" SIZE="1">
<OPTION SELECTED VALUE="'||c1.promot||'">Yes
<OPTION VALUE="N">No
</SELECT>');
else
htp.p('<SELECT NAME="p_promot" SIZE="1">
<OPTION SELECTED VALUE="'||c1.promot||'">No
<OPTION VALUE="Y">Yes
</SELECT>');
end if;
htp.p('</td></tr>');
end loop;
htp.p('</table>');
htp.p('<input type="submit" value="save" name="p_action">');
end;
</ORACLE>
</form>
</BODY>
</HTML>
thanks,
Mainak -
Calling a form in a dynamic page
Hi all,
We are using dynamic pages for the creation of custom portlets. We can call a report in html tag by calling report.show procedure. What will I write for calling a form?
Thanx,
GulsahGulsah,
In the component management screen you can find a URL-style "Run Link" which looks like this:
PORTAL30.wwa_app_module.new_instance?p_moduleid=1060253649
Also can put this PLSQL code:
PORTAL30.wwa_app_module.link (
p_arg_names => '_moduleid', p_arg_values => '[module id]',
p_arg_names => '_show_header',p_arg_values => 'YES');
where [module id] is your form id
for more information please see the Portal FAQ:
http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
Thanks,
Dmitry -
Auto Query in Master Detail Form using dynamic page doesn't work
I created a Master-Detail form, and implement AutoQuery using a dynamic page
with the following code :
<HTML>
<BODY>
<ORACLE>DECLARE
nre_ VARCHAR2(100);
BEGIN
nre_ := emp_nre;
if nre_ is not null then
net_portal.Popula_Agregados(nre_);
net_portal.Popula_Docs_Agregados (nre_);
htp.p('<iframe id=myFrame name="myFrame" frameborder=0 width="250%"
height="300"
src="/pls/portal/PORTAL.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=
3
388118140&p_arg_names=_show_header&p_arg_values=NO&p_arg_names=_cad_nre_cond&p_a
rg_values=%3D&p_arg_names=cad_nre&p_arg_values='||nre_||'">
</iframe>');
end if;
EXCEPTION
WHEN OTHERS THEN
htp.p(SQLERRM);
END;
</ORACLE>
</BODY>
</HTML>
It works fine when we access the first time to the page, but if i press the
save button after inserting or updating a detail record, the header record is
lost. How can i avoid this situation ?I changed query:
select
Replace(
'<img src="#IMAGE_PREFIX#ed-item.gif" border="0" alt="EditMap" usemap="#editmap***id***"></img>
<map name="editmap***id***">
<area shape="rect" coords="0,0,16,16" href="http://apex.oracle.com/pls/otn/f?p=&APP_ID.:'
|| decode ( type, 'FOLDER', '33', '22' )
|| ':&APP_SESSION.::&DEBUG.::P'
|| decode ( type, 'FOLDER', '33', '22' )
|| '_ID,P'
|| decode ( type, 'FOLDER', '33', '22' )
|| '_CALLING_PAGE:' || id || ',&APP_PAGE_ID." ></area></map>' ,
'***id***', id
) Edit,
id,
type,
name,
decode ( type, 'FOLDER', 33, 22 ) target
from tThe idea is - each img uses its own map.
It works now.
Check:
http://apex.oracle.com/pls/otn/f?p=20980:13
Lev
Edited by: le on Nov 3, 2010 11:11 AM -
Pass parameter from dynamic page to form
I have a report that uses a link to pass a parameter (projno) to a dynamic page. This dynamic page calls a procedure which, using the projno, pulls information from four tables. Depending on who the user is and what phase the project is in, each heading can be a link to a form so that the proper user can update the project. For instance, the projetc manager can update the progress table during phases 2-9. So I want the Progress Heading to be a link to a form so that the project manager can update the progress for a specific project number. I tried to put the link in the procedure like this:
if iPhase in (2,3,4,5,6,7,8,9) then
htp.p('<TD><a href="/pls/portal/PORTAL.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=6803259033&p_arg_names=projno&p_arg_values='||projno||'&p_arg_names=_projno_cond&p_arg_values=%3D&p_arg_names=_sessionid&p_arg_values=" target="_blank"><FONT FACE="VERDANA" SIZE="2">Progress</FONT></a></TD><TD width="10"></TD>');
else
htp.p('<TD><FONT FACE="VERDANA" SIZE="2">Progress</FONT></TD><TD width="10"></TD>');
end if;
But it brings up a blank form... no parameters are passed. Help!?when I use :projno I get a "bad bind variable" error. But really, I don't think that's the problem. Using the code in my last message, I can mouseover the link and see the correct information:
http://spring.ous.edu:7778/pls/portal/PORTAL.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=6803259033&p_arg_names=projno&p_arg_values=14&p_arg_names=_projno_cond&p_arg_values=%3D&p_arg_names=_sessionid&p_arg_values=
When I actually click on the link however, this is the URL now displayed in the address field:
http://spring.ous.edu:7778/pls/portal/PORTAL.wwa_app_module.show?p_sessionid=2592
It strips the url of the projno information. -
How can i exclude information pages from being printed in a dynamic XML form?
Hi there,
i am building a dynamic XML form in Adobe LiveCycle Designer ES2.
In this form there are pages with information that help the end user fill out the form, but to use - those who process the forms after they have been sent to us - these pages with information are irrelevant.
Is there a way to tell the form to omit these pages when printing.
Currently i have set the pages mentioned to be only visable on-screen. But doing so results in an empty page being printed (only the master page information is visable.)
Any ideas how i can solve this issue?
Thank you.Create a new master page and set that page to visible screen only. Set your subforms to use that master.
-
How to achieve dynamic page break in Smart form
Hi
1.How to achieve dynamic page breaks in Smart forms.
2.What are the various table types in Smart forms.
Regards<i>Dynamic page break : </i>
create a node of type COMMAND and in its attributes check "Go to new page".
<i>There are Tables and Templates in smart forms :</i>
Use node type <i>Template</i> to display a table whose layout and size (number of lines and columns) is determined before the runtime of the print program else use <i>Table</i>.
Take a look at <a href="http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf">SAP Smart Forms (BC-SRV-SCR)</a>
Regards -
Obtaining form parameters in a dynamic page
Hi
It is possible of course to create a form on a dynamic page and have a user provide input. But how can the user input be retrieved, if the user input is sent to the same page or to another Portal dynamic page? As a Portal dynamic page can only contain html and pl/sql between the <oracle> tags, it looks like there is no programmatic way (such as with perl or java) to obtain the information from the form and put it in one or more variables.
Is there a way to obtain the data from forms using pl/sql in a dynamic page? A code example would be most helpful.
Thanks very much.
HugoYou can do it using two dyns or one dyn.
Using one dyn:
Define a parameter :p1 and let a default value for it(e.g. 1).
Construct a form that submits to the same dyn
begin
declare
v_p1 varchar2(100) := :p1;
begin
htp.p('<form name="example" action="" method="post">
<input type="text" name="p1" value="'||v_p1||'">
<input type="submit">
</form>');
end;
When you submit it to same page you will be able to see your new parameter value. If you want to use two dyns then submit it to second dyn.
Maybe you are looking for
-
I've installed and configured Lion Server on an old iMac that suddenly became available when I upgraded to a new iMac. I've got a share point on there. It was easy. Love it. My bookkeeper comes into my office once a week and works on that iMac. He al
-
Hello, I have a new cluster using 2012 R2 and have the problem that if I want to connect to a VM from the Hyper-V Manager (or Failover Cluster) the connection takes about 10 seconds or sometime even longer (20 seconds). Does someone have any idea why
-
Canon s95 in 3.3 RAW aspect ratio
Hi, When I import Canon s95 in 3.3, RAW + JPEG with aspect ratio 3:2, I see the picture in 3:2 ratio. Nevertheless, the RAW has the full info (4:3) Is it possible to have it? Thanks
-
How can i prevent and stopdownloading podcasts from itunes U ?
dear friends, i can't stop and prevent podcasts download from itunes u ,, this download reduces my iphone free space ,, Please help me !!
-
Is it possible to post a GB song file- original work in progress in the idisk public folder - for another player to download and add a track - then down load the piece back to my computer. Does this work? Problems ? Thanks anyone. Powerbook G4 Mac