472,119 Members | 910 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

No events with "background-color:transparent" style

I'm trying to duplicate functionality found in a Windows application
at one of my clients. Essentially, another programmer was able to
arrange a lot of search options into a single dialog box by positioning
the descriptive label behind the textbox instead of beside it. When
the user enters text, the label disappears and the user types in their
information into the textbox.

I've figured out how to arrange a label behind the textbox (yes, the
label format has to be altered to differentiate), but events are not
being captured. I can't type into the textbox, and it doesn't even
recognize click events. I've narrowed this problem down to the
"background-color:transparent" since changing 'transparent' to
'white' captures the events.

Here's my code.
---------------------------
<label style="position:absolute;left=100;top:100;z-index:1;">Test
label</label>
<input type="text"
style="position:absolute;left:100;top:100;z-index:2;background-color:transparent;"
/>
--------------------------

If anybody could enlighten me as to what the problem might be, it would
be greatly appreciated.

Regards,
John

Jul 27 '06 #1
3 3108
In article <11**********************@h48g2000cwc.googlegroups .com>,
bu*********@hotmail.com wrote:
I'm trying to duplicate functionality found in a Windows application
at one of my clients. Essentially, another programmer was able to
arrange a lot of search options into a single dialog box by positioning
the descriptive label behind the textbox instead of beside it. When
the user enters text, the label disappears and the user types in their
information into the textbox.

I've figured out how to arrange a label behind the textbox (yes, the
label format has to be altered to differentiate), but events are not
being captured. I can't type into the textbox, and it doesn't even
recognize click events. I've narrowed this problem down to the
"background-color:transparent" since changing 'transparent' to
'white' captures the events.

Here's my code.
---------------------------
<label style="position:absolute;left=100;top:100;z-index:1;">Test
label</label>
<input type="text"
style="position:absolute;left:100;top:100;z-index:2;background-color:transpare
nt;"
/>
--------------------------

If anybody could enlighten me as to what the problem might be, it would
be greatly appreciated.
Hi John,
I don't mean to be snide or grouchy, but it'd help if you (a) post a URL
to an example that demonstrates the problem and (b) tell us what browser
you're using. I don't have time to code up a form around your snippet of
HTML above, sorry.

--
Philip
http://NikitaTheSpider.com/
Whole-site HTML validation, link checking and more
Jul 28 '06 #2
To further the education of mankind, bu*********@hotmail.com vouchsafed:
I'm trying to duplicate functionality found in a Windows application
at one of my clients. Essentially, another programmer was able to
arrange a lot of search options into a single dialog box by
positioning the descriptive label behind the textbox instead of beside
it. When the user enters text, the label disappears and the user
types in their information into the textbox.

I've figured out how to arrange a label behind the textbox (yes, the
label format has to be altered to differentiate), but events are not
being captured. I can't type into the textbox, and it doesn't even
recognize click events. I've narrowed this problem down to the
"background-color:transparent" since changing 'transparent' to
'white' captures the events.

Here's my code.
---------------------------
<label style="position:absolute;left=100;top:100;z-index:1;">Test
label</label>
<input type="text"
style="position:absolute;left:100;top:100;z-index:2;background-color:tr
ansparent;" />
--------------------------
It's possible that 'transparent' is becoming invalid per the j/s.

--
Neredbojias
Infinity has its limits.
Jul 28 '06 #3
(Follow-ups set)

bu*********@hotmail.com wrote:
<label style="position:absolute;left=100;top:100;z-index:1;">Test
You have three syntax errors in that line alone.
http://jigsaw.w3.org/css-validator/
http://diveintomark.org/archives/200..._wont_help_you
Essentially, another programmer was able to arrange a lot of search
options into a single dialog box by positioning the descriptive label
behind the textbox instead of beside it.
The usual (and horribly hackish) way to achieve that is to use the value of
the field to act as the label and fiddle with it using JavaScript when the
user enters or deletes things from the field.

--
David Dorward <http://blog.dorward.me.uk/ <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 29 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Thomas Hoheneder | last post: by
3 posts views Thread by kaczmar2 | last post: by
4 posts views Thread by MarcuEusebiu | last post: by
2 posts views Thread by Warren Tang | last post: by
reply views Thread by leo001 | last post: by

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.