Forum Moderators: open

Message Too Old, No Replies

Object Moved?

What is it with Netscape?

         

txbakers

3:05 am on Dec 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using ASP, I have an update page. The form values can be changed, and the user clicks an update button.

In IE, the page reloads as it is coded. In Netscape, an intermediary page is displayed with the words "Object Moved" in h2 size, and a link to the original page.

Does anyone know anything about this and how to avoid it????????

(edited by: txbakers at 3:27 am (gmt) on Dec. 16, 2001)

txbakers

3:26 am on Dec 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I discovered why I get an "Object Moved" page, but I don't understand why it happens, nor can I figure out how to avoid it.

I am using image buttons for the submit buttons. I set the onClick event to form.submit() on one page. this page updates and refreshes like it is supposed to.

On another page, the onClick event calls a validation javascript first, before submitting the form. this page returns the "Object Moved" page.

How can I validate the form before submitting and not get the Object Moved page upon refreshing.

Thanks.

Xoc

10:24 am on Dec 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does the JavaScript function return "void"?

txbakers

4:53 pm on Dec 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No it doesn't, show I try that?

Netscape only can fire OnClick methods on <A HREF> tags, so I set the A HREF = "#" I could try to return VOID in the javascript.

Thanks.

txbakers

6:05 pm on Dec 16, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My theory was wrong.

Even if the onClick is directly to the submit(), I get the Object Moved page first.

Here is the snippet from the submit button:

a href="#" onClick="formLib.submit()"

Any further ideas?

joshie76

9:30 am on Dec 19, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just read your post in the Opera thread.. sorry I'd missed this one before...

I think this is the result of an archaic bit of security in NN4 for POST requests.

You've more than likely got an ASP reponse.redirect on the page you are posting to ... Netscape 4 doesn't like this and you get an "object moved" message.

Let me know if this is your problem.

Josh

txbakers

2:43 pm on Dec 19, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Exactly - it's a response.redirect that is causing the issue.

Is there anyway to avoid it?

joshie76

3:45 pm on Dec 19, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Don't use a redirect :).

If you're sending up only a little data, and it isn't too sensitive then you may be able to send the data from the client as a GET (i.e. use querystrings instead of form post - see this recent thread [webmasterworld.com]).

This should get rid of the problem. There are many ways to work around things like this, and they can be tedious, but how depends on exactly what you're doing.

txbakers

6:18 pm on Dec 19, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Joshie. I do use mostly GET methods, and condition the output via SQL commands which is a nice trick.

Someone else suggested that I use response.write with the code to the same URL instead of the response.redirect. The redirect causes a 302 HTTP code which means that the.......Object was temporarily Moved.

txbakers

4:46 am on Dec 20, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well I'll be dipped in DooDoo! I solved the problem with the Object Moved, and it was nothing that anyone thought.

I was using images for my submit buttons as <img> tags with onClick() methods. With netscape I needed to also code a <A href> tag upon which to attach the onClick().

I was using either the myVoid() or the "#". That was the problem.

I'm using ASP code, so I grabbed the Action of the Form tag and made that my <A href=>. the OnClick method superceded the A Href and poof - no Object Moved and it even loaded faster.

Bizarre. But I'm glad it's solved.