How do mozilla addons or IE activeX plugin's handle browser page zoom ?
Basically the size of the window they draw to will be changed by the browser; the NPAPI plugin or ActiveX control just handles the window resize event and does whatever it wants to. AFAIK there is no real way to detect if it was changed because of the page zoom or by something resizing the object element.
This is from my own experience.
Related
My Chrome app contains two pages A1.html and A2.html. How can i navigate from A1.html to A2.html without creating a new window?
The page A1.html contains 10 div's and A2.html contains a back link to A1.html. My need is to load directly a specific div of A1.html when the back link in A2.html is pressed.
You can't navigate within a Chrome App window (Content Security Policy), although you can navigate to an external browser if you set the target attribute of the <a> element to "_blank". What you have to do, if you really want links to appear to work normally, is intercept the click on the link by setting an event handler and then changing the DOM from within JavaScript.
One easy way to change the DOM from JavaScript if you have an HTML fragment is to use the insertAdjacentHTML API (Google it for documentation).
While this might seem awkward, even limiting, think of a Chrome App as an app, and not a web page. After all, with a native Mac OS X or Windows app, you wouldn't expect to entirely change the UI in a window by simply clicking on a button, right? You'd expect that the app would do that via the native API. Same the Chrome Apps.
Alternatively, you can position a webview in the Chrome App window, and then HTML within the webview works normally, because that really is a "web view."
How can I automatically refresh the page (with JS/jQuery) whenever the user resizes the window ?
(it must sound like a weird thing to do but I have a good reason to want this : in summary, Dailymotion videos cannot be resized by JS dynamically as YouTube videos can, but their size can be set by JS based on the window size)
window.onresize = function(){window.location.reload();}
In some browsers the resize event is triggered continually while resizing, so you need a debounced event. When that event goes off, there are many ways to refresh the page.
I have written an panel which supports file / image uploads. So the panel is a simple plain form. The panel works in a normal Wicket page.
What I would like to do now:
I would like to use the panel in a modal window. The panel is displayed correctly. However, when I submit it / upload a new file, my browser prompts whether or not I would like to leave the page. The page which contains the DIV of the modal window is a form itself.
My research didn't turn up any interesting information about forms in a modal window expect it has to be self contained (nested form). I think this prerequisit is met.
Is there any information available, what I have done wrong? Any tutorials?
You need to use an AjaxSubmitButton (or AjaxSubmitLink) to submit your form. The problem is that the modal window requires Ajax communication. If you use the window to just reprocess a whole page and don't care about the Ajax'ness, then you can override the ModalWindow#getCloseJavaScript() method.
As Martijn pointed out, the modal window relies on AJAX communication. So use AjaxSubmitButton or equivalents. When components in the main window need to be updated after the submit of the modal window, this can be done by adding them to the AjaxRequestTarget.
However when it comes to multi part forms (file uploads) this does not work quite. Apparently multi part doesn't play nicely with AJAX. One has to do an IFrame trick as pointed out e.g. here: http://www.dooriented.com/blog/2008/04/23/wicket-ajax-like-file-upload-on-a-modal-window/
Is there a way to make firebug (or any other browser, or using any other tool) stop any dom manipulation from happening? Sometimes layout debugging a screen filled with on hover events is impossible, as the elements may disappear, and you can't see their compound layout.
I freeze DOM Manipulation in FF with Firebug clicking right button on Node and set "Stop when add/change child"
Actually this is quite easy to do for pages that are not constantly and autonomously being altered (even comet applications can be relatively stable for a few seconds): just save the page using firefox. It will save the current state of it all, ignoring all javascript and events. More than that, the styles will be easily viewable.
i wish there was a better way to do this, i wonder if it would be possible to do with a bookmarklet, im surprised theres no button in firebug or chrome to just freeze the dom, or is there one, that i dont know about?
I need to find out how to make the menu that appears in mobile safari on the iphone/touch when you tap & hold an element appear on a single tap without having to hold. how would i do this? preferably i would use webkit & no js.
UIWebView does not does not call any methods until a link is actually activated, and it does not expose any information about its subviews. There is no way to do with current SDK, you should file a bug with Apple if you need this functionality.