473,609 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

set/adjust z-index onmouseover

What would be the correct syntax for setting the z-index of a layer
OnMouseOver?

I have a mouseover action on a visible layer which displays a popup info
layer but it gets displayed behind other visible layers depending on its ID
which I beleive is inherited from its parent. I need the popup layer to
display in front of everything on the page when activated.

<DIV ID="popinfo<%=r s("ID") %>" STYLE="padding: 0px; border:1px solid
#000000; position: absolute; width: 300px; height: 220px; left: 36px;
top: -1px; z-index: <%=rs("ID") %>" ; background-color:#2D5B8E;
visibility:hidd en">

Thanks in advance!

Jul 23 '05 #1
5 33974
Jake <sp******@allte l.net> wrote in message
news:jq******** ****@fe10.usene tserver.com...
What would be the correct syntax for setting the z-index of a layer
OnMouseOver?

I have a mouseover action on a visible layer which displays a popup info
layer but it gets displayed behind other visible layers depending on its ID which I beleive is inherited from its parent. I need the popup layer to
display in front of everything on the page when activated.

<DIV ID="popinfo<%=r s("ID") %>" STYLE="padding: 0px; border:1px solid
#000000; position: absolute; width: 300px; height: 220px; left: 36px;
top: -1px; z-index: <%=rs("ID") %>" ; background-color:#2D5B8E;
visibility:hidd en">

Thanks in advance!

It's better to simplify the syntax by writing a function to do the job.
Here's an example using two simple layers. I chose to style the popup
initially visible.

<html>
<head>
</head>
<body>

<DIV id='popup' style="position :absolute;left: 100px; top:50px;
background-color:#ffff00;z-index:0;visibil ity:visible;">P opup text
layer</DIV>
<DIV onmouseover='to Top("popup",tru e,100)'
onmouseout="toT op('popup',fals e,0)" id='perm'
style="position :absolute;left: 50px; top:55px;
background-color:#ff0000;z-index:1">The Permanent Layer</DIV>

<script type='text/javascript'>

function toTop(layer, action, z) // layer== id of div, action:
true==show,fals e==hide, z==z index
{
var lref;

if(document.get ElementById && (lRef=document. getElementById( layer)))
{
lRef.style.visi bility=action?' visible':'hidde n';
lRef.style.zInd ex=z;
}
}
</script>
</html>

--
S.C.
http://makeashorterlink.com/?H3E82245A

Jul 23 '05 #2
Thanks for the reply but I cant get your sample to work.

Error: Expected '{'
"Stephen Chalmers" <ig******@lycos .co.uk> wrote in message
news:42******** **@mk-nntp-2.news.uk.tisca li.com...
Jake <sp******@allte l.net> wrote in message
news:jq******** ****@fe10.usene tserver.com...
What would be the correct syntax for setting the z-index of a layer
OnMouseOver?

I have a mouseover action on a visible layer which displays a popup info
layer but it gets displayed behind other visible layers depending on its

ID
which I beleive is inherited from its parent. I need the popup layer to
display in front of everything on the page when activated.

<DIV ID="popinfo<%=r s("ID") %>" STYLE="padding: 0px; border:1px solid
#000000; position: absolute; width: 300px; height: 220px; left: 36px;
top: -1px; z-index: <%=rs("ID") %>" ; background-color:#2D5B8E;
visibility:hidd en">

Thanks in advance!

It's better to simplify the syntax by writing a function to do the job.
Here's an example using two simple layers. I chose to style the popup
initially visible.

<html>
<head>
</head>
<body>

<DIV id='popup' style="position :absolute;left: 100px; top:50px;
background-color:#ffff00;z-index:0;visibil ity:visible;">P opup text
layer</DIV>
<DIV onmouseover='to Top("popup",tru e,100)'
onmouseout="toT op('popup',fals e,0)" id='perm'
style="position :absolute;left: 50px; top:55px;
background-color:#ff0000;z-index:1">The Permanent Layer</DIV>

<script type='text/javascript'>

function toTop(layer, action, z) // layer== id of div, action:
true==show,fals e==hide, z==z index
{
var lref;

if(document.get ElementById && (lRef=document. getElementById( layer)))
{
lRef.style.visi bility=action?' visible':'hidde n';
lRef.style.zInd ex=z;
}
}
</script>
</html>

--
S.C.
http://makeashorterlink.com/?H3E82245A


Jul 23 '05 #3
In article <3e************ *@fe10.usenetse rver.com>, sp******@alltel .net
says...
Thanks for the reply but I cant get your sample to work.

Error: Expected '{'

That's because his code wrapped. If you really can't figure out that
problem for yourself, you might want to look at one of the many free
javascript tutorials on the web, and focus on the troubleshooting
sections. The line which begins "true==show " can be safely deleted or
can be returned to its original position at the end of the line above
it.
function toTop(layer, action, z) // layer== id of div, action:
true==show,fals e==hide, z==z index
{
var lref;

Jul 23 '05 #4


Jake <sp******@allte l.net> wrote in message
news:3e******** *****@fe10.usen etserver.com...
Thanks for the reply but I cant get your sample to work.


It's a line-wrap problem. Replace the function with this:

// layer== id of div, action:true==sh ow,false==hide, z==z index
function toTop(layer, action, z)
{
var lref;

if(document.get ElementById && (lRef=document. getElementById( layer)))
{
lRef.style.visi bility=action?' visible':'hidde n';
lRef.style.zInd ex=z;
}
}

--
S.C.

http://makeashorterlink.com/?H3E82245A

Jul 23 '05 #5


Jake <sp******@allte l.net> wrote in message
news:3e******** *****@fe10.usen etserver.com...
Thanks for the reply but I cant get your sample to work.


It's a line-wrap problem. Replace the function with this:

// layer== id of div, action:true==sh ow,false==hide, z==z index
function toTop(layer, action, z)
{
var lref;

if(document.get ElementById && (lRef=document. getElementById( layer)))
{
lRef.style.visi bility=action?' visible':'hidde n';
lRef.style.zInd ex=z;
}
}

--
S.C.

http://makeashorterlink.com/?H3E82245A

Jul 23 '05 #6

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

Similar topics

3
19109
by: dreamer | last post by:
I am making a program for a friend with a disability. I need to adjust his audio volume using the keyboard as he cannot use a mouse. Any suggestions as to how I can raise the volume using the up arrow on the keyboard and decrease the volume using the down arrow? I am using VB 5. Many thanks in advance.
0
1619
by: Jeff O. | last post by:
Has anyone written a class to adjust their Timer period for daylight savings time? Or, is there another way to have the timer automatically adjust for DST?
3
1478
by: Matthew | last post by:
Hello ~ I am looking for a character counter that will display the remaining number of characters left in a form box, that will also display adjust for default values on the form
8
2258
by: kchayka | last post by:
<URL:http://www.w3.org/QA/Tips/font-size> In the "recommneded practices", I don't agree with their second bullet point, but the last 2 bullets sound like really bad advice, at least in a WWW context. How can they, in good conscience, advocate using font-size-adjust when it is virtually unsupported, besides probably being dropped from the next spec update? If they just made some disclaimers about browser support or font availability on...
0
359
by: RobbRoss | last post by:
I'm trying to adjust the font-size of my header. I can do that until I turn allowsorting=True, then no matter what I set for font-size it doesn't adjust. How can I adjust the header font-size when Allowsorting=True Thanks
7
2320
by: lauren quantrell | last post by:
A while back I got a requirement for the client to be able to adjust the relative heights of two subforms by click-dragging the mouse and I came up with a kludge solution using a border control between the two subforms. But I put my mind to this again recently and came up with a solution (code below) that works well with multiple subforms to size both the heights and widths of the sunforms relative to each other, and it uses no additional...
4
8196
by: Elijsh | last post by:
I'm new to datagrid and VB.Net. Is there any way to adjust the height of datagrid textbox row according to the height of text programmatically ? Your advice is greatly appreciated!
6
12600
by: Scott Kilbourn | last post by:
Hi, I'm writing a control that inherits from TextBox. I need to adjust the width of this control based on the number of characters in the control. I'm having a hard time with this. The problem (as I see it) is that the size of the font is in points, but the size of the TextBox is in Pixels. I can't figure out a way to use VB.NET to convert.
6
8119
by: Christopher Glenn | last post by:
I have very basic html skills. My friend who has a wide screen monitor and is using IE7 sent me a jpg screen shot of my home page. I have attached this jpg, but I recall a while back that attachments were discouraged. I am sorry if I have offended anyone by attaching. Note the left side table tiles or repeats towards the right side of the screen, but the text does not, so it cannot be seen under the graphic.
4
2626
by: Terry | last post by:
I am trying to figure out if there is a way to get a regular asp.net TextBox to fill the screen, both height and width. When I drop a TextBox onto a blank asp.net page and set the height="100%", width="100", and the TextMode="MultiLine", the TextBox will fill the width of the page, and will adjust the width dynamically as the page changes size, but the height of the textbox is not full screen as I would like. It remains at 2 lines high....
0
8548
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8510
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8197
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8375
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6042
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5503
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4006
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4063
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.