replacing post buttons with images ; strange prob.

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/60975?pagenum=1
05 November 2025, 10:13

Topic


MarcelG
replacing post buttons with images ; strange prob.
09 February 2006, 16:25


I've been trying to replace the post buttons ('post new topic' and 'preview') by images. (example) http://www.scoutingkeentmoesel.nl/topic.asp?TOPIC_ID=2111
and http://www.scoutingkeentmoesel.nl/post.asp

Here's the HTML source that's used to generate the image-buttons:
Code:
<input name="Submit" src="images/plaatsbericht.gif" align="absmiddle" type="image">&nbsp;
<input src="images/voorbeeld.gif" align="absmiddle" type="image" name="Preview" type="button" value="preview" onclick="OpenPreview()">

Here's the original HTML code:
Code:
<input class="gmlBtn2" name="Submit" type="submit" value="Post!">&nbsp;
<input class="gmlBtn2" name="Preview" type="button" value="preview" onclick="OpenPreview()">
The problem is that when someone clicks on 'Preview' the topic gets posted.....and the preview gets loaded... dead The same happens on the edit-profile page ; if one clicks on the 'view signature' button, the profile gets updated....
HTML is not my best part, I knew that already, but this one is really boggling me... dissapprove<

 

Replies ...


Bassman
09 February 2006, 16:35


Sounds alot like my problem, Shaggy give this code:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=60133<
MarcelG
10 February 2006, 03:56


Thanks!!! (funny to see it's causing problems at two dutch scouting websites! bigsmile)
So, I've changed the preview button to this:
Code:
"<a href=""pop_preview.asp"" onclick=""OpenPreview();return false;""><img src=""images/voorbeeld.gif"" align=""absmiddle""/></a>"
It works as a charm.<
Ranko
10 February 2006, 09:52


This is the code you are looking for; you can't have two types in a tag

<input name="Submit" src="images/plaatsbericht.gif" align="absmiddle" type="image" /> 
<input src="images/voorbeeld.gif" type="image" name="Preview" value="preview" onclick="OpenPreview()"><
© 2000-2021 Snitz™ Communications