:: Learn More :: Close this Message Ĭlose = document.getElementById("close") Ĭlose.Cortana will pipe up now and then to offer suggestions on how to use it. Any one know the fix?įunction SetCookie(c_name,value,expiredays)ĮtDate(exdate.getDate()+expiredays)ĭokie=c_name+ "=" +escape(value)+" path=/"+((expiredays=null) ? "" : " expires="+exdate.toUTCString()) I'm implementing that stupid Cookie Law thing here in the UK, but I can't get the popup to close on click in IE.
If I need to use another code to open the popup, that's fine, I just need help on how to fix this, since I haven't been able to find the answer myself. Does anyone have a clue how I would fix this? Once the upload is complete and I close the window, I need the parent window (the index page which the link to open the popup is on) to be refreshed, so you can see that the file has been successfully uploaded. What I am opening is, an upload page to upload an image (PHP / AJAX). The actual link to open the popup is like this: I am using the following little piece of code to open a popup window: I'm NEW to javascript, so I need some good help on this haha. TextMessage = "Bandwidth: " + ctype + "time to load: (sec): " + diffTimeSeconds + "kbits loaded: " + kbits + "Throughput (kbps): " + throughput + ""Īutomatic detect default page and check to low band version go to html page or high band version go to flash page.īeen searching on google for two days now, without a valid answer. If you drop a cookie it can be picked up on return by php or something elseįunction setCookie(name, value, expire) Remove down to "ConnectionSpeed Detection section" if you don't want to use cookies The return true will make it execute the href as well right? The reason i use self.close is because i heard that it always closes the child not the parent. UPDATE: i just had an idea, can i mix a href and an onClick together so that both are executed like this (i never tried it before) shoutwindow.close () // also tried both these didnt work When i click logoff the site i want the popup to close also Shoutwindow = window.open("/shoutbox/minichat.php", "shoutwindow", "location=0,status=0,scrollbars=0,menubar=0,resizable=0 width=300,height=310") I am having a heck of a time closing this popup window when i logoff the site. Like I said, I'm sort of new at this.Īny advice would be greatly appreciated. I've also seen others use codes that involve functions and variables, but it is beyond my current coding knowledge to implement this. onClick="window.opener=null window.close()"), but I don't think I'm doing it right because it still doesn't work. I've tried preceding "window.close()" with "window.opener=null" (i.e. But, since my popup window is opened using Flash/AS2, I need to find a way around it. I looked into it and saw that others have used a window.opener to solve similar issues. Opera = Button actually works for each page.įirefox & Chrome = Does not close the window at all. However, if I keep clicking "Back" until I get to the original page, it closes. If I click on any of the other links (note that these all open in the same window), those pages' "Return to Main Menu" buttons cease to work. Safari = Only closes if I'm on the original HTML page. Internet Explorer = popup message appears, asking "Are you sure you want to close this window?" or something similar window closes after clicking "Yes." The problem is that it works differently in each browser, and I can't even get it to consistently close the window in most browsers: On each page, I have a "Return to Main Menu" button that should close the popup window. OnClick="MM_goToURL('parent','example2.html')" I've been using the following to create the links in Dreamweaver: Within the popup window are links to other HTML pages.
In Flash, I open the new window using Actiosnscript 2.0: I have a button on my Flash site that opens an HTML page in a popup window. Hi! I'm new to this, so please bare with me.