Redirect Parent URL from within iframe

Hi - I have an iframe that contains a series of links ... and
when the user clicks on one of the links within the iframe, I want
the parent page's URL to be redirected to a particular URL.
Right now, if I just use the standard <a href="target
URL">Text</a> for the link, it brings up the redirect JUST
INSIDE the iframe ... but I want the
parent page that contains the iframe to change to the target
URL.
It is like I need to embed the statement:
<script language='Javascript' type='text/Javascript'>
window.location = "target URL";
</script>
inside the link - but I am not sure of the best or most
proper way to do that.
Any suggestions? [I tried to do a SEARCH on my subject topic,
and it generates some odd forum error message.] Thanks!

MLBdesigner wrote:
> Hi - I have an iframe that contains a series of links
... and when the user
> clicks on one of the links within the iframe, I want the
parent page's URL to
> be redirected to a particular URL.
>
> Right now, if I just use the standard <a href="target
URL">Text</a> for the
> link, it brings up the redirect JUST INSIDE the iframe
... but I want the
>
parent page that contains the iframe to change to the target
URL.
>
> It is like I need to embed the statement:
> ************
> <script language='Javascript'
type='text/Javascript'>
> window.location = "target URL";
> </script>
> ************
> inside the link - but I am not sure of the best or most
proper way to do that.
>
> Any suggestions? [I tried to do a SEARCH on my subject
topic, and it
> generates some odd forum error message.] Thanks!
>
Remember the "same origin policy", which means you can use js
only to
manipulate data from the same origin (same server).
Mick

Similar Messages

  • Calling parent method from within child object

    Hello,
    A quick question! Is it possible to call a method in a parent object from within a child object.By child object I mean an object that was instantiated within the parent object.
    Thanks.

    A quick question! Is it possible to call a method in a
    parent object from within a child object.By child
    object I mean an object that was instantiated within
    the parent object.Since you are using ambiguous terminology, it would be much better if you provided a small sample of your code to avoid confusion. I am guessing that you are actually talking about an inner class when you say child class.
    If that is correct, then you can do something like this:
    class Parent {
      void foo() {}
      void bar() {}
      class Child {
        void foo() {}
        void test() {
          bar(); // No conflicts, just call the Parent method
          Parent.this.foo(); // Use explicit qualification to avoid conflicts.

  • How can I forward to an external URL from within a DataAction?

    This is a very simple question I'd guess -- but what I thought was the obvious answer turned out not to be. Keep in mind I am using struts, and the URL is constructed dynamically, so I cannot place a struts forward action in the struts-config.xml file. Here is what I tried from within my DataAction's prepareModel() method:
    actionContext.setActionForward(newURL);
    actionContext.setRedirect(true);
    This didn't work -- nothing happened. Anyone have any ideas?
    Brad

    In our application, we had a forward named Cancel, but for it to work properly we wanted a Redirect to occur to another page. The redirect was not working until we created a new actionforward and set th action forward to it as seen below. You can't programmatically change the forwards at runtime without error, from what I remember.
    DataActionMapping mapping = ctx.getActionMapping();
    ActionForward af = mapping.findForward("Cancel");
    ActionForward afNew = new ActionForward();
    afNew.setPath(ctx.getHttpServletRequest().getSession().getServletContext().getInitParameter("rootURL") + af.getPath());
    afNew.setRedirect(true);
    ctx.setActionForward(afNew);

  • How can I lauch a PDF from a URL from within my Plug-In?

    I have my plug-in working pretty good with the exception that I can not figure out how to launch a PDF using a URL. I am able to launch a PDF file from the file path, just not a URL.
    Any assistance is appreciated.
    Gregory

    Leonard,
    Yes, I want to open a PDF that lives on a web server. I will know the URL to the doc I want to open and I want to open it via a SDK call from within my plug-in. I can open docs from the file system using the following:
    AVDocOpenFromFile(compareASFilePath, asFileSys, NULL);
    Is there a SDK call that will allow me to open the doc using a URL like 'http://216.24.154.161/files/XXX.pdf' ?
    Thanks,
    Gregory

  • Get URL from within a Ejb-Container

    Hi all,
    I try to realize a WD-Application with Hibernate ORM. Now it seems , that from within the Ejb the hibnerate.cfg.xml couldn't be found.
    No I try to read the URL from hibernate.cfg.xml. There I did some test with the getResource()-Function. At least I managed to get a URL from a zip-archive, but I'm not able to found the URL from something inside the archive, <b>and my configuration is in an archive!!!</b>
    See the following tests:
      URL myurl11 = cl.getClass().getResource("/"); //works
      URL myurl12 = cl.getResource("/"); //works not! (without getClass())
      URL myurl2 = cl.getClass().getResource("/version.txt"); //works
      URL myurl3 = cl.getClass().getResource("version.txt");//works not (relativ)
      URL myurl4 = cl.getClass().getResource("/apps/sap.com/dc~oracle~ear/src/java/src.zip");//works
      URL myurl5 = cl.getClass().getResource("/apps/sap.com/dc/oracle/ear/src/java/src.zip");//works not
      URL myurl6 = cl.getClass().getResource("/apps/sap.com/dc~oracle~ear/src/java/src.zip/de/pa/ejb/systeme/SystemeDao.java");//works not
      URL myurl7 = cl.getClass().getResource("/apps/sap.com/dc~oracle~ear/src/java/src.zip/de.pa.ejb.systeme/SystemeDao.java");//works not
      URL myurl8 = cl.getClass().getResource("/apps/sap.com/dc~oracle~ear/src/java/src.zip/de.pa.ejb.systeme.SystemeDao.java");//works not 
    As you can see with "myurl14" it works for a zip-file but not futher. How can I get Into an archive? Or even adress things relative?
    Can anybody help me?
    Thanks
    Richard

    Hi Joe,
    Thanks a lot for ur reply,
    But the LD_LIBRARY PATH is set to the user that runs the App Server, Since it is throwing a UnsatisfiedLinkError, there must be a problem with the link only(i.e calling native method).
    The flow of data is as follows
    1 A method from ejb calls another java method in an other java class which is in the same jar file,passing the actual arguments.
    2 That java method calls the Native methos residing in the same class file
    3 The Native mentod calls a c function as usual
    My ejb is working fine up to the Native Method call, at this point it is throwing an error
    All my java files are in a package, and my .h file contains package name in the prototype of c function
    If you get any ideas please mail me ASAP
    ThanQ
    Kiran

  • Redirect to URL from PL/SQL

    Hi,
    I'm trying to redirect to a url from an Application Process using
    DECLARE
    l_url varchar2(2000);
    BEGIN
    select APEX_UTIL.PREPARE_URL('f?p=&APP_ID.:10:&SESSION.:DELETELINE:&DEBUG.:RP:P10_ORID,P10_ORDID:&P10_ORID.,&PP10_CCODE.') into l_url from dual;
    htp.init();
    owa_util.redirect_url(l_url, true);
    END;The above process is called with javascirpt using ajax. This successfully deletes the item i want but first it returns this error
    (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> and second it doesn't refresh the page.
    I'm using prepare_url since Page Protection is enabled with Arguments Must Have Checksum.

    Solutions:
    i) Use the Javascript inside the Pl Sql .,
    sample Code:
    declare
    l_count number:=0;
    begin
    select count(*) into l_count from usermaster where usertypeid in
    ( select usertypeid from usermaster where usertypeid !=1 and Userid=:P9_USERID);
    if l_count > 0 then
    return true;
    else
    htp.p('<script language="javascript">');
    htp.p('window.location ="http://localhost:8080/apex/f?p=2234:8:&SESSION.::NO::"');
    htp.p('</script>');
    return false;
    end if;
    end
    that's all
    All the best...
    Udayakumar
    Edited by: 872464 on Sep 29, 2011 5:59 AM

  • Refreshing parent page from an IFRAME - javascript?

    Hi
    I have an IFRAME embedded in a jsp page. In the IFRAME, a user gets to submit a form, after which I need it to call the parent jsp page to refresh itself. The JSP page has a table with values from the database and needs to be refreshed to reflect the new form submitted to the database.
    I believe i'll need to use javascript for this, since I'm not using struts, or action classes.
    can anybody help out, with code samples? I've tried searching on google, but most examples are incomplete. If anyone has a link to it I'll be very grateful.
    Thanks

    well to refer to the parent frame, from the javascript panel I believe you can just access window.parent.
    so window.parent.location.reload() should do it.
    However reloading the parent window, will also reset the iframe. If you are going to reload the parent frame anyway, you could potentially submit to it instead of your iframe form by using a target="_parent" on the iframe's form.
    Hope this helps,
    evnafets

  • I can't call up a URL from within a component?

    Hi all. Hope you can help.
    I have a flash site that contains a component. The component
    is for a scroll bar that shows image slices of my work. The image
    slices are buttons that when clicked should call up a seperate web
    (URL) window to display the work. However when clicked the button
    doesn't work. The button im using is on (release) {getURL
    ("work.htm")} this is fom the browser/network submenu in the global
    functions menu. I think that I should be looking in the components
    menu but have no idea what function or code to use.
    Any advice would be massively helpful.
    Cheers
    Rob

    The images are added within the component as buttons. I don't
    know how to check wether the button is accessable or not? IF you
    could advise on this that would be really good. I don't think its
    tracing anything.
    Basically just want it to open a javascript URL window.
    Cheers in advance
    Rob

  • Problem opening live web page (url) from within keynote

    hi.
    i encountered this problem during a recent presentation. i have a standard two-monitor set-up, on my laptop viewing notes etc and presenting on the attached monitor. the transitions between my slides are all set onClick.
    so, when i encounter a hyperlink in my presentation (of the web page type), when i click on it, i am not taken to the web page, but rather to the next slide.
    how do i avoid this? how do i make keynote follow the hyperlink -- i.e. open the webpage during the presentation?
    many thanks in advance for your tips.

    use '_blank' as parameter, not '_self'.
    Guy Dallaire (guest) wrote:
    : Hi,
    : We would like to open a Web Page from a forms running in
    : client/server as well as from a form runningover the web.
    : Over the web, we plan to use SHOW_DOWUMENT (Even tough it
    seems
    : broken, on forms 6.0, the only way we have got it working was
    by
    : using the parameter that overwrites the current page (the
    form),
    : we cannot have it open an URL in another window)
    : In C/S mode, the SHOW DOCUMENT does not work. What is the
    proper
    : way to lauch an URL in a browser in C/S mode ?
    : Is there a way to determine if we're running in CS mode or Web
    : Mode ? We would like to use the same code both on the web and
    in
    : C/S
    : Example pseudo code:
    : if (Running in CS Mode) then
    : open the URL using C/S method
    : else
    : open the URL with show dowument
    : fi
    : Thanks
    null

  • Is it possible to link out to external URLs from within an HTML widget, and have them open in Safari?

    I can add links within the iBook content, but if they're added inside an HTML widget, the new page loads *inside* the widget itself, with no ability to navigate back etc.
    Is there any way to have external links inside an HTML widget open in Safari?
    Thanks,
    Mike

    Those links need to be local the the book, sorry.
    As always, feel free to use the 'Provide iBooks Author Feedback' menu item for features you'd like added in the future, etc.
    http://www.apple.com/feedback/ibooks-author.html

  • How can we get a url for a "Meet Now" conference call from within the Windows Store App?

    Hi,
    Is it possible to get the url for the current meeting / new "Meet Now" call from within the Windows Store app?
    You have the option of inviting your current Lync contacts, but I don't see a way of giving a URL to clients that would launch Lync on their device, or take them to the web app.
    I can see how to get the link using the Outlook plugin, for pre-scheduled meetings. Is this link always the same and the one that should be used for an impromptu "Meet Now" meeting? It would still be good to know how to get this URL from within
    the store app so I can tell clients where to get it.
    Some people may be on Windows RT devices and not have access to the plugin in Outlook, and want to start a meeting at short notice and then invite others via email or pasting a link to them elsewhere.
    Any help appreciated.
    If I have answered your question, please mark it as the correct answer. If I have provided helpful information, please mark it as so.

    Hi,
    Agree with Holger, I check on my Lync Windows Store app and can't find the meeting URL as well.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • How to get requested (target) URL from login page jsp.

    Hi,
    How can I get requested (target) URL from within login jsp page where unauthenticated user was redirected.
    IN other words I need to get target URL that user requested before he was redirected to login page.
    In Weblogic there is "j_target_url" session attribute for this purpose.
    Does NetWeaver have analogue?
    Thanks in advance.

    hi Alex,
    NWDS provides Authentication through Pre defined properties,
    We can trap unauthorised user.
    To know more about this,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4ecd6eb1-0301-0010-61bd-a3d6bee102c0
    thank you

  • Navigate to external URL from secured APEX server

    NOTE I am using the internal Oracle APEX server to host my application, so it may be possible that you will have to be an Oracle employee with the same access, or using a similar setup, in order to respond. Even if you are not, if you feel inclined to "take a swing" at it, keep this in mind.
    Hi all,
    I am using the internal APEX server at oracle to host an application (Application Express 4.0.2.00.07). I have other, NON-APEX applications hosted on other servers within the Oracle firewall.
    On page 0 of the APEX application (which, as you may know, usually displays as the "header" section of every other page in the application) I have created a select list of the other projects and their associated URLs as well as a "Go" button, so users that want to navigate to the other applications can do so from this application. Since page 0 does not seem to allow the creation of standard branch items (please correct me otherwise), I have created a process on that page triggered by the "Go" button. The process currently contains the following code:
    begin
    apex_application.g_unrecoverable_error := true;
    htp.p('<script language="JavaScript">
    window.open (:P0_PRODUCT_PAGES); <!-- :P0_PRODUCT_PAGES being the URL of the selected non-APEX application -->
    </script>');
    end;
    That code currently replaces the existing page with a blank page and the associated URL is "https://apex.oraclecorp.com/pls/apex/wwv_flow.accept". I am assuming this means that APEX was looking for an application ID and/or page and did not get it so it "stopped" at this page.
    I am unaware if there are any settings on the APEX server, DB,or associated web server preventing me from navigating outside of APEX once I am running the hosted application.
    I would like to launch another properly-sized (default) browser window rather than replace the existing window pointing to the URL for the selected application.
    I have also tried using the owa.util code to try to generate the proper URL but was likewise unsuccessful.
    NOTE: I am not looking for different ways to do this by changing server parameters, settings, etc. since I do not have server rights to do this. Additionally, due to time constraints, I would prefer not to be drawn in to a discussion of the comparisons and/or benefits of owa.util or javascript over the other for navigating to an external URL from within APEX, etc. (I'm not trying to be a "punk", but I AM under the gun to resolve this with very limited time). In light of this, please indicate if you have a working option to do this under similar conditions that I can implement quickly. I have done much research within the forums and Googled extensively for information from outside sources but have not yet found something that will provide the proper results.
    If you are an oracle employee and wish to contact me directly, please email me at [email protected]
    Crossing my fingers and hoping someone has done this before.
    Many thanks in advance; your useful contribution will actually contribute to lessening the world's INSOMINA factor considerably (mostly mine). ;)

    >
    I would like to launch another properly-sized (default) browser window rather than replace the existing window pointing to the URL for the selected application.
    I have also tried using the owa.util code to try to generate the proper URL but was likewise unsuccessful.
    >
    Opening a URL in a new tab or window has to happen in the browser, without submitting the page. The server doesn't know about browser windows. Use:
    onchange="window.open(this.value);" in the HTML Form Element Attributes property of <tt>P0_PRODUCT_PAGES</tt> (making the "Go" button unnecessary), or, if the "Go" button is required to match the LAF:
    onclick="window.open($v('P0_PRODUCT_PAGES'));"in the button Attributes property, ensuring the button is a template button including the <tt>#BUTTON_ATTRIBUTES#</tt> substitution string, e.g.
    <input type="button" value="#LABEL#" #BUTTON_ATTRIBUTES# />Ensure that absolute URLs are used in the <tt>P0_PRODUCT_PAGES</tt> where necessary, specifying the correct scheme for the site, so that you are not trying to go to <tt>{noformat}https://apex.oraclecorp.com/pls/apex/www.google.com{noformat}</tt> for example:
    f?FOO:BAR:&APP_SESSION.    // other APEX app hosted on apex.oraclecorp.com sharing the same authentication scheme
    https://foo.oraclecorp.com // other secured internal site
    http://www.google.com      // unsecured external site

  • Opening a URL from a button within a Web Template

    Hi All,
    I have a requirement to provide report specific help from within a standard web template. Assuming that I had a list of help URLs for each report and an intermediary way to redirect to those URL based upon a unique id such as the reports technical name, is it possible to create a generic button from within a web template that would dynamically create a URL based on the reports technical name? I.e., http://www.example.com/page.html?ZGTRPTNME
    To date I have only used the Action "Command via Command Wizard" from within the parameters of the button Web Item. However, I did notice that a Script Function was provided. Has any used this functionality and is it possible to create a URL with the technical name of the report?

    Rekesh,
    I had a look at the document you linked however what I need to find out is how I can place the technical name (dynamically) within the web template URL (i.e., this needs to work for multiple projects over many reports that all use the same global web template).
    It's actually very easy opening a new window via javascript however finding the varible for the report technical name remains unclear. At present I am looking at command URL's. The only other option is that I use a java script substring command to pull the report technical name from the URL (although this not as clean as using command URL's).
    EDIT: Found this document: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/ef9a6c13f2025be10000000a1553f7/content.htm
    Appears that the command: sapbi_page.GetMainTemplateName(); will give me the technical name of the webtemplate although I'm finding it hard to find the command for getting the technical name of the current report.
    Edited by: Paul Thomson on Feb 18, 2010 4:00 PM

  • IFRAME in portlet question - possible to call parent function from iframe?

    From the iframe I tried to call the parent function by doing this parent.myFunc(). I got a permission denied javascript message. Just curious if anyone has successfully done this. If so please share your thoughts and comments.

    Hi,
    You will get "Persmission denied" error due to cross site scripting. Either you need to change browser settings to allow cross site scripting or you need to make sure both the URLs fall under same parent domain like both URLs ending with "*.abc.com".
    Thanks

Maybe you are looking for

  • Sales Order Pricing User Exit Problem

    Hi, I am facing a problem related to coding in Sales Order pricing user exits. Scenario is as mentioned below: Based on Material Entered and Sold To in Sales Order, auto determination of a manual pricing condition happens. For doing this, coding has

  • Replacement of WS_QUERY to get length of filename

    Hi, We are using WS_QUERY FM to get the length of file name. CALL FUNCTION 'WS_QUERY'       EXPORTING         filename      = l_filename         query          =  'FL'       IMPORTING         return         = return This FM is obslete in ECC 6.0.  So

  • Opening a PDF in a new window

    I'm using Captivate 3 and have a button with a simple link to a pdf file. The pdf file loads okay but it takes over the popup window which the training is in. I'm using an LMS and the Captivate file appears in its own window, i've tried changing the

  • Two time machine questions i cannot find an answer for ...

    1) i use a 1 TB time capsule to back up my macbook. can i use this back up to restore to a windows computer in case of a macbook crash ? ( no plans to shift back to windows, but just need to know. ) 2) i also separately back up my 395 GB music collec

  • Query performance on multi-provider

    Hi, I have a query on a multi provider...its taking a long time to run. It should run within one minute. How do I find out where the problem is...pls provide the steps I can take to find out the exact problem. Thanks, Frank