Solved

html, javascript

Posted on 2008-10-22
6
151 Views
Last Modified: 2012-05-05
to display data in the form........
if the first textbox has value, then the first radio button is checked and the first drop down box value is selected.....

if the textbox has a value 0 or nothing then the whole div not to be displayed.....
0
Comment
Question by:sakvk
  • 2
6 Comments
 
LVL 7

Expert Comment

by:bluV11t
ID: 22776387
Hi!
Could you please post the code for your form?
0
 
LVL 12

Accepted Solution

by:
Dean OBrien earned 500 total points
ID: 22776745
Hi Sakvk

Not entirely sure from your explanation, but i think this will do the kind of thing you are looking for.
The red DIV will disappear if you enter '1' in the text box, select radio button 'Option1', and select 'Option3' from the drop down list.

Regards
Easynow


<html>

<head>

<script>

var radio = 0;

var dropdown = 0

var textbox = 0;

function update1(x)

{

textbox = x;

check();

}

function update2(x)

{

radio = x;

check();

}

function update3(x)

{

dropdown = x;

check();

}

function check()

{

if(radio==1 && dropdown==1 && textbox==1) testDIV.style.display = "none";

}

</script>

</head>

<body>

<form method="POST" action="--WEBBOT-SELF--">

	<p><input type="text" name="T1" size="20" onblur='update1(this.value)'></p>

	<p><input type="radio" value="1" name="R1" onclick='update2(this.value)'>Option1<br><input type="radio" name="R1" value="0" onclick='update2(this.value)'>Option2</p>

	<p><select size="1" name="D1" onchange='update3(this.value)'>

	<option></option>

	<option value="1">Option3</option>

	<option value="0">Option4</option>

	</select></p>

	<div id="testDIV" style="width:100px;height:100px;background:red;display:block"></div>

</form>

</body>

</html>

Open in new window

0
 
LVL 8

Expert Comment

by:MatthiasVance
ID: 22776996
Could you please explain a bit more about what you're trying to accomplish?

Kind regards,

Matthias Vance
0
 
LVL 12

Expert Comment

by:Dean OBrien
ID: 25980019
A solution was posted, sakvk did not respond.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now