HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 9th, 2008, 07:35 AM
motiejus motiejus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 12 motiejus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 50 sec
Reputation Power: 0
Same div tag through several html pages... please help.

HI,

I have several simple html pages and the footer. I want to ask if it's impossible to make the footer div tag the same in all html pages. I don't how to explain properly, but it is like inline frames, but conversely. I want this, because my footer has a little flash player and when you enter the site it's automatically playing songs, but when I am going through pages it's playing from the beginning and I want, that it plays continuosly...

Or maybe is another way to play song continuosly on the site?

Reply With Quote
  #2  
Old May 9th, 2008, 07:47 AM
GameYin GameYin is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Location: Whiteford, MD
Posts: 348 GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 11 h 54 m
Warnings Level: 5
Reputation Power: 60
Send a message via AIM to GameYin
MySpace
You would need frames for that.
__________________
Adwords Professional
You can give me

Reply With Quote
  #3  
Old May 9th, 2008, 07:47 AM
Ebot's Avatar
Ebot Ebot is offline
Meatball Surgeon
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Elbow deep in code
Posts: 1,040 Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)  Folding Points: 10015 Folding Title: Novice Folder
Time spent in forums: 1 Week 3 Days 3 h 37 m 17 sec
Reputation Power: 462
I usually do this thru the server side, so i don't know if there is a better way to do this, but the following should work for you:

<iframe src="footer.htm" width="100%" height="50" scrolling="no" frameborder="0">
__________________
The liver is evil and must be punished!

Reply With Quote
  #4  
Old May 9th, 2008, 09:46 AM
motiejus motiejus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 12 motiejus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 50 sec
Reputation Power: 0
Ok. If I put this code into pages (home.html, contacts.html, services.html, ...) than if I walk through pages this code should also reload or not?

(if this code will reload, than my music also reload and play from the beginning, which I don't want to be that)

<iframe src="footer.htm" width="100%" height="50" scrolling="no" frameborder="0">

Reply With Quote
  #5  
Old May 9th, 2008, 10:26 AM
Ebot's Avatar
Ebot Ebot is offline
Meatball Surgeon
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Elbow deep in code
Posts: 1,040 Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)  Folding Points: 10015 Folding Title: Novice Folder
Time spent in forums: 1 Week 3 Days 3 h 37 m 17 sec
Reputation Power: 462
yeah, if you never want the song to stop, then just use a regular frame.

Reply With Quote
  #6  
Old May 9th, 2008, 12:47 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Click here for more information.
 
Join Date: Jul 2004
Location: USA
Posts: 15,149 Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 5th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 2 Weeks 2 Days 2 h 47 m 18 sec
Reputation Power: 1294
Automatically playing music is one of the most annoying things that can be on a web site. The best solution is to use a popup-window.

Reasons to Avoid Frames and iFrames

My Top Ten List Of Extremely Annoying Web Page Design Elements!
Ten Annoying Website Design Mistakes
Comments on this post
Ebot agrees: yeah, i was planning on stating that as well.
__________________
Spreading knowledge, one newbie at a time.

Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

IE7: the generation 7 browser new in a world of generation 8 browsers.
Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

Reply With Quote
  #7  
Old May 11th, 2008, 01:53 AM
motiejus motiejus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 12 motiejus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 50 sec
Reputation Power: 0
Could you provide me an example on my footer.html to regular frames, that don't refreshes going trhough pages?

Sorry, I am new in html, just want to solve this problem...

Thanks

Reply With Quote
  #8  
Old May 12th, 2008, 06:38 AM
Ebot's Avatar
Ebot Ebot is offline
Meatball Surgeon
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Elbow deep in code
Posts: 1,040 Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Ebot User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)  Folding Points: 10015 Folding Title: Novice Folder
Time spent in forums: 1 Week 3 Days 3 h 37 m 17 sec
Reputation Power: 462
annoy your users at your own risk:


Frame examples

Reply With Quote
  #9  
Old May 13th, 2008, 04:19 AM
motiejus motiejus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 12 motiejus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 50 sec
Reputation Power: 0
Ok, IT doesn't work for me. This time I decided to use, I think, more simple way to do that. It should work also great with a popup window. But I have one problem: my site contains a lot of liks. I use a javascript tree menu. For example home (link1, link2, link3), services (link4, link5, link6), downloads (link7, link8, link9). In these large 3 pages (home, services, downloads) play different music. So, I should in the each link... page add a JS popup window, yes? I ahve done that, but when I press, for example, link1 and then link3, which plays tha same music, it opens the popup again. Two times the same music.

Is any way to make the same popup window not open?

Reply With Quote
  #10  
Old May 13th, 2008, 06:11 AM
GameYin GameYin is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Location: Whiteford, MD
Posts: 348 GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 11 h 54 m
Warnings Level: 5
Reputation Power: 60
Send a message via AIM to GameYin
MySpace
Leave the popup to happen onload. Then just check to see if it's there. Or on popup load, set a cookie. If cookie is set then don't do the onload for other pages.

Reply With Quote
  #11  
Old May 13th, 2008, 07:06 AM
motiejus motiejus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 12 motiejus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 50 sec
Reputation Power: 0
I found this popup script. But it works only for browser session.

Code:
<script type="text/javascript">

var popurls=new Array()
popurls[0]="http://www.sitename.com"
function openpopup(popurl){
var winpops=window.open(popurl,"","width=,height=")
}

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function loadornot(){
if (get_cookie('jkpopup')==''){
openpopup(popurls[Math.floor(Math.random()*(popurls.length))])
document.cookie="jkpopup=yes"
}
}

loadornot()
</script>


How, can I change this to work cookie in different pages?

Reply With Quote
  #12  
Old May 13th, 2008, 07:17 AM
motiejus motiejus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 12 motiejus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 50 sec
Reputation Power: 0
Maybe is some "if" statement? I don't learn javascript, but for example - ''if the site 'http://sitename.com' is loaded, then popup will not open again"?

Reply With Quote
  #13  
Old May 13th, 2008, 07:17 AM
motiejus motiejus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 12 motiejus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 50 sec
Reputation Power: 0
Maybe is some "if" statement? I don't learn javascript, but for example - ''if the site 'http://sitename.com' is loaded, then popup will not open again"?

Anyway, thanks guys for help

Reply With Quote
  #14  
Old May 13th, 2008, 08:24 AM
GameYin GameYin is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Location: Whiteford, MD
Posts: 348 GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 11 h 54 m
Warnings Level: 5
Reputation Power: 60
Send a message via AIM to GameYin
MySpace
Use this method to get the location. I won't give you the exact example since I haven't done JS in a while.
Code:
<script type="text/javascript">
if (document.home.src ="http://www.gameyin.com/whatever.html") {
//do someting
}
else {
//do something else
}
</script>

Reply With Quote
  #15  
Old May 13th, 2008, 01:05 PM
motiejus motiejus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 12 motiejus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 48 m 50 sec
Reputation Power: 0
I found that this code fits to me, but it has to be fixed.

Code:
<script type="text/javascript">
var popurls=new Array()

popurls[0]="music/dance.html"
popurls[1]="music/dj.html"
popurls[2]="music/hiphop.html"

function openpopup(popurl){
var winpops=window.open(popurl,"","width=370,height=10")
}
function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}
function loadornot(){
if (get_cookie('jkpopup')==''){
openpopup(popurls[Math.floor(Math.random()*(popurls.length))])
document.cookie="jkpopup=yes"
}
}
loadornot()
</script>


When I press one page, and another and another page with the same popup url (for example dj.html) it makes no changes, which is good. Because it's not refreshing and music is playing continously. But I want that it would refresh, if I press another page with different popup link (for example music/dance.html)

Is it possible?

Reply With Quote