Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

DW Template, optional BODY onLoad not working
 

Wallace Wilcox




quote this post edit post

IP Loged report this post

Old Post  09-30-05 - 11:21 PM  
I need to make an BODY onLoad statement optional in a Dreamweaver template. 
 I
have created a parameter:

<!-- TemplateParam name="LoadTIConnect" type="boolean" value="false" -->

But when I try to use it Dreamweaver complains of errors and won't update an
y
pages.  I have tried two different methods.  First a simple if statement:

<BODY <!-- TemplateBeginIf cond="LoadTIConnect"-->onLoad="loadPageTIC();"<!-
-
TemplateEndIf -->>

When updating pages from a template with this line in it, Dreamweaver
complains of an unbalanced </BODY> tag, meaning the tag above isn't being
recognized by DW as a <BODY> tag.  I have also tried a multiple if statement
:

<!-- TemplateBeginMultipleIf -->
<!-- TemplateBeginIfClause cond="LoadTIConnect==true" -->
<BODY onLoad="loadPageTIC();">
<!-- TemplateEndIfClause -->
<!-- TemplateBeginIfClause cond="LoadTIConnect=false" -->
<BODY>
<!-- TemplateEndIfClause -->
<!-- TemplateEndMultipleIf -->

But for some reason DW complains of nested editable regions on this one.  Is
there a way to achieve my desired result within the DW MX2004 template syste
m?



Post Follow-Up to this message ]
Re: DW Template, optional BODY onLoad not working
 

Stephanie Sullivan




quote this post edit post

IP Loged report this post

Old Post  09-30-05 - 11:21 PM  
On 9/30/05 11:42 AM, in article dhjmdf$nat$1@forums.macromedia.com, "Wallace
Wilcox" <webforumsuser@macromedia.com> wrote:

> But for some reason DW complains of nested editable regions on this one.  
Is
> there a way to achieve my desired result within the DW MX2004 template system?[/co
lor]

Perhaps it's the way you're creating it... What I do is to highlight the
opening body tag -- then go to Modify > Templates > Make Attribute Editable
(then it will allow you to set the editable parameters in there)...

On the child pages, you'll simply go to Modify > Template Properties... And
change the onLoad values...

Stephanie Sullivan
Community MX Partner :: http://www.communitymx.com/author.cfm?cid=1008
Team Macromedia for Dreamweaver :: http://tinyurl.com/6huw3
Co-Author .: "Macromedia Dreamweaver MX 2004 Magic" :. New Riders
VioletSky Design :: http://www.violetsky.net

"Watch what people are cynical about and one can discover what they lack."
-Harry Emerson Fosdick




Post Follow-Up to this message ]
Re: DW Template, optional BODY onLoad not working
 

Murray *TMM*




quote this post edit post

IP Loged report this post

Old Post  09-30-05 - 11:21 PM  
This markup will never work, Wallace.

Remove all this from your page. Then select the body tag, and go through the
MODIFY |  Templates > Make Attribute Editable, menu choice to add the onLoad
attribute as the target of the parameter.  Specify that the parameter's
value be null as a default.

This will then create the following markup on your page -

<!-- TemplateParam name="LoadTIConnect" type="text" value="" -->
</head>
<body onLoad="@@(LoadTIConnect)@@">

which by default will evaluate to this -

<body onLoad="">

When you give the parameter a value on a child page, using MODIFY | Template
Properties, it will then appear in that onLoad attribute's value.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Wallace Wilcox" <webforumsuser@macromedia.com> wrote in message
news:dhjmdf$nat$1@forums.macromedia.com...
>I need to make an BODY onLoad statement optional in a Dreamweaver template.
>I
> have created a parameter:
>
> <!-- TemplateParam name="LoadTIConnect" type="boolean" value="false" -->
>
> But when I try to use it Dreamweaver complains of errors and won't update
> any
> pages.  I have tried two different methods.  First a simple if statement:
>
> <BODY <!-- TemplateBeginIf
> cond="LoadTIConnect"-->onLoad="loadPageTIC();"<!--
> TemplateEndIf -->>
>
> When updating pages from a template with this line in it, Dreamweaver
> complains of an unbalanced </BODY> tag, meaning the tag above isn't being
> recognized by DW as a <BODY> tag.  I have also tried a multiple if
> statement:
>
> <!-- TemplateBeginMultipleIf -->
> <!-- TemplateBeginIfClause cond="LoadTIConnect==true" -->
> <BODY onLoad="loadPageTIC();">
> <!-- TemplateEndIfClause -->
> <!-- TemplateBeginIfClause cond="LoadTIConnect=false" -->
> <BODY>
> <!-- TemplateEndIfClause -->
> <!-- TemplateEndMultipleIf -->
>
> But for some reason DW complains of nested editable regions on this one.
> Is
> there a way to achieve my desired result within the DW MX2004 template
> system?
>




Post Follow-Up to this message ]
Re: DW Template, optional BODY onLoad not working
 

Stephanie Sullivan




quote this post edit post

IP Loged report this post

Old Post  09-30-05 - 11:21 PM  
On 9/30/05 12:11 PM, in article dhjo3r$pp2$1@forums.macromedia.com, "Murray
*TMM*" <forums@HAHAgreat-web-sights.com> wrote:

> Remove all this from your page. Then select the body tag, and go through
the...

Wow, Murray! 13 minutes. ;)

Stephanie Sullivan
Community MX Partner :: http://www.communitymx.com/author.cfm?cid=1008
Team Macromedia for Dreamweaver :: http://tinyurl.com/6huw3
Co-Author .: "Macromedia Dreamweaver MX 2004 Magic" :. New Riders
VioletSky Design :: http://www.violetsky.net

The man who goes farthest is generally the one who is willing to do and
dare. The sure thing boat never gets far from shore. -- Dale Carnegie




Post Follow-Up to this message ]
Re: DW Template, optional BODY onLoad not working
 

Murray *TMM*




quote this post edit post

IP Loged report this post

Old Post  09-30-05 - 11:21 PM  
I let your answer sit for a while in plain view first.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Stephanie Sullivan" <stephanie@communitymx.com> wrote in message
news:BF62DD31.566F6%stephanie@communitymx.com...
> On 9/30/05 12:11 PM, in article dhjo3r$pp2$1@forums.macromedia.com,
> "Murray
> *TMM*" <forums@HAHAgreat-web-sights.com> wrote:
> 
> the...
>
> Wow, Murray! 13 minutes. ;)
>
> Stephanie Sullivan
> Community MX Partner :: http://www.communitymx.com/author.cfm?cid=1008
> Team Macromedia for Dreamweaver :: http://tinyurl.com/6huw3
> Co-Author .: "Macromedia Dreamweaver MX 2004 Magic" :. New Riders
> VioletSky Design :: http://www.violetsky.net
>
> The man who goes farthest is generally the one who is willing to do and
> dare. The sure thing boat never gets far from shore. -- Dale Carnegie
>
>




Post Follow-Up to this message ]
Re: DW Template, optional BODY onLoad not working
 

Stephanie Sullivan




quote this post edit post

IP Loged report this post

Old Post  09-30-05 - 11:21 PM  
On 9/30/05 12:18 PM, in article dhjoh4$qco$1@forums.macromedia.com, "Murray
*TMM*" <forums@HAHAgreat-web-sights.com> wrote:

> I let your answer sit for a while in plain view first.

Yea, yea, yea... Sore loser. :P

Stephanie Sullivan
Community MX Partner :: http://www.communitymx.com/author.cfm?cid=1008
Team Macromedia for Dreamweaver :: http://tinyurl.com/6huw3
Co-Author .: "Macromedia Dreamweaver MX 2004 Magic" :. New Riders
VioletSky Design :: http://www.violetsky.net

"Hide not your talents. They for use were made. What's a sundial in the
shade." -- Benjamin Franklin




Post Follow-Up to this message ]
Re: DW Template, optional BODY onLoad not working
 

Wallace Wilcox




quote this post edit post

IP Loged report this post

Old Post  09-30-05 - 11:21 PM  
Unfortunately, this means that our Contribute users would have to manually t
ype
in "loadPageTIC();" for the attribute (I'd already thought of this).  For mo
st
that wouldn't be a problem, but it is in our case, because the boss doesn't
want the users to have to remember anything or to have the possibility of a
typo rendering the page unusable.

However you have confirmed my belief that it would't work as described above
,
so I will present him with the answer and he can take it or leave it I guess
.

Thanks for your assistance.



Post Follow-Up to this message ]
Re: DW Template, optional BODY onLoad not working
 

Stephanie Sullivan




quote this post edit post

IP Loged report this post

Old Post  09-30-05 - 11:21 PM  
On 9/30/05 1:16 PM, in article dhjrtf$1mt$1@forums.macromedia.com, "Wallace
Wilcox" <webforumsuser@macromedia.com> wrote:

> Unfortunately, this means that our Contribute users would have to manually
> type in "loadPageTIC();" for the attribute (I'd already thought of this). 
 For
> most that wouldn't be a problem, but it is in our case, because the boss
> doesn't want the users to have to remember anything or to have the possibi
lity
> of a typo rendering the page unusable.

Hmmm... I have a client who has an editable body attribute that he updates
with Contribute. I don't honestly remember the exact steps. But it was quite
simple due to the template. Have you tried the steps in Contribute to see
what's required?

Stephanie Sullivan
Community MX Partner :: http://www.communitymx.com/author.cfm?cid=1008
Team Macromedia for Dreamweaver :: http://tinyurl.com/6huw3
Co-Author .: "Macromedia Dreamweaver MX 2004 Magic" :. New Riders
VioletSky Design :: http://www.violetsky.net

(Inspiration) - ³It's hard to describe. there'll be moments when you get a
spark, a gleam of light, and boom! you're gone. It seems easy. But then it
goes away, and it gets so incredibly hard.² - Robin Williams




Post Follow-Up to this message ]
Re: DW Template, optional BODY onLoad not working
 

Murray *TMM*




quote this post edit post

IP Loged report this post

Old Post  09-30-05 - 11:21 PM  
Steph:

The problem is that they would have to type that in de novo, as it were.  It
would be especially wonderful if there were a 6th parameter type: list.
This would let you define a list of choices, e.g.,

<!-- TemplateParam name="selectThis" type="List" value="choice1, choice2,
choice3, choice4" -->

And then when you go MODIFY | Template Properties, and select this
parameter, you get a select list where you can only make a single selection.

I think this would solve that problem.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Stephanie Sullivan" <stephanie@communitymx.com> wrote in message
news:BF630754.567C7%stephanie@communitymx.com...
> On 9/30/05 1:16 PM, in article dhjrtf$1mt$1@forums.macromedia.com,
> "Wallace
> Wilcox" <webforumsuser@macromedia.com> wrote:
> 
>
> Hmmm... I have a client who has an editable body attribute that he updates
> with Contribute. I don't honestly remember the exact steps. But it was
> quite
> simple due to the template. Have you tried the steps in Contribute to see
> what's required?
>
> Stephanie Sullivan
> Community MX Partner :: http://www.communitymx.com/author.cfm?cid=1008
> Team Macromedia for Dreamweaver :: http://tinyurl.com/6huw3
> Co-Author .: "Macromedia Dreamweaver MX 2004 Magic" :. New Riders
> VioletSky Design :: http://www.violetsky.net
>
> (Inspiration) - ³It's hard to describe. there'll be moments when you get a
> spark, a gleam of light, and boom! you're gone. It seems easy. But then it
> goes away, and it gets so incredibly hard.² - Robin Williams
>
>




Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 11:03 AM. Post New Thread   
  Previous Last Thread   Next Thread next
Dreamweaver archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top