Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

change iframe source according to date

Posted on 2003-02-27
12
Medium Priority
?
252 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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
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.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

572 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