ma******@yahoo.com (Matthew) writes:
Hello! What is the best NS/IE compliant way to accomplish this using
the least amount of javascript code?
This? ... OH! The important part of your question was only in the
subject. Don't do that! It makes your posting hard to read.
<div id="block1">
Group 1 Code
</div>
<div id="block2">
Group 2 Code
</div>
<a id="buttonone" href="javascript:somecode()">Button One</a>
<URL:http://jibbering.com/faq/#FAQ4_24>
<a id="buttontwo" href="javascript:somecode()">Button Two</a>
Ok, I know those <div> tags may not be formed correctly, but what I
want is for 'Group 1 Code' to run by default, and then the user can
click either button to execute the corresponding <div> tag.
The contents of DIV elements is HTML code. You don't execute that, you
show it (it is a description language, not a programming language).
Try to explain your problem more precisly. Ignore, for now, how you
expect or want to solve it, just explain the problem. (E.g., "I want
people to be able to select what happens when they <floodleboodle> on
the page. Either <foo> happens, or <bar> does. Selecting should be done
by clicking in one of two places")
(Then I would suggest to use buttons for the clickable places, not
links, and for the rest, I would need to know what <floodlebodle>,
<foo>, and <bar> are)
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'