Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape 4.x experts - form submit

Status
Not open for further replies.

CliveC

Programmer
Nov 21, 2001
1,222
US
Can any one figure out how to get this to work in NN4 the way it does in IE?

<html><body>
<form method=&quot;get&quot; action=&quot;test.htm&quot; enctype=&quot;text/plain&quot;><br />
Name:<input type=&quot;text&quot; size=&quot;20&quot; />
<input type=&quot;submit&quot; value=&quot;Send&quot; />
</form></body></html>

TEST.HTM
<html><body>
Received
</body></html>
 
I believe that Netscape might be having a really hard time with <br/> or any single elements with a finishing /

If you can drop support for NS4. 60% of problems posted on the javascript forum relate to this and a great deal in this forum too.

Hope this helps. Gary Haran
 
Thanks for the tip Gary, however is still did not work after following your sugesstion.
 
try adding head and title in the top of your HTML file :

<html>
<head>
<title>testing</title>
</head>
<body>
<form method=&quot;get&quot; action=&quot;test.htm&quot; enctype=&quot;text/plain&quot;>
<br>
Name: <input type=&quot;text&quot; size=&quot;20&quot;>
<input type=&quot;submit&quot; value=&quot;Send&quot;>
</form>
</body>
</html>

Just throwing ideas here. I don't have NS4 to test.

Do you absolutly need to support NS4? Gary Haran
 
I found a workaround by trapping the onSubmit and then calling a function with &quot;return false&quot;.

Thanks anyway!
 
Hi Wullie,

I just made an example fragment rather than confuse it with all the other stuff in the page.

The reason I was submitting to a page was because it was a demonstration version of a page for advertising purposes and I wanted to point out to the prospect what happened when they submitted the form by presenting them with an explanation page.

I have previously used that technique to pass parameters to a new page in hidden fields. I thought that was a standard way to do it. Seemed to me that it worked before in NN4.

Glad you enjoyed Oor Wullie. I used to read it too as a kid.

Clive
 
Hi CliveC,

I know your problem is solved but, just in case you are interested, I think I know what went wrong with your initial code. Try it without the enctype attribute and it will work in NS4 as well.

In most cases you will not need to use the enctype attribute at all. The default value (i.e. if you don't use this attribute at all) is &quot;application/x- which is sufficient for almost any kind of form data. The one exception is if you want to do file uploads. In that case you should use &quot;multipart/form-data&quot;.

I hope this helps a bit.

Cheers,

Xavier
 
Xavier
Thanks I went back and tried your solution and it worked. Sometimes this stuff drives me crazy.[roll2]
 
Hi CliveC!

Good to hear it works! This stuff drives me crazy too. I hate Netscape 4 at least as much as I love Netscape 6.2 ;->

Happy programming and cheers,

Xavier
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top