472,119 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

JavaScript submit method doesn't work

Hi,

Has anyone had any success using jscript submit
method in their VS.NET projects?

For example I have some client processing in a script
function then call <form name>.submit();
This won't work. It does however work in a hand coded
html or aspx page.

Any suggestions?
THANKS
Nov 17 '05 #1
9 1897
It does work. Why errors are you experiencing? Try qualifying the form name
document.all.formName.submit()

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric George" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
Hi,

Has anyone had any success using jscript submit
method in their VS.NET projects?

For example I have some client processing in a script
function then call <form name>.submit();
This won't work. It does however work in a hand coded
html or aspx page.

Any suggestions?
THANKS

Nov 17 '05 #2
Hi,
I'm not getting any errors. All that happens
is a post but it stays on the same page.
I know that the jscript function is being called since
I put an alert for debugging.
document.all.formname.submit() didn't help.
Alternatively is there a way to do this in a VB script?
Any suggestions?
-----Original Message-----
It does work. Why errors are you experiencing? Try qualifying the form namedocument.all.formName.submit()

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric George" <an*******@discussions.microsoft.com> wrote in messagenews:03****************************@phx.gbl...
Hi,

Has anyone had any success using jscript submit
method in their VS.NET projects?

For example I have some client processing in a script
function then call <form name>.submit();
This won't work. It does however work in a hand coded
html or aspx page.

Any suggestions?
THANKS

.

Nov 17 '05 #3
what are you expecting to happen? The page does post so what is it that you
are after?
You can tell if the page posts by watching the page to see if it flashes or
redraws itself. If you want to retrieve the form variables that were
submitted, that is a different story.

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric George" <an*******@discussions.microsoft.com> wrote in message
news:0d****************************@phx.gbl...
Hi,
I'm not getting any errors. All that happens
is a post but it stays on the same page.
I know that the jscript function is being called since
I put an alert for debugging.
document.all.formname.submit() didn't help.
Alternatively is there a way to do this in a VB script?
Any suggestions?
-----Original Message-----
It does work. Why errors are you experiencing? Try

qualifying the form name
document.all.formName.submit()

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric George" <an*******@discussions.microsoft.com> wrote

in message
news:03****************************@phx.gbl...
Hi,

Has anyone had any success using jscript submit
method in their VS.NET projects?

For example I have some client processing in a script
function then call <form name>.submit();
This won't work. It does however work in a hand coded
html or aspx page.

Any suggestions?
THANKS

.

Nov 17 '05 #4
Hi,
I'm trying to say that my form's action is to go to
another form, yet it doesn't, the original page justs
redraws.
??
-----Original Message-----
what are you expecting to happen? The page does post so what is it that youare after?
You can tell if the page posts by watching the page to see if it flashes orredraws itself. If you want to retrieve the form variables that weresubmitted, that is a different story.

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric George" <an*******@discussions.microsoft.com> wrote in messagenews:0d****************************@phx.gbl...
Hi,
I'm not getting any errors. All that happens
is a post but it stays on the same page.
I know that the jscript function is being called since
I put an alert for debugging.
document.all.formname.submit() didn't help.
Alternatively is there a way to do this in a VB script?
Any suggestions?
>-----Original Message-----
>It does work. Why errors are you experiencing? Try

qualifying the form name
>document.all.formName.submit()
>
>--
>
>
>-----------
>Got TidBits?
>Get it here: www.networkip.net/tidbits
>"Eric George" <an*******@discussions.microsoft.com>
wrote in message
>news:03****************************@phx.gbl...
>> Hi,
>>
>> Has anyone had any success using jscript submit
>> method in their VS.NET projects?
>>
>> For example I have some client processing in a script
>> function then call <form name>.submit();
>> This won't work. It does however work in a hand coded
>> html or aspx page.
>>
>> Any suggestions?
>> THANKS
>
>
>.
>

.

Nov 17 '05 #5
post the routine that does the submit please

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
Hi,
I'm trying to say that my form's action is to go to
another form, yet it doesn't, the original page justs
redraws.
??
-----Original Message-----
what are you expecting to happen? The page does post so

what is it that you
are after?
You can tell if the page posts by watching the page to

see if it flashes or
redraws itself. If you want to retrieve the form

variables that were
submitted, that is a different story.

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric George" <an*******@discussions.microsoft.com> wrote

in message
news:0d****************************@phx.gbl...
Hi,
I'm not getting any errors. All that happens
is a post but it stays on the same page.
I know that the jscript function is being called since
I put an alert for debugging.
document.all.formname.submit() didn't help.
Alternatively is there a way to do this in a VB script?
Any suggestions?

>-----Original Message-----
>It does work. Why errors are you experiencing? Try
qualifying the form name
>document.all.formName.submit()
>
>--
>
>
>-----------
>Got TidBits?
>Get it here: www.networkip.net/tidbits
>"Eric George" <an*******@discussions.microsoft.com> wrote in message
>news:03****************************@phx.gbl...
>> Hi,
>>
>> Has anyone had any success using jscript submit
>> method in their VS.NET projects?
>>
>> For example I have some client processing in a script
>> function then call <form name>.submit();
>> This won't work. It does however work in a hand coded
>> html or aspx page.
>>
>> Any suggestions?
>> THANKS
>
>
>.
>

.

Nov 17 '05 #6
Hi,
Here's my jscript:
<script>
function GoTo()
{
alert("in GoTo");
document.all.Form1.submit();
}
</script>

and here's my form code:
<form id="Form1" name="Form1" method="post"
action="webform2.aspx" runat="server">
<INPUT id="jscript" type="button" value="jscript submit"
onclick="GoTo()">
<asp:Button id="Submit" runat="server"
Text="Submit"></asp:Button>
</form>

So when I hit the jscript button I get the alert but no
submit to webform2, just stays on webform1. When I hit the
Submit button I get a successful submit to webform2.

??
-----Original Message-----
post the routine that does the submit please

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric" <an*******@discussions.microsoft.com> wrote in messagenews:05****************************@phx.gbl...
Hi,
I'm trying to say that my form's action is to go to
another form, yet it doesn't, the original page justs
redraws.
??
>-----Original Message-----
>what are you expecting to happen? The page does post so

what is it that you
>are after?
>You can tell if the page posts by watching the page to

see if it flashes or
>redraws itself. If you want to retrieve the form

variables that were
>submitted, that is a different story.
>
>--
>
>
>-----------
>Got TidBits?
>Get it here: www.networkip.net/tidbits
>"Eric George" <an*******@discussions.microsoft.com> wrote
in message
>news:0d****************************@phx.gbl...
>> Hi,
>> I'm not getting any errors. All that happens
>> is a post but it stays on the same page.
>> I know that the jscript function is being called

since >> I put an alert for debugging.
>> document.all.formname.submit() didn't help.
>> Alternatively is there a way to do this in a VB script? >> Any suggestions?
>>
>> >-----Original Message-----
>> >It does work. Why errors are you experiencing? Try
>> qualifying the form name
>> >document.all.formName.submit()
>> >
>> >--
>> >
>> >
>> >-----------
>> >Got TidBits?
>> >Get it here: www.networkip.net/tidbits
>> >"Eric George" <an*******@discussions.microsoft.com>

wrote
>> in message
>> >news:03****************************@phx.gbl...
>> >> Hi,
>> >>
>> >> Has anyone had any success using jscript submit
>> >> method in their VS.NET projects?
>> >>
>> >> For example I have some client processing in a script >> >> function then call <form name>.submit();
>> >> This won't work. It does however work in a hand coded >> >> html or aspx page.
>> >>
>> >> Any suggestions?
>> >> THANKS
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Nov 17 '05 #7
post the routine that does the submit please

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
Hi,
I'm trying to say that my form's action is to go to
another form, yet it doesn't, the original page justs
redraws.
??
-----Original Message-----
what are you expecting to happen? The page does post so

what is it that you
are after?
You can tell if the page posts by watching the page to

see if it flashes or
redraws itself. If you want to retrieve the form

variables that were
submitted, that is a different story.

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric George" <an*******@discussions.microsoft.com> wrote

in message
news:0d****************************@phx.gbl...
Hi,
I'm not getting any errors. All that happens
is a post but it stays on the same page.
I know that the jscript function is being called since
I put an alert for debugging.
document.all.formname.submit() didn't help.
Alternatively is there a way to do this in a VB script?
Any suggestions?

>-----Original Message-----
>It does work. Why errors are you experiencing? Try
qualifying the form name
>document.all.formName.submit()
>
>--
>
>
>-----------
>Got TidBits?
>Get it here: www.networkip.net/tidbits
>"Eric George" <an*******@discussions.microsoft.com> wrote in message
>news:03****************************@phx.gbl...
>> Hi,
>>
>> Has anyone had any success using jscript submit
>> method in their VS.NET projects?
>>
>> For example I have some client processing in a script
>> function then call <form name>.submit();
>> This won't work. It does however work in a hand coded
>> html or aspx page.
>>
>> Any suggestions?
>> THANKS
>
>
>.
>

.

Nov 17 '05 #8
Hi,
Here's my jscript:
<script>
function GoTo()
{
alert("in GoTo");
document.all.Form1.submit();
}
</script>

and here's my form code:
<form id="Form1" name="Form1" method="post"
action="webform2.aspx" runat="server">
<INPUT id="jscript" type="button" value="jscript submit"
onclick="GoTo()">
<asp:Button id="Submit" runat="server"
Text="Submit"></asp:Button>
</form>

So when I hit the jscript button I get the alert but no
submit to webform2, just stays on webform1. When I hit the
Submit button I get a successful submit to webform2.

??
-----Original Message-----
post the routine that does the submit please

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric" <an*******@discussions.microsoft.com> wrote in messagenews:05****************************@phx.gbl...
Hi,
I'm trying to say that my form's action is to go to
another form, yet it doesn't, the original page justs
redraws.
??
>-----Original Message-----
>what are you expecting to happen? The page does post so

what is it that you
>are after?
>You can tell if the page posts by watching the page to

see if it flashes or
>redraws itself. If you want to retrieve the form

variables that were
>submitted, that is a different story.
>
>--
>
>
>-----------
>Got TidBits?
>Get it here: www.networkip.net/tidbits
>"Eric George" <an*******@discussions.microsoft.com> wrote
in message
>news:0d****************************@phx.gbl...
>> Hi,
>> I'm not getting any errors. All that happens
>> is a post but it stays on the same page.
>> I know that the jscript function is being called

since >> I put an alert for debugging.
>> document.all.formname.submit() didn't help.
>> Alternatively is there a way to do this in a VB script? >> Any suggestions?
>>
>> >-----Original Message-----
>> >It does work. Why errors are you experiencing? Try
>> qualifying the form name
>> >document.all.formName.submit()
>> >
>> >--
>> >
>> >
>> >-----------
>> >Got TidBits?
>> >Get it here: www.networkip.net/tidbits
>> >"Eric George" <an*******@discussions.microsoft.com>

wrote
>> in message
>> >news:03****************************@phx.gbl...
>> >> Hi,
>> >>
>> >> Has anyone had any success using jscript submit
>> >> method in their VS.NET projects?
>> >>
>> >> For example I have some client processing in a script >> >> function then call <form name>.submit();
>> >> This won't work. It does however work in a hand coded >> >> html or aspx page.
>> >>
>> >> Any suggestions?
>> >> THANKS
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Nov 17 '05 #9
try this instead
put this in your click button event 'opener.location.reload()'. So for
example, this would be in Page B onclick button event and you are wanting to
post to page A. This code would cause Page A to reload. Now, you would have
to store the data that you want to transfer into Session or cache in page B
so that when page A reloads, it pulls the data out of cache and uses it.

makes sense?

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...
Hi,
Here's my jscript:
<script>
function GoTo()
{
alert("in GoTo");
document.all.Form1.submit();
}
</script>

and here's my form code:
<form id="Form1" name="Form1" method="post"
action="webform2.aspx" runat="server">
<INPUT id="jscript" type="button" value="jscript submit"
onclick="GoTo()">
<asp:Button id="Submit" runat="server"
Text="Submit"></asp:Button>
</form>

So when I hit the jscript button I get the alert but no
submit to webform2, just stays on webform1. When I hit the
Submit button I get a successful submit to webform2.

??
-----Original Message-----
post the routine that does the submit please

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric" <an*******@discussions.microsoft.com> wrote in

message
news:05****************************@phx.gbl...
Hi,
I'm trying to say that my form's action is to go to
another form, yet it doesn't, the original page justs
redraws.
??
>-----Original Message-----
>what are you expecting to happen? The page does post so
what is it that you
>are after?
>You can tell if the page posts by watching the page to
see if it flashes or
>redraws itself. If you want to retrieve the form
variables that were
>submitted, that is a different story.
>
>--
>
>
>-----------
>Got TidBits?
>Get it here: www.networkip.net/tidbits
>"Eric George" <an*******@discussions.microsoft.com> wrote in message
>news:0d****************************@phx.gbl...
>> Hi,
>> I'm not getting any errors. All that happens
>> is a post but it stays on the same page.
>> I know that the jscript function is being called since >> I put an alert for debugging.
>> document.all.formname.submit() didn't help.
>> Alternatively is there a way to do this in a VB script? >> Any suggestions?
>>
>> >-----Original Message-----
>> >It does work. Why errors are you experiencing? Try
>> qualifying the form name
>> >document.all.formName.submit()
>> >
>> >--
>> >
>> >
>> >-----------
>> >Got TidBits?
>> >Get it here: www.networkip.net/tidbits
>> >"Eric George" <an*******@discussions.microsoft.com>
wrote
>> in message
>> >news:03****************************@phx.gbl...
>> >> Hi,
>> >>
>> >> Has anyone had any success using jscript submit
>> >> method in their VS.NET projects?
>> >>
>> >> For example I have some client processing in a script >> >> function then call <form name>.submit();
>> >> This won't work. It does however work in a hand coded >> >> html or aspx page.
>> >>
>> >> Any suggestions?
>> >> THANKS
>> >
>> >
>> >.
>> >
>
>
>.
>

.

Nov 17 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Esben Rune Hansen | last post: by
21 posts views Thread by Martin Eyles | last post: by
10 posts views Thread by ljlolel | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.