LOVs and JavaScript

Hi,
I am trying to use LOVs created with Portal Application inside PL/SQL PDK created portlets.
Anybody has done that?
Also, is there a way to use JavaScript with PL/SQL PDK?
I saw this call inside portal geberated html:
PORTAL30.wwv_javascript.fetch_script?p_name=genlist_popup
anybody knows how to generate it in custom portlets?
Thank you

Yuri,
One of the features of the OWA toolkit is the htp package. The htp packages is used to create html from plsql. There are two procedures that you can use.
1. htp.script
prints html tags for a macro scripting lanugage such as JavaScript, VBScript, etc. It takes in: cscript, clanguage.
Take a look at the package for more info.
2. htp.p
If you use procedure "p" you can insert html tags into your plsql code by placing the tags in quotes...
htp.p('<script language="Javascript" src="http://test.js"></script>');
Hope this helps,
Sue

Similar Messages

  • Dependencies between LOVs and user choices

    Hi guys,
    Maybe the team come help - I haven't really found any comments about similar situations such as this.
    I have a scenario where I need to have 2 or 3 Lovs on the screen (Web based). Let's Call them Districts Towns Streets.
    The user is supposed to choose a District
    then choose a Town (the choice of Towns has to be constrained by his choice of Distict)
    and last choose a Street (the choice of Streets has to be constrained by his choice of Town - and implicitly by the District)
    Data is too much to hold all in Javascript - and assume that I would like to avoid submission of the form until the very end.
    At the moment I am trying to extend the LOVField that by overwriting the function that builds the Javascript for the field and will try to pass parameters in there through javascript (upon change of contents) so that the lovcomp.jsp will then construct its View object by picking those values. or something along those lines
    But I think the best solution might to find a way to change the currency of the view object that gets used in the lovcomp if possible and then see if the framework will take care of the rest
    Any help would be appreciated
    Panos.

    i have the same requirement ,too.
    there are one lov and one textinput in my uix page.when i pick the lov,i want the data in the lov window is based a condition constructed according to the textinput content.
    please help us. thanks a lot

  • How is the length of a string calculated in Java?  and JavaScript?

    Hi all,
    Do any of you know how the length of a string is being calculated in Java and JavaScript? For example, a regular char is just counted as 1 char, but sometimes other chars such as CR, LF, and CR LF are counted as two. I know there are differences in the way Java and JavaScript calculate the length of a string, but I can't find any sort of "rules" on those anywhere online.
    Thanks,
    Yim

    What's Unicode 4 got to do with it? 1 characteris 1
    character is 1 character.
    strings now contain (and Java chars also) is
    UTF-16 code units rather than Unicode characters
    or
    code points. Unicode characters outside the BMPare
    encoded in Java as two or more code units. So it would seem that in some cases, a single
    "character" on the screen, will require two charsto
    represent it.So... you're saying that String.length() doesn't
    account for that? That sux. I don't know. I'm just making infrerences (==WAGs) based on what DrClap said.
    I assume it would return the number of chars in the array, rather than the number of symbols (glyphs?) this translates into. But I might have it bass ackwards.

  • [Solved] Problem with LOV and 'enter query' mode

    Hi all,
    I'm kind of new to Forms and I'm having some problems that I'm not being able to resolve. I already search it on the net, but nothing relevant came up. If anyone could help me I appreciated it.
    In my form I have some fields, and in one of them I have a LOV, and almost everything works fine. I inserted data, changed it, deleted it and all it's ok.
    But when I change to 'enter query' mode, when I try to search for data on the LOV field it ignores what I write.
    That is, for it, it's the same if I make F11 -> write 'aaaa' -> ctrl + F11 or if I make F11 -> '%' -> ctrl + F11.
    It behaves the same way, shows me all the records.
    Probably I'm missing something basic, but I'm not getting it...
    Thanks,
    Ana

    when you create a lov by wizard the lov and record group have always the same name..
    the problem is that the item is NOT based in the tabe.
    what kind of query do you execute if you choose something from a love which is not based on the db?
    i mean, this item has no influence on the query of the table, so whatever you choose it's like a "select * from table"
    i hope i was clear

  • Closing the browser windows created by web.show_document and javascript

    From Forms I am issuing a http request using web.show_document and javascript:window.open(). The http request makes a remote procedure call to a coldfusion component on a JRun appserver. I want this rpc to fire in the background so that the current forms browser window remains as is.
    The logic is as follows
    l_rpcURL := 'http://....just a standard URL.....'; -- edited for this thread
    l_jsURL := 'javascript:window.open("' || l_rpcURL || '","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=no");self.close();';
    WEB.SHOW_DOCUMENT (l_jsURL,'_blank');
    The http request works fine but leaves a browser window behind. It's the one created by the javascript.window.open(). If I remove the self.close() from the javascript then I have two browser windows open, one from web.show_document and the other, as described previously, from the window.open().
    Any idea how I can force closure of the window opened by the window.open() ?
    Thanks

    Hi,
    did this occured afer installing service pack 2?
    A work around is The only solution that is to create a close.html file and calling this file in the code: Web.show_document('http://server:port/close.html','_self');
    <html>
    <body onload="closeit()">
    <script>
    window.close();
    </script>
    </body>
    </html>
    Monica

  • Using Quicken to manage a bank account, I get an error message from the bank that cookies and javascript must be enabled, but I don't get that message when I connect with Internet Explorer.

    Firefox allows me to get the bank home page through Quicken. But when I try to login, the error message appears saying "cookies and javascript" must be enabled. I have Java on my system, but in Firefox under "tools/options/ I don't find any way to "enable" javascript. I have enabled "cookies".
    I have no problem logging in at the bank site using Internet Explorer, but to use it, I have to designate it as the "default browser" before connecting through Quicken. I'd rather keep Firefox as the default.
    A bank tech representative was unable to find any commands in Firefox that would deal with this problem, although she clearly had manuals for both Internet Explorer and Firefox. So she concluded that I would have to use Explorer for this operation, since it allowed control of security level settings. She said that in Explorer, security level should be set to medium.
    Is there some similar control in Firefox?

    Firefox uses the same "security level" setting that is set in IE.
    Tools > Options > '''Content''' <br />
    Is '''Enable Javascript''' check-marked?
    http://kb.mozillazine.org/JavaScript_is_not_Java
    If that doesn't solve your problem, do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • Copy select value in the textfield from LOV and allow user to edit it

    Hi,
    I have a datablock with 20 records and each record has comments (say field_comments) fields. I would like to allow user to choose predefined comments populated from LOV (say lov_comments) and to append some extra comments after they choose the value from LOV.
    I have created a LOV and added Return type “field_comments” in the column mapping properties. When user clicks on a button, LOV opens up. They select the value from the LOV and the value goes to “field_comment” field. The problem with this approach, user can’t add their comment after selecting from LOV.
    I tried this way too. I created another non-visible textbox (say dummy). In the LOV, I added “dummy” field as returntype. In the dummy field, I have created “POST-CHANGE” trigger which basically says :block. field_comments = :block. Dummy.
    But, the user has to click on other field to view the selected value from the LOV. The values in the “field_comments” is not updated as soon as user click on “OK” button in the LOV.
    I would appreciate it if somebody could give me some input and help to solve my issue. Thank you for your help.
    Thank.

    Well, I tried exactly what you posted and it allowed me to SELECT from LOV and then CHANGE/APPEND new text in front of returned value in the field. It saved to the database and queried without any problems.
    Is your item allowed to INSERT/UPDATE ? If not, then set "Update/Insert Allowed" properties to Yes and attach your LOV to the item and set "Validate from list" to No.
    You may also see if you have any validation being performed on WHEN-VALIDATE-ITEM or POST-CHANGE trigger which will fail since you are editing the values populated from LOV.
    Hope it helps!

  • Hi, We have an application  built using HTMl 5 and Javascript running on IPad2, iOS5.1 Safari 5.1. When we try to download a file(.pvw file) in that application safari throws "Download failed" error. Please suggest what needs to be done.

    Hi,
    We have an application  built using HTMl 5 and Javascript running on IPad2, iOS5.1 Safari 5.1.
    When a file url is clicked instead of asking for Save or Open or Cancel options, the file gets opened on IPad by default.
    Is this default behaviour which cannot be changed or can it be configured to ask user preference?
    When we try to download a file(.pvw file -> a model file) in the above application, safari throws "Download failed" error.
    Please suggest what needs to be done.
    Regards,
    Pramod

    Safari on an iPad in general does not allow downloading of files. That's a safety precaution in the iOS SDK to keep unauthorized content off of iOS devices. Safari will open from the web site file types that it can handle, but direct downloading isn't normal behavior, and I don't believe the behavior can be changed, though you can try asking in the developer forum, either here or the one to which you have access as a member of Apple's iOS developer program.
    Regards.

  • SSO and JavaScript

    Hi all,
    does any one of you know about any restriction or any other issue involving SSO and JavaScript?
    We have a web app in an OC4J instance, which uses JSP and JavaScript.
    When SSO is disabled for the application, everything goes well. But when SSO is active, the page loads a lot slower, and the IE browser always shows the error icon when any component tries to execute Javascript.
    Any ideas about this issue?
    Oracle AS 10g (9.4.1)
    Win 2000 SP4
    IE 6.0 SP1
    Thanks a Lot in advance.
    Have a nice day.
    Jaime

    It is simpler to do from server side as follows. Place below line
    inside Page_Load event of any portal component:
       Write(this.Request.Cookies.Get("MYSAPSSO2").Value);

  • Using CSS and Javascript to display a div with flash in it, mozilla reloads the flash file!

    I am using CSS and Javascript to display a div with an
    embedded flash object in it. Mozilla Firefox reloads the flash file
    when the div is displayed! (I dont want this to happen, as it's
    unexpected functionality, my expectation would be that the flash
    file would not change it's state at all, and would remain in
    whatever state it was left in.)
    I was wondering if anyone has come across this issue and is
    there something I can do to prevent this from occurring?
    To be more specific, I have a single HTML page with 8 flash
    files embedded in it (yeah I know, it's a bit much). I am then
    using CSS and Javascript to display (via a numbered link (with an
    id)) an equivalent numbered div tag containing the flash file.
    Mozilla Firefox reloads the flash object that is in the div.
    Internet Explorer will not do this and will instead, load the flash
    object only upon initial view of the flash object. All subsequent
    links (in IE) will NOT reload the flash object on the page. I'm
    guessing this is some kind of difference in the flash player as an
    Active X object and the plugin, or is it just IE being clever? Or
    am I way off?
    Anyway, here is the code...

    I am using CSS and Javascript to display a div with an
    embedded flash object in it. Mozilla Firefox reloads the flash file
    when the div is displayed! (I dont want this to happen, as it's
    unexpected functionality, my expectation would be that the flash
    file would not change it's state at all, and would remain in
    whatever state it was left in.)
    I was wondering if anyone has come across this issue and is
    there something I can do to prevent this from occurring?
    To be more specific, I have a single HTML page with 8 flash
    files embedded in it (yeah I know, it's a bit much). I am then
    using CSS and Javascript to display (via a numbered link (with an
    id)) an equivalent numbered div tag containing the flash file.
    Mozilla Firefox reloads the flash object that is in the div.
    Internet Explorer will not do this and will instead, load the flash
    object only upon initial view of the flash object. All subsequent
    links (in IE) will NOT reload the flash object on the page. I'm
    guessing this is some kind of difference in the flash player as an
    Active X object and the plugin, or is it just IE being clever? Or
    am I way off?
    Anyway, here is the code...

  • Safari not rendering CSS and javascript correctly

    There seems to be a bug in Safari when dealing with CSS display property and javascript.
    I've created a form that hides certain fields when the right circumstances are met, those fields become visible. However, when they become visible, through the use of javascript, they don't display in the flow of the document. For example:
    [field 1]
    [field 2]
    [field 3]
    Assume that [field 2] is hidden on initial page load. And when [field 1] is clicked, then [field 2] should appear and it should appear after [field 1]. Safari, however, displays [field 2] above [field 1] and strips it of any styles. I spent 2 hours trying to figure out what I was doing wrong, but it turns out I wasn't doing anything wrong. It's Safari that can't render this correctly because when I test it in Firefox it works fine. Just as I expected it to. I hope this gets fixed in the next update.
    If anyone has any explanation or solutions or reasons for this peculiar anomaly please tell me.

    If you have not done so already, make sure you also tell Apple by using the Bug Reporting item in the Safari menu.

  • HELP PLASE ! JavaBean and Javascript in frames :)

    Hello,
    First please excuse me for my bad english I'm French think you in advance for your patience and your help ! :)
    To resum the problem :
    I have 2 frames, a menu frame and a main frame
    I use a javabean wich is saved in application variable.
    When the pages of main frame use the javabean there is no probleme.
    BUT when menu frame calls pages of main frame it don't restore the javabean, it looks like je page called by menu frame, which operates on the javabean, wasn't called, and the changes I do in this page aren't saved
    Menu frame uses javascript to calls main frame pages so I think the problem is conjonction of frame and javascript.
    But I have no choice because it's volonty of my boss, so please help me ! :)
    More precisly :
    the javabean : NavigationBean
    page frame menu : menu_page.jsp
    main pages which use javabean : pageA.jsp, pageB.jsp, pageC.jsp
    pageA.jsp has reference on pageB.jsp which has reference on pageC.jsp
    Traitement of the javabean NavigationBean in pageA.jsp, pageB.jsp and pageC.jsp :
    <jsp:useBean      id="gestionNavigation"
              class= "NavigationBean"          
              scope="application">                         
    </jsp:useBean>
    <jsp:setProperty      name="gestionNavigation"
                   property="request"
                   value="<%=request%>" />     
    (it needs response and request to run)
    <jsp:setProperty      name="gestionNavigation"
                   property="response"
                   value="<%=response%>" />
    <jsp:setProperty      name="gestionNavigation"
                   property="pageActuelle"
                   value="<%=urlActuelle%>" />
    (it saves in NavigationBean object the url where user is)
    In pageA I clean all NavigationBean so all pages saved are deleted
    if user go DIRECTLY on pageA.jsp, all is ok :
    user go on
         pageA -> pageB -> pageC
    and NavigationBean save
         pageA -> pageB -> pageC
    That's good ! :)
    BUT if after user go on menu frame it's wrong !
    user go on
         pageA -> pageB -> pageC -> menu_page.jsp -> pageA -> pageB
    BUT NavigationBean save
         pageA -> pageB -> pageC -> pageB
    instead of
         pageA -> pageB
    To resume, for NavigationBean when user go directly on main pages there is no problem, but when it uses menu frame it doesn't save that user go on pageA
    I clean NavigationBean on pageA, but instead of this problem it doesn't clean and retrieve old datas
    It looks like that when user uses menu FRAME it uses an old NavigationBean object, but when it go directly on pages of main frame it runs !
    And I use scope application so don't understand, I have tried session scope but no change :(
    I have tried using "response.encondeURL" but no change
    Think you in advance for your help, and good luck from Paris for all New York people ! :)
    David

    It sounds like what might be happening is when the user goes 'back' to the menu, they're not requesting the page from the server. So, they're either getting the old page cached by the browser. Maybe. If you reload the menu page manually, does it work?

  • Error using java and javascript

    I have a jsp page that links to a bean and is working fine (getting data from the database).
    On a html form I have a button with a picture that fires off javascript when clicked:
    <BUTTON TYPE=reset onclick=showinfo('<%=index%>')>
    <IMG SRC="http://localhost:8080/Portal/Images/q2.bmp" ALT="Info">
    </BUTTON>
    The javascript function just opens a new window and displays the text sent in:
    <Script Language=JavaScript>
    function showinfo(arrayindex)
    InfoWin=window.open("","InfoWin","width=345,height=220");
    InfoWin.document.write(arrayindex);
    return false;
    </Script>
    Well in the above example index is a number (pulled from the database using a java bean and javascript converts it into a string then the function displays it correctly. If I replace <%=index%> with regular text it works fine as well(because java isn't used to pull data)! The problem occurs when I retrieve text data from the database and send it to the function. The web page gives errors about a nonterminating string. But I can move the code to somewhere else on the form(as long as I don't send it to java script) and it will print the text to the screen. I can also view the source of the web page and the html shows the text from the data base as if I hard coded the text into the javascript!!!!!!!!!!!!!!!!!
    This must be a bug between java and javascript!
    -can pass numbers(from a database) between the two
    -can't pass text (from a database)between the two
    Any info would help!

    Found the problem myself!
    I am using an odbc connection to msaccess and the spaces in the text was messing things up!
    After taking out the spaces it worked again.

  • Query LOV and how to display the LOV back in the Text item.

    Hi All,
    I have got a big time problem in getting back my LOV value after Querying it.
    Am using a Tabular Canvas having 10 rows and two columns, one having "Type"(as LOV) and corresponding "Type identifier".
    My LOV is an non data block item, having the correct return type. When ever i search for a value in the LOV, its should give out all the "Type Identifier" list and the "Type".
    But what i am facing is, am not able to get back the selected LOV after querying it and am getting the entire "Type Identifier' with out any filter.
    In short my requirement is,
    - I need to search an LOV,
    - Display the LOV value in the "TYPE" field.
    - Display the corresponding "Type Identifiers'
    Pls note: Since am new to Oracle Forms, if in your replies, if you specify to use any code in trigger, pls specify which trigger to use.
    Thanks a lot in Advance... its bit urgent
    Arun

    Hi Dave
    The requirement is suppose i have an Lov called OrgName is atatched to a column in which user will select the Ou Name from the list and internally the respective org_id will store into the database where the OU Name is available in the same data block but it is not database item . (Only org_id is database item)
    Now if you query the same block i would expect the Ou Name should display .
    Right now in my case it is not displaying anything into that column.
    Hope u understood this time..Please let me know is there any trick?

  • Item Renderers Preview and JavaScript Generator wizard

    Hi all,
    there are 2 feature I can't seem to get my hand on on the
    latest Beta release of FB3 (Beta 3): Item Renderers Preview and
    JavaScript Generator wizard.
    Can anyone elaborate on how to get these started? how can I
    check'em out? are they in the Beta 3 at all or are they supposed to
    come out only in the final release. As far as now I wasn't able to
    find any information on both on the web aside from what Matt Chotin
    wrote on the "What's new" and on the FB3 Wiki.
    cheers.

    Hello Heike,
    Well I have been working on this and wanted some more information regarding one of the possible issues.
    As I have been telling you that I have dropdown boxes and based on the values that the user selects corresponding report should run.(I have eight drop down box and five push buttons)
    Now I have made the selection in the drop down boxes "multiple".
    I am generating the url for all the selected values. Like I have a drop down box whose value is 0SALES_OFF. if the user selects three options for this filter say "A", "B" and "C" and hits one of the push buttons , the query runs fine and filters the value. The only problem lies in the drop down box: it shows "A","B" and "C" as selected values in the drop down box, however this is just a display text and its value is"!unchanged". Now if the user wants to keep the same filter value the value that is being used for the selection is "!unchanged" instead of "A","B" and "C".
    I think this code is generated by SAP.Can you give me some insight as to where should I make certain changes so that values persists?
    Personally, I feel this is a more cumbersome method than using the standard navigation block..but still .I am client site...
    Thanks and Regards
    Pradeep Bhojak

Maybe you are looking for

  • How to suppress blank page before side-by-side subreports

    Post Author: nv6525 CA Forum: General I'm having a problem with a primary report forcing a page-break before sub-reports display data.Here's the side-by-side (newspaper-column style) report I'm trying to build:   Report Header      Report title   Pag

  • Error message when trying to import Quicktime movies

    All of the sudden, I'm getting this weird error message when trying to import various Quicktime movies. I've never seen this message before: File Error: 1 file(s) recognized, 0 access denied, 1 unknown Any thoughts why this might be happening? Any in

  • Problem For/Each statement (or the problem is the MouseListener...)

    Hi guys, I'm making a program in java for school. Now I have this:           for(Stap2TrampolineModel trampoline : lijstTrampolines)                trampoline = new Stap2TrampolineModel(0,215,100,"Poing",lijstKinderen); //model                trampol

  • Introduction to regular expressions ...

    I'm well aware that there are already some articles on that topic, some people asked me to share some of my knowledge on this topic. Please take a look at this first part and let me know if you find this useful. If yes, I'm going to continue on writi

  • Error in opening PDF attachment sent using SO_DOCUMENT_SEND_API1

    Hi all, I am converting script to PDF using FM 'SX_OBJECT_CONVERT_OTF_PDF'. Using this table i am trying to send it as a attachment to mail id. I am able to send the attachment successfully, but not able to open the attachment. It is giving error as