473,564 Members | 2,798 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.visibi lity = "hidden";
}
return status;
}

<form name="details" method="post" action="test.ph p"
onsubmit="fChec kform()">

<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 2961
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.visibi lity = "hidden";
}
return status;
}

<form name="details" method="post" action="test.ph p"
onsubmit="fChec kform()">

<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.javas cript:
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.visibi lity = "hidden";
}
return status;
}

<form name="details" method="post" action="test.ph p"
onsubmit="fChec kform()">

<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
2901
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 to the web server, but regular button won't. I have a problem that needs to pass HTML elements data back and forth in several ASP pages. I am...
15
28929
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="..." value="..."> with <input type="submit" ...> the only name-value values submitted (pushed into the query string) is the one of the submit button that was...
15
6556
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 the buttons. The problem is when I post a form to itself, the Enter key will not submit the form, it only clears the contents of the text box. The...
22
2156
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 stage. One approach I have used on other systems is to prevent the action buttons appearing. For example, if one did not have the Role of...
5
8019
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 hidden because in edit mode i need to show the field prepopulated with the file path, which doesnot happen with input type=file, it cant be shown...
11
3152
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 displays while occuring of the same event.I develop it by creating an object of the form2 and displays it in the event by calling form2.Show() and...
1
5564
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 tools do not have the ability to stay active. As you switch from tool to tool the previous information is lost unless you use a Back button. I need to...
5
3444
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 and found that httpOnly can be used to hide the Session ID. I wrote a script in my code which works perfectly fine to hide the cookies. But the...
5
1806
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" value="Submit"> However, I want to hide the name "new.asp" from being displayed when the user clicks view source in the browser. The source code should...
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
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. ...
0
8106
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...
1
7642
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...
0
7950
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...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
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...
0
3643
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.