More IE bugs, I think

L

Lorenzo Thurman

I have this code here, which works just fine in Forefox, but in IE, the
first item in the select does not appear. If I add a third item, the
second and third items appear, but not the first, Does anyone know of a
workaround for this?
TIA

<td class='infoRow'>
<a
href=\"javascript:document.getElementById('select_$bridge->b_id').value
= '$bridge->status';
hideObject('a_bridge_$bridge->b_id');showObject('select_$bridge->b_id');\"
id='a_bridge_$bridge->b_id'>$bridge->status </a>
<select id='select_$bridge->b_id' style='display: none'

onchange='document.getElementById(\"selectChange\").value=\"select_$bridge->b_id\";
self.refreshBridge=new
ajaxDisplay();refreshBridge.setForm(\"bridgeForm\");
refreshBridge.getPage(\"common/bridges.php\", \"bridgesDIV\");'
<option value='Idle'>Idle</option>
<option value='Active'>Active</option>
</select>
</td></tr>";
 
R

Richard Cornford

Lorenzo Thurman wrote:
... , Does anyone know of a
workaround for this?
TIA

<td class='infoRow'>
<a
href=\"javascript:document.getElementById('select_$bridge->b_id').value
= '$bridge->status';
hideObject('a_bridge_$bridge->b_id');showObject('select_$bridge->b_id');\"
id='a_bridge_$bridge->b_id'>$bridge->status </a>
<select id='select_$bridge->b_id' style='display: none'

onchange='document.getElementById(\"selectChange\").value=\"select_$bridge->b_id\";
self.refreshBridge=new
ajaxDisplay();refreshBridge.setForm(\"bridgeForm\");
refreshBridge.getPage(\"common/bridges.php\", \"bridgesDIV\");'
<option value='Idle'>Idle</option>
<option value='Active'>Active</option>
</select>
</td></tr>";

What a mess. Starting with something a browser might be expected to
understand would help (is this actually server-side code?), then
formatting it in a way that was readable to a human would be a good
idea if you expect others to see what it does.

1. Executing Javascript pseudo-protocol HREFs is a direct cause of
issues in IE. It can be regarded as the equivalent of kicking the
browser really hard, and after that expecting it to still work
normally is unrealistic.

2. This code seems to reference numerous
functions/methods/constructors/objects, and your issue is likely to
relate to the internal behaviour of those objects/functions/methods.
As you have omitted their code it cannot be viewed here.

Richard.
 
L

Lorenzo Thurman

Richard said:
Lorenzo Thurman wrote:


What a mess. Starting with something a browser might be expected to
understand would help (is this actually server-side code?), then
formatting it in a way that was readable to a human would be a good
idea if you expect others to see what it does.

1. Executing Javascript pseudo-protocol HREFs is a direct cause of
issues in IE. It can be regarded as the equivalent of kicking the
browser really hard, and after that expecting it to still work
normally is unrealistic.

2. This code seems to reference numerous
functions/methods/constructors/objects, and your issue is likely to
relate to the internal behaviour of those objects/functions/methods.
As you have omitted their code it cannot be viewed here.

Richard.
You're right, it was pretty busy. I found the problem. In all of that
clutter, I was missing the closing '>' for the <select.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top