473,499 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hiding submit button

I have a form with a submit button and an onsubmit event.

fCheckform = function() {
var status = false;
//
// some checking here, if its ok then status get set to true
//
if (status) {
var el = document.forms["details"].elements["finish"];
el.style.visibility = "hidden";
}
return status;
}

<form name="details" method="post" action="test.php"
onsubmit="fCheckform()">

<input name="finish" type="submit" value="Finish">
What's happening is that the submit button flashes off and then back on
when 'status' is true. Is there a way to keep/make the submit hidden if
fCheckform returns true?

Andrew Poulos
Mar 30 '07 #1
2 2952
Andrew Poulos wrote:
I have a form with a submit button and an onsubmit event.

fCheckform = function() {
var status = false;
//
// some checking here, if its ok then status get set to true
//
if (status) {
var el = document.forms["details"].elements["finish"];
el.style.visibility = "hidden";
}
return status;
}

<form name="details" method="post" action="test.php"
onsubmit="fCheckform()">

<input name="finish" type="submit" value="Finish">
What's happening is that the submit button flashes off and then back on
when 'status' is true. Is there a way to keep/make the submit hidden if
fCheckform returns true?
I did some more testing and it looks like the page is getting reloaded
each time fCheckfrom returns - I'm incrementing a global variable in
fCheckform and when I alert its value its always the same???

Andrew Poulos
Mar 30 '07 #2
Andrew Poulos wrote on 30 mrt 2007 in comp.lang.javascript:
I have a form with a submit button and an onsubmit event.

fCheckform = function() {
var status = false;
//
// some checking here, if its ok then status get set to true
//
if (status) {
var el = document.forms["details"].elements["finish"];
el.style.visibility = "hidden";
}
return status;
}

<form name="details" method="post" action="test.php"
onsubmit="fCheckform()">

<input name="finish" type="submit" value="Finish">
What's happening is that the submit button flashes off and then back on
when 'status' is true. Is there a way to keep/make the submit hidden if
fCheckform returns true?
Not if you submit to a new instance of the same page.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 30 '07 #3

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

Similar topics

3
2898
by: Matt | last post by:
I want to understand the difference between submit button and regular button: <input type="submit"> and <input type="button">. My understanding is that submit button will send the entire HTML form...
15
28915
by: Mattia | last post by:
Hi! I have a <form> that can be submitted thruogh three buttons and I need to tell witch one was pressed when the form was submitted. I now do it with 3 <input type="submit" name="..."...
15
6538
by: M Smith | last post by:
I have a form I want to submit to itself. I want to be able to type in a list of numbers and submit the form and have that list show up on the same form under the text box I typed them into and...
22
2143
by: Mr Newbie | last post by:
I was thinking about developing a workflow application yesterday and was musing over the different approaches than one could take in restricting specific actions on a ticket( Form ) at any said...
5
8013
by: hrpreet | last post by:
Hi All, I need the file chooser in the jsp, just for brosing and saving the file path in the database, so i have used the following code.I dont need to read the file content. I have to make it...
11
3142
by: Alex | last post by:
Hello all, I have a main form(say "form1") .i want to display another form(say "form2") on occuring of an event (say a button click) and want to hide it after some time so that it will again...
1
5551
by: Grimm | last post by:
I am developing an internalk inteface that integrates alot of seperate tools into one interface. The current version uses one Iframe inside a div layer for positioning. Currently the seperate web...
5
3434
natrajr83
by: natrajr83 | last post by:
Hi, I am working on a secure project which uses SSL. I want to hide the Session ID which gets generated from the public view. I am testing with both IE6 and also Mozilla Firefox. I tried googling...
5
1803
by: kpdeepu | last post by:
Hi, I have created a form which has a text box and a submit button.... <form name="myform" action="new.asp" method="post"> <input type="text" name="text1" size=20> <input type="submit"...
0
7128
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
7006
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...
0
7215
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...
1
6892
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...
0
4597
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...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1425
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 ...
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
294
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...

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.