943,614 Members | Top Members by Rank

Ad:
Dec 22nd, 2008
0

template with editable <body> tag

Expand Post »
Is it posible to have the body tag in an editable region of a template. I want to PreLoad images on some of the pages and not others.

I've tried
<body
<!-- TemplateBeginEditable name="body_tag" -->
<!-- TemplateEndEditable -->
>

but get an error message.

Alternatively, can I preload images in another area of the body OR head - and how would I do that?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
bob on whidbey is offline Offline
32 posts
since Oct 2007
Dec 23rd, 2008
0

Re: template with editable <body> tag

You cant do that as half of that could would inevitably be in the head(Which couldnt execute it anyway) and half in the body, so thats a structuaral mistake.
Last edited by ccube921; Dec 23rd, 2008 at 8:27 am.
Reputation Points: 13
Solved Threads: 6
Junior Poster in Training
ccube921 is offline Offline
93 posts
since Oct 2008
Dec 23rd, 2008
0

Re: template with editable <body> tag

Thanks.

I've been preloading images in the onload opton of the body tag.
How can I use a template - for the basic structure of the web page -and also have the ability to preloadimages?
Reputation Points: 10
Solved Threads: 0
Light Poster
bob on whidbey is offline Offline
32 posts
since Oct 2007
Dec 23rd, 2008
0

Re: template with editable <body> tag

I'm not familiar with template use, how does it work?
Reputation Points: 13
Solved Threads: 6
Junior Poster in Training
ccube921 is offline Offline
93 posts
since Oct 2008
Dec 26th, 2008
0

Re: template with editable <body> tag

Use a stylesheet to select the images.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Dec 26th, 2008
0

Re: template with editable <body> tag

Click to Expand / Collapse  Quote originally posted by ccube921 ...
I'm not familiar with template use, how does it work?
A template is a web page that has editable and non-editable regions. The template isn't actually posted on the web, but it is used to create other pages.

Typically, many pages in a web site will use the same template. This forces a common structure for those pages. Moreover, you can change the template and it automatically changes all the pages that are based on that template.

Templates are normally used when you let a client or some other non-web designer person update/edit their web site with Adobe's Contribute. I think Contribute is a good product that meets a very real need. Few people can create a web site but almost all can update/edit their web site with Contribute.
Reputation Points: 10
Solved Threads: 0
Light Poster
bob on whidbey is offline Offline
32 posts
since Oct 2007
Dec 26th, 2008
0

Re: template with editable <body> tag

Click to Expand / Collapse  Quote originally posted by MidiMagic ...
Use a stylesheet to select the images.
I'm not sure how that would be done with CSS.

My goal was to preLoad the images so they would be ready for a quick image swap on a mouse roll-over. Perhaps this is an old-fashioned concept that is not needed with faster download speeds.

I solved my problem by keeping the onLoad event within the body tag, which is, of course, in a non-editable region.
<body onLoad="LoadAllFiles()">
Then, I include the LoadAllFiles() function within the editableRegion of all pages. For those pages where I want to preload the images, I include the following:

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadimages() { //v3.0

[snip some standard code]

function LoadAllFiles() {
  MM_preloadimages('../images/Photos/1.jpg','../images/Photos/2.jpg','../images/Photos/3.jpg','../images/Photos/4.jpg',     '../images/Photos/5.jpg','../images/Photos/6.jpg','../images/Photos/7.jpg','../images/Photos/8.jpg','../images/Photos/9.jpg','../images/Photos/10.jpg','../images/Photos/11.jpg','../images/Photos/12.jpg','../images/Photos/13.jpg','../images/Photos/14.jpg')
}
//-->
</script>

If the web page has no files that I want to preload I merely insert:

<script language="JavaScript" type="text/JavaScript">
<!--
function LoadAllFiles() {}
//-->
</script>
Reputation Points: 10
Solved Threads: 0
Light Poster
bob on whidbey is offline Offline
32 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Background Image Problem
Next Thread in HTML and CSS Forum Timeline: i am new





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC