Box bounds of html elements in a WebView

Is there a way of getting hold of the box bounds of each of the elements/tags (along with elements' attributes), in an web page - I want to know the position and size of these things one rendered, and then, in some cases, overlay extra information.
I can probably do this by executing some JavaScript, but the web engine/view must have already done this?

Controls that are used by WebView are actual Controls, and you can get them by asking the WebView for its children. But all the other bits are, as far as Java and FX are concerned, just a bitmap that has been rendered by the webkit engine (not technically, they're a bunch of drawing commands passed to Prism, but for all intents and purposes it might as well be a bitmap). So only if you can get that information from webkit would you be able to do that, and for that you're better of using the JavaScript bridge (as mentioned) to get that information. And you should be able to get that information and then overlay FX content since every node in a DOM tree will tell you its position.

Similar Messages

  • How to set an input box in an HTML Web Resource embedded in a CRM 2013 form

    I have embedded an HTML web resource that contains some input boxes in a custom CRM form. In the CRM form I have created some fields that corresponds to the input boxes in the web resource and they are hidden.
    The reason to do so was the limitation of the CRM not giving me the flexibility of the layout I was looking for. So basically, the user enters the data in the web resource and once saved they write to the hidden fields. On the other hand, when the form loads
    the values from the hidden fields are copied into the web resource input boxes.
    I am having a hard time setting those input boxes from the corresponding hidden fields on the form. I can read the crm fields easily using JavaScript. I can also get to the HTML web resource using the following:
    var target = Xrm.Page.getControl("WebResource_CriticalPath").getObject(); I also appended the contentWindow.document to the end of this and it comes back not null but when I try to get to the HTML element which is the inputbox I am trying to set
    the value to, I get a null reference. I am using:
    target.getElementById('input20'); to get to the element. I know this is not supported and I have to use Xrm.Page but I cannot figure out how to do so.
    Also, any advice on how to do the writing back (i.e. from the element to the form field) when the record is save would be helpful.
    I really appreciate any comments/help in this regard.

    Hello,
    What I would suggest is try to do everything from your html webresource. Add following code to set you field's value during onload:
    document.getElementById('input20').value = window.parent.Xrm.Page.getAttribute('hidden field id').getValue();
    Add following code to onchange hanlder to put changes back:
    window.parent.Xrm.Page.getAttribute('hidden field id').setValue(document.getElementById('input20').value);
    Dynamics CRM MVP/ Technical Evangelist at
    SlickData LLC
    My blog

  • Can JFC handle all event of html element

    I was just going through with JSF spec.
    I have some doubts .
    Can JSF hanlde all the events related to html element like key down , onclick etc, on form load.
    Instead of writing heavy javascripts for this on client , can i handle all this on server side with JSF.
    In my application , for each html field, we make server trip. To handle these html events , we are dependent on javascript. we don't use any fancy Elememnt.
    My concern is this ,
    by using JSF can i avoid this javascript coding on html event. and use JSF element with server side event handling .
    thanks

    If I understand your question, you're asking whether JSF component event handling can be done on the server side, rather than through the use of client side javascript.
    The answer, I suppose is yes; you'd write server side code that is run during an appropriate phase in the life-cycle after data is submitted to the server.
    However, I don't see much point in doing this. You're bound to create less scalable applications. If you're disgruntled about javascript, consider designing a set of JSF components based on XForms (provided you have an appropriate browser plug-in).
    Rob

  • How to create a frame or box to surround a element

    Hi,
    Would appreciate some help on this one, as I can't seem to figure it out.
    How do you create a frame or box to surround an element, for example when using Hazardstatements.
    The only way I can think of is to use tables, but is there any other way?
    Example:
    Danger
    Some warning text
    Some warning text
    Thanks
    Best regards
    Ronny

    Hi Ronny...
    It's of my opinion that there while you may want this content formatted as a table when published, you should not be authoring the content with a table to achieve that formatting. This type of formatting should be applied as a "publishing process" after the DITA topics are assembled into a FM book and FM chapter files. If you're publishing to other formats (like HTML), the formatting can often be achieved through CSS or by other publishing processes. You don't want your source files to enforce some type of formatting that may differ depending on the deliverable.
    You may want to set up some ExtendScript wrapper that performs various pagination and formatting tasks to your generated FM files. While you can use ExtendScript to actually wrap the hazardstatement in a table, you can also look into using other tools such as FrameSLT (from West Street Consulting), or Structure Snippets (from Leximation, my company).
         http://www.weststreetconsulting.com/WSC_FrameSLT.htm
         http://leximation.com/tools/info/structuresnippets.php
    Cheers,
    Scott Prentice
    Leximation, Inc.
    www.leximation.com

  • How to include text as HTML elements (see DOMElement)

    I am working with Flash PRO CC v. 14.0.  to convert my Flash website to HTML5 / javascript
    I have converted a file to the HTML5 Canvas
    I am very happy that the new Flash Pro has the feature to convert to HTML5 canvas
    HOWEVER:
    In my original .FLA file project I use only one font: Copperplate Bold.  I use several sizes of that font within the project / scene
    In the original file for all text I use static text, Letter spacing, AntiAlias, AutoKern and single line (Linetype)
    - none of which the HTML5 canvas seem to allow / support?
    How do I maintain the FONT look that I have chosen in my original FLASH project, after I convert to HTML5 canvas?
    Is there a way in the HTML canvas to maintain the FONT look that I want?
    HTML5 canvas will not allow Font embedding
    The device font destroys the LOOK of my Copperplate Bold font.
    How do I include text as HTML elements (see DOMElements)?
    WARNINGS generated when I convert the original file into an HTML Canvas:
    Warnings generated while copying/importing in 140827a HTML test.fla:
    * AntiAlias is not supported in HTML5 Canvas document, and has been converted to DeviceFonts in an instance of Text.
    * AutoKern is not supported in HTML5 Canvas document, and has been removed in an instance of Text.
    * Frame Scripts have been commented
    * LetterSpacing is not supported in HTML5 Canvas document, and has been converted to 0.0 in an instance of Text.
    * LineType is not supported in HTML5 Canvas document, and has been converted to MultiLineNoWrap in an instance of Text.
    * Some artwork contains Hairline stroke, which is not supported in HTML5 Canvas document, and has been converted to Solid.
    * StaticText is not supported in HTML5 Canvas document, and has been converted to DynamicText in an instance of Text.
    New HTML Canvas Document created.
    NOTE:  So far the only way I have been able to maintain the font look is to convert the fonts to .png files
    This is painstaking work that I would like to avoid.
    Even then I still get a WARNING when I test my scene - (no doubt because I left the original FONT text  in guide layers)
    After conversion ON TEST SCENE:
    WARNINGS:
    Frame numbers in EaselJS start at 0 instead of 1. For example, this affects gotoAndStop and gotoAndPlay calls. (18)
    Only circular (not oval) radial gradients are supported. (85)
    Text support is limited. It is generally recommended to include text as HTML elements (see DOMElement). (6)
    Color effects are published as a filter and subject to the same limitations. (4)
    Filters are very expensive and are not updated once applied. Cache as bitmap is automatically enabled when a filter is applied. This can prevent animations from updating. (2)
    Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system.
    HOW CAN I MAINTAIN the FONT LOOK that I have chosen for my project?
    How do I include text as HTML elements (see DOMElements)?
    ANY HELP will be appreciated
    A good, in depth, tutorial on the subject (FONTS) would be a BIG help to many using the convert to HTML5 canvas features.

    GOOGLE HAS
    https://www.google.com/fonts
    choose a font from above site
    then:
    google generates instructions on how to embed that font
    Montserrat
    3. Add this code to your website:
    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
    4. Integrate the fonts into your CSS:
    The Google Fonts API will generate the necessary browser-specific CSS to use the fonts. All you need to do is add the font name to your CSS styles. For example:
    font-family: 'Source Sans Pro', sans-serif;
    font-family: 'Ubuntu', sans-serif;
    font-family: 'Montserrat Alternates', sans-serif;
    font-family: 'Montserrat', sans-serif;
    font-family: 'Open Sans', sans-serif;

  • The box in my Photoshop Elements, which shows the size and types of brushes has shrunk to one unreadable line. How do I expand the box to its original size?  I have tried dragging it open but nothing moves.

    The box in my Photoshop Elements, which shows the size and type of brushes, has shrunk to one unreadable line. How can I expand this box to its original size? I have tried dragging it open but nothing happens and none of the tool boxes appear to give me an expansion option

    Well, when you open the program, the splash screen, the window you see while the program is opening, should make that clear enough. For example:

  • Check box in Tree ui element.

    Hi All
    I am using org.eclipse.swt.widgets.TreeItem for creating tree structure. Now I am trying to incorporate check box for last tree element. For example if I am preparing tree structure for files the check box should appear only for text file not for directory. User would select the file by checking the box. Here is my code..
    for (int i = 0; i < files.length; i++) {
    TreeItem item2 = new TreeItem(item1, 0);
    item2.setText(files.getName());
    item2.setData(files[i]);
    if (!files[i].isDirectory())
    //here i have to do some thing so that i can select the file in check box
    if (files[i].isDirectory()) {
    new TreeItem(item2, 0);
    I cant use java script here. So pls help me out without using js.
    Thanks a lot.
    Sunit

    in oninputprocessing use the following code to read all the form field values
    data: fields type tihttpnvp,
            field  type ihttpnvp.
    call method request->get_form_fields
      changing
        fields = fields.

  • How to include HTML file in JSP using HTML elements or Javascript?

    Hi,
    I have around 15000 static html files one for each item which we display each upon invoking an item.The HTML file should be part of a JSP file.
    Please note that the name of the HTML file is determined dynamically
    Placing all the HTML files within the web application does not give us good performance so i would like to put all of them in the webserver.
    I am not able to include the file in the JSP using the jsp:include attribute if i place the HTML files in the webserver ,
    in order to do that i think should use either HTML element or javascript to include the HTML in the JSP.is there any alternative to <Jsp:include>
    Does anyone have an idea how to include the HTML file and take advan tage of webserver?
    Any ideas are appreciated

    What you need to do is simply read the HTML file from the disk and dump it out to the outputstream. It really is that simple.
    There's no reason you need to include all 15000 files in the actual WAR, you can place those files any place handy that is easy for the application to see (in another directory, or accessible from a file server if you have multiple front ends).
    Then, just write a utiility function that takes the output stream (i.e. the 'out' JSP variable), and the file name, read the file, and write it to the stream.
    If you start noticing performance issues, then you can try doing some caching, but truth is your OS should be doing that for you.
    But, truth be told that's the only practical way to do it.
    Another solution would be to use JavaScriipt and XMLHttpRequest (i.e "AJAX") to load the file at the client side, and simply replace a tag with the results.
    That's also pretty trivial to write, any web site talking about AJAX should give you hint there.
    Of course, that won't work for folks who have JavaScript turned off, or some other incompatible browser, whereas the server side solution obviously works everywhere.

  • WSRP Portlets - HTML elements renamed

    Moved from Webcenter Spaces.
    All,
    I have a JSR-168 portlet that I WSRP-ed using the wsrp-predeploy tool. I have this registered in Weblogic as a WSRP producer and added to Webcenter Spaces. What I notice is that when rendered on Spaces, the HTML elements including javascript function names are renamed and prefixed with some string values. For e.g. my input fields have "_adfp_portlet_field___adfpfp_f1723360181_adfpsep_f0_adfpsep_" added at the beginning and my javascript function names (within the script tag) have "adfp1723360181_" added.
    The portlet I have (it's the JasperServer portlet fwiw) uses Javascript functions for navigation. As a result of this renaming, none of the button controls work in the portlet.
    Is there anything I can do about this?
    Bijesh

    Yannick,
    That was brilliant. It worked.
    BTW, I notice that the edit mode of my portlet always opens in the Maximized state. This happens even though the portlet render url is constructed with "normal" window state. Is there anything else I need to do so Webcenter displays the portlet in normal mode?
    Edited by: Bijesh Krishnadas on Dec 5, 2010 7:33 PM

  • Html elements not declared as items ?

    Hello !
    Related to that thread (Reusing existing htp pages my question :
    Is there a chance to use html elements which are not declared as items (added a manually in html region…) ? I tried to cheat a bit by naming it p_t100 for example. Indeed, “p_t100” is accepted by the wwv_flow.accept procedure (no miss match error message). But, I’m unable to get back the posted value in an “after submit” process.
    Thank you in advance
    Pat

    Pat,
    It is not recommended you add your own HTML form elements to HTML DB pages. You point out one of the main reasons yourself. May I ask why you feel compelled to do this?
    Sergio

  • HTML elements obscuring scroll bar

    HTML elements on the below webpage obscures Firefox's scroll bar. That should never be alowed to happen, right? It only happens on that particular page though, not other pages on the same site. Haven't a clue as to why but it's obviously a bug that needs fixing.
    Page in question: http://pfangirl.blogspot.se/2010/05/rip-frank-frazetta-father-of-fantasy.html
    Screenshot: http://i.imgur.com/V8U4aav.png

    That is not the main scroll bar attached to the body or html element, but a scroll bar attached to a scrollable div container that is part of the page. This is just an example of a bad design. I see the same in Google Chrome and there this top widget is a lot longer with 5 elements.

  • I threw up the box before installing photoshop elements 13 and now i can not installed my brand new photoshop because i do not have a serial number

    I threw up the box before installing photoshop elements 13 and now i can not installed my brand new photoshop because i do not have a serial number

    When you buy software, the serial number is really what you're buying, since the software is typically downloadable. So don't throw it away in the future.
    If you registered the software before you threw away your serial number, then Adobe may have a record of your purchase.
    You could try chatting with a Support Agent:
    https://helpx.adobe.com/adobe-connect/kb/connect-chat-support.html

  • Muse changes size of embedded HTML-Elements

    Hello,
    Muse drives me crazy: I've added some HTML-Elements to my site and Muse always rescales 'em. For example: One element is 317x356 Pixels - but Muse scales it at 396x423. Now I go and change it back at 317x356 - and a few seconds later it's again 396x423. And if I try to rescale it with the mouse, it gets bigger and bigger each time I try to rescale it.
    What can I do? What is wrong with muse?
    Best,
    Sven

    How are you setting the width and height? Are you editing the embed code or using the width and height controls in Muse? YouTube videos and most HTML embed code specify their own dimensions. If you've accidentally changed the dimensions of the container holding the embed code, the easiest way to reset the widget to the default size is to drag-resize the widget with the mouse to dimensions that are much smaller than their default size. Muse will initially allow you to resize to these smaller dimensions but will then ask the browser to render the embed code and report its dimensions. If the dimensions are larger than the current size of the container, Muse will reset the container's dimensions to match those reported by the browser.
    With respect to your bandcamp embed code, it consists of an iframe with internal dimensions of 356x317. For HTML embed code pasted onto a page, Muse does not know what is in the code but it needs to know the dimensions so it can put it in a container. So, Muse hands the embed code to the browser and lets the browser determine its dimensions and generate a poster image for design time rendering in Muse. These dimensions are the initial dimensions of the container. Muse lets you style this container by adding a stroke and fill, for example, and it lets you resize the container. If you attempt to resize the container by dragging a resize handle or using the width and height controls, Muse gives the html embed code a chance to adapt to the new size of its container by handing the embed code back to the browser along with the container it needs to draw within. If the embed code is smart enough to adjust its dimensions, it will do so and pass a new poster image and new dimensions back to Muse. In this specific instance, the iframe has hardcoded dimensions so it cannot change its size. However, Muse will still allow you to adjust the container's dimensions as long as you don't resize it to be smaller than what the browser says its dimensions should be.
    Try the following experiment with your bandcamp widget. Give it a colored fill. Resize it larger than 356x317 by dragging the bottom-right selection handle. When you let go of the mouse, Muse will pass the container and the embed code for the widget to the browser to give it a chance to resize the widget. The band camp code does not respond so you see a colored fill in the portions of the container not filled by the widget. Now resize the container smaller than 356x317. Muse again gives the widget a chance to resize but the browser again returns 356x317 for its dimensions. So, Muse adjusts the dimensions of the container to match this minimum size.
    If you want to really make the widget a different size, you need to adjust the dimensions specified in the embed code. If you want to experiment, try the following:
    1. Right-mouse click on the widget and select "Edit HTML..."
    2. Find the 'width' and 'height' values and change them to something else. Try changing the width to something like 500px. Make sure you preserve quotes and semicolons and only change the numbers so that you do not break any syntactical rules.
    3. Press OK and watch how it changes the widget.

  • I cannot see all html elements

    I have worked on a file in Dreamweaver. When I open it in Edge Animate and look at the Elements panel I can see all the html elements BUT I cannot see them on stage. I can only see the Edge Animation stage. How can I see the entire html page?

    If this is a subscribed calendar that is pulling the events from another server on the internet, and you have a CDMA phone (such as Verizon or Sprint), it may be because your carrier doesn't support simultaneous voice and data (i.e., when you're talking on the phone, the data connection is suspended dropping the subscribed calendar until you're finished with the call).  This is just a guess; I can't confirm this with my phone as I have AT&T which supports simultaneous voice and data.

  • Out of Bounds feature in Elements 9

    I'm trying to use the out of bounds feature in Elements 9 and it just hangs up and can't get it to work.  Any suggestions????

    Use the correct forum. This forum is for question about Adobe Reader. We don't know what you use.

Maybe you are looking for

  • Getting error while updating data element using Xquery Automator

    Hi, I am getting following error while i am trying to update a data element in my task. <Nov 28, 2011 5:02:40 PM IST> <Error> <oms> <BEA-000000> <automation.AutomationDispatcher: Failed to execute on/plugin/external/ACOI_TMIP_POC/1.0.0/CLARIFY_Task.a

  • Call RFC(in R3) from CRM

    Hi, I am trying to call a RFC from CRM. I developed that FM in R3. and trying to call like .. CALL FUNCTION Function_Name EXPORTING IMPORTING But when I run from CRM, in runtime it is terminated. Please suggest a way to call FM (in R3) from CRM. Than

  • Firefox wont open get message saying no exe file found

    Hi I have been using firefox for years then a couple of months ago I started getting this message 'Windows cannot find C:\Program Files\Mozilla Firefox\firefox.exe' I've tried to un-install and re-install but I keep getting the same message so I've b

  • Calculating liquidation - percentages with subqueries

    Hi, I have a query a sql statement as follows, which I am using to query an oracle database: SELECT EXTRACT(YEAR FROM "CLIENT_TH"."CREATED_DATE") AS LOAD_YEAR, EXTRACT(MONTH FROM "CLIENT_TH"."CREATED_DATE") AS LOAD_MONTH, CONCAT(CONCAT(EXTRACT(MONTH

  • Can's see Muse file Creative Cloud

    I have copied over my Muse file to my Creative Cloud desktop and synced it online.  However, I can only see that the file is there.  I can't interact with it in any way.  See image below. I need to be able to see the individual pages and click throug