Iframe Content cahnge issue

I am struggling trying to find a solution for. I have a page with an  iframe. The document in the iframe comes from a different domain which I  can not alter the contents for eg. google.com . If any change occur  inside frame i want to get the Url of that page. and redirect to another  page.I did the same using javascript in DreamWeaver CS5 and it works  properly work when i am using "Live view" in CS5. But when i tried to  access that page in all browser it doesnt work. Why?
or is there any Solutio for this issue?
Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Changing IFRAME Src</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" language="javascript">
function getSrc(obj) {
     alert(frames['myframe'].location.href);
     //alert(obj.src);
     if(frames['myframe'].location.href=="http://www.google.co.in/")
         frames['myframe'].location.href="http://www.yahoo.com";
     else
         alert("Nop");
</script>
</head>
<body>
<iframe id="myframe" src="http://www.google.com" width="100%"  height="500"  onLoad="javascript:getSrc(document.getElementById('myframe'))"  name="myframe"></iframe>
</body>
</html>
Anyone have any ideas? I searched for ever and a day on Google with no help...

Hi nijin30,
This forum is primarily for discussing the BrowserLab service / application; if you are still searching for solutions, I'd try looking at some JavaScript forums.  A Google search for "detecting the URL of an IFrame using JavaScript" turned up several promising leads.
A couple ideas that may help you get unstuck.
IFrames may load after your main page loads, so you may be running into a case where you are trying to check properties of an IFrame that isn't loaded yet.  Since it works on a local copy (Dreamweaver Live View), this seems like it is a good candidate.  Maybe you can use setTimeout to delay your check until after the IFrames are loaded.
In order to change the location of an IFrame I think you want to edit the source (instead of redirecting the document inside it).  Another way to write:
   frames['myframe'].location.href="http://www.yahoo.com";
is...
  document.getElementById('myframe').src = "http://somedomain.com/page.html";
Best of luck with your page.
Cheers,
Josh

Similar Messages

  • Iframe content in YUI tab disappearing - only in firefox 11

    We have an internal web site developed with YUI which uses the tabview control along with some content provided through an iframe. When the page initially loads the iframe is displayed but when switching between the YUI tabs the iframe content disappears. This stopped working with the upgrade to Firefox 11. It was working with all previous versions including up to 10.0.2.

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • Using BC poplet lightbox for iframe content?

    Greetings!
    I'm having issues where BC's poplet lightbox is preventing our other lightbox script from working. Is there a way present iframe content using BC's poplet lightbox by giving the content a new "rel" tag?

    Is there a URL you could post to take a look at any error messages?

  • Manipulating iframe content

    Hello,
    I face some problem, i am using jquery as my framework, and i got an issue with the iframe content.
    What i want to do is the load external website into my iframe (random website url from my database), and to insert my script into header (i want to do something like greasemonkey does on firefox).
    Here's my code:
    $('iframe').contents().find('header').append('<script>My user script</script>');
    The problem is that this doesn't work, when i tried to do $('iframe').contents().find('header').html() returns nothing...
    I knew this was a limitation in html because of cross domain, but adobe air isn't restricted to that, so what am i doing wrong here?

    I'm not versed in the AIR html security model, so I'm going to forward this over to our webkit team.  My hunch is you are running into a security related restriction.  If you haven't already, please take a look at the following pages:
    HTML Security in Adobe AIR
    Cross-scripting content in different security sandboxes
    Thanks,
    Chris

  • Part 2: Flat files and Business Contents: Any issues with this scenario?

    I will appreciate some clarification on the some points made in response to my previous post "Flat files and Business Contents: Any issues with this scenario?"
    1.
    " ...you’d better analyze those cubes for data redundancy and presence of data you’ll never use. " I will appreciate some clarification on the type of analysis you are referring to. Examples will help.
    2.
    "If you want to combine several found IOs in your custom dataprovider, then again you must know (or figure out) relationships between these IOs." I will appreciate some clarification on the type of relationship you are referring to. Examples will help.
    3.
    I am a bit confused with "..include into ODS structure ALL fields required for the cube" but you also noted noted that "...except navigational attributes and chars and KFs that are going to be determined in TRs or URs."
    If you exclude ALL these, haven't you excluded all the fields you included in the ODS structure?
    4.
    "Consider carefully the ODS’ key fields selection. Their combination should not allow data aggregation that you don’t need."
    I may be missing the point here, I understand that you need to select the fields which will form the unique ID for the records in the ODS under the Key Field (please correct me if I am wrong with the purpose of the Key Field), but I don't understand the discussion of "aggregation" in the context.
    Thanks in advance

    Hallo
    I try to give some exaplanation based on the previous answer.
    1. Data redundancy - make sure you do not store the same information. does not make sense to have data redundanty across you Data Warehouse. this is also a cost. just sotre the same information one time if you get all what you need.
    2. whatwhever you build you dp, which consist of IO, you need to know with kind of relation (1:1 or 1:n - n:n and so on) exist between them. that will help you when you model you infoprovider. For example I would never pit togheter IO (n:m) in the same dimension if you expect an high number of cardinality. Sometime an IO can be an attribute of another one (depend on relation. For example
    Business Partner and his Address. Usually you have a relation 1:1, in this case address is an attribute of BParten and store it in the Masterdata instead then DP
    3. Sometime when you load from ODS to CUBE, you can fill some IO (which are in the infocube and not in the ODS)through ABAP routine in TR-Start Routine of Update Rule. Does not make sense to include these IO in the ODS as they are NULL or Blank (the deault value). This can happen when for example, you first load in the ODS (Price and Quantity) and then you calculate Sell price later (Price * Quantity). of course it could be doen also in the Bex. Depends on other factors (Performance - Loaidng -Sizing)
    4. Make sure that the KEY definition of ODS is accordingly to the data otherwise you will aggregate the data and later maybe if you need the detail you miss it.
    for example: customer - product - Distr Chan - Sell Price
    if each Customer can buy each product for any Distrution Channel, then when you build your ODS(Customer - Product and Distribution must be KEY) otherwise (if you have only Customer - Product KEY for example) you will lose the details for Distribution Channel.
    I hope eveyrhting is clear
    Regards
    Mike

  • How to change pdf page in an iframe content automatically

    I open a pdf in my web page with <iframe> and the pdf-option for example #page=2 equals week number 2 of a year.
    How could I change the viewable page as a function of the actual week number of a year (#1 - 52)
    At the moment my html code looks like:
    <div id="tr-inside_anw2">  
        <iframe class="org_pdf_anw"
        src="attendance.pdf#page=2"></iframe>
    </div>
    Is there a way to use a variable for the week number? or is it better to use a javascript "function dayofweek_iframe()"
    which changes the whole iframe content?
    Is there somebody, who know a solution with code? Thanks

    Thanks, it worked on my Mac apps. But the problem is that the new numeration is not recognized by my PDF Reader on iPad (goodnotes), so numeration starts from 1...

  • How can i disable "browser-auto-load" for different iframe-contents in a composite widget?

    Hey there,
    i´ve got a lil topic going on with a Website (One-Site-Layout with anchors), created with muse
    i putted 20 iframes (each one routed to its own trigger) in a composite widget. Everything is working perfect for me and the users, but :
    The deliverer of the iframe-contents (pretty big picture galeries) told me, his server crashes, because every single time, someome enter the Website, the browser i loading every single iframe-content in this widget automatically > so the traffic is way to large, and i need a solution that simply load every single content after a click on the right trigger, not before.
    thank you so much!
    Werner
    Gonna let you see the the "trouble-area" http://werner-ag.com/#produkte

    That is not possible.
    You can look at this extension:
    *https://addons.mozilla.org/firefox/addon/toggle-mixed-active-content/
    *https://developer.mozilla.org/Security/MixedContent

  • Unable to scroll iframe content in Safari on ipad

    unable to scroll iframe content in Safari on ipad

    Try going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iDevice, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • Update on Captivate HTML 5 content playback issue in Google Chrome Browser

    Good night,
    I am having a problem implementing projects generated in html5 and run on Chrome. The video does not run.
    I think I found the solution, a correction patch for Captivate 7. But I just link and is broken.
    http://blogs.adobe.com/captivate/2014/07/update-on-captivate-html-5-content-playback-issue -in-google-chrome-browser.html
    I have several e-learning generated with html5 and want to avoid make the change manually.
    Does anyone have the patch and can share?
    Thank U

    I saw this email ID in a comment of that post. I guess you can send a mail asking for the fix.
    Shriyansh Agnihotri: [email protected]
    Sreekanth

  • Iframe content disappear if script loaded from string

    I've got strange behaviour of FireFox 3.6-14 (have no 3.0 for now) with whis sample of code
    http://pastebin.com/CzzfB709
    Short explanation: if we create SCRIPT element and push script text from string and at the same time this script (that comes from string) create IFRAME, then iframe content is reloaded after script finished;
    In sample code you can see that we have `scriptText` variable that contains JS code. Then we create SCRIPT tag and put string code there.
    What you see: till you not close alert windows, you see text in iframe, but when you close it, iframe became blank.
    I also have an example of the same code from string if it pasted directly into HTML. Everything seems fine there.
    http://pastebin.com/4JcajiDQ
    I ask if anyone can just explain me, why is it hapend.

    As I think, this is some kind of a problem inside FireFox. So I just didn't know where to post it. Usually I'll prefer developer discussion group or maillist but I could not find such for FireFox. If you shure that mozillaZine is a best place for it than I'll wait. But I'm not shure whether it is still active community based on it's main page.

  • Iframe contents not displaying in FF Windows 7 or Mac

    I've read almost all posts about frames not displaying in FF, however, I have an odd issue. While I am able to get the iframe to display, NOT ALL of its contents is displaying. It's odd. A sample page is below, click on the virtual tour tab and you will see what I mean. All the code does show up. This also happens for another page with similar type of code. This works fine in Chrome/IE both PC and Mac. Any help would be appreciated.
    Thanks
    http://www.kdnovelties.com/educational/terrance-the-giraffe/personalized_293.html

    The content is there, but is hidden with display:none style rule, so it looks that if there is script running to show this content then it doesn't finish properly.
    <pre><nowiki><div id="virtualbook" class="kdnbook" style="height: 465px; width: 680px; display: none; margin: auto;"></div></nowiki></pre>
    Removing the display:none makes the book appear for me.
    The Web Console also shows an error with the MP3 file:
    <pre><nowiki>HTTP "Content-Type" of "audio/mpeg" is not supported. Load of media resource http://26ebe445280acec2e3b0-023df79dc48add581f4e26895345aac6.r54.cf1.rackcdn.com/page-flip.mp3 failed.</nowiki></pre>

  • Iframe content

    I've built a page that contains an iframe and a list of links
    that open different content within that frame. Google has indexed
    the source frames, so a user can click the link from Google and the
    content appears outside its parent page. Is there a way to force
    the parent page to load in such cases, or do I need to disallow
    indexing of the source pages to prevent this issue from
    happening?

    Try this in the HEAD section
    <script type="text/javascript">
    var text = window.location.href;
    function delineate(str) {
    theleft = str.indexOf("=") + 1;
    theright = str.indexOf("&");
    return(str.substring(theleft, str.length));
    url=delineate(text)
    function refreshFrame() {
    if(maincontentarea.location!=url&&url!=location.href)
    maincontentarea.location.replace(url);
    function calcHeight()
    //find the height of the internal page
    var the_height =
    document.getElementById('maincontentarea').contentWindow.document.body.scrollHeight;
    //change the height of the iframe
    document.getElementById('maincontentarea').height=the_height;
    </script>
    And append this to the end of your Body tag
    onload="refreshFrame();">
    "Harv Craven Design - HCD"
    <[email protected]> wrote in message
    news:eooq85$2it$[email protected]..
    > I've built a page that contains an iframe and a list of
    links that open
    > different content within that frame. Google has indexed
    the source frames,
    > so a
    > user can click the link from Google and the content
    appears outside its
    > parent
    > page. Is there a way to force the parent page to load in
    such cases, or do
    > I
    > need to disallow indexing of the source pages to prevent
    this issue from
    > happening?
    >

  • BI Content Installation issues due to compounding

    Hi All,
    I am on BW 7.4 and am facing some issues while trying to install a BI content cube.
    One of the infoobjects of those cubes has a custom infoobject compounded to it and the BI content installation keeps on failing because the Delivered version of that cube doesnt have that  compounded InfoObject.
    For example 0COMP_CODE has ZXYZ added in compounding. Now I try to install a cube 0ABC having 0COMP_CODE.
    System throws an error that cube 0ABC is missing infoobject ZXYZ and cannot be installed.
    How do I get this cube to be installed so that I can manually put ZXYZ in it and activate? Please help.
    Regards,
    Shyam

    Hi,
    I think I am not clear on my question.
    0COMP_CODE is already present. ZXYZ is already been created and is a custom IO.
    ZXYZ had been added in compounding of 0COMP_CODE.
    This means that whenever you use 0COMP_CODE in a cube/dso you will have to make sure that ZXYZ is also present. Or else that Infoprovider cannot be activated.
    Now the problem is that when I try to install a BI content cube containing 0COMP_CODE system throws an error that ZXYZ is not part of the Infocube (obviously since it is a custom IO) and hence the entire cube installation fails.
    Now my question is how do i get the cube to be installed at least in inactive state so that I can add ZXYZ to it and make it active.
    Regards,
    Shyam

  • In an iFrame, content loads only after a refresh

    I have this website
    www.paidly.co
    In it, there is an iFrame. Now this loads perfectly fine in Chrome, and IE but in Firefox only the html content is shown, without any CSS or JS applied. On reloading the frame, I randomly get the entire loaded document sometimes and at other times it is not so. The code for the iframe looks like this:<br />
    <pre><nowiki><iframe class="iphone-content" src="Mobile/main.html"> </iframe></nowiki></pre>
    The page that is being called is this:
    <pre><nowiki><!doctype html>
    <html>
    <head>
    <title>Paidly</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">
    <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
    <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
    </head>
    <body> ... </body>
    </html></nowiki></pre>

    I need to right-click in the frame and choose Reload Frame to make the frame display properly.<br />
    Maybe it is because the frame is hidden that Firefox isn't loading the CSS and JS files.

  • Link to Document Content Type issue - links not relative

    I'm using the Link to Document content type in a library in order to link to documents in other libraries.  We just migrated to 2010 from WSS 3.0 (2007) and are having an issue.  We view our site internally thorough the internal machine address/name
    and also have users connecting remotely from an external url.  In 2007, it didn't matter whether we were internal or external, all links were apparently stored as relative because the "link to document" items worked fine either way.  This
    was despite entering the url fully and not relative.  When viewing/editing the properties of that item, it shows you the full url applicable to where you are viewing it...internal if internal, external if external.  
    However, after the migration to 2010, all links that existed previously are fine, but any new items created using link to document apparently no longer store them as relative so either the internal or external users get the wrong link.  For example,
    if I put in the link as http://servername/library/doc the external users get that same link and it doesn't work, since it should be like https://myurl/library/doc.  Viewing/editing the properties of the item shows an absolute url of whatever location
    the item was added.  For instance if I'm connected externally and add an item, even if i only enter it as relative, it creates the link as https://myurl/library/doc and then the internal users end up having to connect via that url and that is just a pain
    due to AD and certificate issues.  The internally created links are obviously not accessible at all from the outside. 
    I've also tried storing the link as relative when creating the item but it seems to overwrite it with the absolute link.
    This is causing quite an issue with us.  Does anyone have any insight as to what is going on and how to fix it?
    thanks!

    Hmm...I thought I had the thread set to email me if there were replies and I never received an email so I thought there were no replies.  I came back to this since another issue cropped up that is related and there were replies!
    I cannot recall how things were set up exactly in 2007 and there's no way to look back now.  I'm a novice when it comes to AAM/DNS/IIS really.  Maybe you can suggest what it should look like?
    We have our site which is accessed internally by http://machinename .  Externally, we use https://sharepoint.mydomain.com .   
    In AAM we have http://machinename listed in the default zone with the same url for internal and public.  We also have https://sharepoint.mydomain.com listed, in the internet zone and it also has the same url for both internal and public.  
    In IIS, the sharepoint site has bindings for port 80 and 443, but nothing specific to https://sharepoint.mydomain.com
    DNS....I'm not sure what should be here, if anything.  
    We can access the site just fine externally, there are just a few instances where some links do not work correctly and point to the internal url instead of external when you are external.  The original post is one time and the other, found the other
    day, is a search box webpart that points to a relative url for the results page but externally it ends up going to the internal url.
    I'd appreciate any guidance.  Thanks!

Maybe you are looking for

  • Audio-books in iTunes

    I have a lot of a-books on my computer that has no info inside of mp3 and all tracks are same like 1.mp3, 2.mp3, 3.mp3, etc. For example I add folder with a-book to itunes and then I have no idea how can I find those files from correct folder.

  • Apache Trinidad: Warning messages when starting WebLogic Server 10.3

    Hi, I'm trying to work with Trinidad in WLS / WLW 10.3. I'm using the JSF 1.1 Sun RI. When starting WLS the log print this warnings (I'd like to get rid of) <20-02-2009 12:05:40 PM CLST> <Warning> <org.apache.commons.digester.Digester> <BEA-000000> <

  • How do i register Quick Time Pro for Windows with my new MacBook?

    How do i register QuickTime Pro for Windows with my new MacBook? I just bought a MacBook in the last few months and just got around to register my Quicktime Pro? It says invalid registration; Can i transfer the seriel number? i do i get a mac seriel

  • Change HTML page title in Oracle Waveset 8.1.1

    Hi, Does anyone know which file/page to override if I want to change the HTML page title for Oracle Waveset? After the upgrade the title on every page is: "Waveset". This is what I would like to do: - Set the title to "Identity Manager Administration

  • My Aperture Library does not want to open.

    Hi Guys, I am trying to Reference my Aperture Library, so that I keep all my RAW (original) files on my external hard drive, and only work on the Version files in Aperture.  I am having a BIG problem with it.  My Aperture library does not want to ope