Webkit get the URL of a link

I am trying to add policy functionality to an app that I have written so that, for example, instead of opening a link to a page within my app itself it might open the link in the default browser or open a window to handle the functionality internally rather than use the functionality provided online.
At this stage I am only trying to log what the URL is so that I can see what the format is. Once I've worked that out, I'll put together the policy code. The code that I have written so far is this:
<pre>
- (void)webView:(WebView *)sender decidePolicyForNavigationAction:(NSDictionary *)actionInformation
request:(NSURLRequest *)request
frame:(WebFrame *)frame
decisionListener:(id<WebPolicyDecisionListener>)listener
// get the url from the information dictionary:
NSURL *url = [\[actionInformation objectForKey:@"WebActionElementKey"] objectForKey:@"WebElementLinkURL"];
// log the url's scheme
NSLog(@"absolute string is \[%@]", [url absoluteString]);
// NSLog(@"relative string is \[%@]", [url relativeString]);
// NSLog(@"fragment is \[%@]", [url fragment]);
// NSLog(@"host is \[%@]", [url host]);
// NSLog(@"parameter string is \[%@]", [url parameterString]);
// NSLog(@"user is \[%@]", [url user]);
// NSLog(@"password is [%@]", \[url password]);
// NSLog(@"path is \[%@]", [url path]);
// NSLog(@"relative path is \[%@]", [url relativePath]);
// NSLog(@"port is \[%@]", [url port]);
// NSLog(@"query is \[%@]", [url query]);
// NSLog(@"resource specifier is \[%@]", [url resourceSpecifier]);
// NSLog(@"scheme is \[%@]", [url scheme]);
}</pre>
As you can see, I've tried every component of the WebElementLinkURL - but without luck. The results mostly came back null - only absoluteString seemed useful (hence it's the only one not commented out). But even that didn't so far enough.
For example, when clicking a link, absoluteString returns
22/04/2009 09:58:00 Test[646] absolute string is [https://test.internal.com/#]
Hovering over the same link in Safari, or clicking on it, returned https://test.internal.com/client/help
The question, therefore, is how can I get my code to return the URL in the same manner that Safari does. The website I'm trying to view does contain a fair bit of Javascript - I don't know if this is relevant though.
Methinks I am looking in the wrong place!

Hi Jun,
Before creating a customised framework page, copy the default framework
page provided my SAP to your own namespace and make changes.
Just open the copied page, set masthead to invisible ,this can be done
for any other component that you want to hide on the framepage.Then
make only the inner page visible, if that's what you want.
Then create a url iview that points to this page and pass room details as
parameters.This can be assigned to any role that you wish.
<i>Pls reward points if helpful</i>
Regards
Vineeth

Similar Messages

  • How can I see the url of a link before clicking on it?

    Hi. I have Firefox 10.0.2. I used to be able to see the url of a link on web pages in the bottom left of the browser. That way, if I the url didn't seem legit I wouldn't click on the link. But now, when I put the mouse over a link, nothing comes up. How can I see the link addresses again? Thanks.

    The Status Bar. where the link previously showed on mouse hover, has been replaced by the Add-on Bar. You can install the following add-on to get some of the former Status Bar functions back. The Add-on Bar must be turned on. The add-on will also stop the showing of the "tooltip" type status loading text, and will, instead, show it in the Add-on Bar:
    *See --> https://support.mozilla.org/en-US/kb/what-happened-status-bar
    *To turn on the Add-on Bar, see --> https://support.mozilla.org/en-US/kb/Back%20and%20forward%20or%20other%20toolbar%20items%20are%20missing#w_showing-the-navigation-toolbar '''and click on "Add-on Bar" to check it'''
    *Add -on '''''Status-4-Evar''''': https://addons.mozilla.org/en-US/firefox/addon/status-4-evar/
    *If necessary, after install and restart:
    **Open Customze window (Firefox button > Options > Toolbar Layout '''''OR''''' View > Toolbars > Customize '''''OR''''' ALT+V+T+C '''''OR'''''right-click in the empty space at the end of the Tab Bar and choose Customize)
    **'''While Customize window is open''', drag any or all of the following from the Customize window to the Add-on Bar in the order and position you want them to appear. Then click "Done" button at lower right on the Customize window.
    ***"Status Text" ('''''link on mouse hover or during page loading''''' or "Done" when page is loaded)
    ***"Progress Meter" (progress bar of page loading)
    ***"Download Status" (status of download)
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.org/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.org/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.org/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *'''''Next Generation Java Plug-in for Mozilla browsers''''': [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • How do I get the URL of a jsp page?

    I have a jsp page which has a link to a servlet page, in the servlet page, I want to get the URL of the jsp page.
    I tried to use request.getHeader("referer"), it seems like if it is a link in the jsp directly lead to the servlet, it works, but if the link calls a javascript function which opens up a window runing the servlet, it is not working. I have to do the second way, so it is not working by doing request.getHeader("referer")
    I tried to use javascript "location.href", I get the whole url by alerting the url in the jsp page:
    http://localhost:8080/pos-webapp/serv/qt_old?currentpage=portal&bcd=ABC123&pnm=P1001830&prnm=1&psd=236863.0&ln=01&sln=NYPPA&stp=2.1&stt=A&_POSID=1F8464122ADAF4EEC9B1A94C286EB252
    then I pass this url when calling with my servlet, in the servlet page, when I do request.getParameter("url"), the url is actually cut off like this:
    http://localhost:8080/pos-webapp/serv/qt_old?currentpage=portal
    anything after &pnm is cut off, anyone has any idea?
    Thanks in advance.

    Thank you.
    but how do I put encoding in the javascript code? do I need to decode in my servlet page?
    here is my code in the jsp page:
    linkset[3]+='<div class="menuitems">Email Diagnostics to AutoOne</div>'<%     
    function emailDiagnostics()
    win = window.open("/pos-webapp/serv/email_diagnostics?url=" + location.href + "&browser=" + navigator.appName, "emailDiagnostics",
    "width=350, height=140, resizable=no, scrollbars=no, toolbar=no, location=yes, directories=no, status=no, menubar=no, copyhistory=no, left=450, top=300");
    win.focus();
    }

  • How to get the URL parameter value when navigating from JSP Page to portal

    Hi All,
    I have web Dynpro application with one button, while clicking that button It will navigate to JSP page as external window. In the JSP page I have a input field and Button.
    In the JSP page input field I will enter some values and press submit button, it will navigate to Portal page by passing some URL parameter with values.
    Once user entering to portal by default WD page displayed, the same WD page I try to get the URL Parameter which I have passed from JSP page, but I am not able to get the URL parameter value.
    If same application running in without portal, I can able to get the URL parameter values. I am getting the URL parameter by interface view default inbound plug parameter.
    How do we resolve this problem?
    Regards,
    Boopathi M

    Hi
    Please try  these link might helpful for you
    1.[How to call WebDynPro application from JSP |/thread/452762 [original link is broken];
    2.[How to get the previous page url from abstract portal component? |/thread/1289256 [original link is broken];
    3.[how to launch and pass a parameter |/thread/5537 [original link is broken];
    Best Regards
    Satish Kumar

  • How to get the URL of the request.

    I am trying to get the URL from where the request is coming to the servlet. If http://www.xx.com/ calls my servlet i want to know that the request is coming from http://www.xx.com/ URL. If i use request.getRequestURL() which is displaying my servlet URL. Please help me which is very urgent.

    You actually want the referrer? You can obtain it from the request headers as follows:String referrer = request.getHeader("referer"); // Yes, with the legendaric misspelling in there.Having said that, be aware that the client has full control over what he sends with the request headers. So the client can change/spoof/remove the referrer entry to his taste anytime. Your code should not rely that much on it, it should rather be used for statistics only.

  • How to get the URL of an iView using AbstractPortalComponent

    Hi All,
    I need to get the URL of an iView using AbstractPortalComponent using the following code.
    But i am unable to open the URL from the Browser
    This is the following code snippet
    public class AbsClass extends AbstractPortalComponent
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
    IPortalComponentURI componentURI = request.createPortalComponentURI();
    componentURI.setContextName("pcd:portal_content/LOG_Viewer/LogViewer");
    String URI=componentURI.toString();
    response.write(URI);
    The output i got from the browser is:
    /irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fLOG_Viewer!2fLogViewer
    Actual Path: pcd:portal_content/LOG_Viewer/LogViewer
    Output Path: /irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fLOG_Viewer!2fLogViewer
    Why some extra numerics are embeded in the output path when compare with the Actual Path.
    Can any one send me the modified code and your suggestions, how to achieve this problem.
    Regards
    Phani

    Hi,
    Now i need to get the URL of this component.
    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    IPortalComponentURI componentURI = request.createPortalComponentURi();
    componentURI.setContextName("com.sap.portal.appintegrator.sap.bwc.Transaction");
    String URI=componentURI.toString();
    response.write(URI);
    I export this component into Portal and i tested with an iView based on this par file, i got the URL in the Preview.
    But when i tried to run this URL by adding the http://<IPADDRESS>:<PORTNO>+URL
    I am facing one AccessDenied Exception for this Object. ( USER/GUEST)
    Is there any security zone, or other Permissions Problem, if so can you plz guide me what are the settings i have to change inorder to resolve this exception
    Regards
    Phani

  • I am unable to reply to your e-mail convermation--how can I get the URL to past into my browser?

    Received a confirmation e-mail requestion me to reply to it and I cannot get the URL to paste to my browser--how can I do this???????/

    Hi June,
    Sorry for the trouble you've had.
    I've verified your account on our end and you should be able to access the ExportPDF service now.
    Please let us know if you have any questions!
    -David

  • I have aperture 3.2.4 on my laptop and have the serial number, but just bought a new MAC and I can't get the Ver 3.0 link to work. Anyone know how to move it from my laptop to our new mac?

    I have aperture 3.2.4 on my laptop and have the serial number, but just bought a new MAC and I can't get the Ver 3.0 link to work. Anyone know how to move it from my laptop to our new mac?

    I am talking about the Ver 3 download link that came with the purchase email.
    That link is no longer available. Use "Migration Assistant" to copy your Applications from your old mac to the new Mac, then immediately run software update. Aperture Version 3.2 will not run on your new mac with Mavericks, you will have to Upgrade to version 3.4.5 at least - you can download this update from the Support page: Aperture 3.4.5
    Then launch Aperture and enter your registration key and try now too update from version 3.4.5 to 3.5 from the AppStore. The AppStore will change your Aperture registration to an AppStore version, so you will able to reinstall by downloading from the AppSTore in future.
    If you want transfer only Aperture and no other applications, do it manually: You will have to copy not only the application but folders from the libraries as well:
    /Applications/Aperture.app
    /Library/Application Support/Aperture/
    ~/Library/Application Support/Aperture/
    Leonie

  • How to get the url of a document in content management?

    Hello,
    I have used API  'SKWF_PHIO_CONTENT_URL_GET to get the url of a file in CRM content management. But when I tried to open this url in explorer got error message "SSF error: Decoding not possible". Could any one please help me to resolve this problem.
    Thanks
    Nisha

    Thanks for replying - unfortunately, there is not much
    support on these forums.
    I wish there was some way to emulate the mouse from
    Javascript to click the play, pause, and slider buttons... but one
    would't even know, programmatically, the location on screen of the
    play, pause, and slider buttons.
    quote:
    Originally posted by:
    davexnet
    You'll notice that questions like this don't get answered on
    this
    forum. The Flash player has a philosophy that skews the power
    over almost everything about it to the content providers,
    and precious little control, if at all, to the client player.
    It's a crappy situation - I use Flashblock in Firefox and
    only view the
    content *I* want to see.
    It works for me, particularly since I'm using an older
    (slower )
    computer that really gets bogged down by aggressive Flash
    content.

  • How to get the url of the document in quick parts?

    I have document library in which there is one content type with the document template uploaded. In the footer of the document, I want to show the URL of the document which is opened in word application.
    Is there any way to get the URL? I am not able to see the field in Quick Parts while configuring footer of document template.

    Alexdu_,
    You can create a single line text site column in that content type to hold URL information.
    Create a SPD workflow to populate URL field using update field of current list.
    This custom column will be available as Quick part in word.
    This could be an alternate approach as URL is not available as quick part field.
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Can I get the URL of any other browser window in java

    Can I get the URL of any other browser window in java

    Hi, did you find the way to find the URL of the WSDL? I have the same problem.

  • How do I get the URL to "My Photo Stream" (the base one, Not the one I created to share out)?

    How do I get the URL to "My Photo Stream" (the base one, Not the one I created to share out)?

    You can't get a url for my photo stream; only for publically shared streams.

  • How Can i get the URL of a page

    How Can i get the URL of a page . like in ASP the
    Request.QueryString() ...
    Thanks

    Are you wanting actual URL or just the url (query string
    variables)?
    For url variables you would reference the structure.variable
    name like so:
    #url.variablename#
    So if you had a url like this:
    http://www.somedomain.com?page=home&action=view
    You could access the variables like so:
    #url.page#
    #url.action#
    If you are wanting to actual page you could use:
    #cgi.script_name#
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technologies, Inc.
    =============================
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "Yasmin_lady" <[email protected]> wrote in
    message
    news:e4fhjv$fpl$[email protected]..
    > How Can i get the URL of a page . like in ASP the
    Request.QueryString()
    > ...
    > Thanks

  • How can I get the "Purchase more sounds" link to light up under GarageBand?

    how can I get the "Purchase more sounds" link to light up under GarageBand?

    Did you try it in the program monitor?

  • Applescript to get the Url's of Safari for multiple browser instance??

    Hi All,
    am trying to get the URL's of the opened windows in more than one instance of Safari.
    I have got the script to get the url's of single instance, Pls suggest the same for multiple instances of safari browser with different windows opened for each instance. current code am uisng:
    tell application "System Events"
              set theURL to URL of current tab of window 1 
    end tell

    Try this:
    set theURLs to {}
    tell application "System Events"
        get id of processes whose name is "Safari"
        repeat with thisID in result
            tell (process 1 whose id is thisID)
                tell windows
                    copy value of text field 1 of group 2 of tool bar 1 to the end of theURLs
                end tell
                tell (windows whose name contains "abc")
                    click button 1 -- close
                end tell
            end tell
        end repeat
    end tell
    theURLs

Maybe you are looking for

  • Url service data control - problem while  POSTing to a restful webservice

    Hi, I am trying to call a restful webservice to add a new employee .I have created the url service data control. The service method consumes XML. When i am creating the url service datacontrol I selected the http method as POST and giving the service

  • 6.0.2 version of Safari does not show pdf files

    When I click on a link to see a pdf file a darkened blank window opens but the pdf file never appears.  Is there a specific setting that needs to be set?  I did not have this problem before I upgraded to version 6.0.2.

  • Whatsapp for Mac mini through bluestacks

    how to download a new version of whatsapp.app to run in my macmini through bluestacks.plese someone help me sending a download link.

  • Returning file thumbnail/icons to their original

    i understand that to change the icon/thumbnail of a file i can ctrl click it to get info then paste an image i have previously copied to the icon selected in the top left corner of the get info window and the new icon will appear for some reason this

  • How do I return firefox to its previous version?

    Yeah I just wanted to say I can't stand fire fox 4. I could fill 3 pages with the bad ideas in this version but I will save you that agony since you wouldn't read it anyway I mean I know I wouldn't. Anyway I just want to know how to return fire fox t