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).
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?
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'm working on a website where I need some help with open and closing divs using javascript.
This is the website: [url]
As you can see I'm using a javascript to open each jeans style link, I don't know if this is the best way to do it, but it's how I've done it so far. If you click the "Frankie style link" at the bottom the div called Frankie will show and you will see a little image in that div that says "next wash". What I would like this link to do is to close the frankie div and open up another wich looks almost the same as the previous, the only thing that will change is the pictures actually.
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.
I try to make a little regexp which can match all HTML tags from a string and outputs all tags which are not closed. This is what I got so far:
html = "test <b>do not show this</b> blabla <p align='left' test2=sdf>haha hm <hr size=1>test"; tags = html.match(/<[^/](([w]*)[w]*)[^>]*>(?!.*<[/]2>)/gi); window.alert(tags); This code outputs all HTML tags, even if some of them are closed.
It should check for text inside < and >, select the first word (which specifies the tag's name like IMG or HR) and then look if a </ tagname > version does NOT exist. If it doesn't exist, it should output the complete tag, like <img src="blaat.jpg">.
I'm putting together a popup flash player that can be launched from a url posted on a board. The link goes to a landing page which executes an onLoad script that opens the popup, then closes itself, leaving the popup over the board. Works fine in IE, but in FF the landing page remains open behind the popup and over the board. It will not self.close, and can't be closed from the popup (close.opener). Leading theory is that a FF window cannot be closed with script if it was not opened with script, and I've somewhat confirmed this, but seems a simple thing and should be doable.