Hi,
I have been looking around for a way to apply the filter that grays out a
form or div. I found some examples but the code is pretty complex. Any
simple ways to gray that out so I can highlight another form or div?
Thanks,
Mica
PS. I looked at several of the 'easy' examples and they did not work when I
applied them. 5 2229
On May 31, 2:24 pm, "MC" <mica[removethis]@aisus.comwrote:
Hi,
I have been looking around for a way to apply the filter that grays out a
form or div. I found some examples but the code is pretty complex. Any
simple ways to gray that out so I can highlight another form or div?
Thanks,
Mica
PS. I looked at several of the 'easy' examples and they did not work when I
applied them.
Are you looking to disable the form element?
document.forms.gs2.elements.q.disabled = true;
Are you looking to send focus to another element?
document.forms.gs2.elements.someOtherInput.focus() ;
Are you looking for a visual cue that the input is not longer the
focus or that another one is the focus?
A little longer.
Peter
Peter,
For example, I have two forms in a page, if the user clicks a button on
form1, I want to 'gray' or shadow form1 and show form2. I know how do do
everything but gray the form using the alpha filter stuff.
Mica
"Peter Michaux" <pe**********@gmail.comwrote in message
news:d4**********************************@p39g2000 prm.googlegroups.com...
On May 31, 2:24 pm, "MC" <mica[removethis]@aisus.comwrote:
>Hi,
I have been looking around for a way to apply the filter that grays out a form or div. I found some examples but the code is pretty complex. Any simple ways to gray that out so I can highlight another form or div?
Thanks, Mica PS. I looked at several of the 'easy' examples and they did not work when I applied them.
Are you looking to disable the form element?
document.forms.gs2.elements.q.disabled = true;
Are you looking to send focus to another element?
document.forms.gs2.elements.someOtherInput.focus() ;
Are you looking for a visual cue that the input is not longer the
focus or that another one is the focus?
A little longer.
Peter
On May 31, 2:47 pm, "MC" <mica[removethis]@aisus.comwrote:
[posting order restored. Please don't top post on Usenet.]
"Peter Michaux" <petermich...@gmail.comwrote in message
news:d4**********************************@p39g2000 prm.googlegroups.com...
On May 31, 2:24 pm, "MC" <mica[removethis]@aisus.comwrote:
Hi,
I have been looking around for a way to apply the filter that grays out a
form or div. I found some examples but the code is pretty complex. Any
simple ways to gray that out so I can highlight another form or div?
Thanks,
Mica
PS. I looked at several of the 'easy' examples and they did not work when
I
applied them.
Are you looking to disable the form element?
document.forms.gs2.elements.q.disabled = true;
Are you looking to send focus to another element?
document.forms.gs2.elements.someOtherInput.focus() ;
Are you looking for a visual cue that the input is not longer the
focus or that another one is the focus?
A little longer.
For example, I have two forms in a page, if the user clicks a button on
form1, I want to 'gray' or shadow form1 and show form2. I know how do do
everything but gray the form using the alpha filter stuff.
If it is just the opacity stuff that is the problem then you can
insert a div over top of the form, and size it to match the size of
the form. Give the div an background colour of something like #666.
Then you can set the opacity of that div with a cross-browser
setOpacity function. All the mainstream libraries have such a function
and we are standing precariously at the precipice of yet another
discussion about the quality of these mainstream libraries. Here is a
setOpacity function I wrote quite a while ago, if you want to slice
and dice your own. http://forkjavascript.org/javascripts/fork/style.js
FORK.Style.setOpacity(overlayDiv, .5)
And the docs I wrote http://forkjavascript.org/style/docs#setOpacity
You can find quite a bit of setOpacity discussion in the group
archives from the past year. It was the focus of some discussion about
cross-browser scripting in general.
Peter
7
"Peter Michaux" <pe**********@gmail.comwrote in message
news:0a**********************************@q27g2000 prf.googlegroups.com...
On May 31, 2:47 pm, "MC" <mica[removethis]@aisus.comwrote:
[posting order restored. Please don't top post on Usenet.]
>"Peter Michaux" <petermich...@gmail.comwrote in message
news:d4**********************************@p39g200 0prm.googlegroups.com...
On May 31, 2:24 pm, "MC" <mica[removethis]@aisus.comwrote: Hi,
>I have been looking around for a way to apply the filter that grays out a form or div. I found some examples but the code is pretty complex. Any simple ways to gray that out so I can highlight another form or div?
>Thanks, Mica PS. I looked at several of the 'easy' examples and they did not work when I applied them.
Are you looking to disable the form element?
document.forms.gs2.elements.q.disabled = true;
Are you looking to send focus to another element?
document.forms.gs2.elements.someOtherInput.focus() ;
Are you looking for a visual cue that the input is not longer the
focus or that another one is the focus?
A little longer.
>For example, I have two forms in a page, if the user clicks a button on form1, I want to 'gray' or shadow form1 and show form2. I know how do do everything but gray the form using the alpha filter stuff.
If it is just the opacity stuff that is the problem then you can
insert a div over top of the form, and size it to match the size of
the form. Give the div an background colour of something like #666.
Then you can set the opacity of that div with a cross-browser
setOpacity function. All the mainstream libraries have such a function
and we are standing precariously at the precipice of yet another
discussion about the quality of these mainstream libraries. Here is a
setOpacity function I wrote quite a while ago, if you want to slice
and dice your own.
http://forkjavascript.org/javascripts/fork/style.js
FORK.Style.setOpacity(overlayDiv, .5)
And the docs I wrote
http://forkjavascript.org/style/docs#setOpacity
You can find quite a bit of setOpacity discussion in the group
archives from the past year. It was the focus of some discussion about
cross-browser scripting in general.
Peter
Peter,
We have a cross browser winner. Every place I looked for this it was buried
deep within many lines of libraries and always tied to other code not
dealing with opacity. I will be using this regularly.
THANK YOU!
Mica
MC a écrit :
>
For example, I have two forms in a page, if the user clicks a button on
form1, I want to 'gray' or shadow form1 and show form2. I know how do do
everything but gray the form using the alpha filter stuff.
<html>
<script type="text/javascript">
function grayer(formId, yesNo) {
var f = document.getElementById(formId), s, opacity;
s = f.style;
opacity = yesNo? '40' : '100';
s.opacity = s.MozOpacity = s.KhtmlOpacity = opacity/100;
s.filter = 'alpha(opacity='+opacity+')';
for(var i=0; i<f.length; i++) f[i].disabled = yesNo;
}
window.onload=function(){grayer('f_2',true);};
</script>
<style type="text/css">
form { _height: 1%; /* hack IE */
padding: 10px; background:#ff5;
}
</style>
<body>
<form id="f_1" action="#" onsubmit="return false;">
<p>test: <input name="test">
<p><button onclick="grayer('f_2',false);grayer('f_1',true);">
change form</button></p>
</form>
<form id="f_2" action="#" onsubmit="return false;">
<p>test: <input name="test">
<p><button onclick="grayer('f_2',true);grayer('f_1',false);">
change form</button></p>
</form>
</html>
--
sm This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Saqib Ali |
last post by:
Please excuse me, this is a fairly involved question that will likely
require you to save the file below to a file and open it in a browser.
I use Mozilla 1.5, so the problem I describe below...
|
by: Robert Neville |
last post by:
I would like to add filter functionality to my database whether
through the Main form or the subform. This question may be
rudimentary, yet I have not less experience with filtering data
outside...
|
by: CSDunn |
last post by:
Hello,
I have a problem with field filtering between an Access 2000 Project form
(the application is called CELDT), and the report that shows the results of
the filter. Both the form and the...
|
by: Richard |
last post by:
Hi,
I have a form based on a table. When I filter the form I want to run a
report based on the same table with the same filter as the form. No problem
until I want to filter a combo box where...
|
by: Dino M. Buljubasic |
last post by:
I'd like to check if a form is already open before opening it and if it is
not, then open it, otherwise just make it the active form.
How can I do that?
Regards,
Dino
--
|
by: Colin McGuire |
last post by:
Hi again, thanks everyone for your previous help. But having resolved
past problems, I'm moving on to new problems :(
This one is a simple winforms application with two buttons, named
Button1...
|
by: Colin McGuire |
last post by:
Hi - this was posted last weekend and unfortunately not resolved. The
solutions that were posted almost worked but after another 5 days of
working on the code everynight, I am not further ahead....
|
by: scubak1w1 |
last post by:
Hello,
I posted this in the HTML forum, but it was suggested I post it over here as well by a moderator.
I have a form that will not 'fire' in non-IE browsers?? I have poked and poked at the code...
|
by: MC |
last post by:
Hi,
I have been looking around for a way to apply the filter that grays out a
form or div. I found some examples but the code is pretty complex. Any
simple ways to gray that out so I can...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |