Disabling A Text Field Depending On 2 Options?

Aug 30, 2011

Not 100% sure why or how to make this work.I have 5 options in a select drop-down. Only two of them are to disable a text field. I have written it successfully to disable on one option. How would I add the second option? I have tried many different ways, and i know its something small that i am missing.Below is the code that does not work but shows the 2 options that disable my text field.

<script type="text/javascript">
function type_disable() {
var qr_type = document.getElementById('qr_type');

[code]....

View 3 Replies


ADVERTISEMENT

Disabling/Enabling A Text Field If...

Apr 3, 2002

In forms, we have all seen where people have numerous options to choose from in a SELECT field, or they can select Other, and type something in a different text field.

I would like to be able to disable this Other text field if the SELECT isn't on Other.

I know how to disable the submit button, but I don't know how, or even if, you can disable/enable a specific text field.

View 2 Replies View Related

Disabling Copy / Paste In Password Text Field?

Jan 9, 2009

I have a password text field, where copy paste from anywhere must be disabled. I have a textarea where the user must be limited to enter only 250 characters.
<textarea name="description" id="description" maxlength="250" rows="4" dojoType="dijit.form.SimpleTextarea" style="width:200px;overflow:auto;word-wrap:break-word;">${fn:trim(status.value)}

View 1 Replies View Related

Disabling Copy And Paste In Text Box / Area Field?

Oct 13, 2005

Is it possible to disable copy and paste property in text box and text area field.

View 5 Replies View Related

Add Values Of Drop Down Menu Options And Output A Total To A Text Field

Apr 29, 2009

I have two drop down menus. I want two values to be added based on what they picked and then outputted to a text field to show a grand total in a dollar amount.

This is what I have:

Code:

Code:

Note I haven't did any type of code for the 2nd drop down menu just in case anybody says I don't see anything. I was working on trying to get started in the right direction.

View 1 Replies View Related

Combo Options Disabling

Mar 3, 2005

How do I disable some options in a combo box in IE? on mozilla I did like:

document.frmEnvio.formaImplantacao.options[0].disabled = true;

but in IE nothing happens? anyone?

View 1 Replies View Related

Javascript Changing The Options Of The Second Select Box Depending On The First

Oct 17, 2007

I have two text boxes one with months in "January, Febuary..." but as not every month has the same ammount of days i need the second select box to change to instead of having options 1-30 it has 1-28 or what ever depending on what month is selected.

View 1 Replies View Related

JQuery :: Validate One Field Depending On Another Field Value

May 1, 2010

I am new in jquery and learning it.I am going to make a form validation where if the radio button is checked then the form validation will take place in particular one field ie file field and all other fields will be validated normally. Here is my code:

[Code]....

View 12 Replies View Related

OnClick Adds Text Field To Page (Limit 3 - Each Text Field Displays Different Text)

Nov 22, 2010

I have a text field (field1) already displayed on the HTML page. However, there's a link where you can add additional text fields to the page as well. When the link is clicked, the second text field is added successfully (field2), and when the link is clicked again, the third text field (field3) is added successfully. However, the third field does not add itself to the page, and the text for anything greater than a third field also isn't displayed after. This obviously means that my "fields" variable is not working right

<script language="javascript">
fields = 1;
function addMore() {
if (fields = 1) {
document.getElementById('addedMore').innerHTML = "<input type='text' name='field2' size='25' /> <span>Field 2.</span>";
[Code]....

View 2 Replies View Related

JQuery :: Selection Field + Disabling Fields

Mar 18, 2011

The purpose of the jQuery code is that when you select an item from the select field that other items need to be disabled(works correct in all conditions) and that at the same time text in corresponding divs' text are altered. The thing is that the script basically works.. however when you've made a selection only the disabling works everytime but the divs are only updated once, so you need to refresh the page if you want to do it again..

[Code]...

View 1 Replies View Related

Selection Html Field And Disabling Stuff

Mar 18, 2011

Got some problems with a php script that outputs a jQuery script.
The purpose of the jQuery code is that when you select an item from the select field that other items need to be disabled(works correct in all conditions) and that at the same time text in corresponding divs' text are altered.The thing is that the script basically works.. however when you've made a selection only the disabling works everytime but the divs are only updated once, so you need to refresh the page if you want to do it again..[code]

View 1 Replies View Related

Show One Image Or Another Depending On The Value Of A Field?

Apr 23, 2010

I have a page that is displaying all the field values for an object. On that page, I want to display one image if the value of the field Reports_to is Jim, and another image if the value of the field Reports to is Bill. I've tried the following.

<script language = javascript>
var reportsto = document.getField('field_reports_to').value;
if (reportsto == �Jim�)

[code]....

View 6 Replies View Related

Change Background Picture Depending On A Drop Down Field Selection?

May 19, 2010

I need to achieve two things upon making a selection from a drop down field:

1) Changing the background picture of a cell.

2) Changing the size of a uploaded foreground picture within the same cell. code...

View 4 Replies View Related

Jquery :: Using Select Form Field With Various Options

Apr 26, 2009

I'm not sure if my term usage is correct, but using a select form field with various options. I would like that when an option is selected, a php query is performed, and the rest of the form is updated according to the selection based query.

View 2 Replies View Related

JQuery :: Variable Validation Rules For Same Input Field Depending On Other Fields

May 30, 2009

I have the following html, field xxx requires a number from 0 to 100 when percentage is selected, and 0 to inifinity when dollar is selected.what's the best practice to setup validation for this?the key is to control the maximum value.I have tried depends expression in a max rule, but it doesn't seem that it can satisfy my requirement.

View 1 Replies View Related

JQuery :: Disabling A Text Box With 1.6.2?

Aug 16, 2011

I am unable to disable a text box when a form loads. It worked before with attr() instead of prop() in earlier versions, now with 1.6.2, it does not work.

This is my code

<HTML>
<HEAD>
<script type="text/javascript">
$(document).ready(function()

[Code]....

View 1 Replies View Related

Disabling Highlighting Of Text

Dec 22, 2010

The first page with the menu works just fine, but when you go to any of the other pages it won't let you highlight the text to copy and paste - in certain circumstances. It works fine on my home computer which is running Windows XP. I've been able to work with it in all browsers. On Windows Vista and Windows 7 there are issues. The only real difference is the previous/next page menu and the switch div script which is written in Javascript. This is the only thing I can think that's interfering. I've only tested Internet Explorer and Chrome in Vista (don't know about Chrome in 7) but it inhibits in both browsers.

Might there be any work arounds? On 14.html which is the Index (as in book, not the main web page) the switch div is gone but it's still not working. However, I tested just the switch div script on another web-site without the previous/next page menu and that also doesn't work.

[Code]...

View 1 Replies View Related

Disabling Text Select In Event?

Jun 19, 2009

The following function works fine provided you call it from the body's onLoad property.

Code:

function disableSelection(target){alert('in');
//disable text selection if drag in progress so we don't highlight text while dragging panels over other panels
if (typeof target.onselectstart!="undefined") //IE route

[code]...

I put an alert inside the disable function and it DOES hit it onload, but you can still select text on the page.

View 5 Replies View Related

Form Text Field/SUBMIT Links To Onsite URL - On Home Page - Text Field And Submit Button ?

Feb 22, 2009

I have a website containing 26 subdirectories 'a' to 'z'

On the home page I want a text field and submit button

If someone for example types 'j' it will go to the 'j' folder home page

Does anyone know where I might find code like this?

View 1 Replies View Related

Data Application: Disabling Text Select In Opera

Nov 16, 2006

I am creating a data application where users must be able to select table rows to perform actions on it... Think in terms of Yahoo Mail. I have written a script to select clicked rows and to deselect them when clicked again. I also added shift button functionality and 'escape' to deselect all.

However my problem arise with my click and drag to select multiple rows. It works fine in FF and IE, I have managed to disable text select in these browsers because it looks awry, but have not managed to achieve the same effect in Opera. Code:

View 12 Replies View Related

Change Text Depending On Condition?

Mar 10, 2009

I have the following code that I use to loop though records in my database and display the text. For each record I look through the text for a certain piece of text and then split the content it is found. So for example if the database contained a field with the data "this is some text [splithere] this is some more text" then the first part (this is some text) would be displayed and then a more button would be shown. If the user clicked the more button then the rest of the content (this is some more text) would also be shown.

At the moment the more button is always shown, even if the [splithere] text was not found. What I'd like to do is only show the more button where necessary. I'd also like to change the text from 'more' to 'hide' when the button has been clicked and the additional content is being shown as when they click the link again the text is in fact hidden and so saying 'more' doesn't make any sense.

Here is the code I use code...

View 14 Replies View Related

Set Button Width Depending On The Length Of Text Value?

Jan 11, 2010

I have button with no width specified. The text value of the button differs, so i left it with no width.

It automatically sets the width but the problem is it to wide with about 5 spaces on each side of text letting the button look stupid.

I thought of working out the Text in a javascript function then set the length of the button.

<input id="{Description}" type="button" value="{Description}" onclick="{@name}.click(); style="background-color: #f9f9f9; height: 23px;"></input>

View 2 Replies View Related

Change Text Within Paragraph Depending On Radio Button?

Mar 23, 2011

I have an electronics site on which I have a code generator. Im an stuck on how to acheive something.

I will simplify what I want to do, so I can then adapt it to my code. I have a paragraph of text on the web page, on which I want to change some words with in the paragraph depending on 2 radio buttons.

Example (radio buttons & short paragraph):

(Radio Button) Apples (checked) (Radio Button) Bananas "Welcome to jakes fruit shop. You have selected apples today" (apples being the word that would change if the banana radio button is checked)

Here is the code generator if your interested. [URL] What I actually want to do is put other 'fixed' text in the input text area (near botton of page) with only the config line changing.

And If I can be shown how to do the short example above, i think I will be able to edit my generator and get it to do what i want it to do.

View 6 Replies View Related

Changing Text Depending On Section Of Content Area

Jun 11, 2010

This is what I want to achieve: a fixed positioned div next to my content area where the text changes depending on the section of the content area the user is reading. Can this be achieved, and how?

View 9 Replies View Related

Show Text In Same Area Depending On Which Link Is Clicked

Mar 30, 2004

I want to have several text links (not buttons) on a page and when someone clicks a link text appears explaining the link. If they click on a different link the text is replaced with the new text.

View 4 Replies View Related

Require Text Field Only If Another Text Field Is Not Blank

Oct 10, 2007

I am trying to create a javascript form validation that will make a text field be required only if a previous text field is populated. If the first text field is blank, then the second field can be blank as well.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved