Closed Thread Icon

Topic awaiting preservation: netscape 4.7 problem w/form (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=8957" title="Pages that link to Topic awaiting preservation: netscape 4.7 problem w/form (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: netscape 4.7 problem w/form <span class="small">(Page 1 of 1)</span>\

 
norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 11-25-2003 21:21

the following code works with REAL browsers, but breaks with netscape 4.7.

<html>
<head>
<title>I hate netscape 4.7</title>

</head>
<body>
<form action="check.php" method="post">
<a href="#"onclick="document.forms[0].submit()">Submit</a>
</form>
</body>
</html>


Unfortunately, my divisions default browser is.....you guessed it!! That nasty old non-standards compliant poor ******* excuse for a browser, Netscape 4.7. Any and all help would be greatly appreciated.




/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 11-26-2003 03:12

Breaks how? Is there an error? What is it?

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 11-26-2003 08:05

the form is never submitted(with n.s. 4.7). The page specified in the form action- 'check.php' contains only an echo "submitted"; statement.
This works just fine in EVERY other browser I've tested in, I get a nice cheerful SUBMITTED appearing on my page. But not with Netscape 4.7.

I've tried :
<form action="check.php" method="post" name="form1">
then calling document.form1.submit()

I've wrapped this stuff in a function and called the function with both onclick and <a href="javascript: myFunction()"> But nothing seems to work...

This is an example of a problem that I ran into coding a PHP application. Since all I needed to do was pass a variable, I came up with a workaround using window.location="check.php?myVar=someData". This worked ok for production in this case, but it still bothers me.... what if I needed to use Post?

I'm sure Netscape 4.x was a fine browser in it's day, but that day is far past. After all, in web-years it must be about 105 years old and I would be glad to put it out of it's misery....



/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 11-26-2003 08:42

OK, a few observations...

- I believe the form *is* being submitted. (You can add an onsubmit="alert('hi')" event handler to see this.)
- If you change "post" to "get", it works right, but of course this isn't really an acceptable solution.
- There should really be a "return false;" in that onclick handler to avoid following the hyperlink after a click, but NN doesn't seem to care about that either way.

I don't know what the deal is. Google might know...

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 11-26-2003 16:45

The form is absolutly NOT being submitted. If it was, my 'submitted' statement would be echoed to the screen, thanks to the wonders of PHP. As I mentioned, this happens when the page is viewed with more modern browsers. Changing the form method to 'Get' doesn't work either. And as far as the onsubmit alert() goes... that doesn't even work with the browsers that do submit the form. According to O'Reilly if you invoke a form's submit method(javascript vs submit button) you do not have access to the onsubmit event.

BTW- I did Google for this for a few hours.... then implimented the window.location fix THEN posted my question here. I don't make a habit of running here for every little question without putting in some work myself. When I do post questions at the Asylum, I always come away something positive because the coders here are(both collectively and individually) very sharp folks.

Well, I guess like they said on the X-Files: "the answer is out there.... somwhere."

Anyway....thanks for looking at this.



/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 11-27-2003 05:36

Try changing '<a href...' to' <input type="submit" ...'

-- not necessarily stoned... just beautiful.

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 11-27-2003 20:00

hyperbole:

Thanks, I tried your suggestion and ended up with a submit button. What I'm after is a link.

This problem came up while I was building an app to conduct a Usability study for site navigation. The test user is given a search subject and a set of navigation headings that have dropdown menus of links. When the correct link is clicked, the response time is recorded, and the next search and navigation set is presented.

Your idea steered me towards a nice workaround- the dropdown menus could use <img> for links, with the correct choice being <input type="image"src='right_link.gif'>. When right_link.gif is clicked, the form is submitted.... this works well in
Netscape 4.7

thanks, be sure and stop by my cell for a beer...


/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

« BackwardsOnwards »

Show Forum Drop Down Menu