473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

submit() error

Hi,
I am trying to submit a form when a non-submit button is clicked!
I have:
<input name="add_dev" type="button" value="Add Device" onClick="
this.form.action='<?php echo $_SERVER['PHP_SELF']?>';
this.form.submit();">

When I run it, it says:
this.form.submit is not a function.

(I tired document.form_name.submit(), same thing).

I already have a "submit" button that submits the form to the file
specified in "Action".

Thanks for your help.

May 15 '06 #1
3 1430
Xerxes wrote:
<snip>
this.form.submit();">

When I run it, it says:
this.form.submit is not a function.

(I tired document.form_name.submit(), same thing).

<snip>

<URL: http://www.jibbering.com/faq/faq_not....html#faComMis >

Richard.
May 15 '06 #2
Xerxes wrote:
Hi,
I am trying to submit a form when a non-submit button is clicked!
I have:
<input name="add_dev" type="button" value="Add Device" onClick="
this.form.action='<?php echo $_SERVER['PHP_SELF']?>';
this.form.submit();">

When I run it, it says:
this.form.submit is not a function.

(I tired document.form_name.submit(), same thing).

I already have a "submit" button that submits the form to the file
specified in "Action".

Thanks for your help.


Why not just have 2 submit buttons?
May 16 '06 #3
Thanks Richard.

May 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Eric | last post by:
Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works fine, however, when the checkbox is only field...
4
by: Sarah | last post by:
Hi all. I have a form, and several text and image links on it that should submit the form with different actions. I prepared a simple page with just the code that's not working. PROBLEM:...
8
by: Syed Ali | last post by:
Hello, I have 1 HTML form with 4 submit buttons and 10 textfield entry areas. If submit button1 is pressed I need to make sure that all 10 textfield entries have been filled before submitting...
10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
4
by: Peloux | last post by:
Hi, I have written some htc in order to validate data in a form. most of htc are attached on 'onblur' event. Now, we would like to use the Enter Key to sublit form, so we use the following...
1
by: accessyou | last post by:
I am using a windows 2000 with apache and php5 A simple url submit containing only english characters are OK: http://www.abc.com/submit.php?msg=test If the value of msg is replaced with a...
5
by: Codeman II | last post by:
Hi there, I am building a form where the user must upload a picture and fill in his details. Now I have a problem as all of this is on the same form. How will I be able to have the Browse...
1
by: B Ekre | last post by:
In VS 2005 I have a WebForm with 3 UserControls on it. One UserControl implements the new ICallbackEventHandler to update a DIV based on user input. The other two implement a <asp:repeater ...>...
2
by: pantagruel | last post by:
As per the subject line, Firefox's error console says document.forms.submit is not a function. the javascript is function makequery(param){ document.forms.qu.value=param;...
1
by: gbezas | last post by:
Hi All, I have added an event handler to redirect form.submit() to a newSubmit() method that I have defined (which does some additional processing before submitting the form). Additionally I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.