Including a form on a dynamic page (ORA-01036)

I created a form based on a proceedure. I also created a dynamic page which consists of:
DECLARE
BEGIN
PORTAL.wwa_app_module.new_instance('1235532770');
END;
When this dynamic page is run in development using the "Run" buttons, it works. When I include it on a portal page as a portlet, it errors with this error:
ORA-01036: illegal variable name/number
Does anyone have an idea as to why? I am sure it has something to do with context and/or the URL parameters, but don't know where to start.

Using javascript, you could wrap the included page within a DIV tag or SPAN tag that is initially not visible. Then when the user clicks the button you would make the hidden DIV or SPAN visible.
The visibility attribute can be set to visible (to see it) or hidden (to not see it). Here's a page that might shed some light:
http://www.csctce.com/demos/dom_tutorial/
HTH

Similar Messages

  • 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,
    Gulsah

    Gulsah,
    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

  • Forms, web applications, dynamic pages

    Hi.
    Can someone tell me what the best method is to create a form
    in DW? Correct me if I am wrong as I am quite new to this, but I
    see a lot of sites out there with different types of
    pages...they're using .aspx, .jsp, .php, .cgi, .html, .asp .cfm
    .........etc. Which one do you use??
    I want a form for contact info filled in & then you click
    a submit button & an email goes to your email listing all the
    fields & the entries of whoever filled your form. What is the
    difference of all of those mentioned above?
    Also what is the difference between .aspx & .asp?
    .html & .htm?
    Any help would be appreciated.
    Thanks.

    Forms can be html pages but once the submit button is clicked
    the form is
    usually processed on the sever hence the .asp. .aspx .jsp
    .php etc.
    Search google for active server pages. You can also look at
    the help file
    for info on database sites.
    Dave
    "Stella1251" <[email protected]> wrote in
    message
    news:gpmak2$ftb$[email protected]..
    > Hi.
    >
    > Can someone tell me what the best method is to create a
    form in DW?
    Correct me
    > if I am wrong as I am quite new to this, but I see a lot
    of sites out
    there
    > with different types of pages...they're using .aspx,
    .jsp, .php, .cgi,
    .html,
    > .asp .........etc. Which one do you use??
    >
    > I want a form for contact info filled in & then you
    click a submit button
    & an
    > email goes to your email listing all the fields &
    the entries of whoever
    filled
    > your form. What is the difference of all of those
    mentioned above?
    >
    > Also what is the difference between .aspx & .asp?
    > .html & .htm?
    >
    > Any help would be appreciated.
    > Thanks.
    >

  • 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.
    Hugo

    You 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.

  • Help on oracle tags inside dynamic pages

    Hi All
    I have used dynamic pages like this , i create a html form inside a dynamic page on submit of which a procedure gets called & inserts the values in the table.
    I see some <oracle> tags every time i create a dynamic page but have never used them. Could some one tell how to use these tags. whether they can be used to call a procedure or can i embed any dml statements in these oracle tags.
    Kindly somebody could explain it with an example.
    Regards
    Sushant

    There is a brief description in the online help - see http://isd-demos2.oracle.com:7778/help/wvtdynam.htm.
    You can also search this forum - there have been many examples posted here.
    If you have further questions about dynamic pages, the Portal Applications forum would be a better place to post them.
    Regards,
    Jerry
    Portal PM

  • Help on oracle tags in dynamic pages

    Hi All
    I have used dynamic pages like this , i create a html form inside a dynamic page on submit of which a procedure gets called & inserts the values in the table.
    I see some <oracle> tags every time i create a dynamic page but have never used them. Could some one tell how to use these tags. whether they can be used to call a procedure or can i embed any dml statements in these oracle tags.
    Kindly somebody could explain it with an example.
    Regards
    Sushant

    Hi,
    You can do all that you can do in a plsql block.
    Here is an example which paints a form for the employee records and submits them. On submit a procedure submit_form is called.
    <HTML>
    <HEAD>
    <TITLE>Example</TITLE>
    </HEAD>
    <BODY>
    <FORM action="<schema name>.submit_form" method="post">
    <H2>Example of A Dynamic Page</H2>
    <ORACLE>
    begin
    for c1 in (select * from scott.emp )
    loop
         htp.p(c1.empno);
         htp.p(c1.ename);
         htp.p(c1.deptno);
         htp.p(c1.hiredate);
         htp.p(c1.sal);
         htp.p('<input type="hidden" name="p_empno" value='||c1.empno||'>');
         htp.p('<input type="text" name="p_comm">');
         htp.p('<br>');
    end loop;
    htp.p('<input type="submit" name="p_action">');
    end;
    </ORACLE>
    </BODY>
    </FORM>
    </HTML>
    Thanks,
    Sharmila

  • Is it possible to call on a link in a dynamic page?

    I have created a dynamic page with sql code in it. When I go to customation form, for the page I just created, there is a button called run dynamic page. When I click this the sql code on the page execute. I can also make a link to the customation form so when I run this link the page with button run dynamic page appear. The question is if there is someway you can use this link in another dynamic page you just created so you get a page with the button run dynamic page when you run the page? Or is there another solution to the problem to get a page with a button to run sql code?

    Hi,
    You can call a component's customization form in the dynamic page like this
    <HTML>
    <HEAD>
    <TITLE>Example</TITLE>
    </HEAD>
    <BODY>
    <H2>Example of A Dynamic Page</H2>
    <ORACLE>
    begin
    SJAYARAM903_1G.RPT_0911010900.show_parms;
    end;
    </ORACLE>
    </BODY>
    This would render the customization form in the dynamic page.
    Thanks,
    Sharmila

  • Dynamic page search passing parametars problem

    I'm having problems with the search dynamic page in Oracle portal 3.0.
    I don't know how to pass the bind variables through the form in the Oracle manner, like p_arg_names and p_arg_values. Can someone please e-mail me a short search dynamic page like an example , how can a bind variable be passed through a from.

    Hi Sharmila,
    May I request this instead as the original thread seems to have died. I am trying to link a Oracle Form from a dynamic page, I am passing parameters from the dynamic page to the Oracle Form.
    Please may I have a simple example of this.
    Thanks Sharmila
    Greg
    Hi,
    Your question is not very clear. Are you creating a dynamic page or a portal form? Do you want to pass parameters to a
    form or from a form? Please elaborate.
    Thanks,
    Sharmila

  • How to call a procedure from dynamic page?

    I am trying to submit a form (dynamic page) to a procedure but keep getting the generic page not found error.
    I have the following dynamic page (bind variable works properly):
    <HTML>
    <HEAD>
    <TITLE>Example</TITLE>
    </HEAD>
    <BODY>
    <oracle>
    declare
    v_job_id number := :job_id;
    begin
    htp.p(v_job_id);
    htp.formOpen('http://mssdiscovery.ssc.nasa.gov:7777/pls/portal/portal_public.buy_off', 'post');
    htp.formHidden('JOBID', v_job_id);
    htp.formSubmit('submit', 'Buy Off');
    htp.formClose;
    end;
    </oracle>
    </BODY>
    </HTML>
    This form should submit to a procedure called "BUY_OFF", defined in the PORTAL_PUBLIC schema as follows:
    Create or Replace PROCEDURE PORTAL_PUBLIC.BUY_OFF
    (JOBID IN number)
    as
    begin
    update portal_public.components_jobs_syn
    set
    status = 'COMPLETE'
    where job_id = JOBID;
    /* add code to redirect */
    exception
    when others then
    null;
    end;
    I have granted PORTAL and PUBLIC execute privileges.
    I have never been able to submit a form in a dynamic page to a procedure... it never works... someone please help me out! What am I missing?

    Nevermind... I changed the submit button name from submit to NULL and it works fine now. I guess the name flipped it out for some reason.

  • 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,
    Mainak

    Sharmila,
    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

  • 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

  • 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,
    Mainak

    Hi,
    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 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.
    Mainak

    Hi,
    I have replied to this in the morning.
    Re: Oracle portal and JSR 168 compliance
    Hope it helps.
    Thanks,
    Sharmila

  • 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

Maybe you are looking for