location.href doesn't take variable
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_Zhang
Posted On:   Tuesday, April 8, 2003 09:33 AM

I have a page with iframe,to change the page inside the iframe,I use javascript: function(){ self.summaryIframe.location.href="mypage.htm"; self.summaryIframe.location.reload(); } it's worked,to make it dynamic,I need a veriable,so I changed to : function(){ var thelink=self.summaryIframe.location.href; thelink=thelink+"&company="+company; self.summaryIframe.location.href=thelink; self.summaryIframe.location.reload(); } this worked only in IE4,5.0,but doesn't work in IE5.5 and 6.0 why?I checked the value of "self.summaryIframe.location.href" in IE5.5 6.0,it's keep the old value but the "thelink"   More>>
			
I have a page with iframe,to change the page inside the iframe,I use javascript:

function(){
self.summaryIframe.location.href="mypage.htm";
self.summaryIframe.location.reload();
}

it's worked,to make it dynamic,I need a veriable,so I changed to :
function(){
var thelink=self.summaryIframe.location.href;
thelink=thelink+"&company="+company;
self.summaryIframe.location.href=thelink;
self.summaryIframe.location.reload();
}

this worked only in IE4,5.0,but doesn't work in IE5.5 and 6.0

why?I checked the value of "self.summaryIframe.location.href" in IE5.5 6.0,it's keep the old value but the "thelink" value changed.
   <<Less

Re: location.href doesn't take variable

Posted By:   Nitesh_Naveen  
Posted On:   Wednesday, April 9, 2003 03:32 AM

you need not reload... to change the location you can just use as following...

var thelink=self.summaryIframe.location.href;
thelink=thelink+"&company="+company;
self.summaryIframe.location=thelink;

works in all browsers
About | Sitemap | Contact