Non-image submit button doesn't work

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Non-image submit button doesn't work

Post by voltrader »

Original html with image buttons, which work perfectly:

Code: Select all

<td>
<input type=image src="images/buttons/submit.gif" name='create'  onClick="return return_script()";>
</td>

<td>
<input type=image src="images/buttons/delete.gif" name='delete' onClick="return confirm('Are you sure you want to delete this?')";>
</td>
I'm in process of changing all images to standard html buttons, however, when I change the code (below), the submit button doesn't submit the form, but the delete button still works.

Code: Select all

<td>
<input type=submit value='submit' name='create'  onClick="return return_script()";>
</td>

<td>
<input type=button value='delete' name='delete' onClick="return confirm('Are you sure you want to delete this?')";>
</td>
Is there an alternative way to do standard html buttons?
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

think it's the semi-colon that's outside the double quotes on this line:
<input type=image src="images/buttons/submit.gif" name='create' onClick="return return_script()";>
but I know nothing.
User avatar
voltrader
Forum Contributor
Posts: 223
Joined: Wed Jul 07, 2004 12:44 pm
Location: SF Bay Area

Post by voltrader »

That didn't do the trick, unfortunately.

Does the type=image act as type=submit or type=button?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

both should be submits.
Post Reply