Javascript in URL

Hi:
I am using Apex 4.0.
I have a horizontal report that I am using for a page. I need to call javascript in the link to set an item on the page. My code does not seem to be working.
Here is what I have done...
How must the javascript for the link appear in the sql?
Currently I have the following
href="javascript:$s("P1_SUPPLIER_IND",Supplier Performance)">Supplier Performance</a></li>' as menu from dual"
union all (and so on....)
Then, I have a dynamic action triggered on the change of :p1_supplier_ind (the item being set by the link.
The dynamic action does not seem to be triggering and makes me think that the javascript is not formatted correctly in the href.
Any help would be apprecieated.
Regards,
Bruce
Edited by: bclark on Jul 13, 2011 12:37 AM
Edited by: bclark on Jul 13, 2011 12:41 AM

Hi,,
thanks for the quick reply. But what i asked was different. I will put it in different way. I have deployed a application in Web Application Server and trying to access it through URL iView. My application is pure J2EE application with html,jsp and JS files. In javascript we used window.top property of the java script which is working fine MS IE. The problem is window.top is a IE specific property which is not having any equallent open standerd so EP is throwing a java script error. As I know the only possible solution for this problem is inherating IE rendaring capabilities to iView(i.e iFrame). is there any way to do that?
Ashok.

Similar Messages

  • Problem with JavaScript in URL iView

    Hi,
    I am facing a problem with javascript when i am trying to access my application through URL iView. In the javascript window.top is used to access the frames in the window. But the EP is not recognizing it as valid. what exctly the problem and please suggest me a solution.
    Ashok.

    Hi,,
    thanks for the quick reply. But what i asked was different. I will put it in different way. I have deployed a application in Web Application Server and trying to access it through URL iView. My application is pure J2EE application with html,jsp and JS files. In javascript we used window.top property of the java script which is working fine MS IE. The problem is window.top is a IE specific property which is not having any equallent open standerd so EP is throwing a java script error. As I know the only possible solution for this problem is inherating IE rendaring capabilities to iView(i.e iFrame). is there any way to do that?
    Ashok.

  • Can't execute javascript via URL Bar

    https://support.mozilla.com/en-US/questions/871548
    I suffer from this, the solution to use a bookmark works however I want to know how and what changes prevent the use of the URL Bar for such things.
    Sometimes Firefox will respond to it being pasted in the URL Bar and sometimes it won't. there does not seem to be any logic behind it hence my question.
    Edit: and just for the sake of it, not really important but how do you make mailto links always open in a new tab?

    Javascript runs with different levels of acces rights. When you type something in the URLbar, it get no access rights (Null principal - starting in Firefox 6 see question 876916), so you can do almost nothing. A bookmarklet runs with page access rights, so it can do more like alert("hello") etc. Javascript that runs inside an add-on has maximum power and can do everything "chrome privileges".

  • Want a javascript redirect URL using an already defined page item?

    Hello,
    i have a button where i configure a Redirect to URL option... and use : javascript:html_PopUp('http://yahoo.com', '_newwindow');
    That is pretty clear, and it works. I also have a defined page item which does contain a valid URL
    For example :P4_OFFICE_WEB_PAGE_LINK_V:='http://google.com'
    I want the pop up to use a stored value, not the hardcoded one at the top... I have tried all of these, but none seem to work :
    javascript:html_PopUp('P4_OFFICE_WEB_PAGE_LINK_V', '_newwindow');
    javascript:html_PopUp(':P4_OFFICE_WEB_PAGE_LINK_V', '_newwindow');
    javascript:html_PopUp(APEX_UTIL.GET_SESSION_STATE('P4_OFFICE_WEB_PAGE_LINK_V'), '_newwindow');
    What should i use?
    Thanks.

    user12602240 wrote:
    I am a bit novice... sometime i don't know when to use a : (colon) and when not! And i certainly didn't know an ampersand symbol, page item name followed by period (.) will return the value stored. All covered in the documentation.
    Please update your forum profile with a real handle instead of "user12602240".

  • SSP checksum in Javascript envoked URL

    Hi,
    I have a report with a column link and an URL:
    javascript:popupURL('f?p=&APP_ID.:300:&SESSION.:#QUELLE#::RP:P300_PSN_ID:#PERSON#')In the popup-window I get the missing checksum error message. How can I create a checksum for this URL inside of Javascript?
    Thanks, Juergen

    Juergen - You have to go to the server to call the prepare_url function which will give you a URL with a checksum. You might be able to do that using AJAX and an application process.
    Scott

  • Flash and a Javascript tagged URL

    I was sent a link for a 360 panorama, which I am linking to
    inside my flash movie. When I use the JS script tag, it get an 404
    error. When I strip the URL out of what I was sent, it gets to the
    server looking for the 360 Pan, but will not show it. It seems to
    see the information in the JS file however.
    Here is the test page
    link. Button 1 has the JS script tag, button 2 has the naked URL.
    How much information does Flash need to handle a link tagged
    with JS? Below is the original tag I was sent.

    Found another thread:
    https://support.mozilla.com/en-US/questions/861910#answer-232406
    and tried clearing the cache and the cookies, and amazingly, everything appears to be working for me now! :)

  • Openning an URL in a new window when the page is submitted, from a pl/sql p

    Hi,
    What I want to do is a procedure (called by an apex process) that opens a new window browser at the URL defined in the procedure.
    I have tried with the following procedure:
    create or replace procedure reportes (par1 NUMBER, par2 NUMBER)
    BEGIN
    htp.htmlOpen;
    htp.headOpen;
    htp.title('Reporte SAF - .: SINERWARE - 2008:.');
    htp.headClose;
    htp.bodyOpen;
    htp.area('0,0,200,400', 'rect', '200.31.86.173/Orden_pedido.jsp?centro_costo='||par1||'&orden_inicial='||par2, NULL, '_blank');
    htp.bodyClose;
    htp.htmlClose;
    END;
    Thanks for any comment.
    Alejandro T.

    I assume your are writting an applet. You can do this by adding a little Javascript to your HTML page. Add this to the HEAD section:
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
      function openURL(url) {
        window.open( url, "", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes" );
      } //end openURL
    // End -->
    </SCRIPT>Execute the Javascript using showDocument():
    String url = "http://somewhere.com/" ;
    try {
      getAppletContext().showDocument((new URL("javascript:openURL(\"" + url +"\")"));
    } catch (MalformedURLException me) {
    } //end try

  • SOLVED: Unable to set Destination URI to URL stored in a VO attribute

    Hi OAF Gurus,
    I want to set destination URI for a message styled text bean in my custom OAF page, such that on clicking the link a popup window comes up with an external url. This external url is record specific and is stored in a db table. I have access to this url thru a VO attribute on my page.
    If I set destination URI declaratively using a static url, it works fine for me. However when I try to pick up the destination url from VO attribute, fwk is prefixing "http://server:port/" to the url and consequently making it an invalid url.
    Please suggest a way to stop fwk from prefixing "http://server:port/" to the url stored in my VO attribute.
    What works:
    Destination URI:
    javascript:var a = window.open('http://www.google.com/', 'a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no'); a.focus();
    What doesn't work:
    Destination URI:
    javascript:var a = window.open('{@BpelInstanceUrl}', 'a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no'); a.focus();
    VO attribute BpelInstanceUrl has value "http://www.google.com/".
    When I specify the above destination uri using VO attribute 'BpelInstanceUrl', I get the following url on the link:
    javascript:var a = window.open('http%u003a//www.google.com/', 'a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no'); a.focus();
    I searched the forum, but couldn't find any discussion on setting destination uri to an external url based on the value of a VO attribute.
    Thanks for the help. Waiting for your valuable inputs.

    Shiv,
    I don't think your suggestion will work, because jsp redirect which framework will use internally will take default port number if fully qualified url(like http://www.google.com/') is not used.So, Ritesh will have the same problem as he mentioned.
    Now, Ritesh coming back to your problem, the solution is to attach the fully qualified url in the table component at runtime. This will help you in two forms:
    1)There will be no MAC key validation for your javascript generated url.
    2)Your fully qauilified url will be attached to url property at runtime, so would not face the current problem.
    Hence you need to use bound values api. Here is the sample code:
    OATableBean tableBean =
    (OATableBean)webBean.findChildRecursive("<table item id>");
    OAMessageStyledTextBean m= (OAMessageStyledTextBean)tableBean.findChildRecursive("<message styled text in table item id>");
    OADataBoundValueViewObject tip1 = new OADataBoundValueViewObject(m, "<vo attr name which stores url for each row>");
    m.setAttributeValue(oracle.cabo.ui.UIConstants.DESTINATION_ATTR, tip1);
    I hope i am clear.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Javascript on Button displayed among this region's items?

    Hello,
    I have implemented Javascripts to used manual LOV, has well describe in "How To", and everything work well.
    I now want to put a button in my LOV page to return back a fix value to the calling page/item. From this button, I'm calling the javascript javascript:passBack('fix_value');
    If I put this javascript in URL Target of a region button, it is working well.
    But position of the button is not what I want. If I try to use a "button among region items" and I define a branching with URL target equal to the same javascript, I get a page not found error.
    Is there an easy solution for this?
    Thank you
    Jean

    check out whether this helps you.....
    when we create a button then automatically javascript:doSubmit("request") function gets attached to it and in this function , current page is submitted.
    If you have created the button among the region items , then i am pretty much sure that you wanted to display this button adjacent to some item (let us say A ) in the region
    If above assumption is right then i think it is better to use a IMG tag (displaying the button ) in < Post Element Text > of item A instead of creating the button in the region...
    e.g then you can put the same in <Post Elment Text > of item A of the region
    <IMG SRC="img src"
    alt="Query" border="0" align="bottom left"
    onclick = "<call javascript>">
    here you can
    1. use HREF to redirect ....then no need of javascript function
    2. put "#" in HREF and use a javascript function to re-direct...
    i have used this approach extensively and it works fine ...plus it gives you freedom to exactly place the button where you wanted on ur page ...
    P.S. i tried creating doSubmit(request) function on the page and thought that this function might override the HTMLDB's doSubmit function ..but it did not work
    ----------------------------------------------------------

  • Strange  javascript  in Universal theme

    Hi
    I use Highcharts javascript Library , in  any legacy  theme  the   library  run ok ,  but  if  I wants to use the library in the new theme  I get   the next message  :
    Uncaught TypeError: Cannot read property 'addEvent' of undefined
    Uncaught ReferenceError: $ is not defined
    Please check  the applicacions in : https://apex.oracle.com
    workspace : apx50
    user            :test
    password    :test
    Application running ok  is  "OLD"  with legacy theme
    Application  not running  is  "NEW" with Universal Theme
    I test in  several  enviroments
    OS: OEL,Windows 7, Solaris
    DB: 11r2, 12c
    Listener : ORDS2.0
    app server : Glassfish & ORDS standalone
    Thanks

    mortus wrote:
    I use Highcharts javascript Library , in  any legacy  theme  the   library  run ok ,  but  if  I wants to use the library in the new theme  I get   the next message  :
    Uncaught TypeError: Cannot read property 'addEvent' of undefined
    Uncaught ReferenceError: $ is not defined
    Please check  the applicacions in : https://apex.oracle.com
    workspace : apx50
    user            :test
    password    :test
    Application running ok  is  "OLD"  with legacy theme
    Application  not running  is  "NEW" with Universal Theme
    I test in  several  enviroments
    OS: OEL,Windows 7, Solaris
    DB: 11r2, 12c
    Listener : ORDS2.0
    app server : Glassfish & ORDS standalone
    This obviously has something to do with the ordering and execution of JavaScript components, which is controlled by various substitution strings in the page template, and where you have created/executed your custom code.
    I've created a copy of your NEW application as NEW 586 in which the reference to the Highcharts library is moved from the legacy HTML Header attribute to the page JavaScript File URLs attribute, and the Highcharts demo code moved from the static region body to the JavaScript Execute When Page Loads attribute. The code then runs without error—i.e. all of the required components have been loaded before the demo code is executed—but I suspect the page does not render as you require...
    Please explain/demonstrate exactly how you are using Highcharts in your real application.

  • Strange url in exchange portlet.

    I add exchange portlet into my portal page.
    It's fine. But when I try to view inbox contents by clicking the content link, I see attached url(javascript:submitURL2227("right url")) and failed to view them.
    Of course, when I access right url,I successed.
    Would you help me?
    with regards,
    eunjoo

    Hi,
    The javascript:submitURL2227("url") that you see is the URL created by URL based portlets to render content inline.
    If you do not want to render content inline, set the <inlineRendering> value in provider.xml to false.
    Is there some error being thrown when you click on the link? Look in the application.log file at the following location:
    OC4J_PORTAL/j2ee/home/application-deployments/exchange.
    Also check for javascript errors in the browser window. Maybe I'll be able to help you better if you can send me the errors.
    - Ashish.

  • 2 javascript src in one page ?

    Hi,
    I have a Portal Application based on JSPs
    My JSP page are begining to fill up with javascript, so now I would like to move the scripts into a file.
    I have created a file called myScripts.js and placed it in the dist->script folder.
    In my JSP page i added the code.
    <%
    String url = componentRequest.getWebResourcePath() + "/scripts/myScripts.js";
    %>
    <script type="text/javascript"  src="<%=url%>"></script>
    i can see in the jsp that the url is generated correctly.
    But when i add the <script type=...
    i get a javascript error on another script on my page.
    Syntax error line 6 char 1.
    which is a sap generated script
    <SCRIPT src="/irj/portalapps/com.sap.portal.epcf.loader/script/standard/js13_epcf.js?6.0723"></SCRIPT>
    Anybody know why it does this ?
    Br Rasmus
    String

    Hi,
    I have often used more than 1 script tag in the same page!
    I have not seen any problem.
    It has worked for me whenever I used in the following manner
    <%
    String srcid =
    componentRequest.getResource(IResource.SCRIPT, "scripts/myScripts.js").
    getResourceInformation().getURL(componentRequest);
    %>
    <SCRIPT language=javascript src="<%=srcid%>"></SCRIPT>
    Regards,
    Harish
    (Please do not forget to reward points just in case it works)

  • Embed Javascript into SSRS Report

    Hi
    There are similiar question on this forum, but they don't really anwser my question, in a way I understand.
    I'm new to SSRS and have a requirement to add a 'badge' to a report I am creating, this is dynamic for each row.
    Below is the code that works as a static page. What I am after is to be able to pass the 'data-doi' for each row and have the 'badge' displayed on the report for each row.
    Can this be done?
    Thanks
    <html>
    <head>
       <script type="text/javascript" src="URL is below"></script>
       </head>
    <body>
    <div data-badge-popover="top" data-badge-type="4" data-doi="110.1371/journal.pone.0003902" data-hide-no-mentions="true" class="altmetric-embed"></div>
    </body>
    </html>
    JS URL
    replace -
    https-d1bxh8uas1mnw7-cloudfront-net/assets/embed.js

    Hi CuriousCraig,
    If I understand correctly, you want to embed the javascript with the code which posted before into report. As per my understanding, we can embed JavaScript in reports using “Response.Write” in custom code, and then show a messagebox using JavaScript. For
    more details, please see the following steps:
    Add a reference that refer to “System.Web”. We can do this by navigating to Report -> Report Properties -> References.
    Add the following custom code to your report through Report -> Report Properties -> Code:
    Function WriteHTML (ByVal Msg AS String) AS String
    System.Web.HttpContext.Current.Response.Write(Msg)
    Return “”
    End Function
    In the report, use the custom function for the image column:
    =Code.WriteHTML("<script>..[your code]..</script>”)
    For more information about how to add code to a report (SSRS), please see:
    http://msdn.microsoft.com/en-us/library/ms156028.aspx
    Another similar thread:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/bb9a913c-4082-4b5d-8c9f-7c1b73f4721c/audio-alerts-on-reports?forum=sqlreportingservices
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • HTML DB - pl/sql in a Javascript

    Hi everybody,
    Is it possible to incorporate this in this javascript ?
    URL Link
    javascript:
    wwv_flow_collection.truncate_collection
    (p_collection_name => 'INFO_ENTITE');
    javascript:window.close();
    Is it possible to do this ?
    Thanks. Bye.

    Hello,
    I have these examples though that do just that I don't have the right procedure plugged in but I will have them working by tommorow.
    http://htmldb.oracle.com/pls/otn/f?p=11933:59
    Another trick I've done is instead of a window.close on your original load of the page do a doSubmit('CLOSE') to the page and and have the first load of your page use a page process to delete your collection and your second load when the request=CLOSE call window.close;
    Carl
    Message was edited by:
    Carl Backstrom

  • Problem creating url

    I have the following code and for some reason, it can not construct the URL.. When I reference <%=Parameter.PROCEDURE_INDEX_PARAM%> it does not seem to understand it. When I hard-code the value ("procedureindex") it works.
    If I reference Parameter.PROCEDURE_INDEX_PARAM in my scriptlet code, it works just fine.
    What am I doing wrong?
    <%@ page info="Procedure Results" import="adac.web.util.Parameter" %>
    <script language=javascript>
    function blankRightWindow(webServerIP, uid, contextPath, strCnt, showImages, viewerType) {
         if (showImages)     {
              if(viewerType == null || viewerType.toUpperCase() == "AMICAS") {
                 url = "http://" + webServerIP + "/servlet/com.amicas.servlet.integration.CernerEmbeddedWebViewer?";
                 url = url + uid;
              } else {
                   alert ("cnt " + strCnt);
    //               url = contextPath + "image.jsp?" + "procedureindex" + "=" + strCnt
                   url = contextPath + "image.jsp?" + <%=Parameter.PROCEDURE_INDEX_PARAM%> + "=" + strCnt
                   alert ("URL: " + url);
    </script>

    Take a look at the generated html/javascript from this page:
    Assuming the constant is declared aspublic class Parameter{
    public static final String PROCEDURE_INDEX_PARAM = "procedureindex";
    }It will be something like this in the html page.
    url = contextPath + "image.jsp?" + procedureindex + "=" +
    as most likely there is no javascript variable called procedure index, its value will undefined.
    The following should do it
    // putting quotes around the scriptlet expression, so it is interpreted as string
    url = contextPath + "image.jsp?" + "<%=Parameter.PROCEDURE_INDEX_PARAM%>" + "=" + strCnt
    // just inserting it into the javascript string
    url = contextPath + "image.jsp?<%=Parameter.PROCEDURE_INDEX_PARAM%>=" + strCntCheers,
    evnafets

Maybe you are looking for

  • How to run two icalenders on the same computer?

    How can i run two separate icalenders on the same computer? I have my own icalender with work, home, etc, and it's totally full. I am now running an artists collective and will publish the collectives icalender on the web. I don't, however, want to m

  • PDF Printer fails to create document

    I have Adobe Acrobat 8.1.2 Standard and today suddenly I cannot create a PDF file from Word 2007. It will create PDF files of up to 5-6 pages but when I try the file that contains 657 pages it will only go to page 90 before I get this error message:

  • PO Change after Creation

    Dear all; In this scenario after creation of PO it is possible to change the PO, but Our client requirement is not to change PO after creation .how this is possible ,is there any special configuration for that ? Thanking You; Regards; Joydeep Mukherj

  • Stock Transport Order-shipping point not determined

    Hi MM Gurus, We need to set up STO for transferring stock from plant 2000 to 1000. I have completed following setting. IMG Enterprise Structure-Assignment-Sales and Distribution-Assign sales organization to company code Both the sales orgnizations ar

  • PSDファイルを表示できません

    Photoshop Album mini 3.2でPSDファイルを表示できません.「サポートされていないファイル形式のため取り込みできません」となってしまいます.どうしたら表示できるのでしょうか.