Link to home
Start Free TrialLog in
Avatar of aviavi
aviavi

asked on

dhtml - drop down menu and text field

I want to put the text field on the drop down menu (in layers).
the next sample do the opposite.
what do i do wrong ?

thank's

<html>
<head>
      <title>Untitled</title>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="42%" valign="top" height="34">
                      <div align="left">
                        <select ID = first STYLE="LEFT: 0px; POSITION: relative; TOP: 0px;z-index:0" name="mydropdown"
                                                                   width = 16>
                          <option value="name0" selected>
                          <option value="name1">avi
                          <option value="name2">sharon
                        </select>
                                    <input ID=second  STYLE ="LEFT: -60px; POSITION:relative; TOP:0px; z-index:1"       
                                                                  name="mydropdownvalue"  size="12"  
                      </div>
                    </td>
                  </tr>
                 
                </table>


</body>
</html>
Avatar of blackEyEz
blackEyEz

First of all Netscape doesn't like inline STYLE properties, Netscape more likes STYLE properties between <STYLE> tags.
Second I tried positioning ever form element stacked up eachother with the HTML code:

<html>
<head>
<title>Untitled</title>
<style>
#id1 {POSITION:absolute; LEFT:0px; TOP:0px; z-index:0}
#id2 POSITION: absolute;LEFT: 0px;  TOP: 0px;z-index:50"}
</style>
</head>

<body>
<div id="id1">
<input ID="second"
name="mydropdownvalue" size="12"
</div>

<div id="id2">
<select ID="first" name="mydropdown"
width="16">                         <option value="name0" selected>        <option value="name1">avi               <option value="name2">sharon
</select>
</div>

</body>
</html>


but no go, I tried other form elements too and only the dropdown menu he sees as top z-index..the other elements did behave the Z-index..

Sawry to dissapoint ya...


Avatar of aviavi

ASKER

hi BlackEyEz

thank's anyway

Avi
Avatar of aviavi

ASKER

Adjusted points to 200
I don't think layers can cover a drop down box. Layers can however cover, buttons, text, all sorts of input types, images etc. But drop down boxes I'm afraid not....

Joseph
why do You even want to do this?
what boxgood is Your selection  if You can't use it?

please explain what You're trying to do this for and we all might know another solution to Your problem.
Avatar of aviavi

ASKER

Hi DreamMaster !

sorry for not clarified myself...

All I'm trying to do is to make a drop down manu writable on the upper textbox (on the left of the arrow)


thank's
Avi
You should tell me whether You want these changes to the menu (made from the textbox) permanent, if You do...You should write the values in a file, being a database (if You're capable to use ASP) or a textfile if You can only use javascript.

i think this could prove to be very tricky, especially if You can't use ASP, because Javascript has a lot of trouble keeping those values, if it is able to keep them (by storing them in a file) You're gonna make it way to hard on Yourself

i truly think You've been digging a hole to deep here...

any remarks on why You need this?

Max Davidse
http://www.thekitchen.nl
Avatar of aviavi

ASKER

It just a graphic design problem.
Insted of putting the textBox and the drop down menu side by side
(because I need the two options:
free text or select from the drop down), I want to make them seen and behave as a comboBox (as in VB, MFC, java ect.)


Thank's
Avi
It is a know issue.

See: http://webreference.com/dhtml/diner/seethru/

Cheers

Ian
like that helps him...
Avatar of aviavi

ASKER

Hi iwatkins!

It didn't solve my problem but
thank's anyway.

Avi
i think somehow we still don't really understand what it is that You wish to do....

was what i asked You before what You want to do? fill the drop down by typing something in the textbox?

i think this question is just about to reach the unsolvable state so please...if You really want it to be solved, be a bit more clear in Your questions.
Like DreamMaster pointed out and like I mentioned in one of my comments before, 1) it's not possible to put the layer with the select box in the background and 2) if it could, then what? I'm sure it wouldn't work. Why don't you point out the exact meaning of this and then another solution can be found, because this is leading to nowhere...

Joseph
oubelkas,

thanks for Your support...and i think Avi will probably have problems stating what he means, sounds like a really strange thing the way he explained it until now...
Avatar of aviavi

ASKER

Hi DreamMaster and oubelkas !

Like I said before it's only a graphical design issue but i'll try to explain again.

suppose u have a site that can be used by several people from the same computer.
eatch of them, at a time, use the site and enter his name. i would like to save the names and show them in the drop down in the next time someone enter to the site from the same computer. so, next time it will be possible to select name or enter a new name in a textField. usualy I can put the textBox and the drop down side by side, but I want them to look like a combined object (when the textBox cover the top left rectangle of the drop down menu.

i hope that I'm a bit more clear...


thank's
Avi
Avatar of aviavi

ASKER

Hi DreamMaster and oubelkas !

Like I said before it's only a graphical design issue but i'll try to explain again.

suppose u have a site that can be used by several people from the same computer.
eatch of them, at a time, use the site and enter his name. i would like to save the names and show them in the drop down in the next time someone enter to the site from the same computer. so, next time it will be possible to select name or enter a new name in a textField. usualy I can put the textBox and the drop down side by side, but I want them to look like a combined object (when the textBox cover the top left rectangle of the drop down menu.

i hope that I'm a bit more clear...


thank's
Avi
ok so You would like to create a combobox, but i still don't get why You would want to display all the names, i think it would be better to use cookies and keep track of the user that checks in.... i mean, use only a textbox and ask the user the first time he loggs in to state his/her name, then the second time he/she loggs in, You can get the name from a cookie and display that in the text field...

this is possible and i think a lot easier then what You're trying to pull of here!

Good luck anyway.
Avatar of aviavi

ASKER

I have many users in each computer.
The cookie can't recognize each of them.
Do you have the names of all users, or is it variable? Mmmm, and if you have the name, then what?

Joseph
then i guess the only option is to keep track of Your users in a database and display those in Your select box, using ASP.

So...make the textbox's input, be the data for the database tabel where You keep all Your users.

So when You press enter it should execute a query that inserts it in Your table (ofcourse checking if it allready exists)

You could have Your select box be filled with ASP then using a code similar to this:

<select name="users">
  <option name="<%= rs("username") %>" value="<%= rs("username") %>"><%= rs("username") %></option>
</select>

ofcourse the options should be created in a loop and i haven't given You the rs variable and stuff, but this is just to explain what i mean...
Avi,

you said

>>usualy I can put the textBox and the drop down side by side, but I want them to look like a combined object (when the textBox cover the top left rectangle of the drop down menu.

BUT here's the problem, the dropdown box cannot be put into the background, like I already mentioned. So this is out of the question, then why wouldn't you put them next to each other, I personally think it's less crappy, because the textbox can never completely cover the dropdown.

Joseph
Avatar of aviavi

ASKER

I dont have the names.
each user can add his name and I save the names array in a cookie
Avatar of aviavi

ASKER

DreamMaster,
 I already do this (filling the option on runTime)


All :

Thank's all of you for trying to help
It ssms that I have to think about an alternative design to my HTML page.

Thank's again
Avi
so...what will You do now? retract the question? or ??

what happens now...i know Your question has not been answered yet...but at least keep us posted when You find the complete answer...

i think we have at least earned that right....don't You?

good luck on finding it all out, and especially on redesigning...

Avatar of aviavi

ASKER

DreamMaster and aubelkas

u certainly earned it.
send me your email to aviy@geo.co.il
and I'll update u .

thank's
Avi
Yes, like DreamMaster says, the least thing you can do for us is giving something for our concern on your problem, and we could also help out for another solution of course, let us know... ;)

Joseph
well..i just finished sending You an email avi, and just for oubelkas....if You need to mail me:

max@thekitchen.nl or david315@wxs.nl

it's always good to help each other and learn every day...
Ok, got that Max. Mine's

joseph@auvicom.nl

Is goed jongen, I'm here to help whenever I got the time. Coole site trouwens Max...

Joseph
Got that Avi...mailed you already

Joseph
Oubelkas jongen...

tuurlijk is ie cool!
oh...for avi..

oubelkas was talking about the site address that is there in some of my replies

http://www.thekitchen.nl

it's my company's site, which i did a great deal of work on, it uses a lot of different technologies, like DHTML and ASP, but also 3D-photography...have a look, it's all in dutch, but that's not the most important thing here...
Haha! Max, http://www.htmlguru.com rules! Gelezen in je profile op je site. I also use some of these technologies, along with Javascript and HTML, I do DHTML, PHP and Flash.

Cool...soon oubelkas.com will be in the air. Don't miss it....it's a flash based site with all sorts of techniques.. ;)

Joseph
keep us informed oubelkas...

Max.
any of You on ICQ?

if so...my # 14958989
I will,

and NO, not on ICQ....sorry...
ASKER CERTIFIED SOLUTION
Avatar of blackEyEz
blackEyEz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
blackEyEz >> uhhh, why did you answer? This Q is done by DreamMaster and me, please comment instead of rudely answering.

AviAvi >> mmm, please do NOT accept the proposed answer, or else I'd be very disappointed...

Joseph
discussion closed, free world, free answers right...

ps..scroll up look who posted the first comment..
Oh, oh yeah, ok, my fault then, but still I don't think it's fair if you just close it, since I and DreamMaster went on with this.

Oh and you're certainly right about FREE WORLD, YEAH! FREE EVERYBODY, FREE WILLY! FREE ME, FREEBEE, FREE...ZE, FREELANCER!