replacing post buttons with images ; strange prob. - Posted (522 Views)
Retired Support Moderator
MarcelG
Posts: 2625
2625
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<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Junior Member
Bassman
Posts: 256
256
Sounds alot like my problem, Shaggy give this code:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=60133<
Posted
Retired Support Moderator
MarcelG
Posts: 2625
2625
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.<
Posted
Junior Member
Ranko
Posts: 400
400
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()"><
 
You Must enter a message