Closed Bug 131432 Opened 22 years ago Closed 22 years ago

location.href doesn't work in some contexts

Categories

(Core :: DOM: Navigation, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jonathanbaron7, Assigned: radha)

References

()

Details

Attachments

(1 file)

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()
{subq.location.href="http://www.psych.upenn.edu/~baron/end.htm"}



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

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
http://www.psych.upenn.edu/~baron/test1.htm
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
bug.

For an example of a less-stripped-down version of a
questionnaire that used to work but doesn't work, see
http://www.psych.upenn.edu/~baron/trade6.htm
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
Status: UNCONFIRMED → NEW
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. 
Attached file 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? 
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.
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.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
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.

Attachment

General

Creator:
Created:
Updated:
Size: