469,631 Members | 1,218 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

Submit Form Notification Message

JP
Hi folks,

Using ASP and/or JavaScript, how do you create that little
notification message (usually in red below the submit button) when the
Submit button is pushed. Something that says "Your information is
being sent ..."

Thanks for any assistance.

Mar 15 '07 #1
4 3929
JP wrote on 15 mrt 2007 in microsoft.public.inetserver.asp.general:
Using ASP and/or JavaScript,
ASP is not a programming language, but a serverside platform for
javascript, VBscript, etc. So the "or" is not possible.
how do you create that little
notification message (usually in red below the submit button) when the
Submit button is pushed. Something that says "Your information is
being sent ..."
It is being done clientside, so ASP cannot do that.

Please ask a clientside NG, like:

comp.lang.javascript
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 15 '07 #2

"JP" <ji*******@gmail.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
Hi folks,

Using ASP and/or JavaScript, how do you create that little
notification message (usually in red below the submit button) when the
Submit button is pushed. Something that says "Your information is
being sent ..."

Thanks for any assistance.
<script type="text/javascript">

function doSubmit()
{
var form = this.form
this.nextSibiling.style.visibility = 'visible'
window.setTimeout(fnSubmit, 0)

function fnSubmit()
{
form.submit()
}
}

</script>

<input type="button" onclick="doSubmit.call(this)" value="Send" /><br />
<span style="visibility:hidden; color:red">Sending...</span>
Mar 15 '07 #3
Anthony Jones wrote on 15 mrt 2007 in
microsoft.public.inetserver.asp.general:
>
"JP" <ji*******@gmail.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
>Hi folks,

Using ASP and/or JavaScript, how do you create that little
notification message (usually in red below the submit button) when
the Submit button is pushed. Something that says "Your information
is being sent ..."

Thanks for any assistance.

<script type="text/javascript">

function doSubmit()
{
var form = this.form
this.nextSibiling.style.visibility = 'visible'
window.setTimeout(fnSubmit, 0)

function fnSubmit()
{
form.submit()
}
}

</script>

<input type="button" onclick="doSubmit.call(this)" value="Send" /><br
/<span style="visibility:hidden; color:red">Sending...</span>
Wouldn't the next sibling be the <br>?

call Method (JScript 5.6):
Calls a method of an object, substituting
another object for the current object.
Could you explain for us mortals what the call() here does?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 15 '07 #4

"Evertjan." <ex**************@interxnl.netwrote in message
news:Xn********************@194.109.133.242...
Anthony Jones wrote on 15 mrt 2007 in
microsoft.public.inetserver.asp.general:

"JP" <ji*******@gmail.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
Hi folks,

Using ASP and/or JavaScript, how do you create that little
notification message (usually in red below the submit button) when
the Submit button is pushed. Something that says "Your information
is being sent ..."

Thanks for any assistance.
<script type="text/javascript">

function doSubmit()
{
var form = this.form
this.nextSibiling.style.visibility = 'visible'
window.setTimeout(fnSubmit, 0)

function fnSubmit()
{
form.submit()
}
}

</script>

<input type="button" onclick="doSubmit.call(this)" value="Send" /><br
/<span style="visibility:hidden; color:red">Sending...</span>

Wouldn't the next sibling be the <br>?
You're quite right. I wrote the code then added the BR as an after thought.

nextSibliling.nextSibling would be necessary.
>
call Method (JScript 5.6):
Calls a method of an object, substituting
another object for the current object.

Could you explain for us mortals what the call() here does?
It calls the doSubmit function as if the input had a doSubmit method
attached. Hence in the doSubmit execution the 'this' context is the input
element.

It could have been written:-

function doSubmit(elem)
{
var form = elem.form
elem.nextSibling.nextSibiling.style.visibility = 'visible'
window.setTimeout(fnSubmit, 0)

function fnSubmit()
{
form.submit()
}
}

and onclick would be "doSubmit(this)"

However I prefer .call since it is consistent with assigning the event
handler in code:-

elem.onclick = doSubmit

Anthony
Mar 15 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by bettina | last post: by
9 posts views Thread by Eric George | last post: by
4 posts views Thread by Dmitry Korolyov [MVP] | last post: by
reply views Thread by JP | last post: by
4 posts views Thread by =?Utf-8?B?YzY3NjIyOA==?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.