Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 29th, 2004, 10:28 AM
Registered User
Join Date: Jun 2003
Location: calicut, kerala, India.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to shine
Default zIndex

Here I am sending a code

<SCRIPT LANGUAGE=javascript>
function disp_cat_txt(val)
var get_name=val.name;
var get_id=val.id;

get_name=new String(get_name);
var p_left=document.getElementById(val.id).offsetLeft;
var txt_name="oth_cat"+get_name;
var frst_name="document.form1.";
var lst_name=".focus()"
//alert(document.getElementById(eval('txt_name')).st yle.width)
//(window.event.srcElement).parentElement.style.zInd ex=0;
//(window.event.srcElement).parentElement.childNodes (0).style.zIndex=100;
//(window.event.srcElement).parentElement.childNodes (1).style.zIndex=-1;

document.getElementById(eval('txt_name')).style.di splay='';
document.getElementById(eval('txt_name')).style.po sLeft=p_left+10;
document.getElementById(eval('txt_name')).style.zI ndex=100;
document.getElementById(eval('txt_name')).style.di splay='none';

<input type='text' id='oth_cat200' name='oth_cat200' size=10 style='display:none;position:absolute;' class=shine>
<SELECT onchange="disp_cat_txt(this)" size="1" id="selectcat200" name="selectcat200" style="width:84;font-family:verdana;font-size:7.5pt;font-weight:lighter;position:relative;"><option value=0>select</option><OPTION value='OS'>OS</OPTION<OPTION value='Telecom'>Telecom</OPTION><OPTION value='ERP'>ERP</OPTION><OPTION value='Server'>Server</OPTION><OPTION value='Tool'>Tool</OPTION><OPTION value='Other-specify'>Other-specify</OPTION></SELECT>

I wrote this code to display text box layer over drop down layer with out hiding it. But it goes under the drop down menu layer. I assigned a positive integer for zIndex property, but the result is same. Please tell me a solution for this. Any suggestion would be greatly appreciated.


Reply With Quote
  #2 (permalink)  
Old January 29th, 2004, 11:08 AM
Friend of Wrox
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post

see the archive
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

All times are GMT -4. The time now is 12:56 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.