PDA

View Full Version : JS + frames - I need a solution


Crysty
11-06-2000, 09:55 AM
I want a solution for this problem:

I want to have different sources for a frame, based on a given condition.

For example, I can set a boolean variable to <true> if the surfer is coming from a certain domain name or <false> for the rest of the traffic. Let's call this variable "m_switch".

Ok,now, second phase
I have here a frameset like this on index.html:

<frameset border=0 framespacing="0" frameborder="NO" cols="0,*">
<frame name="hidden" src="hidden.html" scrolling="no" noresize>
<frame name="main" src="main1.html" scrolling="auto">
</frameset>

And, now, the real problem.
What code I need to use to open main1.html if "m_switch"=true and main2.html if "m_switch"=false ?

Crysty

[XZiBiT]
11-06-2000, 12:54 PM
wish i could help you....
but im no good @ that http://adultwebmasterinfo.com/ubb/tongue.gif

Rich
11-06-2000, 01:20 PM
Crysty,
I'm not sure how to solve the problem with javascript, but I think this script will do what you are trying to do. http://www.kastle.net/products/hostredirect/