473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

What is wrong with "form"

On my testpage

http://www.sonoptikon.de/test.php

I have this

<table><tr>

<td valign="top" align="center" style="width:150px;">
<form action=test.php method="get">
<input style="width:150px;" type="Submit" value="Provisionsentwicklung">
<input type="hidden" name="mode" value="pr"
</form>
</td>

<td valign="top" align="center" style="width:150px;">
<form action=test.php method="get">
<input style="width:150px;" type="Submit" value="IP-Entwicklung">
<input type="hidden" name="mode" value="ip"
</form>
</td>

</tr></table>

If I klick on any button, I get

"http://www.sonoptikon.de/test.php?mode=pr&mode=ip"

What is wrong?

Source text is:

print '
<td valign="top" align="center" style="width:150px;">
<form action=' . $HTTP_SERVER_VARS['PHP_SELF'] . ' method="get">
<input style="width:150px;" type="Submit" value="Provisionsentwicklung">
<input type="hidden" name="mode" value="pr"
</form>
</td>

<td valign="top" align="center" style="width:150px;">
<form action=' . $HTTP_SERVER_VARS['PHP_SELF'] . ' method="get">
<input style="width:150px;" type="Submit" value="IP-Entwicklung">
<input type="hidden" name="mode" value="ip"
</form>
</td>';

It works correct with mozilla, you can see this error only in IE

Thanks for help

Werner

--
--------------------------------------------------
Werner Partner, 45699 Herten
http://www.sonoptikon.de
Jul 24 '05 #1
5 2269
Werner Partner <ka****@sonoptikon.de> wrote:
On my testpage

http://www.sonoptikon.de/test.php

<form action=test.php method="get">
<input style="width:150px;" type="Submit" value="Provisionsentwicklung">
<input type="hidden" name="mode" value="pr"
</form>
The hidden input tag is missing the > at the end.
So the browser may treat
<input type="hidden" name="mode" value="pr"</form>
as one tag and hence doesn't close the first form.
<form action=test.php method="get">
<input style="width:150px;" type="Submit" value="IP-Entwicklung">
<input type="hidden" name="mode" value="ip"
</form>
Again the form isn't closed but that's irrelevant now as you have no
more forms in the page.
If I klick on any button, I get

"http://www.sonoptikon.de/test.php?mode=pr&mode=ip"

What is wrong?
What you effectively have is:

<form action=test.php method="get">
<input style="width:150px;" type="Submit"
value="Provisionsentwicklung">
<input type="hidden" name="mode" value="pr">
<input style="width:150px;" type="Submit" value="IP-Entwicklung">
<input type="hidden" name="mode" value="ip">

and the submitted result is correct for that.
It works correct with mozilla, you can see this error only in IE


For once Mozilla's error correction is kinder to mistakes than IE's.

Running your code through the validator would have pointed out this
mistake (and some others).

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 24 '05 #2
Steve Pugh schrieb:
Werner Partner <ka****@sonoptikon.de> wrote:

On my testpage

http://www.sonoptikon.de/test.php

<form action=test.php method="get">
<input style="width:150px;" type="Submit" value="Provisionsentwicklung">
<input type="hidden" name="mode" value="pr"
</form>

The hidden input tag is missing the > at the end.
So the browser may treat
<input type="hidden" name="mode" value="pr"</form>
as one tag and hence doesn't close the first form.


Uff - that happens when I am looking for "serious" mistake and not
seeing the simple mistakes

By the way - what about </input> ?

Thanks

Werner


--
--------------------------------------------------
Werner Partner, 45699 Herten
http://www.sonoptikon.de
Jul 24 '05 #3
On 31/03/2005 11:37, Werner Partner wrote:

[snip]
By the way - what about </input> ?


INPUT elements are empty: they have no content so they don't need
closing tags. In fact, closing INPUT tags are forbidden in HTML.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 24 '05 #4
Werner Partner <ka****@sonoptikon.de> wrote:
By the way - what about </input> ?


Allowed but not recommended in XHTML (though not allowed in
HTML-compatible XHTML). No such thing in HTML.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 24 '05 #5
Steve Pugh wrote:
Werner Partner <ka****@sonoptikon.de> wrote:

By the way - what about </input> ?

Allowed but not recommended in XHTML


Not recommended, but the opening tag must end in /> otherwise.

(though not allowed in HTML-compatible XHTML). No such thing in HTML.

Steve

Jul 24 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Davis | last post by:
I want to know what's the differences between Request.Form("Field Name") and Request.QueryString("Field Name") OR they function exactly the same, which is to return the value of the field?? ...
15
by: Hal Robertson | last post by:
I have created a rather complicated series of html forms for a data entry wizard In my mozilla browser, every time I submit each form along the process, it asks me if I want to remember the...
3
by: Pavils Jurjans | last post by:
Hello, I have bumped upon this problem: I do some client-side form processing with JavaScript, and for this I loop over all the forms in the document. In order to identify them, I read their...
11
by: Pete Wilson | last post by:
Hi folks -- The page at http://www.pwilson.net/submit-demo.html will not validate. The validator at http://validator.w3.org tells me I can't have an input inside a form. Would some kind...
9
by: Dan | last post by:
I am trying to use Request.Form("__EVENTTARGET") to get the name of the control that caused a post back. It keeps returning "". I am not really sure why, this happens for all of my controls...
5
by: celoftis | last post by:
Using VS2005 ASP.NET 2.0, VB code behind: I have a windows forms based application that I need to port to the web. One of the major components of my windows forms based application is a TreeView...
6
by: KiwiGenie | last post by:
Hi..I am trying to make a search form. I am fairly new to access and could well be looking at it completely wrong. I have an unbound form with textboxes in the header for entering different search...
38
by: Sanders Kaufman | last post by:
I'm converting my table-based layouts to css-positioned divs - but the ONLY reason I'm doing it is because it's *considered* a best practice. I don't really see where anything goes hinky when...
3
by: eBob.com | last post by:
How does a "sub-form", i.e. one invoked by another form, determine anything about the form which brought it into existence, i.e., I suppose, instantiated it? I wanted to so something like this ......
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.