?
Solved

change iframe source according to date

Posted on 2003-02-27
12
Medium Priority
?
251 Views
Last Modified: 2011-10-03
I'm trying to piece together a page that will load an iframe src based on what the date is. I've tried the change by day which gives me 7 choices, but even two weeks of changes would be great. by specific date would be best.

anybody doing this?

ds
0
Comment
Question by:dancinsully
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2
12 Comments
 
LVL 3

Expert Comment

by:NetWize
ID: 8034767
Hm,
how about:

<iframe src="iframe.html">
</iframe>

and in iframe.html you code

<html>
<head>
</head>
<body>
<script>
location.replace("iframe"+new Date().getDay()+".html");
</script>
</body>
</html>
0
 

Author Comment

by:dancinsully
ID: 8037656
then what do I title my different files?
0
 
LVL 30

Expert Comment

by:third
ID: 8038381
using that way you would be relying on the client user's date which means you clients can view different page on a certain page. use the server date by using a server-side script.
0
WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

 
LVL 3

Accepted Solution

by:
NetWize earned 200 total points
ID: 8040140
Your different files would be titled

iframe0.html //Sunday
through
iframe6.html //Saturday

third is right about the date, that this might depend on user settigs. But I assume you just want to present a different picture or banner every day in that iframe, so it really doesn't matter wich of these is actually shown?
0
 
LVL 30

Expert Comment

by:third
ID: 8040363
"that this might depend"

make it, that this will depend
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8040399
Let's split some hairs...

it WILL depend on user date... if that matters.
0
 
LVL 2

Expert Comment

by:IeuanJ
ID: 8041028
you could always declare it as server side script so then it would depend on the server date.
0
 
LVL 30

Expert Comment

by:third
ID: 8053984
IeuanJ,

  i'm sorry but your comment was already given on one of the comments above.


dancinsully,

  any luck?
0
 
LVL 2

Expert Comment

by:IeuanJ
ID: 8070440
ah so it is, apologies, I missed it.  My comment was in response to third and netwize talking about client dates.
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8070460
by the way... dancinsully, are you still "listening" to this?
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9115206
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9306229
It is time to clean this abandoned question up.

I am putting it on a clean up list for CS.

<recommendation>
points to NetWize

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&

0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question