location.href doesn't work in some contexts




Document Navigation
16 years ago
10 years ago


(Reporter: Jonathan Baron, Assigned: Radha on family leave (not reading bugmail))



Firefox Tracking Flags

(Not tracked)




(1 attachment)



16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020311
BuildID:    2002031115

In the example I constructed, when this function is
called from another function, but it works when it
is called by itself.

function endq()

Reproducible: Always
Steps to Reproduce:
1. Load test2.htm and do what it says.

Actual Results:  Hangs.  Nothing happens.  (Different error messages
in different variants.)

Expected Results:  displays page end.htm

This may be related to bug 125003.  I'm not sure

The contrasting case
works fine.  I can't figure out why location.href
works in some contexts but not others.

(Nor can I figure out how to use the new debugger,
in the time I have.)

I do questionnaire studies on the web, and the framework
shown in test2.htm is a stripped down version of what
they all do.  With Mozilla 0.9.9 they all stopped
working.  I can work around this problem by including
end.htm as a text string, but this does seem to be a

For an example of a less-stripped-down version of a
questionnaire that used to work but doesn't work, see
It looks like we suddenly seem to be on a different host from the "top" and
hence can't access some properties due to security restrictions.

To session history, since all the content is document.written
Assignee: jst → radha
Component: DOM Core → History: Session
Ever confirmed: true
QA Contact: stummala → claudius
I have fixed bug 125225 and (inturn) bug 125003. I would like you to try this in
today's build. 

Comment 3

16 years ago
Created attachment 79306 [details]
Test case

As of 4/15/2002, using the latest build, I'm having the same issue with
location.href not working: it won't work from the web but works fine locally.
When viewing from the web, the source code is all screwed up-- variables are
zero'd out, there's the NoError() function added to my code, any functions in
the same script tags are being wiped out, except for the 'function name() {}'
part. Even commenting out the line with the location.href still gives me the
same results. If I remove "location.href" entirely from the page, everything
works as it should and the functions are as they should be.
I went to the above url and did what it said. I went to page Item1 then Item 2 ,
then filled out a questionaire and clicked submit. Everything went Ok and I
could click back through all of them and get to this bug.  What is the problem? 

Comment 5

16 years ago
In response to the last comment by Radha Kulkarni, I ask, "What build
were you using?"  For me, this bug has been fixed for some time.  I'm
now using 2002041114 (Linux) with no problems, but it was fixed well
before that.
I used a trunk build from 04/16/02.

Comment 7

16 years ago
Ignore my comment #3. I thought I had everything covered, but I just disovered
something locally that was interferring with the script. Once turned off, the
location.href worked as it should.
Based on previous comments, marking this WFM.
Last Resolved: 16 years ago
Resolution: --- → WORKSFORME


10 years ago
Component: History: Session → Document Navigation
QA Contact: claudius → docshell
You need to log in before you can comment on or make changes to this bug.