/    Sign up×
Community /Pin to ProfileBookmark

object doesn’t support this property or method

i’m not sure what forum to best post this (it’s php, mysql, html, and javascript)…. but I keep getting this error and cannot for teh life of me figure out why…… here is the code I’ve got:


*************

echo “
<td valign=top>
Modify Users:<br><br>
<table border=1 bordercolor=000000 cellspacing=0 cellpadding=2>
<tr><td width=60><b>NTid</b></td><td width=150><b>Name</b></td></tr>”;

while($row = mysql_fetch_array( $allusers )) {
echo “<tr><td><form method=’post’ action=’moduser.php’ name=’moduform’><input type=’hidden’ name=’moduser’ value='” . $row[‘NTid’] . “‘>
<a href=’javascript:document.moduform.submit();’>” . $row[‘NTid’] . “</a></form></td><td>” . $row[‘lastname’] . ” , ” . $row[‘firstname’] . “</td></tr>”;


****************

on another page this works fine:

<tr><td rowspan=3><form method=’post’ action=’mod.php’ name=’progform’><input type=’hidden’ name=’mod’ value=’prog’><a href=’javascript:document.progform.submit();’>
<i>Now that you are aware of your progress, what are you planning to do to improve each of these areas in the months to come?</i></a></form></td>
<td rowspan=3 valign=top>” . $row[‘progress’] . “</td></tr><tr border=0></tr><tr border=0></tr>


********************

the part between the <form> tags is what I am having trouble with….. please help if you can……..

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51May 09.2005 — You most likely have a submit button on the page that is having the error. Rename the button to btnSubmit and you error should go away.

Eric
Copy linkTweet thisAlerts:
@npbeersauthorMay 09.2005 — so having a second form on the page is probably what is causing it?

here is more of teh code:


***************

echo "

<table>

<td width=325 valign=top>Please input the following fields to add a new user:<br>

<form name='form1' method='post' action='adduser.php'>

<input type='hidden' name='adding' value='yes'>

<table>

<tr><td width=100><b>NTid*</b></td><td><input type='text' name='NTid' maxlength='8'></td></tr>

<tr><td width=100><b>Password*
</b></td><td><input type='password' name='userPass' maxlength='32'></td></tr>

<tr><td width=100><b>First Name*</b></td><td><input type='text' name='firstname' maxlength='30'></td></tr>

<tr><td width=100><b>Last Name*
</b></td><td><input type='text' name='lastname' maxlength='30'></td></tr>

<tr><td width=100><b>Team Lead*</b></td><td>

<select name='teamlead' size='1'>

<option value='' selected>Select Team Lead</option>

<option value='Chris'>Chris</option>

<option value='Sabrina'>Sabrina</option>

<option value='Mike'>Mike</option>

<option value='Chris'>Chris</option>

<option value='Vincent'>Vincent</option>

</td></tr>

<tr><td width=100><b>User Type*
</b></td><td>

<select name='group' size='1'>

<option value='' selected>Select User Type</option>

<option value='uSer'>User</option>

<option value='Mngr'>Manager</option>

</td></tr>

<tr><td width=100><b>Hire Date</b></td><td><input type='text' name='mm' maxlength='2' size='2' value='MM'><input type='text' name='DD' maxlength='2' size='2' value='DD'><input type='text' name='yr' maxlength='4' size='4' value='YYYY'></td></tr>

<tr><td width=100><b>Extention</b></td><td><input type='text' name='Extn' maxlength='4' size='5'></td></tr>

<tr><td width=100><b>Splits</b></td><td><input type='text' name='split1' maxlength='3' size='5'><input type='text' name='split2' maxlength='3' size='5'><input type='text' name='split3' maxlength='3' size='5'></td></tr>

<tr><td width=100><b>Applications*</b></td><td><textarea name='apps' rows=4 cols=40 maxlength='255'></textarea></td></tr>

<tr><td width=100><b>Courses Completed</b></td><td><textarea name='courses' rows=4 cols=40 maxlength='255'></textarea></td></tr>

<tr><td></td></tr>

</table>

<input type='submit' value='Add User'>

</form>

</td>";

$allusers = mysql_query("SELECT * FROM users ORDER BY 'lastname' ASC") or die("Couldn't connect to the database.");

echo "

<td valign=top>

Modify Users:<br><br>

<table border=1 bordercolor=000000 cellspacing=0 cellpadding=2>

<tr><td width=60><b>NTid</b></td><td width=150><b>Name</b></td></tr>";

while($row = mysql_fetch_array( $allusers )) {

echo "<tr><td><form method='post' action='moduser.php' name='moduform'><input type='hidden' name='moduser' value='" . $row['NTid'] . "'>

<a href='javascript:document.moduform.submit();'>" . $row['NTid'] . "</a></form></td><td>" . $row['lastname'] . " , " . $row['firstname'] . "</td></tr>";

}

echo "</table></table>";


****************

so what do you mean that i should change?
Copy linkTweet thisAlerts:
@A1ien51May 09.2005 — while($row = mysql_fetch_array( $allusers )) {

echo "<tr><td><form method='post' action='moduser.php' name='moduform'><input type='hidden' name='moduser' value='" . $row['NTid'] . "'>

<a href='javascript:document.moduform.submit();'>" . $row['NTid'] . "</a></form></td><td>" . $row['lastname'] . " , " . $row['firstname'] . "</td></tr>";

}

You need to name each form different as you loop through this table....

Eric
×

Success!

Help @npbeers spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...