Callbacks from WebView - Catching the URL when hyperlinks are clicked

Hi all,
I need some help. I'm using webview/webengine to display a webpage that uses frames, such as http://commons.apache.org/math/api-2.2/
When I click on a hyperlink in the page the url (and therfore also the WebEngine.locationProperty) does not change and I can't find a way to "catch" the url of the new content displayed in one of the frames.
How can I catch the event of clicking a hyperlink in a html page displayed in WebView?
Cheers,
Nuwanda

I can't test this, but executing Javascript something like this might work:
//Retrieve the IFrame.
var frame = document.getElementById("SomeIFrame");
//Create an event that is run every time a new page is loaded in the iframe.
frame.addEventListener(
    "load",
    function() {
        //Display the url that has been loaded by the frame in a popup.
        alert(frame.src);
    false
//If you want events for every link on this page...
var i;
for (i = 0; i < document.anchors.length; i++) {
    var anchor = document.anchors;
anchor.addEventListener(
"click",
function() {
//Display link in popup.
alert(anchor.href);
false
//You can do something similar for all iframes.
var arrayOfIFrames = document.getElementsByTagName("iframe");
The webpage:<html>
<body>
<iframe id="SomeIframe" width="500" height="300" src="SomePage.html">
</iframe>
<body>
</html>
Here is a convenient JavaScript reference with links to a JavaScript tutorial: http://www.w3schools.com/jsref/default.asp
Edited by: aidreamer on Aug 5, 2011 7:01 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • When I create a hyperlink, it removes the : from the url when a person clicks on the link. How do I stop this from happening?

    In both Indesign CS 5, 6 and Adobe Acrobat, the hyperlinks I create, remove the colon making it a failed hyperlink. I am at a loss as how to move forward.

    Yes, it ends up looking like "http//website.com"

  • Urgent: How can I catch the exception when application exit by accident

    Can anyone give me advice and idea?
    I want to catch the exception when application goes down by accident for example: Power off, turn off the machine without closing the appliction properly.
    Because I want to notify the server and remove it from register.
    How can I do this????
    Please help,
    Thanks very mich,
    Peter

    Shrubz,
    I tested my application as follows:
    1. start rmiregistry
    2. start rmi server
    3. start two clients
    I printed out the client's object information as below:
    first clinet:
    RemoteObserver is com.ss8.qos.qcsm.policy.policyui.PanelMain_Stub[RemoteStub [ref: [endpoint:[192.168.70.237:4706](remote),objID:[-73a6662b:e75af455a5:-8000, 0]]]]
    second client:
    RemoteObserver is com.ss8.qos.qcsm.policy.policyui.PanelMain_Stub[RemoteStub [ref: [endpoint:[192.168.70.237:4711](remote),objID:[-73a6665a:e75af48703:-8000, 0]]]]
    Now I stop the second client by clicking ^C (ctrl c)
    I noticed that this client has not been removed from the server register (Vector).
    next, I am working on first client for example add one record. After server received this record, it will update all clients who have already registered with server. Because now in the server register there are two clinets (first and second), so it will try to update two clients. The exception will be thrown when server tries to update second client which has already been stoped. I used printStackTrace() to print out the message as follow:
    Catch ConnectException
    Connection refused to host: 192.168.70.237; nested exception is:
         java.net.ConnectException: Connection refused: no further information
    java.rmi.ConnectException: Connection refused to host: 192.168.70.237; nested exception is:
         java.net.ConnectException: Connection refused: no further information
    java.net.ConnectException: Connection refused: no further information
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
         at java.net.Socket.<init>(Socket.java:269)
         at java.net.Socket.<init>(Socket.java:98)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:29)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:124)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:497)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:194)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:178)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:87)
         at com.ss8.qos.qcsm.policy.policyui.PanelMain_Stub.update(PanelMain_Stub.java:53)
         at com.ss8.qos.qcsm.policy.policydb.Observable.performNotify(Observable.java, Compiled Code)
         at com.ss8.qos.qcsm.policy.policydb.Observable.notifyObservers(Observable.java:71)
         at com.ss8.qos.qcsm.policy.policydb.PolicyServer.ServerAddPolicy(PolicyServer.java:102)
         at java.lang.reflect.Method.invoke(Native Method)
         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:237)
         at sun.rmi.transport.Transport$1.run(Transport.java:140)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.rmi.transport.Transport.serviceCall(Transport.java:137)
         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:422)
         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:634)
         at java.lang.Thread.run(Thread.java:479)
    *** end here ***
    I don't see any information related to object ID. How can I handle this?
    Please give me suggestion.
    Many Thanks,
    Peter

  • Stop parameters from displaying in the URL

    Hi All,
    I've got a simple application with no login required and I have set up the session state protection at the page level.
    Is there any way to not display the parameters within the URL?
    If yes, what security method is better between the session state protection and hidding the params?
    Many thanks

    Javier,
    What are the normal security recommendations?There is a lot to consider when it comes to security. Does your app has sensitive data? Does it run on the internet? How secure does it need to be?
    Determining the level of security you are shooting for is the first step. After that, it is following processes that will get you to what you need. SSP is not enough--you need to consider security in everything you do--in Apex or any other tool.
    As for hiding parameters, you could also use a frame, but the parameters are still there, they are just in a frame. You could also post them instead of using links, but they are still there, just view the source of the page. SSP will keep users from tampering with the URL and a few other things, but it won't keep them from changing post-able items.
    If you have really sensitive data, you should consider your security holistically--database views, VPD, triggers, Apex validations, Apex conditions, Apex Authorization Schemes. Because it is html, the user can modify the html and post the page--you need to consider that. If you don't have (or display) a Delete button, the user can just add one in and post the page. If you have a process that is dependent on a delete button it will run, unless you check to see if it should. This is true for Apex and any other html application.
    This probably poses more questions than it answers, but security is that way--no simple answers.
    Anton

  • [svn] 4901: Only remove the children from the textFlow when they are going to be immediately replaced .

    Revision: 4901
    Author: [email protected]
    Date: 2009-02-09 09:27:39 -0800 (Mon, 09 Feb 2009)
    Log Message:
    Only remove the children from the textFlow when they are going to be immediately replaced. Side effect from SDK-18880.
    QE Notes:
    Doc Notes:
    Bugs: SDK-19177
    Reviewers: Gordon
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18880
    http://bugs.adobe.com/jira/browse/SDK-19177
    Modified Paths:
    flex/sdk/branches/i10/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as

    This is a problem of overall design.  It is not a scripting issue.
    NET USE wil only delete the drive you tell it to delete.  You will need to know in advance which drive that is.  There is no magic in WIndows.  YOu must tel it everything.
    Bill suggests GPP which is very easy to use and very flexible.  It avoids learning how to write scripts and understand much of Windows.  Just set the values and they do allof this for you.  There are checkboxes for most issues.
    Most of us have not mapped drives since shortly after the release of Vista many years ago.  Save your self a lot of headaches and use the tools that were built to do this/
    ¯\_(ツ)_/¯

  • How do I see the URL when I mouse over a link?

    how do I see the URL when I mouse over a link?

    Should show at the bottom of your window if you go to View and click on Show Status Bar.

  • I cannot delete songs from my iphone via itunes, but can with my ipod and regular library. The option when I right-click isn't there ONLY with the iphone, any ideas how to get back this option?

    Can anyone help me get back the options when I right click with my iphone with itunes that drop down menu has oly 3 features and none is what I want or need?
    This happened since the last update.
    Geoff

    I am facing the same problem, please help us ...

  • HT4526 I have difficulty in hearing conversation around the table when many are speaking. Can I put my Iphone 4 3G in the centre of the table and tune it to my hearing aid to join in the converstion?

    I have difficulty in hearing conversation around the table when many are speaking. Can I put my Iphone 4 3G in the centre of the table and tune it to my hearing aid to join in the converstion?

    There are hearing aids that support a BlueTooth connection to a phone. However, to make that work, you'd need to put someone elses phone in the middle of the table, then call it from your phone which you had connected to your aids using BT. I can't imagine that the quality of a call over speaker phone would really be good enough to help, though.
    Best of luck.

  • I'm having trouble converting my RAW files to jpegs. Even though my RAW files are 90MB plus, the jpegs when converted are only around 6MB.  Am I doing something wrong?  Thanks,  A

    Dear Forum,
    I realise this isn’t necessarily your problem, buy I’m having trouble converting my RAW files to jpegs.
    Even though my RAW files are 90MB plus, the jpegs when converted are only around 6MB.
    Am I doing something wrong?
    Thanks,
    A

    HHi Barbara, thanks for replying to my post.
    No there's nothing wrong with the Jpegs, but I want to srart uploading images for sale in Alamy, but they say they must be a minimum of 17mb un compressed. Does that mean that at 6mb compressed from 90mb they'd be acceptable?
    thanks,
    alex

  • I'm in Safari, is there a way to change the order when you right click a link? Just upgraded to Mavrick OS

    I'm in Safari, is there a way to change the order when you right click a link? Just upgraded to Mavrick OS

    You can do that with the Menu Editor extension - https://addons.mozilla.org/firefox/addon/menu-editor/
    This extension has not been updated by its author in a couple of years, but another developer has updated it for Firefox 4, you can get the updated version from http://netticat.ath.cx/MyAddons/MyAddons.htm#3rdpartyaddons

  • Whats the meaning when variables are enclosed by brackets

    Hi,
    Whats the meaning when variables are enclosed by brackets?
    like say
    lv_fieldname(25) TYPE c.
    lv_fieldname  = 'Material01'.
    what does it mean by saying
    ASSIGN (lv_fieldname) TO <fs_fieldname>.

    In many statement in ABAP, brackets mean that real "name" of operand (object) will be determined during runtime.
    Normally you would write
    data lv_fieldname(25) TYPE c VAUE 'SOME_FIELD'.
    assign lv_fieldname to <fs>.
    write: <fs>.
    This code is static . It means that when syntax check takes place, compilator looks for definition of lv_fieldname.
    It then assigns value of this field. The resuts is printintg on screen text "SOME_VALUE"
    Now you have similar code, but with brackets
    data: lv_fieldname(25) TYPE c VAUE 'SOME_FIELD',
             some_field type i vlaue 5.
    assign (lv_fieldname) to <fs>.
    write: <fs>.
    Here code is dynamic . It means that compilator doens't realy know the field name which will be assigned to <fs>.
    We told him that this will be determined during runtime ( by means of brackets ) and the real field name we want to assing, is stored in LV_FIELDNAME.
    This is equal to writing
    assign ('SOME_FIELD') to <fs>.
    When program starts, it is no LV_FIELDNAME which is assinged to <fs>, but the field which is stored in LV_FIELDNAME, namely 'SOME_FIELD'.
    So the printed result will be 5 .
    The same rule with dynamic operands applies i.e. in select statement
    data: my_table(5) type c value 'SPFLI'.
    select * from (my_table) ...
    There is no table in DB named my_table , but compilator "knows" that we don't what to fetch data from MY_TABLE, but we want table name to be determined dynamically (during runtime). So, it is  'SPFLI' table which here will be taken into account.
    One more note!
    Such dynamic statements are generic (doesn't constitute fixed code) and open new range of possiblities.
    Simple extending above example will create flexible (generic) program which can fetch data from different tables with one statement.
    parameters: pa_tabname(40) type c.
    select * from (pa_tabname) into ....
    Of course here you need also dynamic internal table as target area, but this is of no importance here.
    Hope this claryfies magic with brackets;)
    Regards
    Marcin

  • Ever since I updated to Firefox 7.1, my computer won't go to the internet when I double-click the Mozillz Firefox icon, like it normally does; I have to restart my computer to be able to access the internet. Why?

    Ever since I updated to Firefox 7.1, my computer won't go to the internet when I double-click the Mozilla Firefox icon, like it normally does; I have to restart my computer to be able to access the internet. Why?

    There is a difference between remembering the name and password in the Password Manager and a "remember me" check box on a web page to log you in automatically.<br />
    The latter usually involves the creation of a special "remember me" cookie that is stored on your computer and that is send to the server.<br />
    If that "remember me" cookie is removed or gets corrupted or is not send to the server then the server won't remember you anymore and you need to sign in once again.<br />
    <br />
    * http://kb.mozillazine.org/Cookies
    * http://kb.mozillazine.org/Password_Manager
    So make sure that you keep the cookies from those sites via an allow exception and that you do not clear the cookies or site preferences via "Clear Recent History".

  • How do you save your photos in iPhoto and be able to find the photos when you are in different programs. When i try to find them I can only find the iPhotos not the individual photos.

    How do you save your photos in iPhoto and be able to find the photos when you are in different programs. When i try to find them I can only find the iPhotos not the individual photos.

    Use the media browser. In every open/attach window in tithe lower left hand corner under media ==> photos ==> iPhoto
    LN

  • When links are clicked, they do not fully display the NEW page until the mouse is moved.I know it is a current bug, and appears in no other browsers that I know of.

    It was pointed out that my links do not function correctly on Firefox on a Windows platform. When links are clicked, they do not fully display the NEW page until the mouse is moved! I have now observed it for myself on my fathers PC running Windows XP on Firefox.My PC is on Windows7
    It is the 5 version of Firefox, so I know it is a current bug, and appears in no other browsers that I know of.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    In Firefox 4+ you can use one of these to start in <u>[[Safe mode]]</u>:
    * Help > Restart with Add-ons Disabled
    * Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Hii Respected, I have restored my data from icloud, but the app's that are downloaded i am not able to open it.. but instead i am able to see it with unhighlight color.. so help me..

    Hii Respected,
    I have restored my data from icloud, but the app's that are downloaded i am not able to open it.. but instead i am able to see it with unhighlight color.. so help me..

    Contact iTunes:
    Apple - Support - iTunes - Contact Us

Maybe you are looking for

  • Unable to capture the value of vbrk-vbeln value from VF02

    Hi All, am printing form from VF02 ,,,once i execute the VF02 , and select Billing Document -> Issue Output to  option .., my printi program gets triggered ,......, but in my print program am unable to capture the value of VBRK-VBELN which i have ent

  • How Do I Transfer Clips From One Project To Another?

    I have what is probably a basic question. I have two projects that I'm working on, and need to transfer a set of clips from my first project to my second. How would I do that.

  • No apple ID found AND already in use??

    So I just made a new apple ID.  I go to log in and it says wrong password... I try to reset my password and I get nothing, it's been 7 hours.  Then I tried to find my apple ID (using my email), what comes up says: "No Apple ID found. We can't find an

  • Hlep.

    Hi, Can someone help me in implementing this simple logic in ABAP. Set of values :  (00:10:00,00:18:00,02:14:00,05:30:00,10:40:00) If the value is not in this interval then it is updated to next higher value. Ex: 1)If the hour timing is 02:18:00 , it

  • Cs6 lighting effects

    cs6 lighting effects, down loaded plug in and did not get cs6 version, got lighting effects classic. How do I down load cs6 version? windows 7 32 bit