×

Discussion Board

Results 1 to 1 of 1
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    1

    How to go back in the iframe history

    Just to share the solution to an issue found during development. This one puzzled me for over three days.

    The problem:
    Get the page into an iframe to go back. On the container this is no real problem, but once you have an iframe showing data from another site, then the security bells start ringing. Most of wrt apps will go to a remote server, and for this neither history.back() nor history.go(-1) will work. No even self.doc tree will be accessible.

    The solution
    On a .js just initiate the variable myreferrer as
    myreferrer=document.referrer;

    On the link to go back -which must be able to use the same scope for myreferrer- do something like
    <a href="javascript:document.location.href=myreferrer;" >Go back</a>.

    Of course you can declare a function OneBack that would go something like

    function OneBack(){
    var miref=document.referrer;
    document.location.href=miref;
    return;
    }
    Last edited by ajam1962; 2010-05-31 at 01:45. Reason: mismatched var names

Similar Threads

  1. Web History Access
    By imi.imran in forum Symbian
    Replies: 0
    Last Post: 2009-09-10, 05:16
  2. Problem in Going Back from Form to List
    By lopesrohan1988 in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-07-07, 08:11
  3. Errors building project in VS.2003
    By jensesaat in forum Symbian
    Replies: 11
    Last Post: 2006-11-13, 16:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×