We help IT Professionals succeed at work.
Get Started

location.href NOT working in IE7

rgarimella
rgarimella asked
on
746 Views
Last Modified: 2012-05-05
Hi Folks,

I have this line of code

Content.location.href = "m1_0010.htm";

where Content is the name of the Frame

It works fine in IE6 but would NOT work in IE7

Update, I just realized that it works fine when I access thru the webbrowser, but DOES NOT work from a CD ROM

Any ideas why it would not work in IE7


Thanks

Ravi


function returnToBookmark( lastpage ) {
	var counter =  WM_readCookie("strNavCounter");
	Navigation.count = counter ;
	var this_location = window.location;
	
	var this_pathname = this_location.pathname;
	var new_pathname  = "";
	
	
	// split on /
	var dirs = this_pathname.split('/');
	// set filename (last value) to the lastpage we got
	dirs[dirs.length-1] = lastpage;
	
	for ( var i=0; i < dirs.length; i++ ) {
		new_pathname = new_pathname  + "/" + dirs[i];
	}
	// remove first character
	new_pathname = new_pathname.slice(1);
	
	// set the location parameter with the new pathname
	// and apparently jump to the page
	//this_location.pathname = new_pathname;
	Content.location.href = new_pathname;
}

Open in new window

Comment
Watch Question
IT Expert
CERTIFIED EXPERT
Top Expert 2009
Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE