NameSilo

IE issues... could use a little help!

Spaceship Spaceship
Watch

monty

Established Member
Impact
3
He y'all,

Damn, I hate IE! Stupid piece of crap software!

Anyway, the problem is that I have simple select field and onChange, i just want to prompt a message displaying the selected option. My HTML:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<form>
<select onChange="alert(this.value)">
	<option>1</option>
	<option>2</option>
</select>
</form>
</body>
</html>

Now, anybody knows what's wrong with this? It's probably something stupid (it always is), but in Safari, Opera and FF all works fine, only IE has to be a pain in the but again!

Thanks much!

-monty
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
.US domains.US domains
Weird, try adding a name for the select, see what happens then.
 
0
•••
Your option's need to have values.

<option value="1">1</option> works.
 
0
•••
Dan is completely right, you're trying to find "this.value", but you never set it. It isn't IE that's messing up, it's the coder :| .
 
0
•••
Palyriot said:
Dan is completely right, you're trying to find "this.value", but you never set it. It isn't IE that's messing up, it's the coder :| .

Please get your facts straight before you start accusing me of bad coding. It's not me that's off, but it's IE typical non-standard behavior and stubborn refusal to comply to web standards.

According to the W3C DOM specs, the "value" property of a SELECT element object, points to the VALUE attribute (VALUE inside the <option> tag) or the VALUE property (the string nested within <option></option> tags). Other, decent browsers like FF, Safari and Opera implement the spec by looking at the attribute first and if this one is empty, it uses the property instead.


Anyway, thanks for helping out guys! All is well again!

-monty
 
Last edited:
0
•••
Palyriot said:
Dan is completely right, you're trying to find "this.value", but you never set it. It isn't IE that's messing up, it's the coder :| .
monty said:
Palyriot said:
Dan is completely right, you're trying to find "this.value", but you never set it. It isn't IE that's messing up, it's the coder :| .

Please get your facts straight before you start accusing me of bad coding. It's not me that's off, but it's IE typical non-standard behavior and stubborn refusal to comply to web standards.

According to the W3C DOM specs, the "value" property of a SELECT element object, points to the VALUE attribute (VALUE inside the <option> tag) or the VALUE property (the string nested within <option></option> tags). Other, decent browsers like FF, Safari and Opera implement the spec by looking at the attribute first and if this one is empty, it uses the property instead.

Thanks for helping out Dan!

-monty
Monty you are right ;),

I had that same problem once before, data was being sent fine in FF, Opera etc, but not IE.

IE = EVIL enemy.
 
0
•••
yeah thanks!

It's just plane insane how much extra effort I have to put in to make web apps and web sites compatible with IE. IMO, it qualifies as one of the worst pieces software written in the history of mankind! :td:
 
0
•••
Im not sure whats wrong with this site and think i might have to giveup here becuse i could not get to where the instructions said. . .
 
0
•••
Sorry Webmonkey, I forgot to mention that the matter is already resolved by adding the value attribute to the different options within the select element.

Thanks for the help!
 
0
•••

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back