Replacement For ShowModalDialog - Disallow Anyone To Browse From A Pop-up Window Without Closing It
Jul 17, 2008
I was trying to find a browser independent way to raise a modal dialog. I know that MS IE has showModalDialog and Firefox has an attribute modal for window.open but I was wondering if anyone knew of a solution out there that would disallow anyone to browse from a pop-up window without closing it. Disabling the text highlighting and right click are not required, just disabling the user from browsing with the dialog open.
/* Notes: 1. edge & help attributes do not work. 2. "height" & "width" must be entered before "center" 3. if you should choose to set "center=yes" do not put in "left" and "top" 4. Minimize button not hidden, but when clicked the window will not disappear 5. Aside from the aforementioned, all features should react the same *fingers crossed* 6. Still in the works, so don't expect miracles. Any problems/queries/complaints please don't hesitate. Email: x_goose_x@hotmail.com */
I created a little script on a section of a website that password protects the page. It gives a user 3 tries to enter the correct password and then if they get it wrong, it moves them to another page that says they don't have access.
Recently, I upgraded it to do a window.showModalDialog instead of just using a plain javascript prompt as they don't look as nice and clear as a customized JSP could.
However, now that we've sent that upgrade out, we're finding that some of our users are not seeing the window.showModalDialog and it just loads the page (not the no access page).
The script is below. When I look through it, it looks to me that a user with an active popup blocker should just be sent straight to the no_access.jsp file, but that isn't what's happening. Code:
I have a starting page, Page1.php that uses Page1.js.In Page1.js, I'm using the onclick event for a button that's on that page. When the button is clicked, it goes to Page2.php. Okay, fine.Page2.php is using Page2.js. But when the browser switches to page 2, I get a javascript error because, somehow, it's still referencing the Page1.js file. (Using IE8)So how do I 'dereference' the first javascript file, so that when Page2 loads, it doesn't still try to instantiate the objects in Page1.js? (I'm getting a null object error when Page2.php loads).
I've been working with HTML, CSS, and PHP for the past few years. I've decided to add some interactivity to my websites and one of the new courses requires JS in our implementations, so I figure why not.
Anyhow, more to the point...the topic is a bit vague, but I didn't want to put a 50 word topic either so bear with me as I try to explain :D :
Okay, so I'm designing an art portfolio page and I have a 250x250 pixels preview shot of an art piece on my side bar at the top. There is a horizontal column at the bottom of the page (before the footer) that contains about 6 to 8 mini thumbnails around 100x100 pixels. Right now, I am able to make it so that if I mouse over the bottom thumbnails, the 250x250 at the sidebar is replaced to reflect what was hovered at the bottom, only in a bigger size.
This is my current coding:
<script type="text/javascript"> <!-- function change_img(path) { document.large_img.src=path} function preload(){
[Code]....
I'm not even sure if that's the correct or most efficient way to do it...it took me a while to figure out, and it finally worked so I went along with it.
What I want to do, and what I need help with is...I'd like to give the current artwork, or the piece that's currently @ 250x250 pixels at the sidebar a title. Preferably, perhaps from the context of the alt tag from an img src but not required. However, I would like for it to change to the corresponding pieces' title when I mouseover, so for example:
250x250 piece1's name is ...art1 and that name is located right under the image.
I mouse over the bottom thumbnails to the 5th thumbnail, the 250x250 piece1 is replaced and becomes 250x250 piece5. I'm trying to make it so that art1 becomes art5.
code to show ( overlay / modal window ) to the user when closing or navigating away from the page ( i want put in this window facebook share to make the user to share the page in his facebook ) , bytheway i wanna use it in my wordpress in every post could it be happen ?
I have done thus far is set up a simple Ajax request to my server to log in a user (This part seems to work just fine). The problem that I am incurring is that I would like to close the window if the user has been successfully logged in and not close the window (aka - show the form errors via php) if the user did not input the correct credentials.
This is what I have got so far (which simply logs in a user): -note: the php currently just spits out Sucess or Fail to the jquery ajax request and I would like to add a way to verify if logged in then close window but if not keep window open
This seems to work fine and dandy to just return Success or Fail to the #results div but is there a way to verify if the user is logged in success or not or at least a way to catch such validation that is sent back from the php script?
I was also playing with adding the below code after the $.post request but it obviously just closes the window no matter what the response.
I'm having trouble with Safari. After i close a popup it does not focus on the parent window. I have been looking around and i think its this sort of thing i need 'javascript:window.opener.focus()" target="_self"' but tbh i'm not in anyway a javascript whizz, so im a little confused.
I have a parent page which I don't have control of. I call my child page from parent page, perform some operations and once I click update child window should close and parent window should be refreshed.Everything seems to work fine except the parent page not refreshing.I tried using window.opener.location.reload(true). But it makes a postback in the parent page and so the values that I update are lost because it makes a postback with the previous values.I tried window.opener.document.locationwindow.opener.document.location. But this doesn't refresh my parent page.
Iam using mozilla firebird. I have three popups displayed at one point of time...if I close one the other two goes hidden....could you please suggest me the reason for this behaviour and how to overcome it.....
While I opened......these child windows(popup)...from the main window I have given "dependent=yes" in the window.open statement.
The sameway I want to close the Child windows opened from the parent window using IE. I use IE 6.0.
How can I prevent the user from closing the window? I need some how to prevent the user from closing the window even if he tried to close it from the (X) button in the top right of the window?
Basically I have problem and I was wondering someone can help. I have my and on clicking a submit button i create like smaller pop up window in which i display a text area what i would like to do is that when the save button is clicked the page should be submitted back to the original page as well as the small window closing is that possible i do not want to use like a seperate close button.
Does anyone know how to have a pop-up window close once someone's clicked on a link? And can cookies be incorporated into this so that the window only pops up once a day?
At the minute, when someone clicks on a link, it opens up the page behind the window so you have to then also close the window. This is the script now: Code:
I am using a pop-up on my site that allows people to subscribe to my email list. Is there a way that once the visitor subscribes, the pop-up window can automatically close and the subscriber is sent to the confirmation page in a new window?
Please let me know to execute specific javascript code when the browser is exiting. When a browser is closed i want some code to display images or text to be executed.