Back Button with Anchor Link in Webview?

I use UIWebView (in a view controller) to display html pages stored locally on the device. This web view is the "leaf" view from a series of table views using a navigation controller that provides the appropriately-labeled "back" buttons to the table hierarchy tree.
The problem is that in some of these html pages, I have anchor links to a footnotes html page also residing on the device, and then that web page does appear in the web view but I don't know how to go "back" to the previous web page leaf. The navigation bar of course shows a back button that goes back to one of the table views and not to the preceding web page, the origin of the linked web page.
So, from a UI and programming prospective, how do I change the navigation back button label to say "Back" (instead of the previous table view) and have it when clicked show the previous web page and not the previous table view?
Is there where I might use UIWebView delegate functions? But how do I get the navigation button to change its functionality?
Thanks for any help.

Is there where I might use UIWebView delegate functions? But how do I get the navigation button to change its functionality?
You can use the delegate functions to intercept each nav request...
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
or you can be told when new data was navigated to:
- (void)webViewDidFinishLoad:(UIWebView *)webView{
you can change the Nav bar's left button to be a custom view:
UIBarButtonItem *leftButton = [[[UIBarButtonItem alloc]
initWithTitle:NSLocalizedString(@"Back", @"")
style:UIBarButtonItemStyleBordered
target:self
action:@selector(goBack:)] autorelease];
self.navigationItem.leftBarButtonItem = leftButton;
You need to provide a function to perform the goBack.
hope this helps
michael golden

Similar Messages

  • Can i make a button change anchor link when you scroll down the site?

    I am trying to make a scroll site.. and i have navigation buttons on the right, a full menu, but also a "1 topic up" button and "1 topic down" button.
    Is there any way that i can have those buttons change anchor link when you scroll down the site.
    Example:
    I am at home, then i press "1 topic down" and gets scrolled to the next topic on the website, but then i cant make the button change to link to the anchor below that, so the button becomes useless after that 1 press.
    Is that in any way possible in Muse to make it change link?

    Hi
    You can try to create different buttons on page positions where down scrolling will be active with separate button actions. For example you click on "I topic down" , page scrolls and there is another button placed with "Next Topic down" , on click this would scroll the page more and similarly along the length of page.
    Button with anchor link scrolling down the page cannot be used for different anchor links, creating different buttons with anchors is the solution.
    Thanks,
    Sanjit

  • Active state not working in scrolling site (with anchor links)

    I'm design a scrolling site with anchor links and an horizontal menu on the top.
    when i publish the site and click on the menu buttons the site scrolling to the place of the anchor but the active state in the menu is not working.
    now... when i leave the main page (were the scrolling site is) and then return back to it all active states are working perfectly
    anyone have this bug? or any one know how to fix it ?

    Hmmm...I've just been playing around, and I think I got the Active State to work correctly.  I think my problem was not understand what Active State means.
    To answer your question, I was changing the Font Color and Box Fill Color of the Active State.
    I did not understand that Active State means the look of the Menu Item when the PAGE is active.  I thought it meant the look of the Menu item when the cursor is scrolling down the Menu (i.e. when the MENU is Active, not the page).
    Look at this page for an example of what I'm trying to achieve...
    http://www.pgavdestinations.com
    When you hover over the "Work" menu item, and move the cursor down the menu, the state of "Work" remains changed until you move the cursor off of that menu column. It does NOT return back to it's Normal state until you are off of that menu column.
    Is there a way to achieve this with the menu states in Muse?
    Thanks for the replies!
    Dave.

  • Had problem with bookmarks, history, back button and google links not working.

    For the last five days i've had problems with firefox. First, i noticed that it was running incredibly slowly and then that all the links in the google search were not working. Then i noticed that neither was the history, bookmarks or back button. I went on to facebook chat to ask for help. First, I was told to reinstall firefox, which didn't work. Then i was told to do a "clean" install where you rename the old firefox folder in the programs folder so that it makes sure when it's installed that everything is new and nothing is corrupted. That didn't work either. I then disabled my antivirus software and firewall to see if that was causing the problem. It was not. Then I installed an anti-malware program to remove any adware or spywar,e which it did remove from my computer, but it didn't solve the problem. The chat person was at a loss and I don't blame him/her because so was I.
    The reason I'm writing this is in case anyone else has the same problem. The only way I solved it was first by uninstalling and making sure to check the little box asking if you want all personal data and such associated with firefox also removed (which removes cookies as well) and then I finally thought to delete all the cookies from the rest of my computer also. Once all the cookies were gone and i had fully uninstalled firefox and personal data, I reinstalled it with a newly downloaded file and it is once again functioning properly. Hope this is helpful to anyone who's been ripping their hair out. :)

    '''I have the same problem!!
    But in my case, not just Google links.
    The problem happens with all the websites links.
    Please...
    Help us!!
    Thnx'''

  • Problem with back button  with myfaces/jsf

    Hi guys
    i have very strange kind of problem , i have a page where i am shwing tabular data with data scroller , thats work fine , in this tabbular data we are shing user infomration , and a link on user name ti see his details , this link works fine , and take user to user details page ,
    but from that page if user press back button , and reaches back to tabbular data page , in this page if user select any link , page reloads , and stay there , and after reloading page if user select any link then it works
    Any one geting this kind of preoblem , hope i am not alone
    please help me out
    X-preet

    Hi Luisa,
    1 .Create 2 views  View1 and View2
    2. Place buttons on both the views and create actions for both in view1 and view2
    3.Create outboundplug from View1 to View2.(Navigation link also)
    4.Create outboundplug from View2 to View1.(Navigation link also)
    5. In View1 button action fire the outboundplugto View2
    6. In View2 button action fire the outboundplugto View1.
    Regards, Anilkumar

  • Problem with anchor link entire page moves to the left of the browser

    I created an anchor link on the top of my home page with a text link at the botton called "back to top of page" whenever I click on the text link on my desktop the page move vertically upwards to the top of the page but when I try doing this on either of my laptop the page moves diagonally from right to left up to the top of the page how can I fix this? You can see this on my website www.sweetproductionmedia.com

    hi julia, i placed the anchor in various places to see what works. I placed the anchor center top towards the left and right side within the browser. I also tried upper top outside of the browser center, right and left and it still moves diagonally. Here's what I noticed. On my desktop I use a 25" monitor so the anchor works fine the page moves straight up but whenever I view it on both  laptops  it moves diagonally.  I had my sister test the link on her laptop (she lives in Brazil) and she told me that sometimes it would go straight up and another time it moved diagonally. Here's the link to my website so you can see the problem in action. There's a 'back to top' link on almost every page see for yourself. www.sweetproductionmedia.com 
    thanks so much for taking the time to help:-)

  • Issue with Anchor Links in Composition Widget

    Hoping for some help regarding anchor links. I was successful in nesting a Slideshow widget within a Composition widget. The Composition widget contains six panels, each of which contains one Slideshow. Thankfully, that all works as it’s supposed to.
    What I want is to direct users (from another page on my site) to a specific Slideshow within the Composition widget (i.e., for example, to the slideshow on the third panel of the Composition). The anchor link does work in that it directs users to the page with the Slideshow/Composition combo. However, it displays the first panel in the Composition and not the third. I’ve tried inserting the anchor link on top of the actual picture in the Slideshow, and also within one of its text labels. Still the same result.
    My question … can an anchor link be used to direct someone to a specific panel within the Composition widget? Perhaps I can export my site to HTML, open the .html file in Dreamweaver and … I don’t know, move or rename the anchor somehow? Is anyone else having this issue?

    This is a bit late in the day looking at the date of your post, but I asked the same question recently and Brad Lawryk answered (thanks Brad - saved me hours of fiddling!):
    Unfortunately the only way to do this now would be to save a copy of the page with the desired tab focused. Unfortunately this does cause duplicate content and is not SEO friendly though.

  • Is anyone experiencing problems with anchor links moving after updating to Muse 2014?

    I just happened to check my website and my CONTACT anchor link is not working. The image and contact info has moved to a different part of the page and I can't seem to get it to work properly. Here's the website: soleilnyc.com

    Yes, I have noticed the sucking more power issue.  We also can't connect to the iTunes store anymore on either ipad we own after the upgrade.  All the tips provided in the forums have not worked.  I hope Apple peeps are paying attention to this... they are losing money!!  I can't buy my stuff on iTunes, so I went to Amazon.com.

  • Button with HTML-Link

    Hi!
    I've to create buttons on a dynpro, which process the currently installed frontend mail client (zB. Notes, Outlook, etc.) and fill the recipients, subject and mail body dynamically at the end of "PROCESS AFTER INPUT".
    The application handling should be like a HTML-Link (for example: <a href="mailto:[email protected]?body=Hello%20Fritz,%0D%0A%0D%0Aich%20wollte%20nur%20sagen,%20dass%20">Mail mit Body</a>).
    The solution should work in SAPGui for Windows and SAPGui for HTML.
    Does anybody knows a example coding?
    Any hints are welcome.
    Thanks, happy new year!
    Peter Lintner

    develop a FM with the following code and call it onclick of a button.
    function y_outlook_mail_create.
    *"*"Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_SUBJECT) OPTIONAL
    *"  TABLES
    *"      EMAIL_BODY STRUCTURE  SOLI OPTIONAL
    *"      ADDRESS_LIST STRUCTURE  SOLI OPTIONAL
    *"      ATTACHMENTS STRUCTURE  SOLI OPTIONAL
    *"  EXCEPTIONS
    *"      INVALID_PATH
    *"      DOWNLOAD_FAILED
    *"      EXECUTION_FAILED
    data:
        v_translate(2),
        it_vbs          like soli
           occurs 50 with header line,
        v_last,
        v_vbs_filename  like rlgrap-filename,
        wf_filename like rlgrap-filename ,
        commandline(1000).
    *- Prepare a code to translate a quote into a hex-tab
    *- so it can then be translated back to 2 double quotes.
      concatenate '"' '9' into v_translate.
    *  CON_HEX-TAB'
      append:
        'Dim myolapp                                        ' to it_vbs,
        'Dim olNamespace                                    ' to it_vbs,
        'Dim myItem                                         ' to it_vbs,
        'Dim myRecipient                                    ' to it_vbs,
        'Dim myAttachments                                  ' to it_vbs,
        '                                                   ' to it_vbs,
        'Set myolapp = CreateObject("Outlook.Application")  ' to it_vbs,
        'Set olNamespace = myolapp.GetNamespace("MAPI")     ' to it_vbs,
        'Set myItem = myolapp.CreateItem(olMailItem)        ' to it_vbs,
        '                                                   ' to it_vbs.
    *- Translate the body into a single line.
      loop at address_list.
        concatenate
          'Set myRecipient = myItem.Recipients.Add("'
          address_list
          into it_vbs.
        append it_vbs.
      endloop.
      append:
        'myItem.VotingOptions = "Approve;Reject"' to it_vbs.
    *- Build the subject line.
      concatenate
        'myItem.Subject = "'
        i_subject
        into it_vbs.
      append it_vbs.
    *- Prepare attachments
      append:
        'Set myAttachments = myItem.Attachments' to it_vbs.
    *- Check if the attachment exists
      loop at attachments.
      clear wf_filename .
      move: attachments-line to wf_filename .
        call function 'WS_QUERY'
             exporting
                  filename       = wf_filename "ATTACHMENTS
                  query          = 'FE'
             exceptions
                  inv_query      = 1
                  no_batch       = 2
                  frontend_error = 3
                  others         = 4.
        if sy-subrc eq 0.
          concatenate 'myAttachments.Add("'
                      attachments
            into it_vbs.
          append it_vbs.
    * '    olByValue, 1, "4th Quarter 1996 Results Chart"'
    *      append '    olByReference, 1' to it_vbs.
        else.
          message i017(zz) with
             'Could not attach' attachments.
        endif.
      endloop.
    *- Prepare the email body.
      clear: v_last, it_vbs.
      append it_vbs.
      loop at email_body.
        at first.
          append 'myitem.HTMLbody = _' to it_vbs.
        endat.
        at last.
          v_last = 'X'.
        endat.
        translate email_body using v_translate.
        while sy-subrc eq 0.
          replace '09' with '""' into email_body.
        endwhile.
        if v_last = 'X'.
          concatenate '"' email_body '" &vbCrLf '
            into it_vbs.
        else.
          concatenate '"' email_body '" &vbCrLf  &_'
            into it_vbs.
        endif.
        append it_vbs.
      endloop.
      append 'myItem.Display' to it_vbs.
    *- Prepare the vbscript filename for download and execution
      clear v_vbs_filename.
      call function 'WS_QUERY'
           exporting
                environment    = 'TEMP'
                query          = 'EN'
           importing
                return         = v_vbs_filename
           exceptions
                inv_query      = 1
                no_batch       = 2
                frontend_error = 3
                others         = 4.
      if sy-subrc <> 0.
        raise invalid_path.
      endif.
      concatenate v_vbs_filename 'mail.vbs'
        into v_vbs_filename.
      commandline = v_vbs_filename.
    *- Download the file
      call function 'WS_DOWNLOAD'
           exporting
                filename            = v_vbs_filename
                filetype            = 'DAT'
                mode                = 'S'
           tables
                data_tab            = it_vbs
           exceptions
                file_open_error     = 1
                file_write_error    = 2
                invalid_filesize    = 3
                invalid_table_width = 4
                invalid_type        = 5
                no_batch            = 6
                unknown_error       = 7
                others              = 8.
      if sy-subrc <> 0.
        raise download_failed.
      endif.
      call function 'WS_EXECUTE'
           exporting
                commandline    = commandline
                program        = 'WSCRIPT.EXE'
           exceptions
                frontend_error = 1
                no_batch       = 2
                prog_not_found = 3
                illegal_option = 4
                others         = 5.
      if sy-subrc <> 0.
        raise execution_failed.
      endif.
    endfunction.
    Regards
    Raja

  • How do I go back to my previous version of Firefox? on Version 4 i can no longer get a drop down next to back button with previous visited sites!!

    The bar at the top lists back and forward. However, there used to be a drop down arrow next to forward where I could click it and select from a list of pages (sites) that I had just visited in this session, without having to click back, back, back, back, etc. You get the picture??

    Click-hold the unified Back / Forward button, or right-click it to get the Back / Forward history for that tab.
    Or install this extension to get the old "drop-marker" button restored. <br />
    https://addons.mozilla.org/en-US/firefox/addon/backforedrop/

  • Re: [iPlanet-JATO] Back Button functionality

    Hi Mike,
    Our test environment does not include proxy server.
    regards,
    syam.
    Please respond to [email protected]
    cc:
    Subject: Re: [iPlanet-JATO] Back Button functionality
    Guys,
    Please clarify something for me, the JATO code is commented as follows
    protected void addResponseHeaders(RequestContext requestContext)
    // These values should make any proxy between the client and
    // server avoid caching, and ensure that pages from one user
    // can never be seen by another user (if they're cached anyway)
    requestContext.getResponse().addHeader("Pragma","no-cache");
    requestContext.getResponse().addHeader
    ("Cache-Control","private");Yet you make no mention of whether your test environment includes a Proxy
    Server, or does your browser
    go directly to the Application Server's web server?
    Can you clarify, please?
    ----- Original Message -----
    From: <syam_reddy@p...>
    Sent: Wednesday, April 25, 2001 2:59 PM
    Subject: [iPlanet-JATO] Back Button functionality
    >
    Hi,
    We observed the following difference in behaviour between JATO pages
    and NetD served pages.
    We have the following scenario. User will login to the
    site. After login he will get a frame set. This frame set has threeframes.
    Top and bottom frames are used for navigation (to switch between various
    sections on the site.) .The middle frame(main frame) shows the actual
    content. When the the frame set gets loaded main frame shows page1. User
    will click on a link on page1. Page 2 will be loaded in main frame. Atthis
    point if the user clicks on back button , with migrated application(JATO
    pages) the following message appears in the main frame.
    In Netscape Communicator 4.61 the following message appears in the main
    frame :
    Data Missing
    This document resulted from a POST operation and has expired fromcache.If
    you wish you can repost the form data to recreate the document by
    presenting the reload button.
    In IE 4.72/5.5 the following message appears in the main frame:
    Warning : Page has Expired
    The page you requested was created using information you submitted in a
    form.This page is no longer available.As a security precaution, Internet
    Explorer does not automatically resubmit your information for you. To
    resubmit your information and view the web page click teh refresh button.
    However, in the NetD site page1 will appear in main frame.
    How do we mimic the NetD behaviour with the migrated
    applications ?
    We think the above behaviour with migrated Apps, is due to the
    headers that are get set in Application ServletBase , see the following
    code snippet :
    protected void addResponseHeaders(RequestContext requestContext)
    // These values should make any proxy between the client and
    // server avoid caching, and ensure that pages from one user
    // can never be seen by another user (if they're cached anyway)
    requestContext.getResponse().addHeader("Pragma","no-cache");
    requestContext.getResponse().addHeader
    ("Cache-Control","private");
    If we comment the above code , we were able to mimic theNetD
    behaviour. Are there any alternatives/thoughts on how to mimic the NetD
    behaviour ?
    Thanks in Advance,
    syam&ravi.
    [email protected]
    [email protected]

    OK, here's what I'm trying to do: We have, like you said, a menu
    page. The pages that it goes to and the number of links are all
    variable and read from the database. In NetD we were able to create
    URLs in the form
    pgXYZ?SPIDERSESSION=abcd
    so this is what I'm trying to replicate here. So the URL that works
    is
    pgContactUs?GXHC_GX_jst=fc7b7e61662d6164&GXHC_gx_session_id_=cc9c6dfa5
    601afa7
    which I interpreted to be the equivalent of the old Netd way. Our
    javascript also loads other frames of the page in the same manner.
    And I believe the URL-rewritten frame sources of a frameset look like
    this too.
    This all worked except for the timeout problem. In theory we could
    rewrite all URLs to go to a handler, but that would be...
    inconvenient.

  • How do I turn off the drop-down menu on the back button?

    I use a laptop and my hands aren't too dextrous. Every time I click the "back" button I get the drop down menu, which means I then need to move my hand back to the pad (slowly!) move the pointer, and try again. It can take me several attempts to go back one site now!
    I have searched for hours to find out how to turn this drop down menu off, to no avail, and even looked through all the settings in about:config in an attempt to find a way around this. It seriously impacts my ability to use my laptop on the web now, so if anyone can please come up with a way to get back to the old back button, with no menu when my slow old finger cannot move fast enough to get off the button, I would be very grateful.

    You can use that list and open the previous tab just above the one that appears bold and has a bullet.
    The current active entry has a bullet in front of it.<br />
    If you hover an entry in the tab session history list with the mouse then you see an arrow at the left side pointing left (Back) or right (Forward) to show the direction.<br />
    You can left click an item to open it in the current tab or middle-click or Ctrl left-click an entry in that list to open that link in new tab, just like you can with other links.<br />

  • Browser Back Button

    Could someone please explain to me why users cannot use the browser back button with SP 2013? What is the purpose of preventing its use?
    Also, if there is no legitimate technical reason to disable this capability, how do I stop SP 2013 from redirecting the user to the current page when they try to use the browser back button?

    What page? On some you're being bounced from a link to a re-direction so when you hit back you just hit the redirect again and end up in the same place...
    There are other times the back behaviour might be interfered with as ajax controls weren't anticipated as part of basic HTML and browser construction.

  • Anchor links reloads page

    My site (www.vikunja.com) is mainly built with anchor links creating that nice smooth navigaton that I like.
    When I open the site and click on one of the menylabels, it scrolls down the site exactly as I want it .
    BUT when I click again (on any label) the site reloads first. It really annoying.
    I noticed that when I enter the site, the adress bar reads "www.vikunja.com"
    Lets say that I click on the "Music" label, then the adress bar says "www.vikunja.com/#music" - so far so good
    Then when I click on a label the second time, the adress bar changes to "www.vikunja.com/index.htlm#contact
    That makes the site reload. Why does it add the "index.htlm" just like that?
    Can I fix it?
    /A

    I have the same problem - Anchor links reloading pages.
    Just updated software to the new release 7.0.2 today (4.5.2012) and still has the same problem.
    Has the bug been fixed or not?

  • Reload previous page on back button - using cache control

    Hi,
    In my application I am using cache control to avoid the pages to be cached. But the requirement is changed and now the previous page can be re-loaded on hittinh browser's back button even after the 10 mins. i.e if user hits the back button with in 10 mins he should be allowed to see the pre-loaded contents on the previous page. After 10 mins the browser should display the page refresh warning.
    a) Old code to preventing caching:
    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0     
    response.setDateHeader ("Expires", -1); //prevents caching at the proxy server
    b) I am trying with the code ha changes as to get the previous page with in 10 minutes time:
    response.setHeader("Cache-Control","no-cache, max-age=600"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0     
    The above code changes are not working. If uses "no-cache" with max-arg=600 it behaves like the code in section a).
    If I uses response.setHeader("Cache-Control","max-age=600"); then even after 30 mins it load the previous page with preloaded contents.
    Any help is appreciated.

    I tried it lots of time by refreshing the browser's cache. I am using IE 6.0. I tested it through FireFox to get the header details. when I submit the request it displays the headers request
    same as I set in the code. But when I hit the back button (after the max age time passed) still it gets the value from cache and no header values are displayed.

Maybe you are looking for