Anomalous Behavior In Location.replace With IE
Jul 20, 2005
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:
View 1 Replies
ADVERTISEMENT
Jul 23, 2005
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:
gotoNewPage = function(loc) {
main.location.replace(loc);
// alert(loc);
}
which changes the page loaded in the main frame. This seems to work well
until I put a link in the page in the main frame, say:
<a href="#" onclick="top.gotoNewPage(Ƈ_7.htm')">Click me</a>
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.
How can I get FF to behave in this instance?
View 1 Replies
View Related
Oct 16, 2006
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.
View 5 Replies
View Related
Nov 27, 2005
I have this function in a page (namely cours.html)
function go(inValue)
{
var lien =
'file:///F:/MyWebs/jeanpierredaviaucom/httpdocs/cours1.html?T1=' +
document.R.T1.value;
document.location.replace = "lien";
}
If I put an alert(lien), the link is ok. But when I try it I see ...
View 9 Replies
View Related
Mar 23, 2009
The code works fine in every browser except for IE, and am wondering why...
Code:
<script type="text/javascript">
window.onbeforeunload = null;
$(document).unbind("m1");[code]...
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.
View 1 Replies
View Related
Mar 4, 2009
is there any way to override this function in firefox?this code worx well in ie/opera:
window.location.replace = function ( newLocation ) { alert ( newLocation ); }
how to override location setter in ie
View 2 Replies
View Related
Sep 28, 2005
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?
View 7 Replies
View Related
Mar 12, 2011
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.
View 5 Replies
View Related
Apr 12, 2006
Trying to automatically redirect to a new window.
View 2 Replies
View Related
Aug 14, 2010
this is a newbie question, and probably really dumb, but If I create a function that looks like this...
function recall(tim)
{
setTimeout("window.location.replace('somepage.html')",tim);
}
it works fine when called. However; I want to be able to pass the page url in a variable, something like this.
[Code]...
View 3 Replies
View Related
Oct 23, 2010
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;
C:Demo_FolderManchester_file_001.html
C:Demo_FolderManchester_file_002.html
View 1 Replies
View Related
Nov 26, 2011
I'm currently trying to make a page redirect using the following code:
<img src=foo.png onerror=location.replace('%68%74%74%70%3A%2F%2F%67%6F%6F%67%6C%65%2E%63%6F%6D');>
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'
View 1 Replies
View Related
Jul 23, 2005
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?
View 5 Replies
View Related
Jun 27, 2009
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.
View 1 Replies
View Related
Feb 14, 2010
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?
View 3 Replies
View Related
Jul 23, 2005
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.
View 5 Replies
View Related
Nov 30, 2005
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>
<style>
Input.Grid
{
border-style:none;
}
Input.GridChanged
{
background-Color:Yellow
}
</style>
View 1 Replies
View Related
Aug 3, 2006
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)
View 3 Replies
View Related
Oct 29, 2006
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.
View 11 Replies
View Related
Jul 20, 2005
I used the following script to allow me to bring up a list of events
for a given year by simply hovering the mouse over the filename. As
follows --
<script Language="JavaScript">
function winopen1(){
msg1=open
("","WINDOW1","toolbar=no,location=no,directories=no,status=no,me nubar=no,scrollbars=no,resizable=no,copyhistory=no ,width=550,height=200");
msg1.location="1989H.htm"}
</Script>
Then....
<a href="1989H.htm" onMouseOver="winopen1();return true;"
onMouseOut="msg1.close();return true;">1989</a></font></td>
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.
View 1 Replies
View Related
Jul 20, 2005
I expect to see "foo" for the 2nd alert. Instead, the value of select is
cleared. Am I missing something?
<html>
<head><title>Foo</title>
<script language="javascript">
<!--
function foo()
{
alert('Before change: ' + document.control.titleFont.value);
document.control.titleFont.value = 'foo'
alert('After change: ' + document.control.titleFont.value);
}
-->
</script>
</head>
<body>
<form name="control" method="POST">
<select name="titleFont">
<option value="sans-serif">Arial</option>
<option value="serif">Times</option>
</select>
<input type="submit" name="control" value="Submit" onclick="return
foo()"/>
</form>
</body>
</html>
View 1 Replies
View Related
Jul 20, 2005
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?
View 1 Replies
View Related
Mar 11, 2003
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
<public:component>
<public:attach event="onfocus" handler="blurry" />
<script>
function blurry() {
element.blur();
}
</script>
</public:component>
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.
View 16 Replies
View Related
Feb 6, 2009
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?
View 1 Replies
View Related
Sep 29, 2004
I was reading Peter-Paul Koch's article about how to separate javascript from the html and put it in another file:
http://www.digital-web.com/articles/...d_structure_2/
but I can't get it to work(IE6 and Firefox1.0 on windows). Here is my html file:
Code:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en" lang="en">
<head>
<title>Web Design 1</title>
<meta name="author" content="Mr. Smith, I presume" />
<meta name="description" content="web" />
<script src="mouseovers.js" type="text/javascript"></script>
</head>
<body>
<div><img id="mouseover_effect" src="green_square.jpg" /></div>
</body>
</html>
and here is my mouseovers.js file:
Code:
function initializeMouseOvers(){
var images=document.getElementsByTagName("img");
var c=images.length;
for(var ii=0; ii < c; ii++){
images[ii].onMouseOver=mouseover;
}
}
function mouseover(){
this.src="red_square.jpg"
}
window.onload=initializeMouseOvers;
A green square displays, but I don't get any rollover effect--I'm trying to get the green square to switch to a red square.
View 4 Replies
View Related
Mar 20, 2007
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?
View 1 Replies
View Related