Quite a few issues there...

First off, you can generally use one or the other of "visibility" or 
"display" properties.  In your case you'd probably want to use "display" 
since this will actually create or destroy the space that the br occupies.

Then, in makeNewEntry you'd want this one line:
document.getElementById('FTDTYPEe').style.display = 'block';
// since it is an id, you can reference it directly, independent of the form

Finally, you can remove the visibility property from the br:
<br id="FTDTYPEe" style="display: none;" />

That should get you where you need to be.

-- Josh



----- Original Message ----- 
From: "Chad Gray" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Wednesday, June 11, 2008 10:34 AM
Subject: (ot) javascript help


> Can any javascript gurus tell me why this does not work?  I want the <br> 
> tag to display on the page so I get a carriage return between the two 
> pieces of text "Foo" and "Moo".  I get this error in Firbug:
> document.tabbedTicket.FTDTYPEe has no properties
>
>
> <script>
> function makeNewEntry() {
> document.tabbedTicket.FTDTYPEe.style.visibility = 'visible';
> document.tabbedTicket.FTDTYPEe.style.display = '';
> }
> </script>
>
> <form action="preferences.cfm" method="post" id="tabbedTicket" 
> name="tabbedTicket">
>
> <input value="+" type="button" style="font-size:9px; 
> "onclick="makeNewEntry();" title="Add New FTD
>
> Type"><br />
> Foo
> <br id="FTDTYPEe" style="visibility:hidden; display: none;" />
> Moo
> </form>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307262
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to