Link to home
Start Free TrialLog in
Avatar of dancinsully
dancinsully

asked on

change iframe source according to date

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
Avatar of NetWize
NetWize

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>
Avatar of dancinsully

ASKER

then what do I title my different files?
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.
ASKER CERTIFIED SOLUTION
Avatar of NetWize
NetWize

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"that this might depend"

make it, that this will depend
Let's split some hairs...

it WILL depend on user date... if that matters.
you could always declare it as server side script so then it would depend on the server date.
IeuanJ,

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


dancinsully,

  any luck?
ah so it is, apologies, I missed it.  My comment was in response to third and netwize talking about client dates.
by the way... dancinsully, are you still "listening" to this?
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:
https://www.experts-exchange.com/help/closing.jsp


Cd&

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&