Doogie said:
I appreciate your help (everyones). But I'm not sure how much time I
am going to be allowed to do anything other than try to get the combo
box to default as I explained above. I'm new and this app is an old
app and it's ASP 3.0 which means its old technology too. My
experience before coming here is more in back-end development and so I
may have to ask someone else to try to tackle why what should be a
simple change isn't working because I just don't get it. Thanks
though again. Doug
You are surely free to do that... main drawback to that plan is that you
still seem to believe ASP has something to do with this problem. Since
that, in fact, is not the case, you've saddled yourself with a distinct
disadvantage. It's very difficult (if not impossible) to make any progress
while persistently asking the wrong questions.
Typically, I avoid definitive statements like the one above... I've been
programming professionally going on 20 years, I worked on the DoD contract
project that delivered the very first Windows App created for the US Army...
over the years I've witnessed any number of things that were amazingly
anomalous, entirely inexplicable and/or *highly* improbable by definition.
Experience leaves me hesitant to say that anything in IT specifically could
or couldn't be, especially sight unseen... usually... anyway...
Out of curiosity I copied the html source you posted to a local html file.
There was an unclosed script tag near the bottom, but after I fixed that,
the page rendered. I fully expected to see '09' in that SELECT element, but
to my surprise, I didn't see the SELECT element at all. I knew it was in
the source, though, so I used a tool I wrote (
www.pagespy.com) to look for
it.
As it turns out, the SELECT element is contained by a SPAN that is hidden in
two ways. (style.visibility = 'hidden', and style.width/style.height both
set to 1px.) I used pagespy's script context to change those styles/reveal
the element in question -- predictably, the initial value of the SELECT
element was '09'. Surprised me not at all.
The exercise would be pointless, but I can guarantee you that if I renamed
this file .asp and copied it to my local web root, it would render the same
'09', just as we all know it's supposed to. Test concluded.
Ok, so exactly what, if anything, does all this prove? (And, as long as
we're asking rhetorical questions, how could it possibly justify all the
rambling-on you see above?) Very astute of you to ask, I'll tell you:
1. You aren't able to see the SELECT element in question immediately after
the page renders -- if you were you would've seen that the selected
attribute does/did work.
2. By the time you *are* able to *actually* see it, some client-side script
has already been executed in response some UI interaction.
3. Said client-side script clearly concerns itself with the SELECT in
question (and its other initially-hidden SPAN-dweller siblings.)
4. You purposely omitted from your post some client script that was present
in the source dump -- what else explains the unclosed SCRIPT tag (presence
of which prevents the page from rendering in the least tiny way)? (I won't
even ask why.)
5. Without all of the page's client script, impossible for me to quote-back
the line of it that's responsible, but regardless, there is NOT A DOUBT in
my mind that's what is happening...
6. Client script -- not ASP -- is changing the selected option, before it
lets you see it.
If you still have any doubts, disable Active Script in IE security, change
the code so that can see the element you've been on about for days...
observe... and then post an accurate description of how this experience made
you feel.
Good Luck,
Mark