473,890 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to blank the screen when any submit-type buttons clicked

Is there a way to blank the screen in a FORM's onsubmit=... to blank
the screen for the user??

I asked this before and got a way to blank a table by id with

"document.getEl ementById('tabi d').style.displ ay='none';" in the onclick
event and setting the encapsulating table's ID to 'tabid'.

I was wondering if this or some other similar approach that could
possibly be planted globally in my pages in the onsubmit validation
sequence ????

Oct 3 '05 #1
14 2640

"charlie_M" <cm******@comca st.net> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
Is there a way to blank the screen in a FORM's onsubmit=... to blank
the screen for the user??

I asked this before and got a way to blank a table by id with

"document.getEl ementById('tabi d').style.displ ay='none';" in the onclick
event and setting the encapsulating table's ID to 'tabid'.


you could put your "page" content in a div and then just hide the whole
div.
Oct 3 '05 #2
Can you nest DIVs??

The problem and the reason I ask the original question... these pages
are written in Foxpro and there are literally hundreds of them. I am
loking for the easiest method to blank the screen when sublitted and
would favor the method that would allow trhe change be centrally
applied (like a form's onsubmit()).

TIA
Chuck

Oct 3 '05 #3
charlie_M said the following on 10/3/2005 3:45 PM:
Can you nest DIVs??
Yes. What does that have to do with Javascript?
The problem and the reason I ask the original question... these pages
are written in Foxpro and there are literally hundreds of them. I am
loking for the easiest method to blank the screen when sublitted and
would favor the method that would allow trhe change be centrally
applied (like a form's onsubmit()).


If Foxpro is screwing your pages up that bad, you need a new editor.

<form onsubmit="hideT heBody()">

function hideTheBody(){
bodyNode = document.body?d ocument.body:do cument.document Element;
bodyNode.innerH TML = '';
}

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Oct 3 '05 #4
Does this allow the form to be submitted?? My initial test shows the
screen blanks.. but the data does not go to the server??
FYI:. Foxpro is not an editor.... also not javascript ;o)) Foxpro is a
fuly compiled language with similarities to Visual Basic and C++ and
the ilk. In this case... Foxpro is generating/interpreting web pages
and serving them through an isapi interface to/from a webserver.

Oct 4 '05 #5
Randy Webb wrote:
charlie_M said the following on 10/3/2005 3:45 PM:
Can you nest DIVs??

Yes. What does that have to do with Javascript?
The problem and the reason I ask the original question... these pages
are written in Foxpro and there are literally hundreds of them. I am
loking for the easiest method to blank the screen when sublitted and
would favor the method that would allow trhe change be centrally
applied (like a form's onsubmit()).

If Foxpro is screwing your pages up that bad, you need a new editor.

<form onsubmit="hideT heBody()">

function hideTheBody(){
bodyNode = document.body?d ocument.body:do cument.document Element;
bodyNode.innerH TML = '';
}


That doesn't work, by the time the submit runs, there is nothing left to
submit (or was that the intention?).

Try:

function hideTheBody()
{
bodyNode = document.body? document.body : document.docume ntElement;
if (bodyNode.style ){
bodyNode.style. display = 'none';
}
}

However, it seems like a very bad idea - why not just write 'The form is
being submitted' or similar to the page in a faux message dialog?.

--
Rob
Oct 4 '05 #6
charlie_M wrote:
Is there a way to blank the screen in a FORM's onsubmit=... to blank
the screen for the user??

I asked this before and got a way to blank a table by id with

"document.getEl ementById('tabi d').style.displ ay='none';" in the onclick
event and setting the encapsulating table's ID to 'tabid'.

I was wondering if this or some other similar approach that could
possibly be planted globally in my pages in the onsubmit validation
sequence ????


If you have some sort of global onsubmit function , you most certainly
could blank the screen or just about anything else.

I would broabably not choose display:none , as it confuses some browsers
as relates to the content of the container becomming not only invisible,
but occasionally inacessible to script. perhaps if you simply take the
div with the form in it and adjust the left or top to a location that is
-x and/or -y enough to be off screen.
--
--.
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=-- C++,HTML, CSS,Javascript
--=<> Internet Programming since 1994 <>=-- DHTML NSAPI TCP/IP
--=<> http://resume.drclue.net <>=-- AJAX, SOAP, XML, HTTP
--=<> http://www.drclue.net <>=-- SERVLETS,TCP/IP, SQL
--.
Oct 4 '05 #7
Dr Clue wrote:
charlie_M wrote:
Is there a way to blank the screen in a FORM's onsubmit=... to blank
the screen for the user??

I asked this before and got a way to blank a table by id with

"document.getEl ementById('tabi d').style.displ ay='none';" in the onclick
event and setting the encapsulating table's ID to 'tabid'.

I was wondering if this or some other similar approach that could
possibly be planted globally in my pages in the onsubmit validation
sequence ????

If you have some sort of global onsubmit function , you most certainly
could blank the screen or just about anything else.

I would broabably not choose display:none , as it confuses some browsers
as relates to the content of the container becomming not only invisible,
but occasionally inacessible to script. perhaps if you simply take the
div with the form in it and adjust the left or top to a location that is
-x and/or -y enough to be off screen.


The following hides just the form, but it could hide the entire body.

There are some usability issues here - what happens if the submit fails?
The user now has a blank page and must work out that they need to
refresh the page rather than navigate 'back' - how is that really any
different to learning that they should only submit once and wait?

If the submit takes a while and the page stays blank, will they hang
around or just go elsewhere and possibly screw-up whatever process they
were engaged in?

Why attempt to teach non-standard behaviour?

Anyhow:

<form ... onsubmit="hideM e(this);">

// Using a shift:
function hideMe(f)
{
f.style.positio n = 'absolute';
f.style.left = '-9000px';
}
// Using visibility:
function hideMe(f)
{
f.style.visibil ity = 'hidden';
}

--
Rob
Oct 4 '05 #8
RobG said the following on 10/3/2005 9:19 PM:
Randy Webb wrote:
charlie_M said the following on 10/3/2005 3:45 PM:
Can you nest DIVs??
Yes. What does that have to do with Javascript?
The problem and the reason I ask the original question... these pages
are written in Foxpro and there are literally hundreds of them. I am
loking for the easiest method to blank the screen when sublitted and
would favor the method that would allow trhe change be centrally
applied (like a form's onsubmit()).


If Foxpro is screwing your pages up that bad, you need a new editor.

<form onsubmit="hideT heBody()">

function hideTheBody(){
bodyNode = document.body?d ocument.body:do cument.document Element;
bodyNode.innerH TML = '';
}

That doesn't work, by the time the submit runs, there is nothing left to
submit (or was that the intention?).


<g>

I get facetious at times :)
Try:

function hideTheBody()
{
bodyNode = document.body? document.body : document.docume ntElement;
if (bodyNode.style ){
bodyNode.style. display = 'none';
}
}

However, it seems like a very bad idea - why not just write 'The form is
being submitted' or similar to the page in a faux message dialog?.


My personal preference is to let the user screw up. Nothing will teach
you quicker not to double-submit a form than trying to go through email
tech (or the phone) to try to get your money back after making that
screw up.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Oct 4 '05 #9
Randy Webb wrote:
RobG said the following on 10/3/2005 9:19 PM:
Randy Webb wrote:
[...]

If Foxpro is screwing your pages up that bad, you need a new editor.

<form onsubmit="hideT heBody()">

function hideTheBody(){
bodyNode = document.body?d ocument.body:do cument.document Element;
bodyNode.innerH TML = '';
}


That doesn't work, by the time the submit runs, there is nothing left
to submit (or was that the intention?).

<g>

I get facetious at times :)


The 'Foxpro as an editor' bit was something of a giveaway! ;-)

[...]
However, it seems like a very bad idea - why not just write 'The form
is being submitted' or similar to the page in a faux message dialog?.

My personal preference is to let the user screw up. Nothing will teach
you quicker not to double-submit a form than trying to go through email
tech (or the phone) to try to get your money back after making that
screw up.


Yes. I thought issues with multiple submits were fixed years ago on the
server. Client-side scripting is bound to fail sufficiently often that
it can only be considered a convenience some of the time for some users
and certainly not a robust solution.

I get the feeling a course somewhere has a unit on multiple submission
and some of the students have decided to come here...
--
Rob
Oct 4 '05 #10

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

Similar topics

5
1884
by: John | last post by:
Hey everyone, I keep getting multiple blank records entered along with my data everytime I submit my form. On the first page is the form itself without any code. On the 2nd page that it goes to after I hit submit is this: <?
7
3160
by: John | last post by:
How do I prevent blank data from being entered into a table? For instance, the user fills out a form, but if a field is left blank, then the entire entry won't be filled in. This isn't necessarily a form validation thing, just that if all the fields are filled, then proceed to enter data, if not then don't. Thanks in advance!
2
4252
by: www | last post by:
Hi there, I' m getting a (0x80040E2F) error, if I submit my form, with blank textboxes to my update stored procedure. The stored procedure expect values, so how can I detect if a form field was empty. I've tried testing to see if the form field is null, blank and to count the characters, but I can't get it working. My SQL table allows nulls, so it's not that. thanks in advance Charles
5
1428
by: Tim Johnson | last post by:
Howdy: I'm just learning how to use focus() and select(). I have a very large form (360+ elements). Javascript validation is launched by the 'onclick' event handler in the "submit" button tag. Problem: When the element to be validated is not on the screen - since the form is larger than the screen, then there are no visual cues to help
1
2187
by: Dave | last post by:
Hi All I'm new to php and am converting a bunch of asp pages to php. Current problem : I am using a Submit button on a form to POST ( send the database variables ) to a php page that will send a personalised e-mail to each client. On the php page,
2
4936
by: Eric | last post by:
We have a page that displays a datagrid with quite a bit of data in it. We have a few comb-boxes that we filter data on when we click the search button. I can change the combo-boxes and click the search button, but if during that time I go and look at an email or get a cup of water, I come back and click the search button I get a white screen or blank screen. I checked my session and it is still valid. If I close the page and re-open it...
2
3353
by: lmlaster | last post by:
I have 2 webs under my default web running win2003 1. A front-page intranet 2. A asp (not .net) web is fine Both allow anonomous access. My front page web always gets a BLANK Request.ServerVariables("Logon_User"). The asp web gets the logon_user OK. Both webs have a global.asa that has Sub Session_Onstart() session("logon") = Request.ServerVariables("Logon_User")
1
2444
by: Raul Elms | last post by:
Hi, I'm running Apache2 together with the php and mysql modules on an opensuse 10.1 machine. Most scripts run well, I can connect and query databases without any problems. But some well known scripts like phpMyAdmin or Nucleus fail. When accessing a database or table (I don't really know when PHP crashes) PHP just returns a blank screen (HTML source code is blank as well). For instance phpMyAdmin: With only one server configured I can...
10
20319
by: Lorie0114 | last post by:
Hello, We have an issue that I do not know how to resolve. Our website has several hundred reports. There are a handful of them that are causing issues when there is no interaction for a couple of minutes between client and web server. We are using .NET 2005, Framework 2.0 with an Oracle 9i database. Our application has several hundred reports, but only several reports have this issue; the reports with the issues do not write anything...
4
2109
by: koager | last post by:
I know there have been various questions about blank screens from php but I've looked around and they aren't helping me at all. I wrote a .php page and put it up on the hosting server but the page keeps on returning blank. I've checked that I have all my brackets and semicolons placed correctly. I've added <?php //turn on error reporting ini_set('display_errors',1); ERROR_REPORTING(E_ALL); ?>
0
9976
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...
1
10908
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
10451
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
9618
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...
1
8008
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5835
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6035
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4665
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
3267
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.