Form object doesn't support submit

  • Thread starter Thread starter Hugo Wetterberg
  • Start date Start date
H

Hugo Wetterberg

I have a real problem with this page. It simply refuses to perform a
postback, claiming that the form doesn't support submit().

I cannot figure out what it's complaining about. Please help me with
this one.
/Hugo Wetterberg ICQ:7355985

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>ref_cmsimageedit</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
<LINK href="admin.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<form name="Form1" method="post"
action="ref_cmsimageedit.aspx?id=80a48b49-0af5-49bb-97df-9d54e941a0d0"
id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwxMDk2OTE3OTYyO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+Oz47bDx0PDgwYTQ4YjQ5LTBhZjUtNDliYi05N2RmLTlkNTRlOTQxYTBkMDs7Pjs+Pjs+PjtsPGltYWdlRWRpdDs+PrdSdJ0yqgp4elu1sZpWky9NmgaC"
/>

<P>
<table>
<tr>

<td valign="top">
<a
href="http://localhost/kbrygg/images/cmsimages/80a48b49-0af5-49bb-97df-9d54e941a0d0.jpg"
target="_blank">
<img
src="http://localhost/kbrygg/images/cmsimages/thumbs/80a48b49-0af5-49bb-97df-9d54e941a0d0.jpg"
border="0" />
</a>
</td>

<td valign="top">
Bilden är rätt så stor, besökare med
långsamma internetanslutningar kan få problem.<BR/>
<a href="javascript:__doPostBack('imageEdit','resize')">Klicka här för
att ändra storleken på bilden</a><BR/>

<div><span class="formfield">Namn</span></div>
<input name="imageEditname" id="imageEditname" type="text"
value="Beach boy" />

<div><span class="formfield">Beskrivning</span></div>
<textarea name="imageEditdescription"
id="imageEditdescription"></textarea>

<button name='submit'
OnClick="__doPostBack('imageEdit','')">Spara</button>
</td>

</tr>
</table>

</P>

<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if
(window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENTTARGET.value =
eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
</form>
</body>
</HTML>
 
Server forms can only post to themselves, so I assume your page is named
ref_cmsimageedit.aspx?
If so, I suggest you try removing parts of your page temporarily to simplify
things and see if you can narrow down the problem to a specific line or code
block.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


Hugo Wetterberg said:
I have a real problem with this page. It simply refuses to perform a
postback, claiming that the form doesn't support submit().

I cannot figure out what it's complaining about. Please help me with
this one.
/Hugo Wetterberg ICQ:7355985

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>ref_cmsimageedit</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
<LINK href="admin.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<form name="Form1" method="post"
action="ref_cmsimageedit.aspx?id=80a48b49-0af5-49bb-97df-9d54e941a0d0"
id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwxMDk2OTE3OTYyO3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDE+Oz47bDx0PDgwYTQ4YjQ5L
TBhZjUtNDliYi05N2RmLTlkNTRlOTQxYTBkMDs7Pjs+Pjs+PjtsPGltYWdlRWRpdDs+PrdSdJ0yq
gp4elu1sZpWky9NmgaC"
/>

<P>
<table>
<tr>

<td valign="top">
<a
href="http://localhost/kbrygg/images/cmsimages/80a48b49-0af5-49bb-97df-9d54e
941a0d0.jpg"
target="_blank">
<img
src="http://localhost/kbrygg/images/cmsimages/thumbs/80a48b49-0af5-49bb-97df
-9d54e941a0d0.jpg"
border="0" />
</a>
</td>

<td valign="top">
Bilden är rätt så stor, besökare med
långsamma internetanslutningar kan få problem.<BR/>
<a href="javascript:__doPostBack('imageEdit','resize')">Klicka här för
att ändra storleken på bilden</a><BR/>

<div><span class="formfield">Namn</span></div>
<input name="imageEditname" id="imageEditname" type="text"
value="Beach boy" />

<div><span class="formfield">Beskrivning</span></div>
<textarea name="imageEditdescription"
id="imageEditdescription"></textarea>

<button name='submit'
OnClick="__doPostBack('imageEdit','')">Spara</button>
</td>

</tr>
</table>

</P>

<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if
(window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENTTARGET.value =
eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
</form>
</body>
</HTML>
 
Found it! Whew!
For future reference: do not name any fields submit!

I had a custom control on the page that generated a button named
submit. It replaced the submit function and that in it's turn didn't
support "()".

/Hugo
 
Back
Top