html, javascript

Posted on 2008-10-22
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.....
Question by:sakvk
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 22776387
Could you please post the code for your form?
LVL 12

Accepted Solution

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.


var radio = 0;
var dropdown = 0
var textbox = 0;
function update1(x)
textbox = x;
function update2(x)
radio = x;
function update3(x)
dropdown = x;
function check()
if(radio==1 && dropdown==1 && textbox==1) = "none";
<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 value="1">Option3</option>
	<option value="0">Option4</option>
	<div id="testDIV" style="width:100px;height:100px;background:red;display:block"></div>

Open in new window


Expert Comment

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

Kind regards,

Matthias Vance
LVL 12

Expert Comment

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

726 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