473,405 Members | 2,421 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,405 software developers and data experts.

Need Help with Else Statement

Could someone tell me the syntax for using "else' to check the value of
my txtName1 value if its not "Size Mix". If it is not size mix I want to
hide the table "Table2" and show the other controls I hid. Help
appreciated. Thanks.
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function showtable(){
var myform1 = document.form1
var myform2 = document.form2
if (myform1.txtName1.value =="Size Mix")

document.getElementById("tn3").style.visibility="h idden"
document.getElementById("but1").style.visibility=" hidden"
document.getElementById("Table2").style.visibility ="visible"

}
</SCRIPT>
</HEAD>
<BODY onLoad="showtable()";>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
1 912
Steve Bishop wrote:
Could someone tell me the syntax for using "else' to check the value of
my txtName1 value if its not "Size Mix". If it is not size mix I want to
hide the table "Table2" and show the other controls I hid. Help
appreciated. Thanks.
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function showtable(){
var myform1 = document.form1
var myform2 = document.form2
if (myform1.txtName1.value =="Size Mix")
Start by adding a { here document.getElementById("tn3").style.visibility="h idden"
document.getElementById("but1").style.visibility=" hidden"
document.getElementById("Table2").style.visibility ="visible"

} else {
// whatever you need to do here.
} </SCRIPT>
</HEAD>
<BODY onLoad="showtable()";>

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 20 '05 #2

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

Similar topics

3
by: Jason Callas | last post by:
I have a stored procedure that runs as a step in a scheduled job. For some reason the job does not seem to finish when ran from the job but does fine when run from a window in SQL Query. I know...
12
by: Roman Töngi | last post by:
In c++ there does not exist an if-statement as for example in Visual Basic, does it? //VB-analogy: if (cond.) statement; else if (cond.) statement; else statement;
27
by: C Gillespie | last post by:
Dear All, Hopefully I have a simple problem. Basically, I just want to alter some text with JS. Here is some of my test code: <snip> <script type="text/javascript"> var tmp='a';
2
by: Mike Button | last post by:
Hello all, I am really really desperate on what I should do, and I am asking for help from anyone in this newsgroup, here's the situation: I am creating a form that is being run on a server...
14
by: Brian | last post by:
#include <iostream> #include <cmath> using namespace std; int water_bill(int usage_in_cubic_meters); int main() { cout << "Enter the amount of usage in cubic meters: ";
7
by: Buck Rogers | last post by:
Hi all! Newbie here. Below is an example from Teach Yourself C in 21 Days. My apologies if it is a bit long. What I don't understand is how the "get_data" function can call the...
9
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result...
1
by: darrel | last post by:
Hi vb master i need help on this here my code: If Combo1(0) = rs.Fields("TimeStart") And Combo4(0) = rs.Fields("TimeEnd") And Combo2(0) = rs.Fields("ROOM") And Combo3(0) = rs.Fields("DAYS")...
3
by: rbjorkquist | last post by:
I am looking for some help figuring out the best way to refactor these two examples. I was thinking of using delegates and/or generics; but have little experience with either. Any sample code...
6
by: lgerhardx | last post by:
First of all, please forgive my newness to the language. I have had much experience programming...but not in C! :) I am modifying a program designed in LabWindows/CVI, which as far as I can...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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...
0
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
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,...
0
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...

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.