template with editable <body> tag

Reply

Join Date: Oct 2007
Posts: 20
Reputation: bob on whidbey is an unknown quantity at this point 
Solved Threads: 0
bob on whidbey bob on whidbey is offline Offline
Newbie Poster

template with editable <body> tag

 
0
  #1
Dec 22nd, 2008
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?
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 76
Reputation: ccube921 is an unknown quantity at this point 
Solved Threads: 6
ccube921 ccube921 is offline Offline
Junior Poster in Training

Re: template with editable <body> tag

 
0
  #2
Dec 23rd, 2008
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.
If I have been helpful add to my reputation!
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 20
Reputation: bob on whidbey is an unknown quantity at this point 
Solved Threads: 0
bob on whidbey bob on whidbey is offline Offline
Newbie Poster

Re: template with editable <body> tag

 
0
  #3
Dec 23rd, 2008
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?
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 76
Reputation: ccube921 is an unknown quantity at this point 
Solved Threads: 6
ccube921 ccube921 is offline Offline
Junior Poster in Training

Re: template with editable <body> tag

 
0
  #4
Dec 23rd, 2008
I'm not familiar with template use, how does it work?
If I have been helpful add to my reputation!
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: template with editable <body> tag

 
0
  #5
Dec 26th, 2008
Use a stylesheet to select the images.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 20
Reputation: bob on whidbey is an unknown quantity at this point 
Solved Threads: 0
bob on whidbey bob on whidbey is offline Offline
Newbie Poster

Re: template with editable <body> tag

 
0
  #6
Dec 26th, 2008
Originally Posted by ccube921 View Post
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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 20
Reputation: bob on whidbey is an unknown quantity at this point 
Solved Threads: 0
bob on whidbey bob on whidbey is offline Offline
Newbie Poster

Re: template with editable <body> tag

 
0
  #7
Dec 26th, 2008
Originally Posted by MidiMagic View Post
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>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC