Let’s open a window with minimal set of features just to see which of them browser allows to disable: ![]() There is also a number of less supported browser-specific features, which are usually not used. scrollbars (yes/no) – allows to disable the scrollbars for the new window.resizable (yes/no) – allows to disable the resize for the new window.status (yes/no) – shows or hides the status bar.FF and IE don’t allow to hide it by default. location (yes/no) – shows or hides the URL field in the new window.toolbar (yes/no) – shows or hides the browser navigation bar (back, forward, reload etc) on the new window.menubar (yes/no) – shows or hides the browser menu on the new window.There is a limit on minimal width/height, so it’s impossible to create an invisible window. width/height (numeric) – width and height of a new window.There is a limitation: a new window cannot be positioned offscreen. left/top (numeric) – coordinates of the window top-left corner on the screen.There must be no spaces in params, for instance: width:200,height=100. It contains settings, delimited by a comma. params The configuration string for the new window. If there’s already a window with such name – the given URL opens in it, otherwise a new window is opened. Each window has a window.name, and here we can specify which window to use for the popup. The syntax to open a popup is: window.open(url, name, params): url An URL to load into the new window. In also can navigate (change URL) in the opener window. A popup may persist even if the user left the page.It’s very easy to open a popup, little to no overhead.So opening a popup with a third-party non-trusted site is safe. A popup is a separate window with its own independent JavaScript environment.But there are still situations when a popup works good, because: Modern usageĪs of now, we have many methods to load and show data on-page with JavaScript. So the first one is blocked, and the second one is not. Does this sound doable? I assume I do not actually have to have a callback function, right?Ģ) If I decide to use a popup window and user makes the request on page1.asp and has now changed to page2.asp, how would I handle that? I assume every possible page the user could navigate to in our internal app, I would have to have that callback function declared in the javascript, right? We currently have an include file called common.asp that I could it in since all our pages include that.The difference is that Firefox treats a timeout of 2000ms or less are acceptable, but after it – removes the “trust”, assuming that now it’s “outside of the user action”. While the PDF is being created, I assume the user can navigate to page2.asp and do something else, correct? I was thinking that instead of using a popup window when completed, I could just email them the PDF using vbscript on the server. I use javascript to send an async call to the server to start creating the PDF (it is all vbscript with a bunch of stored procs). Now that you tell me this, I think I might want to do it another way (tell me which ones are feasible)ġ) User is on page1.asp and clicks a button to create a PDF. the user may do whatever he wants in the meantime. basicly you start a async XMLHttpRequest and say: open the window when you are ready.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |