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

Similar Messages

  • Youtube does not work when i am using wifi on iphone 4

    the youtube does not work when i use wifi. it works perfectly when i use 3 g network ..

    At home when i use my Wi-Fi it work normal, but as soon as i go out, for example on the bus or at work it keeps saying "Cannot connect to Youtube".

  • Dynamic record group not working when apostrophes are used

    Hi Everyone,
    I have developed a Form for the most part everything is working as expected. However, there is a search functionality that is giving me problems. The issue is that when the user enters search criteria for last_name that has an apostrophe (O'brian) the search lov doesn't get populated because the dynamic record group is not getting created when the string has an apostrophe (ie O'brian). I have a dynamic record group that takes the user's search criteria and populates an LOV on the screen with the records that matched their criteria.
    Here is the code that is behind my search button where the dynamic RG gets created. It works fine for all searches that don't contain an apostrophe. Btw, the Oracle Forms version is 10g.
    DECLARE
    p_where_debtor varchar2(2000);
    p_where_liab varchar2(2000);
    rg_id RecordGroup;
    v_query varchar2(2000) := null;
    rg_name varchar2(2000):= 'RG_LIAB_LST';
    errcode NUMBER;
    BEGIN
    IF :SEARCH.cd_nb is null and
    :SEARCH.cd_seq is null and
    :SEARCH.f_name is null and
    :SEARCH.l_name is null and
    :SEARCH.mi_name is null
    then
    display_message ('Search criteria must be entered');
    raise form_trigger_failure;
    END IF;
    v_query := 'SELECT last_name, first_name, middle_name, c_no, c_seq
    FROM TABLE_VW2 WHERE 1=1';
    /*Search criteria entered by user*/
    IF :SEARCH.l_name_srch IS NOT NULL THEN
    v_query := v_query||' AND UPPER(last_name) LIKE '''||UPPER(:SEARCH.l_name)||'%''';
    END IF;
    IF :SEARCH.f_name_srch IS NOT NULL THEN
    v_query := v_query||' AND UPPER(first_name) LIKE '''||UPPER(:SEARCH.f_name)||'%''';
    END IF;
    IF :SEARCH.mi_srch IS NOT NULL THEN
    v_query := v_query||' AND UPPER(middle_name) LIKE '''||UPPER(:SEARCH.mi_name)||'%''';
    END IF;
    IF :SEARCH.cdcs_nbr_srch IS NOT NULL THEN
    v_query := v_query||' AND UPPER(c_no) LIKE '''||UPPER(:SEARCH.cd_nb)||'%''';
    END IF;
    IF :SEARCH.cdcs_seq_srch IS NOT NULL THEN
    v_query := v_query||' AND UPPER(c_seq) LIKE '''||UPPER(:SEARCH.cd_seq)||'%''';
    END IF;
    /*Make sure record group doesn't exisit*/
    rg_id := Find_Group(rg_name);
    /*If it doesn't exist then create record group*/
    IF id_null(rg_id) THEN
    rg_id:= create_group_from_query(rg_name,v_query);
    END IF;
    IF NOT id_null (rg_id) THEN
    delete_group (rg_id);
    rg_id:= create_group_from_query(rg_name, v_query);
    END IF;
    errcode := Populate_Group(rg_id);
    Any help would be greatly appreciated.
    Thanks,
    Adrian

    For every item where an apostroph can occur, do a
    REPLACE(:BLOCK.ITEM, '''', '''''');

  • Pages not working when icloud switched on

    My pages on my iphone and iPad crashes when my icloud is connected when it is not pages works ok can anyone suggest what's going on ??

    After trying a number of things from other posts (including "reset all settings", uninstalling and reinstalling pages on the ipad, deleting all duplicate pages documents and folders on i cloud with my laptop, and more, I had the same result on my ipad. After reinstalling and turning off the icloud option, pages would start and work fine, but since I had icloud deselected, I didn't have access to any of my many pages documents stored on icloud. After quitting pages on the ipad, and toggling on the icloud option, opening pages would result in it crashing.
    I finally called Apple support, and the tech had me open pages on my ipad, and while it was open, then go into settings and toggle on pages documents in icloud, and also on the pages app settings. Miraculously, pages didn't crash, and all my pages documents began to appear over the next few minutes. Now I can quit pages, restart the program, and everything is working fine. The tech told me that the issue with pages crashing is being worked on by the ios team, and there will probably be a fix for the problem in the next update.
    Here are the steps that worked:
    1. Uninstall pages from the ipad.
    2. Reinstall pages with settings/icloud/documents and data/pages-off, and setings/pages/use icloud-off.
    3. Start pages for the first time. If you see an option to use icloud, select it.
    4. If not, while pages is open, change the settings to settings/icloud/documents and data/pages-on, and setings/pages/use icloud-on.
    Hope this helps

  • Lookup expression is not working when I am using with in the rectangle box in SSRS

    I have two datasets with common member is ProgramID.
    I have followed the below steps,
    1. Added one table  (2x2) and mapped this table to dataset1. After that I have removed top row.                                               
    That means I am maintaing only  data row.
    2. Added group to the table (ProgramID). Now the programid is sitting at cell#(1,1) and  cell#(1,2) is blank
    3. I have verified the report with preview and able to see the data for my all programs. I have 5 programs
    4. my plan is adding chart and matrix reports to cell# (1,2). If I am adding chart/matrix to the cell#(1,2) then we can't contol the  cell alignments in terms of height x width.
     To resolve that problem, I have added one rectangle control to the cell#(1,2) then I have added my chart and matrix report
    5. After completing the report, I have verified with preview and able to see the reports (chart/matrix) for all my 5 programs by page wise (note: I have provided page break before for my rectangle)
    6. Till this point, I have no issues
    7. Now, I have added one more row under the group. so, we have our main table (2x2). Becuase of programId group we can only see 3 cells in total table  (cell# (1,1) =ProgramId  cell#(1,2)=chart and matix reports under rectangle box; cell#(2,1)=already
    merged with ProgramID group; cell#(2,2)= planned to add one more rectanlge and add two reports (chart and matrix)
    8. Now, i have added rectangle to cell#(2,2) then added chart and matrix reports within the rectangle.
    9. cell#(2,2) reports are needs to extract the data from dataset-2. Here we have common member is ProgramID (ds-1,ds-2)
    10. First I have tested for matrix report by adding lookup expression
          Matrix report (2x2)
         row-1: Cell(1,1)= Gender report heading ; cell(1,2)=Month  (column group)
         Note: month is also common member in both the datasets. 
         row-2: cell(2,1)--  =Lookup(Programid.value, Programid.value,Gender.value,"Dataset2")  (Gender data is Male and Female)
                    Cell(2,2) -- empty for now
     11. I have tried to preview the report and able to see the report without any issues and below are observations
            main Table (2 x2)
             Cell# (1,1)  = ProgramID --Returning all 5 programs properly
             Cell# (1,2)  = Dataset1 related report (chart and matrix reports under rectangle) -- able to see without any issues
             Cell#(2,1)  = We already know this is merged cell. i.e menas ProgramID dispalying
              Cell#(2,2)= Only Male record is dispalying in the matrix report which is under rectanlge (here we have applied Lookup expression.
    Note: male is the first record from the database and Female is the second record
    Also, observed that Cell#(2,2) matrix report is unable to display the gender count information when I have provided count value expression in the cell(2,2) within the matrix and the expression I have uses is
      = sum(Lookup(ProgramId.value,ProgramId.value,GenderCOunt.value,"Dataset2"))
    Please ask me if I am unable to explain or lengthy explain.
    Point : Why the lookup expression is giving the first record only (in case of gender #(male, female) and why it is unable to give the gendercount.  Gendercount cell is totally blank.
    Please help me.
    Kishore.

    Hi Kishore,
    I have tested the issue step by step by following you description, while the first issue works well in my local environment. Based on my research, this can be caused by the lookup expression or it indeed return Male value based on the logic. If you use the
    expression below, it will indeed only return the Male record. So please try to double-check the record in the two datasets and the expression in your environment:
    =lookup(first(Fields!ProgramID.Value,"DataSet1"),Fields!ProgramID.Value,Fields!Gender.Value,"DataSet2")
    As to the second issue, please try to use the following expression:
    =Count(Lookup(fields!ProgramID.value,fields!ProgramID.value,fields!Gender.value,"DataSet2"))
    Besides, if this issue still exist, in order to trouble shoot this issue more efficiently, could you please post both the .rdl  file with all the size properties to us by the following E-mail address?  It is benefit for us to do further analysis.
    E-mail: [email protected]
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Drag and drop not working when uploading file using safari

    why i cannot drag and drop any file when using safari , and what happens the file auotmatically open while i need to upload it only , extra for that , i cannot write  any remark or fill a space while using website related to my work.
    my work is to upload drawing files using dwf file to a website so the other parties can review and give me review , and then i reply to the remark at the same place and make meeting through the same site.
    please any body can give any way to correct my mac.
    latelly i installed win7 only to use it for that website , and iam now changing from mac to win whenever i want to work , this not acceptable to me because it is waste of time beside i like the mac and it working with other application but not for safari.

    why ?
    I'm sorry, but every OS is different.  You cannot expect all features of one to be in another.  Or alternatively, for similar features, be done it the exact same way. 
    It looks to me after a quick google search that winexplorer is basically the moral equivalent of the mac's finder to present the file system in different ways.  The OSX Finder also has alternative views of the file system, i.e., icons, list, columns.  Experiment with the list and column views and see if one of them are more to your liking.
    As for winexplorer on the mac.  I don't know if this simulates it or not but there is a program called Macintosh Explorer so check that out as well.
    And finally, in the end, as I said in my earlier post, no matter what, nothing on the mac is going to change what I believe you think you can do and drop a file on a browser window and expect it to upload.

  • SPARQL query through Jena adaptor not work when string literals used

    Hi,
    When I executed the following SPARQL query through Oracle Jena adaptor:
    SELECT ?personHasFirstName WHERE
    {?personHasFirstName foaf:firstName ?name . }
    I got the expected results.
    However it won't return anything when I narrowed the query to match a particular name like below:
    SELECT ?personHasFirstName WHERE
    {?personHasFirstName foaf:firstName \"Julie\" . }
    I also tried the Filter approach:
    SELECT ?personHasFirstName WHERE {?personHasFirstName foaf:firstName ?name . FILTER (?name =\"Julie\") }
    It still doesn't return any results.
    I saw from the release notes about the bug dealing with "\". My guess is that the above behavior is caused by that bug. What is the suggested way to walk-around this? Thanks,
    Weihua

    Could you please try this? It works as expected on my machine.
    GraphOracleSem graph = new GraphOracleSem( oracle, modelName);
    ModelOracleSem model = new ModelOracleSem(graph);
    Node sub = Node.createURI("http://test.com/employee123");
    Node pre = Node.createURI("http://xmlns.com/foaf/0.1/firstName");
    Node obj = Node.createLiteral("Julie");
    graph.add(Triple.create(sub, pre, obj));
    String queryString =
    " PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
    "SELECT ?person WHERE { ?person foaf:firstName \"Julie\" . } ";
    QueryExecution qexec = QueryExecutionFactory.create(
    QueryFactory.create(queryString), model);
    try {
    ResultSet results = qexec.execSelect();
    while (results.hasNext()) {
    QuerySolution soln = results.nextSolution();
    psOut.println("runQuery: soln " + soln);
    finally {
    if (qexec != null)
    qexec.close();
    output snippet:
    runQuery: soln ( ?person = <http://test.com/employee123> )

  • Alerts not working when "reply" is used

    When I get a reply to a sms text, there is no alert, only the led flashes.  I do not have alerts turned off.  They work fine, when the message originates from the sender.

    Can u give us the details like which component you are using for alerts.

  • Syncronize Camera RAW not working when Auto is used

    I have a problem with settings not being updated in Camera RAW when using the 'Auto' function.
    I have to equalize exposure on a large number of RAW files (often 500+). The Auto function would be great, if it would only apply to the Exposure and not the other settings like contrast.
    To reproduce:
    Open 20 RAW files
    Select all images
    Click 'auto' under the 'tint slider'
    Observe that settings change on all images
    Now change any of the following settings (but NOT the Exposure slider!):
    - Contrast
    - Highlights
    - Shadows
    - Whites
    - Blacks
    Problem: only the settings on the first image are updated, the other images are not edited.
    When you change the Exposure slider, the other settings are updated (probably because the 'auto' mode is disabled).
    I have uploaded a small screen recording of this problem here https://www.youtube.com/watch?v=jGx6wV5v774&feature=youtu.be
    Using 'Synchronize' it is also not possible to copy over the settings to all images.
    I contacted Adobe over the phone, but they can only give the usual nonsense (reset your preferences, reinstall Photoshop, etc).
    I see other people with the same problem, did anybody find a solution or a workaround?

    You now slide it up to open the camera instead of tapping.

  • RCOUNT not working when SORT is used.

    Hi Everyone,
    I have a table report, and at the bottom of the page i want to have the total distinct of row counts.
    Department Name Emp ID Emp Name Phone
    Sales 11111 abc xxx-xxx-9999
    Sales 23335 xyz xxx-xxx-9939
    ITD 01235 ddd xxx-388-3999
    Accounting 10000 hgg xxx-388-9299
    Accounting 02020 qqq xxx-123-3355
    Total of Departments : 03 (I'm using RCOUNT for this and put it in the narrative)
    It works as default but if i click on Emp Name to sort then the Total of Departments will show the count of emp name which is 5 in this case.
    Has anyone had any solution for this?
    Thanks.

    Why can't you use COUNT DISTINCT in column properties? (instead of default)...
    Bring a new column (any column)...edit its formula and add COUNT with brackets wrapping column name - something like COUNT(Table.EmployeeName) - it should be better than RCOUNT

  • Pagecontext.forwardimmediatly not working when hashmap is used.

    Hello,
    I am trying to use as below:
    HashMap hm = new HashMap(1);
    hm.put("conc_called","YES");
    pageContext.forwardImmediately("OA.jsp?page=/XXX/xxPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    hm,
    true,
    "N");
    But i get an error message stating that the method doesn't exist. Any suggestions would be appreciated.
    Thank You
    PK

    Ranjit,
    That was awesome. You were able to figure out the issue even thought i haven't posted the import statement i have used for the hashmap. It worked now.
    Thanks a lot!!

  • Help! Javascript not working when object moved from one page to another!

    Hello all:
    I am new to Adobe Livecycle Designer (version 8.0). I have created a 3 page interactive pdf form with numerous objects (text fields, radio buttons, drop-down boxes, etc.), that our business wants to begin using soon.
    I am having difficulty with some of my Javascript not working with a few of my objects on page 2 of the form. Specifically, there is a drop-down box for "Country" on page 2 of my form. When the user selects, for example, "United States" from the list, I have Javascript that is supposed to change the "Currency" drop-down box rawValue to "US Dollars" accordingly (upon the change event).
    I think my Javascript syntax is proper, but I am not certain. Here is my simple Javascript associated with the "Country" drop-down box (Note: rawValue 80 = "United States" and rawValue 105 = "US Dollars"):
    form1.Page1.cmbContactInfoCountry::change: - (JavaScript, client) -
    if (this.rawValue == 80) {     
         cmbCurrency.rawValue = 105;
    This seems pretty straight forward and it WORKS when my "Country" drop-down box is moved to page 1 of the form, but it WILL NOT WORK when I move the "Country" drop-down box back to page 2 of the form (which is where it belongs).
    Does anyone have any suggestions or solutions? I have spent probably 6-8 hours racking my brain trying to figure out why it works when on one page, but it does not work when move to a different page. I am guessing that I may have corrupted something OR that I am not fully addressing the proper name of the object?
    Please help!
    Frustrated and helpless near Chicago!
    Taylor T

    Hi Jono:
    Thank you for your quick reply.I was able to obtain the full name of the cmbCurrency object using the method you taught me. That is brilliant! Great short-cut tool.
    Unfortunately, I am still having issues with getting Javasript for the cmbCountry object to work with the cmbCurrency object. I haved pasted my new Javascript below.
    JavaScript for cmbCountry object:
    //UNITED STATES
    if (this.rawValue == 1) {
              xfa.resolveNode("form1.#subform[1].cmbCurrency").rawValue = 1;
    else
    //CANADA
    if (this.rawValue == 2) {
              xfa.resolveNode("form1.#subform[1].cmbCurrency").rawValue = 2;
    I have checked the "Specify Item Values" checkbox of the cmbCurrency drop-down object and Value 1 = "US Dollars" and Value 2 = "Canadian Dollars".
    When I select "Canada" from the cmbCountry drop-down object, the rawValue of the cmbCurrency drop-down object is changed to "US Dollars" (when it is clearly defined as "Canadian Dollars"). When I select "United States" from the cmbCountry drop-down object, the rawValue of the cmbCurrency drop-down object stays blank for uknown reasons. Very strange.
    Since I am not able to further explain in detail on what I am experiencing, I have posted a link to my file below (I just signed up for an account at ShareFile). I would forever be indebted to you if you can help me figure this out!
    https://thomptk.sharefile.com/?cmd=d&id=07ede2fe11db4549

  • Keyboard backlighting not working when using Windows in Boot Camp

    Hi, I'm posting this for a friend with a new Macbook Air. He says that his keyboard backlighting does not work when he is using it for Windows (don't know which, but probably Vista). Any ideas why? Thanks. Gary

    Install all the drivers needed when running boot camp - try for example inserting a DVD - then press the eject key - See if it comes out - If it doesn't install all the drivers - try Control Panel - If not try re-installing your version of Windows.

  • HP ProBook 440 G2, Finger print reader not working when I upgraded form Win 7 Pro to Win 8.1 Pro

    My HP ProBook 440 G2, Finger print reader not working when I upgraded form Win 7 Pro to Win 8.1 Pro.
    In device manager showing that biometric reader is working properly. But actually the finger printer reader is not reading or senseing. It seems like "dummy" part. Please help me to correctly configure step by step for this issue.
    thankyou
    Hillet
    This question was solved.
    View Solution.

    Have you installed the Validity Sensor Fingerprint driver software for Windows 8.1?
    http://h20564.www2.hp.com/hpsc/swd/public/detail?sp4ts.oid=6943811&swItemId=ob_134806_1&swEnvOid=415...
    See page 64 in the following Windows 8.1 user manual for Validity Fingerprint setup information
    http://h20565.www2.hp.com/hpsc/doc/public/display?sp4ts.oid=6943810&docId=emr_na-c04371762&docLocale...
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • I tunes is not working. when i go to update apps nothing happens go to itunes page is blank

    itunes not working. when i go to update apps nothing happens. if i go to itunes store page is blank and does not go to the store

    http://support.apple.com/kb/ts1567

Maybe you are looking for

  • Charm in implementation project

    Hi All, Iam currently configuring charm in implementation project. We do not have QA and PRD systems build yet. I have created transport routes DEV>VQA>VPR ie with QA and PRD as virtual systems. Now how do I add this as virtual systems in logical com

  • Problem in creating jdbc-data-vew to oracle10g

    I have installed DSEE7.0 and setup the directory proxy server successfully my oracle environment: ip=202.205.16.93 sid=nicdbs table: CAMPUS.CAMPUS_USER { USERID, NAME, TEL, EMAIL } my steps (refer to the administrator guide a reference): dpconf creat

  • Thread safe architecture problem

    I am developing a app that is utilizing a proxy pattern to "wrap" instances of a few classes. The consumer of the proxy then does not need an instance of the inner class and the inner class is shared among all of the proxy consumers. However, I need

  • Transferring movies from iPod to mac

    how do i transfer movies from my ipod T to my mac.

  • How may I print a pdf doc from access vba code

    I have a directory of files and I want to send these files to the printer in a specific order (right-clicking in the explorer seems to give an unpredictable order). I am using the sdk and know how to find the files in the directory, but I can't find