A Textfield Appears After An Option Is Chosen At The Dropdown Menu?
Nov 3, 2009
i'm currently designing a dropdown menu that can create a textfield or another dropdown menu based on the option from the first menu. is it possible to create this out of javascript?
Code:
<select name="dropdownMenu" id="dropdownMenu">
<option value="textfield">Show Textfield</option>
<option value="dropdown">Show Dropdown</option>
</select>
View 3 Replies
ADVERTISEMENT
Jun 27, 2010
On a drop down list, on click of an option an input textfield appears. e.g.
echo "<select>
<option>What is your opinion on</option>
</select>";
echo "<div id='pop'><input type='hidden' id='opinion' size='20' name='opinion' value='Type Keyword Here' /></div>";
i want it to be hidden and then appear on click of the option in the dropdown list.
View 4 Replies
View Related
Jun 5, 2007
I have a html form with two drop down menu's. Now what i need is if some one selects a certain option in the first drop down menu then it will show the second one, Otherwise it stays hidden.
View 2 Replies
View Related
Aug 31, 2005
Basically i am doing a form which allows the user to input the office branches for this company. The user can input up to a maxi of 10 branches' details like location and tel.
the form details for each branch looks like this
<tr>
<td align="left">Location/font></td>
<td align="left"><input id="location" name="location" size="20"></td>
</tr>
<tr>
<td align="left">Tel/font></td>
<td align="left"><input id="tel" name="tel" size="20"></td>
</tr>
I would want a dropdown menu which allows the user to select 1 to 10 offices and with that the immediate appearance of the number of branches after the user has made the selection.
Another possible way is a link which allows the user to add another branch and keeps adding till a maximum of 10.
View 1 Replies
View Related
Sep 16, 2010
I have an select option list, each option has a numerical id, value and text. Each option has an array of its own. So when I choose an option from this list, I want to insert the options array into another option list with an id, value and text. Whats the best way of doing this? How do I select an array based on the value or text of a select option? For for example, take a list of car makes. If I choose the make Audi, how do I select the array of Audi models and insert these models into another select option list. All makes and models have their own numerical id, value and text.
View 9 Replies
View Related
Oct 19, 2007
How can I disable an option in a drop-down menu? Specifically, I want
to disable the option "Bouncy Castles". I want to display it, I just
want the user to be able to select it. As well, how can I remove the
indentation?
View 1 Replies
View Related
Jan 30, 2009
Basically, I have written an application that runs a report based on a certain amount of parameters, one of which being date. So, the date selection is a <select></select> dropdown menu and it has the usual in it, today, yesterday, this week, last week etc. The problem is I need it to have a 'Custom' selection to run reports for custom dates. When 'Custom' is selected in the dropdown menu, two text boxes appear underneath with YYYY-MM-DD watermarked in them. I have assembled enough code from around the web to get this to work and it works fine, the problem I have is that when the user clicks off the 'Custom' option and on to a different one, I need the textboxes to disappear again.
Here is the code I am using:
<script type="text/javascript">
function showhide(divid){
thediv = document.getElementById(divid);
if(thediv.style.display== 'none' ){
thediv.style.display='block'
}else{
thediv.style.display='none'
}} .....
View 3 Replies
View Related
Aug 5, 2010
cna anyone tell me how to use the Select = "selected" option for a simple dropdown. for example when someone chooses c it will have a code like <option selected="">c</option> (am I doing it right, well if you got a firebug some site with dropdowns offers that option) so can anyone tell me how that works. I will be using it for a purpose of just selecting parts on my array, well incorporating it
<html>
<body>
<select>
[code]....
View 2 Replies
View Related
Oct 10, 2011
I'm using a bit of Javascript to display content based on the dropdown selection:http://jsfiddle.net/mcgarriers/wjLXk/However, I would like it when the user selects "show two" that it shows the 2 div elements rather than specifically div2.And for "show three" it would show all 3 divs.
View 2 Replies
View Related
Apr 14, 2009
I need a script that when an option is selected in a drop-down box (select tag) an input tag appears and I am still pretty basic at javascript.
I was using a script that worked fine but because the variable of the option that makes the script go required the "|" character, it interfered with a PHP script in my document and screwed everything up.
View 3 Replies
View Related
Mar 9, 2009
I am building a form with ColdFusion, HTML, and will be using some Javascript, and I wnt the javascript to tell one form object to display itself when a certain option is chosen from a <select> tag.
<cfquery name="getCategories" datasource="#mydatasource#" username="#myusername#" password="#mypassword#">
SELECT * FROM categories WHERE type = 'cat' ORDER BY id
</cfquery>
<cfform action="engine.cfm" method="post" format="html">
<table cellpadding="0" cellspacing="0">
<tr><th colspan="2">New Category</th>
</tr><tr>
<td>Category Type:</td>
<td><select name="type">
<option value=" "></option>
<option value="cat">Main Category</option>
<option value="sub">Sub Category</option>
</select></td></tr>
<tr><td>Name:</td>
<td><cfinput type="text" name="title" size="20" maxlength="100" required="yes" message="A name for the category is required.">
</td></tr>
<tr><td>Parent Category:</td><td>
<cfselect enabled="Yes" name="parentcat" multiple="no" query="getCategories" value="id" display="title" queryPosition="below">
<option value=" "></option></cfselect>
</td></tr><tr>
<td colspan="2"><cfinput type="submit" name="submit" value="Submit" validate="submitonce" validateat="onserver,onsubmit"></td>
</tr></table></cfform>
I want the <cfselect> tag to display on if Sub Category is selected on the first <select> tag. I expect that it will use the onchange attribute but other than that I have no idea.
View 2 Replies
View Related
Sep 5, 2009
I want to know how I can update my power_points field if a select option is chosen.
View 6 Replies
View Related
Feb 26, 2011
In my code, I have the following snippet:
HTML Code:
I want to know how I could direct the user to a html document based upon which option I have chosen in the list (see above). So for example...
If I have chosen '1' in the list (see above), then when I submit the form, I will be directed to a page detailing information related to option '1'. If I have chosen '2' in the list (see above), then when I submit the form, I will be directed to a page detailing information related to option '2' etc.
View 1 Replies
View Related
Jul 21, 2010
I am working in ASP.NET 4.0 anduse IE8, Firefoxand Chrome for testing. Inside the web page I have a textbox and a drop down with 5 items. If the 4th item is chosen I want the textbox to become a datepicker.
Here is my best attempt thus far.
$(document).ready(
function () {
$(
"#txtSearch").focus(function () {
if ($("#ddlSearch").attr("selectedindex") == 4) {
$("#txtSearch").datepick("enable");
} else {
$("#txtSearch").datepick("disable") .....
View 3 Replies
View Related
Sep 24, 2010
I am currently looking to create a JavaScript menu for a website I am working on. It currently expands and collapses on click. The code in question is pasted below:-
menu_status = new Array();
function showHide(theid){
if (document.getElementById) {
var switch_id = document.getElementById(theid);
[Code]....
As you can see, it basically shows and hides the menu (when clicked). I want it to open the menu when clicked and close when another menu is opened. I have looked and have not been able to find a solution into it. Ideally I donot want it to be a long piece of code as I do have a working menu but with many more lines of JavaScript than the one I have posted.
View 6 Replies
View Related
Feb 11, 2009
What I'm trying to do is auto populate the foreign key with help of dropdown box that contains names of clients so if i select a name from dropdown box a textfield above should populate with it's ID(primary key).
Code:
<td>Client ID : </td>
<td><input type="text" id="cl_id" name="cl_id" value="<?
$query = "SELECT * FROM client ";[code]......
View 7 Replies
View Related
Jul 9, 2009
I can't figure out why it dosen't work. I'd like to show/hide a <p> block depending on the value selected in the dropdown list:
$(document).ready(function(){
$('#report_rep_type').change(function(){
$('#report_rep_type').change(function(){
if($(this).text()!= 'Contigency Liabilities/Others')
$('#someElement').hide();
else
$('#someElement').show();
});
});
});
HTML code:
<form action="my action>
<fieldset>
<legend>Report details</legend>
<p>
<label for="report_rep_type">Report type</label><br />
<select id="report_rep_type" name="report[rep_type]"><option value="">Please select</option>
<option value="Scientific & Technical">Scientific & Technical</option>
<option value="Financial">Financial</option> .....
<p>
<button class="button " type="submit"><img alt="Tick" src="/images/silk/icons/tick.png?1245400388" /> Create</button>
</p>
</form>
View 7 Replies
View Related
Apr 11, 2011
Have you ever used google? If we typed somewords into it, then google would eventually appeared the suggestion words.... I wonder, if we use jquery or javascript manually, how to create the dropdown menu on that textfield? I mean, ya, how to create the suggestion list menu on that textfield....? since the plugin that jquery ~autocomplete has worked well but, I need some adjustment that not just receiving 1 type of values.
Let say;
If we have these table on mysql;
Code:
Then... so suppose I want to do ajax request that retrieves names & id(s) and extract it into two different elements;
1) textfield suggestion menu (name).
2) another html element (id).
View 4 Replies
View Related
Feb 11, 2010
Is there an easy way of creating one file with the website menu code that is used on each page of a website?
At present I use frames which work well except search engines don't direct through the frameset so only the content is loaded not the menu.
View 2 Replies
View Related
Dec 3, 2011
I want to use a drop down menu and found a horizontal example from John Resig. But I want to turn it into a vertical menu. How can I do that?
View 2 Replies
View Related
Jul 24, 2010
I have a project where I need a selection of one dropdown menu may affect the select of multiple other dropdown menus on the same page.First, a table is generated, and within each row, it contains a dropdown menu. Assume: Rows A, B, C, etc..., and Dropdown selection: 1, 2, & 3If dropdown in Row A selects 2, then I want the selection of dropdowns in rows B & C to dynamically change to 2.And if in Row C user selects 3, then the selection in dropdowns in rows A & B should dynamically change to 3.
View 1 Replies
View Related
Aug 18, 2009
So I have some custom images as the background to my menu images, however I also have the text showing too, as can be seen here: [URL] How do I delete the text, so that just the image is showing. I have tried looking in all the php files, html files etc etc, even using windows grep to search for the files. However I cannot find them at all!
View 2 Replies
View Related
Aug 25, 2011
What I'm trying to achieve is that when I select the "other..." value, that �field? change �onchange? to a text field in order to let the user to input his custom color manually.This is the classic list/menu:
Code:
<form method="post" action="example.php">
<span id="spryselect1">
<label for="colors"></label>
[code]...
View 2 Replies
View Related
May 25, 2011
I created a page using jquery to display library resources, based on subject area:Everything seems to work find in Firefox; in IE, however, on page load, there is a brief moment when the items that should be hidden appears briefly, then disappears...does anyone know why this would happen?Here is my code:
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript">
[code]....
View 1 Replies
View Related
Oct 11, 2011
I want an icon in my template that, when you click on that certain icon (image), a drop down menu appears. You know when you click the file option in your browser's toolbar, and a drop down menu appears? It can be just like that, but instead of save as and open, links will be there to places within our intranet opened in a new window. This has to work for IEX 7+ because that's all our company decides to use. I tried to submit a chang erequest for them to move to a better CSS/Javascript supportive browser such as Opera, Firefox, Google Chrome... but they're way too fixed on IEX for some odd reason.*edit* colors dont matter. It can be the default colors used in a basic drop down menu. I figure javascript would have more options though.
View 4 Replies
View Related
Jan 19, 2006
I am new to JavaScript and would really appreciate any help to solve my
problem.
I am using the blow code in my form to validate form fields. What I
would like to accomplish is that if when the list/menu (attribute6)
value is "Ja" then to make the TextField Pas Nr (attribute4)
required. And if when the list/menu (attribute6) value is "Nee" to
make the TextField Pas Nr (attribute4) not required.
I have tried to adjust the code with no success. I give up and hope
that someone can help me to the right direction! ....
View 1 Replies
View Related