Dynamic Page truncating html form text item

I have created a dynamic page that displays the system date on a form. When the
page displays, the date truncates after the space or comma. ie.
instead of displaying "Monday, December 30" it displays "Monday". If i remove
the comma or spaces from the format, it will display ok. Is there some type of
URL encoding I need to to.
<FORM action="stars3.star_portal.process_student_att" method="post">
<TABLE border="0" cellspacing=0 cellpadding=2>
<TR BGCOLOR="#000063">
<ORACLE>
BEGIN
htp.p('<TD ALIGN="CENTER"><FONT COLOR="WHITE">' );
htp.p('<input type="text" name="T1" size="30" value=' ||
to_char(sysdate,'Day, Month DD') || '>' || '</FONT></TD>');
END;
</ORACLE>
</TR>
</TABLE>
</FORM>

Hi,
Yes, it is an encoding problem. You can make use of htp.formText to overcome this. The spaces and commas are interpreted properly with formText.
Here is an example.
<ORACLE>
declare
l_date varchar2(100);
BEGIN
select to_char(sysdate,'Month, Day, DD') dt
into l_date
from dual;
htp.p(l_date);
htp.p('<TD ALIGN="CENTER"><FONT COLOR="WHITE">' );
htp.formText(cname => 'T1',
cvalue => l_date,
csize => 30,
cmaxlength => 30);
END;
</ORACLE>
Thanks,
Sharmila

Similar Messages

  • New Safari 2.0.3 displays some Router Firmware pages as HTML Source text

      Hello Safari users and gurus.
    I installed the new 10.4.4 Combo Updater yesterday, preceded and followed by permissions repairs and other maintenance, including cleaning Safari Caches. Safari 2.0.3 works.
    My problem: 10.4.4's new Safari 2.0.3 displays HTML source text after I click "Save" from within my Linksys (latest firmware) router's web based administration pages that worked correctly with the previous version of Safari.
    When I check or change my router settings, the initial router settings pages appear as they did with the previous version of Safari. However, with 10.4.4's new Safari 2.0.3, as soon as I click "Save" to attempt to save a changed router setting, the confirming info from the router is displayed as HTML source code instead of the expected HTML page display.
    If I wait for the router lights to indicate activity has ceased and then reload the router's opening admin address, the page opens again normally, and I can navigate to other pages and see that the changes have been saved. However, any click on any "Save" changes button in the router's pages delivers another page of HTML source text.
    I will watch for future router firmware updates to see whether the issue is resolved from the Linksys side.
    Does anyone have any suggestions for improvement now? All assistance will be appreciated.
    EZ Jim

     Thanks glefand. As you suggested, I tried my old iBook G3 that is still running 10.3.9, and it works fine for me.
    My G5 DP also worked normally up through OS X 10.4.3. My problem only began after I installed the 10.4.4 update. I think the Safari update included with the 10.4.4 update is what is causing the issue with the firmware pages on my Linksys router.
    Hopefully a future router firmware update (or Safari update?) will restore proper operation. If not, I will continue to reload from the router's Start page. The need to work around this glitch is annoying, but the actual function of my router setup works without problem, even though the pages do not display properly.
    Thanks again for your helpful suggestion,
    Jim
    G5 DP 1.8, 4.5G RAM, 2x160GB Seagate, 1,000va UPS   Mac OS X (10.4.4)   20"ACD, iSight, AirportCard, Klipsch GMX A-2.1 Audio

  • Form text item truncate

    Hi,
    My form emp has to show the employee names in a single text field, using this
    select query
    SELECT dept,
    RTRIM
    (XMLAGG (XMLELEMENT (e, emp_name || ',')).EXTRACT ('//text()'),
    ) emp_name
    FROM emp
    GROUP BY dept;
    multiple records are now coming in single text field but my "emp_name" data type is varchar2(150) so in form
    in getting emp_name text field have records in this format
    " Andrew "Big gap",roger"Big gap" ,John"Big Gap",fletcher
    i guess this problem becoz of the data type length, how to truncate this length in forms text field?
    Edited by: Veekay on 07/02/2011 09:41 م

    Hi
    i believe u r using the right function as u can see here
    http://techonthenet.com/oracle/functions/rtrim.php
    rtrim('tech '); would return 'tech' if i got ur problem then may be ur data length property of ur the text item if u minimize the spaces of displasying ur data
    guess this problem becoz of the data type lengthyesss, i guess this too :)
    Hope this helps
    Regards,
    Abdetu...

  • How to use Custom Search in Dynamic Page or HTML Portlet ?

    Gurus,
    1. I have a tab called My Space in the portal web site, where user gets a personalized view of the content.
    2. I am using custom attributes and custom item types. I have a custom attribute called 'Location', which is a attribute of custom item types.
    3. I have 2 pages - News and Events.
    4. All the content in News and Events page is tagged by the attribute 'Location'.
    5. The requirement is to let the user search the News and Events by Location.
    6. To achieve this I used the Custom Search portlet and the user can select the attribute Location and see the resultant News and Event items by location in the Search portlet.
    7. The requirement is to present the News items and Event items in separate regions on the page and show only the first 5 News and Event items in the result and show a More link which would guide the user to rest of the News and Event items.
    8. Eventually there may be more content other than News and Events tagged by location. If so, the requirement is to create a new region and display the new content.
    9. How would I do this using custom search ? I was thinking if there is anyway I could use the custom search api (where can i find it ?) in the HTML portlet or Dynamic page and submit the result to IFRAMES in each region and show the output ?
    Pls advise.
    Thanx a bunch.

    I would suggest that you use two custom search portlets; one for the news items and one for the events items. Switch the custom search portlets to "AutoQuery" mode and add the relevant criteria. On the results display tab of the the "edit defaults" screen, choose to show just 5 items.
    To add a link to show the user mode results, I'd create two new pages that have just a single custom search portlet on it that is customised to show more of the results and maybe has the pagination links enabled.
    Then I'd add two "Page Link" items underneath the two news and events portlets on the first page in an item region.
    I'm sure there are other ways of doing this as well. Hope that helps to get you started.

  • WebDB - Dynamic Pages SVG/HTML Encoding Help

    I have been playing around with WebDB 2.2
    to generate an SVG document from a table with X/Y locations
    in columns.
    I can generate the SVG content fine but when WebDB sends it to
    my browser (IE 5.5) it is displayed as XML rather than as an SVG document.
    Now I think that the problem is that the document does not have an SVG extension
    and WebDB is typing the document as HTML. When I check the properties of the
    document (right mouse click and select properties), Windows tells me the type of the
    document is HTML. If I File>Save the document with an SVG extension and then open it
    in IE I get my map.
    I can't see how to force WebDB to change the document type.
    Can anyone help me?
    I hope I am making sense :-)
    Simon

    Have you specified any value (greater than 0) in the Portlet expires in ... minutes field ?
    If you have, then I guess your dynamic page is getting cached.
    Before submitting the form, do a right click on the browser page and view the page source.
    What does the <form> tag look like ?
    Does it still show the old procedure name ?

  • Submit fdf data to php to pupulate a html form text box

    okay i have no idea if this can be done because I always see it the other way around....
    I want to give my clients some instructions to type in an account number that is taken from the pdf, submitted to my web server in php or asp, and generates the information into a text box field...
    can anyone help me in the right direction?

    I cannot use the typical regular HTML "a href",
    because I have to call a struts action.No... you said you have to submit the form with a link. A link is an "a href", it's exactly what <html:link> generates. But a link cannot be used for form submitting except by invoking Javascript to do it programatically.
    Using an action in <html:link>, presuming that's really refering to an action and not just the href value, which is what I'm not really sure of. It's been a while since I've used Struts. So maybe the action is the href part, and you can put "javascript:void(0);" there?
    But I'm absolutely positive about the HTML/Javascript aspect. Struts tags don't alter how HTML works. They just make generating some HTML content easier. But in this case, I'm not sure that's helpful because I never found a simple way to get the actual form name that the <html:form> creates.

  • Copy a Forms text item? [Solved]

    In Forms 10g is there any way for a user to highlight a text item and do a Windows copy to clipboard function without navigating to the text item?
    Turns out that the form in question had the mouse disabled and only the keyboard was allowed.
    Message was edited by:
    [email protected]

    When you highlight text you have to use the mouse or keyboard cursor to select the desired text in the item. If you don't navigate to the item to select the text, how is Forms suppose to know what item to use to get the text? You can't select text from an item unless you make it the current item.
    What are you trying to do that wants you to highlight text without navigating to the item containing the text?

  • How to make form text item nullable?

    I created an Apex form using wizard.
    It had a text item which was not null column in database. Now I made the column nullable in database.
    However, in Apex form, it still refuses to accept any null value in that text item.
    Where do I need to change in form to make it nullable?
    Thanx

    Hi,
    Has the wizard created a not null validation for the column that was originally not null. Check validations and remove the entry.
    Regards
    Paul

  • Form text item initial value not taking effect

    Hello,
    Sorry for the simple question, but I'm at a loss.
    I'm trying to present a system date on my form using $$DATE$$ as the initial value of a text item. The form will not display it. Am I running up against a bug, or is there a block setting that might be getting in the way? Possibly an OAS issue? The item is in a control block, and the form is insanely simple. It makes use of menu as well.
    Any help is appreciated,
    Jim

    I tried setting the initial value to $$DATE$$ in a control block item in Forms 10g (9.0.4), and it worked fine. I think the online help is referring to creating a record in a block (not the database), which happens in a control block as well as a base table block.
    Not sure what version of Forms you are using, but in the unlikely chance that you're still on 6.0, there are some bugs (1046279, 2970983) filed on 6.0 about the initial value not displaying when the text item is subclassed from an object library. If that's what you're experiencing, you should be able to fix it by upgrading to 6i.

  • Request.getParameter() from same page as HTML form

    I have a jsp page with a form. form contains a textfield, once the user submits the form, i want jsp scriptlet to get the
    value of the user input and carry out processing on it within the same page and give a result.
    problem is the first time the page is loaded, there is an error in the request.getParameter() statement since no form has
    yet been submitted i guess ....
    if i use another page ... it works ... but i want to display the information in the same page ...
    thanks

    I'd like to see an example where you'd get a NullPointerException from the line
    if(request.getParameter("foo") == null)
    but not one from
    if(null == request.getParameter("foo"))
    In either case, the only possibility for a NullPointerException would be if your request variable were null (but this would cause a NullPointerException in either method). Otherwise request.getParameter() returns a null value if the parameter does not exist, but will not throw a NullPointerException.

  • Using jar to change functionality of forms text item: possible?

    Hii..I'm using Oracle Forms 10g Rel 1 and DB 10g with AS 10g. The requirement is to have a text field that is able to format text like word processor (e.g. MS Word) and must support image drag drop facility. To facilitate all these, I have written a executable jar. It works fine when run standalone, but I cannot implement it in the forms.
    I am successfully using oracle rollover button, getclientinfo, and other jars. But none of them have a main method. Can anybody give me any clue how can i implement this in the form?

    Hii..I'm using Oracle Forms 10g Rel 1 and DB 10g with AS 10g. The requirement is to have a text field that is able to format text like word processor (e.g. MS Word) and must support image drag drop facility. To facilitate all these, I have written a executable jar. It works fine when run standalone, but I cannot implement it in the forms.
    I am successfully using oracle rollover button, getclientinfo, and other jars. But none of them have a main method. Can anybody give me any clue how can i implement this in the form?
    My another question is that is it possible or not to initialise my jar file in the orcale form without packaging my class file ? E.g.
    //Not available packag in my java code
    //package oracle.demos.......
    class
    that means i have no package.

  • Creating Dynamic Page:  Make My Own Template Appear?

    I am creating a Dynamic Page portlet.
    During the setups for this dynamic page, in the "Dynamic Page and Customization Form Text" step, I would like to make a template of my creation appear in the dropdown of templates.
    (Examples of templates currently appearing in this dropdown list include PUBLIC.TEMPLATE_1 , PUBLIC.PEOPLE_TEMPLATE AND PUBLIC.SKY_TEMPLATE.)
    Does anybody know how I can make a custom template of mine appear in this list?
    Thank you.

    Go to the Navigator (page) > Providers (tab) > Locally Built Providers (link) > Shared Components (link) > User Interface Templates (link)
    Once there, you can either copy one of the existing templates or click on "Create New... User Interface Template" (When prompted, I recommend selecting "Unstructured UI Template" if you want complete control over your html, css, and javascript code.)
    Once your template has been created, you will be able to select it from the list of available templates and the template will be shown when the component is viewed in full page display mode.

  • 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

  • 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

  • Displaying header and border on a dynamic page passing parameters to a form

    I am using portals 10.1.4. and am trying to pass parameters to a form which appears as a portlet on a page.
    for this, dynamic page has been used to pass parameters to that desired form. my problem is this that when the form is displayed with parameters, the header and borders of the portlet disappear.
    The check-boxes for header and borders of the portlets on the page are checked. Yet, when for any reason, the parameters are not passed into the dynamic page, the header of the dynamic page and border are displayed. But when the parameters are passed and the form shows up, then the header and borders disappear.
    can anyone help me with the following:
    - is it the desired behavior?
    - how can i get the headers and borders reappear?
    thanks

    Any ideas fellows?
    how can we control the border and header of dynamic pages when a form or report is called from them with passed parameters?
    will appreciate any helpful experiences.

Maybe you are looking for