I need some help with closing a popup window. I'm making an online portfolio, that has one base page with text and thumbnails. When a user clicks on a thumb, a new window opens containing a larger image and a caption (each contained on a separate htm document). I do this with a function in the header script as follows:
var picpage=" "; var params=" ";
function fullpicwin(picpage,params) { window.status="Opening picture... please wait"; window.open(picpage,'fullpic',params) }
picpage (the name of the htm file), and params (window size, etc.) are passed from the click code by each thumb. Each popup is sized differently, of course, based on the side of the larger photo. All controls, etc., in the popup are turned off. The user can click the "x" box or a form button at the bottom of the popup to close the window.
All this works very nicely... EXCEPT...
The user can move the mouse back to the main page and open ANOTHER popup by clicking on another thumb BEFORE closing the existing popup. The problem is the 2nd popup retains the size of the first, so of course the photo may be blocked by the borders, etc.
What I want to do is force the closing of the first popup if the user tries to open a 2nd and so on. There is no reason to have more than one large photo showing at the same time.
I thought I could put some code in the function that checks for the existence of a window named "fullpic", and if it's there, closes it first, then opens another. But I can't seem to get the syntax right.
I've got a div that slides out from the left of the screen when the page loads but I can't figure out to get it slide back when another navigation button is clicked. The navigation has several buttons so clicking on any of them would make current div to slide back out of site.
I am calling a Java Script function on the button click of a pop up window (ASP.net). The function does the following: 1. Close the Popup window 2. Call JS function on the Parent window 3. Try to open another popup I am able to close the popup window and call the js function on the parent window but I am not able to open the new window.
CODE: window.close(); window.opener.clearfields(); window.open('MyExcel.xls'); I need to perform all these in one JS function.
I have five divs that I want to work kind of like an accordion, but you can open multiple sections. Right now, when user clicks any link, it opens all five sections. And when you click to close, it closes all five. I want to be able to open one section, then go to the next and so on.
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 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 am seeking to change the color attribute in my CSS file under the ID's #realmaturesingles and #seniorpeoplemeet upon the hovering of these links. These two ID's are initialized inside an <a> tag (these are links). How can I do this with JavaScript? This is what I tried:
Im having a bit of trouble with the bounce show effect from jquery ui. To see what I mean, check out my development site. Anytime you modify a part in this computer builder, the rigth side gets updated. Right now its removing and adding list items. Problem is when click items too fast, the animation doesnt finish and the next item gets bumped lower and lower.
I have a question, I'm developing my own LightBox with jQuery, and I call 2 function, animate and fadeIn and both of them work with the same element, fadeIn also with 2 elements more, but this isn't problem. And fadeIn I call before animate and here is the issue, it starts animate this element by fadeIn and after it is done, start function animate. But in second part, I call it again, and the element, which I animate in both of them, can't animate by fadeIn because he is visible, so immediately start function animate.
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.
i have a some code <form><td colspan=ƈ'><input type='button' onClick=javascript:window.open("calendar.php","name","attributes") name='button' value='Book' /></td></form>
(it is echoed in php)
the thing is when a link is clicked on the pop up i want it sent back to the original page and the pop up closed..
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?