473,569 Members | 3,063 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form Gray Filter

MC
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.

May 31 '08 #1
5 2243
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.so meOtherInput.fo cus();
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
May 31 '08 #2
MC
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**********@g mail.comwrote in message
news:d4******** *************** ***********@p39 g2000prm.google groups.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.so meOtherInput.fo cus();
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

May 31 '08 #3
On May 31, 2:47 pm, "MC" <mica[removethis]@aisus.comwrote :

[posting order restored. Please don't top post on Usenet.]
"Peter Michaux" <petermich...@g mail.comwrote in message

news:d4******** *************** ***********@p39 g2000prm.google groups.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.so meOtherInput.fo cus();
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.setO pacity(overlayD iv, .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
May 31 '08 #4
MC
7
"Peter Michaux" <pe**********@g mail.comwrote in message
news:0a******** *************** ***********@q27 g2000prf.google groups.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...@g mail.comwrote in message

news:d4******* *************** ************@p3 9g2000prm.googl egroups.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.so meOtherInput.fo cus();
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.setO pacity(overlayD iv, .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
Jun 1 '08 #5
SAM
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.getEle mentById(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=f unction(){graye r('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="retur n false;">
<p>test: <input name="test">
<p><button onclick="grayer ('f_2',false);g rayer('f_1',tru e);">
change form</button></p>
</form>
<form id="f_2" action="#" onsubmit="retur n false;">
<p>test: <input name="test">
<p><button onclick="grayer ('f_2',true);gr ayer('f_1',fals e);">
change form</button></p>
</form>
</html>

--
sm
Jun 1 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2006
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 should be reproducible with that version at least. BACKGROUND: =========== When you open this page in your browser, you will see a 4 cell table....
1
7837
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 from queries. Let me just add that Allen Browne excellent article about this subject may not apply to this scenario on an elementary level. (Here's...
0
6461
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 report are based on the same View addressed in the Record Source of both as 'dbo.CLMain_vw'. The View resides in a SQL Server 2000 database. There are...
3
6599
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 the text value is on a different table. The me.filter is then a text instead of the id-number from the lookup table. This causes the report to prompt...
4
1130
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 --
4
4343
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 and Button2, on it (code below). When I press the mouse button over Button2, and don't release it, in the IDE output window it prints...
18
2937
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. If you do have any ideas I would really like to hear them. Thanks Colin - 0 - 0 - 0 - I want a glorified popup/context menu on a button that...
3
1624
scubak1w1
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 and can not find why. The AJAX changes the query button in non-IE browsers, at least in the sense it is not opaque anymore, the 'title' check...
3
340
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 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.
0
7703
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7619
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7681
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5514
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.