JavaScript Popup On Window Close: Works Great On IE, Works Terribly On FF
Dec 13, 2006
I'm just restating my "site abandonment" post but with a clearer title as I realized it probably only made sense to me and me alone.
I have window that pops up with our commerce system. I have it set to pop up a window via JavaScript if the visitor quits early in the process (abandons the commerce system before completing all of the steps. The new popup is just a customer survey ("why are you leaving, is there something else we can help you with" etc. etc.).
Here's the problem, it works fine in IE, but in Firefox, anytime the page in the original commerce window is changed, refreshed or advanced to a new page, the survey popup window is called rather than just on window close.
Again, here's the two JavaScript routines that handle clicks on the graphical close button and on the window 'X' close button. Code:
I've been working on this for about four hours (two today, two yesterday) and keep hitting the brick wall. I'm trying to create a function that will add an attribute to specified tags. As the title says, it works great in FF and not at all in IE7. Probably the first question you'll ask after you see my code is "why?" Well, I've got a form with over 100 form fields in it, and if I can avoid manually adding an attribute to all of them, I'll take the JS route.
I've spend about 2 days writing this javascript code and it works great in IE only to find out that it does nothing in Safari/FF.
Here is my code:
<script type="text/javascript">function calculate() { var thetotal = 0; var silver = 0; var gold = 0;
[Code]....
Basicly what the script does is using some variables in my form will calculate a total price in real time when you click the "Calculate" button. Works great in IE, but in Firefox/Safari it won't do a thing..
Each instance of what I need edited also has an id on the page for referenceSo things like <p id='titleonebox' class='editable'>Title that can be edited</p> If I'm updating the DB I have it all figured out because I'm updating X where X is X.However on the index page itself I have 'headers' that I want editable for each div(The divs are populated via the DB and they edit fine)I've tried using save.php from jquery's jEditable documentation but it won't save the value when I refresh the page.
Having issues with the video plugin for jQuery. This works great for Chrome but not Safari or Firefox. In Firefox it just shows up as a grey box with a light grey 'X' in the middle, and in Safari as nothing. I'm guessing it's something about the MIME but I have no idea what to do about that.
I have a portfolio page on our company site that functions properly on Mac, but not in Windows. The page is here, but I warn you it will possibly freeze IE if you click it. I include it for reference. code...
In IE, the first thumbnail (of 32) will display and then the page generally locks.
I believe the javascript that governs the popups may be the culprit, but I only know enough to be dangerous and need an assist as this site is already live and that was my screwup. code...
- I have a button on my Flash site that opens an HTML page in a popup window. In Flash, I open the new window using Actiosnscript 2.0:
- Within the popup window are links to other HTML pages. They all open in the same window. I've been using the following to create the links in Dreamweaver:
- On each page, I have a "Return to Main Menu" button that should close the popup window. To do this, I have been using:
- 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:
Internet Explorer = popup message appears, asking "Are you sure you want to close this window?" or something similar; window closes after clicking "Yes."
Safari = Only closes if I'm on the original HTML page. 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. However, if I keep clicking "Back" until I get to the original page, it closes.
Opera = Button actually works for each page.
Firefox & Chrome = Does not close the window at all.
I looked into it and saw that others have used a window.opener to solve similar issues. But, since my popup window is opened using Flash/AS2, I need to find a way around it.
I've tried preceding "window.close()" with "window.opener=null" (i.e. -onClick="window.opener=null; window.close()"), but I don't think I'm doing it right because it still doesn't work.
I've also seen others use codes that involve functions and variables, but it is beyond my current coding knowledge to implement this. Like I said, I'm sort of new at this.
I have the following javascript function, which works fine in Firefox but does not work in IE. I have a feeling it has something to do with window.status. Any ideas??
<!-- START JAVASCRIPT --> <script type=text/javascript> function tracker() { window.focus(); if (window.status) { click = new Image(); click.src = 'http://myurl.com/tracker.php?pid=12345&type=click' } }; view = new Image(); view.src = 'http://myurl.com/tracker.php?pid=12345&type=view' //--> </script>
There are two main things which I am trying to work through:
Drop down menu (bottom of page) - which only works in IE (on pc) right now, although it should work on all browsers except opera. Traditionally in a HTML 4.0 Transitional environment.
Div content that scrolls - placed correctly and works in IE and that's it. Here is an example of the working script on another site http://www.dyn-web.com/dhtml/scroll/scroll-rel.html . Traditionally in a Xhml strict.
My goal is to get this page to look as good in Netscape and on the mac as it already does in IE.
Usually it's the other way (IE works, Firefox not working)... but here it is. IE does render something, although it puts the advert script (starting on line 9) at the very end, after the close of the last table. Firefox displays it as I have intended it (Ad inside the table). Code:
I have a popup window that opens from a page on my website. This popup is a form with several fields. Upon submit button it redirects to a server side ASP page which writes all data to the DB.
I would like the popup to close immediately after the submit button is clicked, and data is saved, (or cancel button) - but this does not happen. The popup window remains open, even though I have a "return false;" after window.open in the onclick event.
What am I missing?
<a href="myurl.asp" 'title','toolbar=no,width=700,height=600'); return false;">post a note</a>;
I am currently having problems with Popup windows in an application I am writing. I have a page, which opens a Popup window to a Perl Script on another server.
Because of this, I cant access the Parent's DOM to execute a function on the main page from the popup. I need to execute a script in the Main window once the popup window has finished its process.
I have tried setting a loop that checks if the popup is still open, which should work in principle.... however it hangs both Browser Windows.
I am trying to do two things. I have PDF files but the user has to click on the icon and a contact form will come up in a pop-up window. That window has a form and once the form is completed and properly validated, I want the pop-up window to automatically close and go to "white_papers.com?download=1". It will do everything but it only goes to white_papers.com. How can I get it to go to the entire URL including "?download=1"?
As per the rather long subject, I would like to (well, my boss would like me to...) on a popup have one button to close and another to close but then redirect to another page.
I have some code, using all the DOM documentation in the developer.mozilla.org website. For some reason it's only working in the newest Firefox 2 versions, and not 1.5.0.x
I'm having a hard time finding any documentation of what's not supported.
Can you guys help me? Here are the functions I'm calling:
getRangeAt();
range.collapsed
document.createElement("div");
range.cloneContents();
element.appendChild(clone);
document.getElementById("divid");
do you think it's createElement div? Maybe I can't create a div element?
as i know href is a property of location but location.href(url) works fine with IE 6. i couldn't figure out how its possible? is it a kind of browser syntax-tolerance helping it to work? how the heck is this working?
I have a popup window that has a "link" inside it, which needs to have a target=_blank but when ever clicked in IE, it stays inside the same window.I tried all of the following, none work
I was curious if such a thing is possible, I've seen it done before, but not exactly sure how that would work. Would it have something to do with the window.close (); function?
I have this page that a user uses to upload a PDF. I want a small popup to come up when they hit the upload button to promt the user to wait. This part is fine and works but I need the popup to close when the upload is complete. The way I have aproched it is to have a function that pops the window up: Code: