<script LANGUAGE="JavaScript">
/*Original script by Dr Joe Burns, www.htmlgoodies.com.
Modified by Brian Sloan, www.f1cafe.co.uk.
Hide/Show Mailform Added by Green CoW - www.greencow.se
You can take this out if you want.
This script is a form.
When it is submitted, its contents are shown in the main browser window and the user has the chance to change their details before the form is submitted.
I've had error messages when I tested it in Netscape Navigator 4.6 but it works fine in Microsoft Internet Explorer.
Please send any feedback you may have to brian@sloan29.freeserve.co.uk. Enjoy the script!*/
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
function WriteValue(id)
{
var table='<table width="100%" border="0" cellspacing="2" cellpadding="2"><tr align="center"><td colspan="2"><h2>This is what will be submitted…</h2></td></tr><tr>'
var getName='<td width="17%"><b>Name:</b></td><td width="83%">'+document.form.name.value+'</td></tr><tr>'
var getEmail='<td width="17%"><b>Email:</b> </td><td width="83%">'+document.form.email.value+'</td></tr><tr>'
var getComment='<td width="17%"><b>Comment:</b></td><td width="83%">'+document.form.comment.value+'</td></tr>'
var endtable='</table>'
document.getElementById(id).innerHTML=table+getName+getEmail+getComment+endtable
}
</script>
<H1><CENTER>
Mailform with Confirmation
</center></H1>
<P> <br>
<div id="Open_buttonLayer" style="position:absolute; z-index:2; visibility:visible">
<input type="submit" name="Submit" value="Open the Mail Form" onClick="MM_showHideLayers('mailLayer','','show');MM_showHideLayers('Close_buttonLayer',' ','show');MM_showHideLayers('Open_buttonLayer','','hide')">
</div>
<div id="Close_buttonLayer" style="position:absolute; z-index:2; visibility:hidden">
<input type="submit" name="Submit2" value="Close the Mail Form" onClick="MM_showHideLayers('mailLayer','','hide');MM_showHideLayers('Close_buttonLayer',' ','hide');MM_showHideLayers('Open_buttonLayer','','show')">
</div>
<br>
<br><FORM NAME="form" ACTION="mailto:your_mail@address_here.com?subject=Edit your subject here" METHOD="post" ENCTYPE="text/plain">
<div id="mailLayer" style="position:absolute; width:100%; z-index:1; visibility: hidden">
<table width="90%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td>Name: </td>
<td>
<input type="TEXT" name="name" size="50">
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="TEXT" name="email" size="50">
</td>
</tr>
<tr>
<td>Comment:</td>
<td>
<textarea rows="5" name="comment" cols="50"></textarea>
</td>
</tr>
</table>
<CENTER>
<INPUT TYPE="BUTTON" VALUE="Submit" onClick="WriteValue('res');MM_showHideLayers('Showmail','','show');MM_showHideLayers('mai lLayer','','hide');;MM_showHideLayers('Close_buttonLayer','','hide')">
<INPUT TYPE="RESET" VALUE="Reset"></center>
</div>
<div id="Showmail" style="position:absolute; width:100%; z-index:1; visibility: hidden">
<span id="res"></span><div align="center"><br>
Is this right?<br>
<input type="button" value="Confirm" onClick="document.form.submit()" name="button2">
<input type="button" value="Edit Mail" onClick="MM_showHideLayers('Showmail','','hide');MM_showHideLayers('mailLayer','','show') ;;MM_showHideLayers('Close_buttonLayer','','show')" name="button2">
</div>
</div>
</FORM>
Naravno moras izmijeniti mail adresu i slicno...Prema tvojim potrebama...