473,847 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1963
It does work. Why errors are you experiencing? Try qualifying the form name
document.all.fo rmName.submit()

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric George" <an*******@disc ussions.microso ft.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.fo rmname.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.f ormName.submit( )

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric George" <an*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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.fo rmname.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.f ormName.submit( )

--
-----------
Got TidBits?
Get it here: www.networkip.net/tidbits
"Eric George" <an*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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.fo rmname.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.f ormName.submit( )
>
>--
>
>
>-----------
>Got TidBits?
>Get it here: www.networkip.net/tidbits
>"Eric George" <an*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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.fo rmname.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.f ormName.submit( )
>
>--
>
>
>-----------
>Got TidBits?
>Get it here: www.networkip.net/tidbits
>"Eric George" <an*******@disc ussions.microso ft.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.Fo rm1.submit();
}
</script>

and here's my form code:
<form id="Form1" name="Form1" method="post"
action="webform 2.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*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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.fo rmname.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.f ormName.submit( )
>> >
>> >--
>> >
>> >
>> >-----------
>> >Got TidBits?
>> >Get it here: www.networkip.net/tidbits
>> >"Eric George" <an*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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.fo rmname.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.f ormName.submit( )
>
>--
>
>
>-----------
>Got TidBits?
>Get it here: www.networkip.net/tidbits
>"Eric George" <an*******@disc ussions.microso ft.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.Fo rm1.submit();
}
</script>

and here's my form code:
<form id="Form1" name="Form1" method="post"
action="webform 2.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*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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.fo rmname.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.f ormName.submit( )
>> >
>> >--
>> >
>> >
>> >-----------
>> >Got TidBits?
>> >Get it here: www.networkip.net/tidbits
>> >"Eric George" <an*******@disc ussions.microso ft.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.locatio n.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*******@disc ussions.microso ft.com> wrote in message
news:00******** *************** *****@phx.gbl.. .
Hi,
Here's my jscript:
<script>
function GoTo()
{
alert("in GoTo");
document.all.Fo rm1.submit();
}
</script>

and here's my form code:
<form id="Form1" name="Form1" method="post"
action="webform 2.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*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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.fo rmname.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.f ormName.submit( )
>> >
>> >--
>> >
>> >
>> >-----------
>> >Got TidBits?
>> >Get it here: www.networkip.net/tidbits
>> >"Eric George" <an*******@disc ussions.microso ft.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2828
by: NewbieJon | last post by:
I am attempting to send the variable "sComputerName" from my ActiveX script to "GetInfo.asp" using javascript. (Having been advised this is the way to get my ActiveX variable into my ASP script) My code is below. I am getting the following error "MyForm.oNetwork.Value is Null or is not an object". I'm struggling to diagnose what to do next. I'd very much appreciate some help Many thanks <HTML><BODY><FORM NAME="MyForm"...
12
8182
by: Barnes | last post by:
Does anyone know of a good way to use the JavaScript string.replace() method in an ASP form? Here is the scenario: I have a form that cannot accept apostrophes. I want to use the replace() so that the apostrophe is automatically replace with two '' . Reason being--SQL Server does not like apostrophes being sent to database. I've tried to do this on the server side in the SQL area of the ASP page by writing a function (with some great...
7
4895
by: AnnMarie | last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it works fine in IE. I made some of the suggested changes which enabled it to work in IE. I couldn't make all the changes because then it didn't work in IE. How can I enable this javascipt form validation to work in Netscape? When I use netscape, none of the alert boxes appear. It submits the form without validating anything.
1
1532
by: Esben Rune Hansen | last post by:
Hi I am working on a PHP-script and need javascript to set the value of a hidden field in a form. This field happens to be an entry in an array data according to my example. How can I do this? Below is listet two PHP-pages: one that doesn't work (to my dismay), and another that does work, but do not use an array entry in the hidden field. Thanks
21
24473
by: Martin Eyles | last post by:
I am trying to get javascript to cause a page to post back. I have tried calling _doPostBack from my script, but generates an error "object expected". I think this is because the page's script doesn't contain the method _doPostBack, which needs to be added by asp.net. How can I make asp.net add this script? Thanks, ME --
9
4929
by: tshad | last post by:
This is from my previous post, but a different issue. I have the following Javascript routine that opens a popup page, but doesn't seem to work if called from an asp.net button. It seems to work fine from a link. The button does bring up the popup window, but when I press the links on the page, it doesn't return or close the window. ****************************************************************************
10
6096
by: ljlolel | last post by:
So.. I have a form that submits to an ASP.net site made in C-sharp. The ASP site is not mine, i do not have the server side code. When I submit from my form by pressing the Submit button, I get different results than when I use a javascript submit: form1.submit();. I think the javascript submit is working as it should, since I want the server to process an __EVENTTARGET posting. When I click the submit button, it does not process the...
16
2886
by: browntown | last post by:
so I have this application I'm nearly finished with. The only thing the client has requested is the ability to submit the form by pressing "enter". I didn't think this would be a huge pain in the ass and the app will be used internally so I'm not too worried about users who aren't using javascript. I'm using the following javascript to detect whether or not they've hit enter: if(document.layers) {
10
7310
by: evicailieva | last post by:
A have a php scrip where I call a JavaScript function. I don't know why, but it doesn't work. At the beginning, when I was writing the script it was working but now it's not. I don't know wхat to do. Please help me. Here is the php code: function print_rezBilet($rezBilet,$posRezBilet1){ $step=$_SESSION; $max=$_SESSION; $curr= $_SESSION+$step-1 ; if($max<$curr) $curr=$max;
0
9881
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10982
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10645
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10706
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10331
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9480
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3160
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.