Control Over IE Window Closure
Oct 31, 2006
I am currently strungling with the fact that I want to control the
browser closure. In fact, I have a webbased application in which I use
a wizard. Ones the wizard starts, a lock is set on specific objects in
the db. On all pages of the wizard, the user get the possibility to
exit the wizard by clicking on a custom "Exit" button. That way, I know
that the user has left the wizard and that way I can unlock the locked
objects in the db again.
So far, so good. But users are used to close browser windows by
clicking on the "X" in the titlebar. If they close a window that way,
the locks aren't unset and no other user may start the wizard again. If
I should know that he had clicked on the "X", I could unlock the
objects.
I have searched a lot on the net but all results aren't sufficient for
me.
Some solutions which don't work:
1) onunload event: =Also called when the window is refreshed or
forwarded.
2) "titlebar = no" property while opening the first page of the wizard,
is not working (the titlebar is still enabled). And even then, the
users can close the window by clicking CRL-F4. This key combination
isn't disabled by the "hotkeys = no" property.
Note: if the client's pc crashes or if the user kills the wizard
process via the task manager (exceptional cases), they have to call
maintenance to reset the locks. This is a requirement, defined by
bussiness.
View 4 Replies
ADVERTISEMENT
Sep 20, 2010
when a user clicks on a link, a new window opens. what I want to do is that if the user closes that popup but click on that same link again, the window should open..
Code:
<script language="javascript">
var winOpen = "";
[code]....
View 1 Replies
View Related
Jul 16, 2009
I've been using this script (and variants that give the user different controls) for years and am positive it worked before but I just noticed that resizable is being ignored in FF 3.0.11. It is working in IE fine. I don't want the user to be able to resize the window.
Code:
function PopNada(PopNadaUrl,xW,xH)
{
var ScreenWidth=window.screen.width;
var ScreenHeight=window.screen.height;
[code]...
View 1 Replies
View Related
Mar 10, 2004
I have a form that I link to from several locations. Right now I use JS in the link to the page to open it a specific size. I would rather simplify the links and just put the dimensions in one place...the file that opens. Is there a best way to force a page to be opened in a specific size without putting JS in the link? I would just use target="_blank" to get it in a new window.
View 2 Replies
View Related
Jul 30, 2009
I have been working on this code in the last few hours with my boss and we are completely stumped. We are currently writing our companies new site, and we have come across a problem. We built a mini samples user control that shows on a few of our pages, that works with no problem. In that user control, we implemented a Rad Window Control by Telerik.
We have the auto populate thumbnail images and full size images from a database during the ItemDataBound event on our Repeater, this too works fine with no problem. When we first implemented the window, we added anchors to the thumbnails in the code behind so when a user clicks on a thumbnail from the parent page the thumbnail shows up in the window scroll bar at the bottom when the window opens. This worked fine except when you click on a thumbnail with the window closed the parent page would scroll half way down and then the window would open. The scroll function worked fine and had no problems with it, but we wanted to fix the parent page issue.
We decided to do accomplish the same task but with javascript. Since it only meant a few changes we thought it would be no problem, but we are stumped like never before. The javascript code we are using works fine, but when we try to implement it in the window, it doesn't do squat. We suspected that the javascript was being called before the page was loaded but even when using onload in the body tag it still doesn't do anything. We then added a literal and populated the text in the PreRender event but still no avail.
I made a test page that had the exact same javascript functions as the samples page but with hard coded content rather than data binded. This page works exactly as it should, but the samples page doesn't. I have already looked into the Telerik support forums but can't find anything near related to our issue so I thought I would stop by here as a last resort. I hope that we are just missing something and is an easy fix, rather than having to rewrite everything but if it's needed then it has to be done.
So here are my questions for you :Can you look at our code and see if we are missing something. Maybe a fresh pair of eyes will do the trick.Would going back to the anchor system be better and just try to fix the parent page scrolling issue?
I have posted our samples page and the test page that I made.
view-samples.aspx
View 6 Replies
View Related
Mar 12, 2010
I am opening a pop up in a new window (window.open) . I have no control on the code of the pop up. Its a third party pop up (twitter). Now that generates a callback url and I can specify that.My problem is the callback page is loaded on the pop up window. I want that window to close and have the call back page loaded on the parent window.
View 1 Replies
View Related
Nov 21, 2009
I'm using the code below for the "launch page" to open a JS window and know when it has been closed, and than execute some other code that should be run after the pop-up closes.
javascript Code:
This works, and does exactly what I want. Do any of you JS experts see any reason for concern? Anything that makes it suboptimal?
View 3 Replies
View Related
Oct 7, 2011
I would like to set a flag using a closure so that the internal value of that closure is preserved for me to retrieve it when different events occur. It is one of those times where lack of block scope will stop me from doing what I want to do unless I can set a boolean and preserve its value in a function.
View 9 Replies
View Related
Aug 19, 2006
In my UI framework, I have an event handler - just like many frameworks do. My handler is a static object, and contains methods to take care of things like mouse events, etc. However, upon adding a method to handle onfocus today, I ran into a very odd problem in Firefox. I've put together an example page that generates the error:
View 14 Replies
View Related
Jan 6, 2011
I'm not sure why this: Code: console.log(instance2.getAnotherKey()()); returns Object { a = "a" } when I clearly reassigned the value of the a property. Reassigning the property caused change in this line:
Code:
ref.a = 'abc'; console.log(inst.getZ()); //Object {a="abc"} So why does it work when you call an instance method in the constructor (e.g. this.getZ()) but doesn't work when you call the instance method in prototype?
[Code]...
View 3 Replies
View Related
Sep 22, 2010
I had a original function in this format/syntax:
Code:
GlobalFunction(){
InnerFunction(){
// ... long definition here ...
[Code]....
Other words the innerFunction behaves like it is global and has not shared variables with myClosure!
View 14 Replies
View Related
Feb 18, 2011
I'm using the apycom jquery menu style 1 (dim grey)URL..It's a great looking menu but does anyone know how to 'delay' the dropdown menu closure when your mouse moves off of it?I can change the speed of the menu opening and closing, but not can't find a way to delay.It's too easy for visitors to 'slip' off the menu and if you have two child menu's, it get frustraing if you drill down to the secon child menu and slip off. You have to go back to the top menu and start again.
View 2 Replies
View Related
Nov 24, 2009
I'm trying to group some existing top-level functions inside a closure (to avoid polluting the global namespace) but I'm not quite getting it to work. First, all the JS works outside my anonymous function, but once I put it in the anonymous function I get an error of "crossfade is not defined". I'm not quite getting why the the setInterval/crossfade works outside the anonymous function but not inside. Anything inside start() should be able to see vars/functions outside start() and it should all be protected in the closure created by the top-level anonymous function? I'm not trying to access anything *within* crossfade(), I'm just trying to execute it.
Code:
(function($) {
//vars up here that internal functions can access
//also using some jquery inside here, so using $
function crossfade() {
//body here
}
//other functions
function start() {
//body here
cInterval = setInterval('crossfade()', 5000);
}
})(jQuery);
View 3 Replies
View Related
Oct 10, 2011
Situation:I have a very long page divided into many sections vertical-wise marked by bookmarks, say pageX.html#s1 to s10. I need to show the section inside an iframe (iFrame1) on the mainpage (mainpage.html). I am thinking of having 4 buttons, sitting on the mainpage, to help navigate between these sections on pageX, namely NEXT, PREVIOUS, TOP, END.condition of the frame, fixed width/height, no scroll, no border.Very new to javascript but need this code to make a page work for BIZ.
View 1 Replies
View Related
May 31, 2011
I'm trying to develop a function to resize a control upon window resize. In regular javascript I would make a global array of control names and append code to the event that cycles through and resizes each control.For example
var proportionalizedImages=new Array();
proportionalizedImages.push(document.getElementById(ctrl));
if (window.addEventListener)[code]....
I'm wondering if there's a more elegant way to do this in jQuery. I've played around with it a bit, but i'm unsure how to get the control object to the resize function triggered by window resize without a global variable.
jQuery.fn.resize = function(max_size) {
$(window).bind('resize', $(this), resizeTriggered);
}[code]....
View 2 Replies
View Related
Jan 29, 2010
I have a HTML and I am opening another link in a separate window using window.open() . The child window is something like 'http://yahoo.com' which is out side html. I need to refresh the parent window when the child window is closed.
View 4 Replies
View Related
Jul 20, 2001
I've opened a pop up with javascript.
How would I go about controlling the parent window from the pop up, ie. changing it's content:
I tried this in in the pop up
<a href="new_page.htm" target="parent"> but that just opens up a new window.
View 5 Replies
View Related
Jul 23, 2005
does anybody know how I am able to control Flash Movies from html
or JavaScript? For example, I want a movie go to a specific frame
each time I open the html file where it is embedded.
View 3 Replies
View Related
Jul 23, 2005
I have a form frm1 . The form is generated by a "control" that is placed on
the page - I have no access to the source to modify the controls. I can
access other hidden controls within it by referencing:
ocontainer.frm1.txt1.value;
I would like to insert my own hidden control that can be posted back to to
my page so I can do something with it. How can I do this from clientside at
runtime?
View 8 Replies
View Related
Feb 6, 2007
Is there a possibility to compare and visualize in a user-friendly way
the differences of two html files?
I need also something like a version-control. I think I could generate
for everychange of the text a new record in the database. But now I
need a tool (JavaScript, Java, etc.) to compare and visualize two
versions of these html-files online over a web-browser.
I know, this is not really a javascript topic, but perhaps here is
anyone how knows a tool for that.
View 5 Replies
View Related
Aug 25, 2006
In HTML documents, named forms may be referred to as named
properties of the `` document.forms '' collection, and named form
controls may be referred to as named properties of the form's
elements collection:
var frm = document.forms["formname"];
var contrl = frm.elements["elementname"];
The (string) value property of such controls can be read
directly from the element:-
var value = contrl.value;
var value = (+contrl.value); //string to number: see 4.21
One exception is where the control is a SELECT element, and
support for older browsers, such as NN4, is required:
var value = contrl.options[contrl.selectedIndex].value;
Another exception is where several controls share the same name,
such as radio buttons. These are made available as collections
and require additional handling. For more information, see:-
http://www.jibbering.com/faq/faq_notes/form_access.html
View 3 Replies
View Related
Mar 3, 2011
How to add a new tab to a tab control by clicking a button on the first tab? Do I use the "add" method? If so how?
View 3 Replies
View Related
Mar 30, 2010
how can I control a swf with a FLVPlayback, that it's reading a movie from my server, with Javascript. check the link. it's the second image
[URL]
View 1 Replies
View Related
Sep 24, 2011
I have 2 checkboxes.How would I control one from the other?
Eg.
[ ] Option A
[ ] Option B
[code]....
View 7 Replies
View Related
May 25, 2009
I have the following problem: I have a swf file that I'm inserting in my page, this swf file has a sound(mp3 imported file in the stage). I was wandering if I can stop or set the volume to 0, from JavaScript, I found that I can do(play go to frame):
FlashID.GotoFrame(frameNumber);
FlashID.Play();
View 1 Replies
View Related
Apr 23, 2010
i am useing Javascript Function's for validation Its Working Fine But If Condition Not Matches Its Not getting Focus On That Control. cursor Going To url ...is There Something with Post Back..
View 9 Replies
View Related