JAM 0 Newbie Poster

T. Greer happens to be a member of Daniweb. In fact he moderates this forum. In actual fact, he's me. I haven't looked at that example in quite awhile. I removed your attachment because I have it on good authority the author doesn't wish the code distributed.

Ah, my apologies. Since I couldn't see any copyright notice on the original page with your code, I didn't realise that you wouldn't want me to post your original code with my changes as an attachment in this forum. I'm from a University, and I'm interested in your demonstration for educational and not commercial purposes. Yes, I had seen the connection between the author of the code and the moderator of this forum - from my point of view that was coincidental, since the problem I was having was one with JavaScript in general and not with the specifics of your example. I've now solved my own problem.

However, please reply with your own code listing of the mods you've made. I'm not entirely clear what you're wanting to do. Modifying the code to support any/all select/text input combos on the page would be quite a task, one I'm not willing to do for free!

I didn't expect you to enhance your code for me - or anyone else - without reward. What I wanted to do was to allow the use of more than one such synthesised HTML combobox, and at any position on the page. Here are the changes required …

JAM 0 Newbie Poster

I came across T. Greer's very clever demonstration of how to provide an HTML combobox at http://www.tgreer.com/comboArticle.html. I realised, however, that for the purposes of the demonstration the example combobox is placed at an absolute position on the page. I tried to make it dynamic, but have encountered difficulties. Would someone be kind enough to help? (I'm a novice JavaScript programmer.)

Take the original and comment out the '<style type="text/css">...<!--<style type="text/css">' near the top. Alter the order of the HTML of the selector and the input box so that the selector is first. (This does away with the need to use .zIndex, which I couldn't make work in any case.) Remove the 'class="DropDown"' from the selector and the 'class="TxtBox"' from the input box. Add an initial paragraph of text and a reset button. Then change the content of the ieStinks() JavaScript procedure to get the attached HTML/JavaScript file.

This works fine with Firefox on Linux. I've not been able to try it with Internet Explorer. My problem is that I'd like to use the calculated values for selector.style.width, textbox.style.width and the upward adjustment of the textbox position: '"-" + textbox.style.height', but find that only the literal values ("120px", "100px" and "-20px") work. There is also a minor aesthetic problem: the definition of "relative" (see "javascript: The Definitive Guide" by David Flanagan, O'Reilly) says that "The space allocated for the [relative-re-positioned] element in the normal document flow remains allocated for it, and the elements on either side …