I've been working with a page that should act as a 'jump page' before
loading a PDF and when I use the location.replace function to replace
the jump page with the resulting PDF, both the jump page and the pdf
show up into the browser history (in IE only) leading to the dreaded
back-button loop. Code:
I've got a simple navigation system set up in a framed site: navigation/top frame and a main body frame. Whenever you click on a navigation button it passes the new location to this function:
In IE the page changes to Ƈ.7.htm'. In FF (and MZ) the page "flashes" but doesn't change. If I uncomment the alert the page changes. If I put the link in the nav frame the page changes in FF.
I am creating a "Please wait..." page to show a friendly message to my site users while the data is being loaded. I am using location.replace() javascript function to do this.
The problem that I am facing is displaying the records that the application has already processed on the wait page. Does anybody know what can I do to pass data field value from the end page where the data processing is going in background on to the wait page.
Googling got me some people experiencing problems in there's a charset, and I did have one. Even taking it out, it still won't redirect. If I put <?php echo 'Ok'; ?> just before <script>, it'll print it out in IE, so, I know that it's getting to this point.... Just don't know why it isn't actually going to the location.replace URL.
This may sound dumb but this is what I want and I am not sure how to frame it better. I see window.location.replace() creating problem with my "Back" browser button. This is because, location.replace() actually replaces the url in the history with the one currently given. So if I click on "Back" button after going to an url using window.location.replace, it goes to the previous-1 page.
Is there any measure to avoid this? Or do we have an alternative function that does the same action without replacing history?
I was debugging my code looking for a loop. So in the process I added a confirm request and if the user clicked cancel I coded location.replace("Kill.html"). Problem was that the JAVASCRIPT continued to run until either it finished or I used the Task Manager to end the session. :( There3 was a small difference in browsers: Firefox put up the new screen while continuing to run the JAVASCRIPT while IE didn't put up the new screen until after the JAVASCRIPT was finished. I could tell the JAVASCRIPT was still running because the confirm messages kept popping up.
I have around 100,000 html files that I need to do a search/replace on. I currently have the word "Manchester" in all of these files which needs replacing with the full file path location;
The encoded html part is simply a link [URL] The code works fine so far on all browsers. But the problem is that it redirects wrongly.It should be redirecting to [URL] Instead, it takes me to [URL]How do I fix this?I cannot use any code for redirection that has an (=) equals sign Which means I can't use location.href='http://google.com'
I've got a div, and it has an onMouseOver handler attached to it which makes a second div visible. The second div shares part of one side with the first, but not all.
The first div also has an onMouseOut handler which, you guessed it, makes the second div invisible.
However, if the user rolls out of the first div and into the second, I'd like to keep the second div visible. Any ideas how to accomplish this?
My question is regarding the behavior of Supersubs in IE6. It seems to adjust to the correct width, but, it applies the new width to all of the parent UL's of the widest LI. In IE7 and FF the new width is only applied to the containing UL of the LI.
Danged if I can find the thread, but I swear I saw a $.url() reference in here a day or two ago. It was beingutilized for parsing out the window.location or window.location.search parameters. I made a mental note because that was something I would be needing to do.
Now I can't find it, either because the search isn't finding it or I was dreaming about this function existing.
I rummaged about the API docs and didn't find it there either. Is it something provided by one of the plugins and not a function native to jQuery?
Is there a way, besides writing another method, to make Date.setMonth() do something more useful than nothing when the month in question creates an invalid date? If I try
d=new Date(); d.setMonth( 1 );
today, I'd really like to get some kind of an error rather than silent failure.
I have a table that changes its cell (input text) colors when their contents have changed (actually on keypress) and shows a couple of buttons automatically, UDPATE and CANCEL. This works partially, though detecting enter and escape doesn't seem to work, or parhaps calling the button click events directly doesn't (see below).
In addition to getting the ENTER and ESC keypresses to fire their appropriate button clicks, I need to be able to collect information on which cells have changed, so on the page loading again I can read this information, perhaps from a hidden field, to use to update a database server-side.
<script language=javascript> function GirdTextKeyPress(txtID, btnsContainerlID, btnUpdateID, btnCancelID) { var txt = document.getElementById(txtID); txt.className = 'GridChanged' var bc = document.getElementById(btnsContainerlID); bc.style.display = 'inline'
var btnUpdate = document.getElementById(btnsContainerlID); if (event.keyCode == 13) { event.returnValue=false; event.cancelBubble = true; btnUpdate.click(); }
var btnCancel = document.getElementById(btnCancelID) if (event.keyCode == 61) { event.returnValue=false; event.cancelBubble = true; btnCancel.click(); } } </script>
Normally, a button like <input type="image"is also a submit button. Is there any way to override that so that it has an onclick event but does not submit the form?
For what I'm trying to do, I cannot use an <imgelement with onclick. I have to use a form element (and I'd rather have an image than a button)
I coudn't understand some behavior of RegExp.test function.
Example html code: ---------------- <html><head></head><body><script type="text/javascript"> var r = /^https?:///g; document.write( [ r.test('http://a'), r.test('http://b'), r.test('http://c'), r.test('http://d') ]); </script></body></html> ---------------------
The page displays true, false, true, false. (in Opera, Firefox and IE) This is strange because I expected it would display true, true, true, true. There must be something I didn't know about the function RegExp.test.
This is one example .... this is repeated about 20 times in the program, one for each year of our history...
It works fine ... but not on all the browsers in our office. Most work fine ... others (all IE) work fine on some dates; other dates, when you hover, flash a blank page repeatedly until you move the mouse away; almost as though it is looping ...
I notice that "about:blank" flashes briefly before the called page comes up ... but that appears to be normal.... I have checked and rechecked all coding, all brackets and semi-colons ... and it works perfectly -- for me and for a few others.
I want to call a JS function when Enter is pressed inside the form, and when the submit button is clicked I want to submit the form. Any simple way for doing this?
i'm sure its been thought of before and i'm sure this is just gunna piss off the people who like to tab through their pages, but i just made a little behavior component file that stops any links from gaining focus on your page.
put this is the style section of your page.
<style type="text/css"> a { behavior: url("hidefocus.htc"); } </style>
then put the attached file in the same dir. (hidefocus.htc) this is all it is
Note: since this behavior is stored in an external file, sometimes one instance of link focus can occur before the htc file can be loaded. if anyone has any tips on fixing that i'd like to hear'em.
I have a drop down menu on my page, works. Then I went to add another ddm, doesn't work when on page, but works independently . DW creates a file called mm_menu.js. I am sure the problem is here, but I don't know what to change. Might anyone here know what I am talking about/had this prob before?
I have a JSP page on which when print is pressed - Records are fetched on a redirected page and those are to be printed.
I use the lines - <script language="javascript"> window.print(); history.back(); </script> to do the same.
When browsed from Netscape 4.7, the Resultset page is printed perfectly whereas in IE6, the resultset page is generated and the source page is printed i.e. the one where Print command was given
Is there a workaround for IE6 for the same which will let me print the Result page silently without changing the sequence of operations for the user?