[Javascript] Showing and Hiding Divs
Flavio Gomes
flavio at economisa.com.br
Fri Jul 8 09:43:19 CDT 2005
I made a change to your css that seemed to solve it: I just added
"display: none" to all three div's to start with and commented the
"ShowLayer('divCreditFACTSContainer', false);" Line.
(attached)
Hope to Help,
Ps.: On reloading by (CTRL+R) the radio will still be selected, but the
div won't show.. T_T
--
Flavio Gomes
flavio at economisa.com.br
Glenn E. Lanier, II wrote:
> Thanks to help from this list, I have a function that will show or not
> show a div. All seemed to work properly, but I'm running into some
> problems using IE.
>
> I have two radio buttons (in the example); if the first one is
> selected, I show credit card payment options (by displaying
> divCreditCard). If the second is selected, I show another payment
> option called FACTS (likewise, displaying divFACTSInfo). Both
> divCreditCard and divFACTSInfo are members of divCreditFACTSContainer.
>
> When the page loads, I hide divCreditFACTSContainer.
>
> When the radio button is selected, I hide divCreditFACTSContainer,
> divCreditCard, and divFACTSInfo (in real life, some payment method
> selection will require that no payment options are displayed). I then
> determine which option was selected, showing divCreditFACTSContainer
> and the appropriate other div.
>
> The problem, in IE6, is that the border assigned to both divCreditCard
> and divFACTSInfo show, regardless of which div is displayed, but only
> on the first time the option is selected (per page load).
>
> Example: when the page is loaded, divCreditFACTSContainer is hidden.
> Select "Credit Card", see alert messages (for debugging) that show all
> three layers being hidden. See message showing divCreditFACTSContainer
> (see border appear), see message showing divCreditCard (see border
> appear), see message hiding divFACTSInfo (see border appear -- I
> originally didn't have this hide in place, but added it in testing).
> Now, select "FACTS", see similar, except divCreditCard border
> disappears. Now, select "Credit card" and see only
> divCreditFACTSContainer and divCreditCard. If you reload the page, and
> select "FACTS" first, you'll see the divCreditCard border.
>
> The CSS (inline), the HTML, and the JavaScript (also inline) are at
> http://bellsouthpwp.net/S/p/Speedy7/fees.html.
>
> Any help, pointers, tips, etc. is appreciated.
>
> --G
>
> ------------------------------------------------------------------------
> *Glenn E. Lanier II*
> **/ /*Email: glenn_lanier at netzero.net <mailto:glenn_lanier at netzero.net>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050708/b87e58a5/attachment.htm>
More information about the Javascript
mailing list