NameSilo

'Just' a simple acknowledge window required...

Spaceship Spaceship
Watch
I use IIS5.0 and .asp for my web site and all is working quite happily. I use a submit function for a number of forms and actions. On the submit email form, the details are sent correctly to the destination addresses. I would like a small window/message to appear after the submit button is pressed to let the user know it has been sent. Currently I get up to 10 emails of the same thing as the user does not know the submit is working OK. Thanks for any help...

Regards
Keith the newbie.
Code I am using is below
<FORM Action="mailto:xxxxxxxx" ENCTYPE="text/plain">
<Br>Subject:
<INPUT name="Subject" value="Please Contact Me">
<Br>Details: 
<TEXTAREA name=" ">
Please enter your contact details

</TEXTAREA>
<BR>
<INPUT type="submit" value="Submit">
</FORM>
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Check out this page:

http://gethelp.devx.com/techtips/dhtml_pro/10min/10min1199/10min1199.asp

Go down to the heading "Hide form button using DHTML"

In there it has a couple of functions you can use to get started. Basically, in the button's onClick method put a call to the javascript disable() function, and it will disable the button (make sure you fix which element it's diabling)

Or read slightly above that, the heading "Ignore the button" and put that in your page, so if they hit the button twice it can alert them that it's already been submitted and is processing.

Hope that helps,
Mike
 
0
•••
hey

im not sure, but for php, i use an if function to check if the submit variable has been sent, it then displays a message, and redirects to a new page.

ie :

if(isset($_POST['submit'])){
echo "Well done, entered sucessfully";
*redirect code*
} else {
*display form*
}

There must be something similar in asp?

hope it helps anyway, if not, just use the java (onclick) function :D
 
0
•••
Thanks to both of you as both items straightened me on points that were a little hazy regarding technique. In this scenario though asp seems a little reticent. I don't really want to mix java and asp in the same pages although the script and /script seems quite happy to allow the mixes. I'll get there though :)
 
0
•••
give this ago

Code:
<script type=text/javascript>
function clickmea()
{
	window.open("msg_sent.aspx","name","height=600,width=600,status=yes,toolbar=yes,menubar=no,location=no");
}
</script>
<FORM Action="mailto:xxxxxxxx" ENCTYPE="text/plain">
<Br>Subject:
<INPUT name="Subject" value="Please Contact Me">
<Br>Details: 
<TEXTAREA name=" ">
Please enter your contact details

</TEXTAREA>
<BR>
<INPUT type="submit" value="Submit" onclick="javascript:clickmea();">
</FORM>

see where i have msg_sent.asp

replace this with the page u want to display the welcome msg

if the window is to big edit the height and width values on the same row :)
 
0
•••

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back