Javascript function for validating string for length

hi all,
i am having a string whose datatype is CHAR in the database and length is 7 .
can any one help me with the javascript validation code(function) for this?
regards and thanks in advance

sigh Another user to the ignore list. :)You should see this thread
http://forum.java.sun.com/thread.jspa?threadID=632908&tstart=0ram.

Similar Messages

  • Page items are cleared when calling javascript function for a buton.

    Hello,
    Can anyone please help me out with this issue.
    I have a reports region with some editable items and in which I have a button enter errors which opens up an popup window, but for this button i also have save process which updates the report and also calls the javascript function popup window. The reason I am saving the report is because the values entered by user needs to be updated in the table or otherwise the page will be reloaded clearing all the values entered by the user when i click the button enter errors. One more thing is that I also have two hidden items (P1_LOAN and P1_HERITAGE) in the reports region.
    Below is the javascript function which i am calling for the button and also setting the items P2_LOAN_NUMBER,P2_HERITAGE with the values &P1_LOAN.,&P1_HERITAGE.
    function ErrorPopup()
    popUp2('f?p=&APP_ID.:2:&SESSION.::&DEBUG.::P2_LOAN_NUMBER,P2_HERITAGE:&P1_LOAN.,&P1_HERITAGE.','_blank','scrollbars=0,left=200,menubar=0,resizable=0,width=400,height=500,toolbar=0,location=0,directories=0');
    doSubmit('ENTER_ERRORS');
    }And below is my pl/sql update process
    BEGIN
    FOR i IN 1 .. apex_application.g_f01.COUNT
    LOOP
                 IF WWV_FLOW_ITEM.MD5(                                                      
                                           APEX_APPLICATION.G_f10 (i) ,
                                           APEX_APPLICATION.G_f11 (i) ,APEX_APPLICATION.G_f12 (i) ,APEX_APPLICATION.G_f13 (i)) <> APEX_APPLICATION.G_F45 (i) THEN
    -- Update tbl
              UPDATE sampl_tbl
              SET  col1     =      APEX_APPLICATION.G_f10 (i) ,
                         col2     =      APEX_APPLICATION.G_f11 (i) ,
                         col3     =      APEX_APPLICATION.G_f12 (i) ,
                         col4     =      APEX_APPLICATION.G_f13 (i)
                   WHERE pkcol    =      APEX_APPLICATION.G_f04 (i)         
         END IF;
    END LOOP;
    COMMIT;
    END;The only problem I have is, when I open up the popup window the hidden item values P1_LOAN and P1_HERITAGE are lost. Is their a way to set these item values within the session.
    thanks,
    Orton
    Edited by: orton607 on Jul 14, 2010 10:38 AM

    It HELPS when you solve an issue and POST that YOU SOLVED it, to SHARE the solution so others can learn from you found..
    Thank you,
    Tony Miller
    Webster, TX

  • Javascript Functions for 4.2?

    Does anyone know where to find a list of all the javascript functions in APEX 4.2?

    In the documentation:
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/javascript_api.htm#CDEEIGFH

  • Assigning return value of a javascript function to a variable

    hi.
    I have a javascript function which returns string.
    I wanna assing return value of that function to variable.
    for example:
    <script>
    funtion writeMe()
    var ex;
    ex="try"
    return ex;
    </script>
    Then in body of JSP page. I wanna do something like:
    <% String st;%>
    Now I wanna assign the value that returned from writeMe function ("try") to st string.like:
    <%st= writeMe();%>. but of course it doesn't work. how can I do that?

    thnx. but actually what I want to do is sending some values produced by javascript to a barchart object. is it impossible too?
    I mean my script function returns something like "100, 200, 300". I wanna pass that values to barchart. when I want to add aplet tag to jsp code instead of writing:
    <param name="s1_value" value="100,200,300">
    I want to write somethin like:
    <param name="s1_value" value="myscriptfunction()">
    is it possible in JSP? I saw an example like this in asp. it was like:
    <param name="sampleLabels" value="<%call func1()>">. but in JSP it seems like call tag doesn't work. Is it possible in JSP?

  • Problem when calling more than 1 Javascript function

    Hello everybody,
    I am trying to disable fields based on the value in a Select List. There is a table in which values are stored to tell if a field should be disabled for the selected value. I have created an Application Process and a JavaScript function for each field.
    The problem is that only the first function is executed, and the second not.
    I have tried the following:
    onchange="Disable_Dagen(this);Disable_Kg(pThis);"and I have put them together in a parent JavaScript function
    function Disable_Fields(pThis){
    Disable_Kg(pThis);
    Disable_Dagen(pThis);
    }In either case only the first works, so when I change the order then the other one is executed properly.
    Can anyone give me a clue on how to solve this?
    My complete JavaScript definition in the header is as follows:
    (the code in html_DisableOnValue is taken from the example site from Carl Beckstrom)
    <script language="JavaScript" type="text/javascript">
    <!--
    function html_DisableOnValue(pThis,pValue,pThat){
         var lTest;
      if(pThis.nodeName == 'SELECT'){
                   lTest = html_SelectValue(pThis) == pValue;
         }else{
                   lTest = $x(pThis).value == pValue;
         if(pThat){
               for (var i=2;i <= arguments.length; i++){
                          html_disableItem(arguments,lTest)
         return;
    function Disable_Dagen(pThis){
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=AP_RETURN_DISABLE_VAL_DGN',0);
    get.add('AI_AFW_CODE',pThis.value);
    gReturn = get.get();
    get = null;
    //alert('Return waarde is '+ gReturn );
    html_DisableOnValue(pThis,gReturn,'P43_AANTAL_DAGEN');
    function Disable_Kg(pThis){
    var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=AP_RETURN_DISABLE_VAL_KG',0);
    get.add('AI_AFW_CODE',pThis.value);
    gReturn = get.get();
    get = null;
    //alert('Return waarde is '+ gReturn );
    html_DisableOnValue(pThis,gReturn,'P43_AANTAL_KG');
    function Disable_Fields(pThis){
    Disable_Kg(pThis);
    Disable_Dagen(pThis);
    //-->
    </script>
    In this case the Form Element property is set toonchange="Disable_Fields(this)"
    Thanks, Wouter                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Roel,
    Thanks again for your response.
    There is a lot more to Firebug then I had seen before. Now I have turned on the Console and the Script. Initially I saw the following in the Console:
    C is undefined
    $x_disableItem(undefined, true)apex_3_1.js (regel 1)
    html_DisableOnValue(select#P43_AFWIJKING_CODE, "101", "P43_AANTAL_DAGEN")f?p=104:...2606::::: (regel 38)
    Disable_Dagen(select#P43_AFWIJKING_CODE)f?p=104:...2606::::: (regel 51)
    onchange(change )f?p=104:...FPQ%3D%3D (regel 2)
    [Break on this error] var gDebug=true;var gkeyPressTime;var gL...Options;html_SelectValue=$f_SelectValue;When I removed the comments before the 2 Alerts, I only got one alert when I tested it.
    Then I replaced the function call to html_DisableOnValue to $f_DisableOnValue as you suggested, and that did the trick. Now it Works!
    I still don't know why the html_DisableOnValue function doesn't work. I just copied it from the demo site of Carl Beckstrom. Anyway my problem is solved.
    Have a nice weekend, Wouter

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • Javascript function

    hi experts
    how can i open new report using go url in pop-up window using javascirpt..
    thanks for your help in advance.
    Any help on this please!!!!!!!!!
    regards
    Edited by: ObieeUser on 17-May-2010 06:17

    I did this feature.
    1. Create a javascript function for popup window, for example such that (it's my code your may use yourself)
    function MyPopupWindow(mypage,myname,w,h,scroll)
    var myleft=0;
    var mytop=0;
    var viewportheight = window.parent.innerHeight || window.parent.document.documentElement.clientHeight || window.parent.document.getElementsByTagName("body")[0].clientHeight;
    var viewportwidth  = window.parent.innerWidth  || window.parent.document.documentElement.clientWidth  || window.parent.document.getElementsByTagName("body")[0].clientWidth;
    //alert(navigator.appName);
    //alert(viewportwidth);
    //alert(viewportheight);
    myleft=(viewportwidth-w)/2;
    mytop=(180+viewportheight-h)/2;
    settings="width=" + w + ",height=" + h + ",top=" + mytop + ", left=" + myleft + ",scrollbars=" + scroll +",location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
    win=window.open(mypage,myname,settings);
    win.focus();
    }2. Add this function in a common.js file by path
    %SAROOTDIR%\web\app\res\b_mozilla
    If you use oc4j as application server then add this file to
    %SAROOTDIR%\oc4j_bi\j2ee\home\applications\analytics\analytics\res\b_mozilla
    3. Don't forget restart presentation services and oc4j
    4. In you report use code similar like this
    5. In a report add code
    '<--a href="javascript:void(null)" onclick="javascript:MyPopupWindow(' || <GoUrl here> || ',''biee'',100,100,''no'')">' || <link name> || '</a-->'and assign HTML format to column. In this code replace '<--' to '<' and '-->' to '>'.
    Edited by: AnTonic on May 18, 2010 12:41 PM

  • How to call javascript function?

    Hi,
    How to call javascript function for SAP button
    control onclick event?
    Thanks in advance.

    Hi Sundar,
      u can call java script  in design mode.
      Add this code in ur design part inside body and call the function as
    <sap:button id="a" onSelect="javascript:go();"
    Add inside body:
      <script language="javascript>
    function go(){
    alert("hai");
      </script>
    Regards,
    Vinoth.M

  • Get table ID for drill down (javascript functions)

    I want to implement some custom drill downs. When you click on a column to drill down, it uses the following javascript function: RTDr(saw_5_6,0,0) where in this case, "saw_5_6" is my current table. Since this is dynamically set and the table name can change, is there a property that i can get this table name from?
    I see where the object is created....(dynamically I might add)
    window.saw_5_6 = new Object();
    saw_5_6.sJSObjName = 'saw_5_6';
    Just wondering if there is a way / property that gives me this information so I can call RTDr() and supply it the correct table name.
    Thanks.
    Edited by: Derek on Nov 9, 2010 2:28 PM

    If there is only one table on the page then you can use my function as it is. I wrote it to implement custom writeback. Of course you can modify it to get all table objects.
    function getSawTableObject(){
         var ptrSawTableObjectName = /saw_.\d/;
         var obj = null;
         for (var propertyName in window){
              if ((ptrSawTableObjectName).exec(propertyName) && String(propertyName).charAt(0) == 's'){
                   obj = window[propertyName];
                   break;
         return obj
    }

  • How to Use the language function for assignment and validation

    Hi All,
    If anyone can explain me in details with example ,how to use the language function for assignments and validations?
    Thanks
    Arnab

    Hi Arnab,
    The expression is checked only for the current MDM session.
    If u login with the ABC language it will always show the ABC language no matter how many times u execute it.
    Try connecting to the DM with the XYZ language.
    It should go to the if part rather than else.
    Hope it helps.
    Thanks,
    Minaz

  • How to use destination function for javascript

    Hi,
    I used javascript:var a = window.open('OA.jsp?page=/oracle/apps/cdar/admin/brandupload/webui/SupportPG&retainAM=Y&OARF=printable', 'a','height=500,width=900,menubar=yes,toolbar=yes,location=yes'); a.focus(); in destination URL property, it can work to popup another window.
    But I want to setup a Oracle function for this javascript, and use Destination FUNC property on the button to popup window. But it can not work after I setup a SSWA jsp function with WEB HTML.
    Could some one help this?
    Thanks,
    Eileen

    Eileen,
    How are you adding the OA function ? I have also tried destination url property but not the destination function.Probably you should do sth like this :
    In ProcessRequest :-
    <OABean> <var name> = (<OABean>)webBean.findChildRecursive("<Bean Id>");
    <var name>.setOnClick("javascript:window.open ('OA.jsp?OAFunc=<funcName>','new','height=550,width=850,status=yes,scrollbars=yes,toolbar=no,menubar=no,location=no' );
    OABean is the bean on click of which the page should open like a hyperlink or sth like that.
    Hope this helps.

  • Sql function for fetching only initail char of string

    Hi All,
    I would like to know is there any sql builtin function which returns initial char(abbrevation) of any string pass to it
    for eg. DEPARTMENT SUB GROUP should return DSG..
    Pls do share with me if any 1 is aware of this or who has already self defined any function for this purpose.
    Thanks in Advance

    And if you have 10g available, here's the regex version:
    with t as (select 'DEPARTMENT SUB GROUP' col1
                 from dual)
    select t.col1, regexp_replace(t.col1, '(\w)\w*\s*', '\1')
      from t;Small correction, just in case we only have 1 letter words.
    C.

  • MDX - function expects a string or numeric expression for the 1 argument. A tuple set expression was used.

    why this query
    select [Measures].[F Events Count] on 0,
    Filter([D Actor Player].[Actor].children,
    ([Measures].[F Events Count],
    {([D Date].[Hierarchy].[Season].[2012 - 2013]),([D Date].[Hierarchy].[Season].[2013 - 2014])},
    [D Result].[Result].&[Goal])
    >=5) on 1
    from [FBA Cube]
    gives this error:
    Query (3, 3) The >= function expects a string or numeric expression for the 1 argument. A tuple set expression was used.
    while the following query works fine
    select [Measures].[F Events Count] on 0,
    Filter([D Actor Player].[Actor].children,
    ([Measures].[F Events Count],
    [D Date].[Hierarchy].[Season].[2012 - 2013],
    [D Result].[Result].&[Goal])
    >=5) on 1
    from [FBA Cube]
    why having set inside Filter's boolean expression generates that error? how can we
    keep the set inside the Filter's boolean expression but
    solve the problem? please explain the reason and solution

    Hi Butmah ,
    I think you should use an aggregation function with the set and the tuple ... adding an AdventureWorks snippet :
    select [Measures].[Order Count] on 0,
    Filter([Product].[Category].children,
    SUM({[Date].[Fiscal].[Fiscal Year].&[2011],[Date].[Fiscal].[Fiscal Year].&[2009]}
    ,([Measures].[Order Count],[Geography].[Geography].[Country].&[United States])
    >=5) on 1 
    from [Adventure Works]
    Regards, David .

  • Documentation for Javascript Functions

    Where do I find documentation for APEX provided javascript functions such as addRow();?

    WaltK wrote:
    Where do I find documentation for APEX provided javascript functions such as addRow();?
    addRow is undocumented.
    Documented JavaScript methods are described in the API Reference, other documentation for the current version is located on the APEX Documentation page. Documentation for previous versions is located in the documentation archive.

  • Smartview VBA function for launch calc-scripts as strings. like EsbCalc ???

    We have used an Excel VBA which launch an calculation script from a STRING using the VBA Add-In function "EsbCalc".
    We would like to migrate to Smartview VBA functions.....
    The calc-script string has "parameters" which are modified at run-time...
    I have found the function HypExecuteCalcScript - but seems that use as parameters ONLY the calc-script name...
    Is it any VBA function in SmartView which launch a calc-script string (not a calc-script name) ?
    We are using EPM 11.2
    Thanks...

    A tip I just learned at Kaleidoscope 2010* is that one can create a calc script consisting entirely of a substitution variable. In other words, a calc script can look like this:
    &Calc
    Smart View VBA does have a function for changing or creating substitution variables (HypSetSubstitutionVariable). You could create a calc script and subvar in your database as above. Then, at run time, set that subvar to your calc string with HypSetSubstitutionVariable and execute the calc script with HypExecuteCalcScript.
    Quick test (11.1.1.3) shows that this really works.
    I can't remember privileges required to create or set subvars vs execute calc strings off the top of my head - might be an issue (I ran as an admin). Also this approach doesn't support concurrent users, unless they each have a calc script and subvar to themselves. Still, depending on your exact situation, this might be a feasible workaround.
    *I won't credit the presenter solely because the tip came from a presentation which he specifically declined to make public domain.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • On Mavericks Mac mail tells me my password is incorrect.

    My Mac is on Mavericks.  I have 2 POP email accounts. These two accounts are setup identically on my Mac my iPad and iPhone.  On iPhone and iPad they work fine.  On my Mac both emails tell me my password is wrong - it is not - HELP please.

  • Stutter on song switch or pause

    Hi everyone, I have a sort of unique problem. When I play a song everything works fine, but when I switch songs or pause, iTunes will pause, do a little hiccup and play a split second of the old song before switching, almost as if it is lagging. If y

  • Printing too Red - Help!

    Hi, I'm having a huge problem I have no idea how to fix. When I have a photo I print it looks good on the screen (iPhoto) but the skin tones print very red when using either my Epson Picturemate or my Canon MP600. I got an idea and hit print preview

  • HT4623 My ringer and music volume is very low!! The problem just started today can someone help?

    Can someone one help me, I just started having problems with my volume. My music and my ringtone are very low!

  • How to run Session ejb client program?

    Hi I am using weblogic server8.1 . I was running an ejb session client program it throws exception like below. Can any one tell me how to run a client in weblogic server. give the syntax for running ejb client. D:\Weblogicserver\user_projects\domains