Greyout A Selection Box

Sep 5, 2005

I have 3 drop downs for day/month/year ,this basically is for when some
text entered into a textarea is entered expires

However there will be some text that will never expire,so I would like to
place a radio or even a check box that says "never expires", however
when this is ticked I would like the 3 selects for day/month/year to be greyed out, so that they cannot be selected. Is that possible.?

View 22 Replies


ADVERTISEMENT

Greyout Specific Dates In Popup Calendar?

Dec 22, 2009

I have 2 different pages. one is where i will set the generic settings for golf course. the other is a reservations page which provides an option to add new reservation page. Now in the settings page i can set no of days to 1 thru 5. it will be inserted into config table in database. Based on this, on reservation page, i need to show only 1 or 2 or 5 days on the popup calendar starting from today which allows to select one while making new reservation.based on the setting if i can prepopulate those dates in a drop down list on the addreservation.php

View 5 Replies View Related

Date Selection

Jul 23, 2005

How can i create a date drop menu that automatically have today's date
selected?

View 2 Replies View Related

Document.selection

Jul 23, 2005

function spawn(ev){
var oSelect = ''
var oFlag = false;
if (ns4 || ns6)
oSelect = document.getSelection();
else if (ie4 || ie5){
if (!ev)
ev = window.event;
oFlag = true;
oSelect = document.selection;
}
alert(oSelect.type);
}
if (oSelect == '')
return;
else{
//stuff
}

In Netscape 4.8 if text is not selected nothing happens which is what I want. Please
disregard the fact that oSelect.type is not Netscape compatible you are really
seeing only a partial of what I am doing.

The issue here comes from this page: Code:

View 5 Replies View Related

Selection Object

Jul 23, 2005

I am trying to achieve in Netscape what I can achieve in IE by
document.selection.empty(). This will remove the highlighting created by
Ctrl A or by dragging over text on a page. I can access the selection object
in NS using window.getSelection() but I have not found any way to clear it
so as to remove the highlighting. I have tried the collapse() method but
that does not do it.

View 3 Replies View Related

One Checkbox Selection

Dec 26, 2006

I have 3 checkboxes but the user should select just one. How to block multiple checkbox selection ?

View 1 Replies View Related

Listbox Selection

Mar 27, 2006

I wrote the following code. So when the user presses the button it should select the second item in the list box. Would someone mind helping me fix this code so it works? Code:

View 1 Replies View Related

Copy Same Selection On One To Another

Feb 24, 2011

I have this in query:

That works fine for input:text boxes but doesnt work for dropdown menus.

How to i have the state dropdown to be the same for the other.

View 8 Replies View Related

Picture Selection

Mar 5, 2004

if i have a picture 300x300 px on-line!!!

is there a way to select a piece of that picture where i want like 120x200 and that that piece is showed into new window!!

something like photoshop when i select with the mask!!!
suggestions?

View 5 Replies View Related

Menu Selection

Jun 22, 2004

how i can create the list of menu that when we want to select certain item instead of we must select manually....mayb u all dont understand...ok like this, i want to select item 'cow' in list of cat, dog, cow, deer n etc...so when i press 'c' then the item cat n cow will appear, but i dont want be like that....but i want when i press 'c' the menu list appear as usual then when i press for the 2cd time, i press 'a' only cat will appear in the option list.

View 1 Replies View Related

Blocking Selection

Jul 4, 2005

I want to know is it possible to block user from selecting any text displayed on a webpage? What I want is to block user from selecting anything by mouse drag.

View 5 Replies View Related

Refer To A Selection Box

Mar 17, 2009

I have to add a selection box in my assignment, but I don't know how to refer to it in the javascript.

Here is the javascript code I am trying to refer to the selection box with that doesn't work [code]...

View 7 Replies View Related

How Do I Copy One Drop Down Selection To Another ...

Jul 23, 2005

I am trying to set the value of one drop down select box to the value of another drop down select box. I have the following in a function.

document.formname.boxto.options[document.formname.boxto.selectedindex].v
alue =
document.formname.boxfrom.options[document.formname.boxfrom.selectedinde
x].value;

but I need to change the above line to allow the 4 references to "boxto" and "boxfrom" to be dynamic so their values can be passed to the function each time. Any ideas?

View 5 Replies View Related

Enclose Selection With Html?

Jul 23, 2005

I am looking for a working replacement
of the following function for Mozilla (this was written for IE):

// encloses the selected area into starting and closing tag
// if no closing tag is given the starting tag will replace the selection
function encloseSelection(startingTag, closingTag)
{
editRange = editArea.document.selection.createRange();

if (closingTag) {
editRange.pasteHTML(startingTag+editRange.htmlText +closingTag);
return;
}

//editRange.collapse(false); // move insertion point to end of text range (append tag)
editRange.pasteHTML(startingTag); // replace selection with startingTag
}

Longer version:
I am working on making an older "WYSIWYMG"-editor (written for IE)
Mozilla-compatible. Everything works fine so far, but I am not able
to figure out a solution to the above problem.

I'd like to enclose a selected text in one of the famous
"designMode=on" iframes with HTML-strings. I've tried numerous
ways - by now without luck.

View 6 Replies View Related

Creating Drop Down Selection Box On The Fly

Jul 23, 2005

I would like to create a box with the same behavior as the "To" field
in the gmail "Compose Email" page.

That is a simple text box but when you start typing it will suddently
show a list of all the e-mails (for our purpose any string would do) in my address
book that have the given substring in it.

E.g. if I type in "ga" I get all the e-mails where the "ga" substing
shows up.

Then I can select from the list and press enter on the requested
address or I can keep typing if the address is not in the list yet.

View 2 Replies View Related

Document.selection.empty()

Aug 5, 2005

Is there a way to achieve in Firefox (and other browsers) what I achieve in
IE6 with the document.selection.empty()? I want to be able to empty the
selection every time the user clicks a certain area, thus making it
impossible to select any text in that area. Is there a way to clear the
text selection in Firefox?

View 3 Replies View Related

Changing The Url Of An Iframe With A Selection Box

Mar 29, 2006

I have been wrestling with a problem, I am trying to change the url of
an Iframe from a simple selection box, once the user selects the
desired url they wish to visit from the main page the iframe then loads
the url while not affecting the main page. I am using the onchange
event of the select tag to drive the javascript function hopefully
passing the value of the selection wich in this case is the url to the
independant script wich will in turn will change the src of the iframe
from the default page that is loaded when first viewing the page.One
question I have is would it be better to use the onload event to set
the initial src then use the onchange event form the select to change
the src or staticly set the src then use the onchange event to change
it? below is an example of my code so far. Also currently whenever I
try to pass teh value to the script I get an object expected error and
nothing happens.Bear in mind I know enough C++ to make myself dangerous
and can stay on top javascript to a point but right now I am just lost.
just need a nudge in the right direction at this point please :D

<select name="sites" id="sites" onchange="changesite()">
<option value=" "> </option>
<option value="http://www.nanpa.org">NANPA.org</option>
<option value="http://www.google.com">Google.com</option>
<option
value="http://www.spywarewarrior.com">spywarewarrior.com</option>
</select>

Function changesite(value)
{
var newsite = value;
document.frames['websites'].src = newsite;
}

View 3 Replies View Related

Scrolling In Textarea To Selection In FF

May 31, 2006

I wrote a simple search function to find text in a textarea where not
all the text is visible (ie. the text box displays 10 lines but there
may be more than 1000 lines to search). I can find the text and select
it using the function below, BUT I can't figure out how to have the
textarea automatically scroll to the selection in Firefox. Any ideas or
suggestions?

function search(needle,haystack,start) {
var element = document.getElementById(haystack);
index = element.value.indexOf(needle,start);
element.setSelectionRange(index, index+needle.length);
}

View 4 Replies View Related

On Change Event And Selection

Aug 21, 2006

I am trying to but a function together whereby the user max a selection
and the selection appears in a box on the screen:


function goThere(){
var list = document.forms[0].toy1;
location.href=list.options[list.selectedIndex.value];
}
<select name=toy1 id=toy1 onchange="goThere(this);>
<option1. .....

<select name=toy2 id=toy2 onchange="goThere(this);>
<options>.....

for some reason it isn't working. Could someone steer me in the right
direction.

View 9 Replies View Related

Determine User Selection

Jul 12, 2007

I am trying to pass the slection made by a user to a javscript
function using the onchange event. The problem is I can get the index
but not the actual value. As my list is variable (dependent on a db)
I cannot hard code to a static index. I either need a way to
determine the number of items in a select control or a way to
determine the actual selection made by the user.

Can anyone enlighten me as to the code to determine what option the
user selects?

View 3 Replies View Related

2 Selection Lists In A Web Form

Jul 20, 2005

I found a web page with 2 selection lists in a form. The contents of
the second selection list are updated based on the entry in the first
selection list. For example:

if the first selection list has all the states in the USA, the second
list will display all the major cities in the selected state.

View 1 Replies View Related

Multiple Selection Values

Jul 20, 2005

I am trying to retrieve selected values from a multiple select object on a page:

*** Selection Page ***

<form name="theForm">
<select name="numbers" MULITPLE>
<option value="1">One</option>
<option value="2">Two</option>
<option value="2">Three</option>
</select>
</form>

What I want to do is to pass the selected values from "Selection page" to its parent window. Right now, I pass the values by doing this (in JavaScript):

window.opener.parentForm.num.value = document.theForm.numbers.value;

I'm assuming if mulitple selections are made (lets say One and Two are selected), document.theForm.numbers.value will be a collection of the selected option values. Is this correct?

If so, how can I retrieve each option value when coding parent window?

View 1 Replies View Related

Document.selection.createRange();

Jul 20, 2005

Is there a NS7, Opera7 or Mozilla equivalent for:

document.selection.createRange();

View 1 Replies View Related

JQuery :: How To Change Selection

Feb 18, 2010

I would like to change selection of

[Code]...

is it possible? I try with this: $('id_select').val(4); // but with no results, I can read the value from select with val, but I can not to set it? How to do it?

View 1 Replies View Related

JQuery :: Move Selection From One Box To Another Box?

Jun 10, 2009

I'm looking to create a screen where there's a box on the left and a box on the right. The left box contains names which can be moved to the box on the right. Between the two boxes will be two buttons, one labeled ">>" to move from left to right and the other labeled "<<" to move from the right to the left.

I've seen this many times but need to create one myself. At first I was thinking of using selection lists with a size of 20 to give it height and also set the width. Then, when a selection is highlighted, the user can click the buttons in the middle to move the selection from one box to the other. Using a selection list gives me access to each individual selection and on the click of the button, I can remove that selection from one list and append it to the other. The problem with this approach is that the grayed out scrollbar is visible. So, I was thinking of using a textarea and that is what brought me here. Does anyone know of such a tool before I try reinventing it?

View 1 Replies View Related

JQuery :: Using A Selector On A Selection?

Jan 27, 2011

I started with jQuery a few days ago and rushed into a principal question. Is it possible to use a selector on a result of a selction made before?

code example (which will not work at all, just try to make clear what I want to achieve):

$(".row").$(".idCell") // in the row result the class idCell is unique

Is it possible to to something like this at all and if yes, how is it done?

What I want exactly to do is that if the user double-clicks on a row I want to return the content of the first cell in order to load another form with data according the selected id.

btw, as a last resort I could manually scan the .html() output of $(.row) but I still believe, that the developers of jQuery thought about this problem and there is a more elegant way to accomplish the task.

View 4 Replies View Related







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