By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,744 Members | 1,716 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,744 IT Pros & Developers. It's quick & easy.

automatically loading a new page in a frame.

P: n/a
the basic idea here is that I want a web page that is made up of
frames to redirect automatically to a frame depending on an if
statement...

if($1 == $2)
{
load url1.php in frame "main"
}else
{
load url2.php in frame "main"
}

The frame "main" is an <iframeif that makes a difference.

Thanks,
O

Jan 29 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Rik
McGowan <Bo******@gmail.comwrote:
the basic idea here is that I want a web page that is made up of
frames to redirect automatically to a frame depending on an if
statement...

if($1 == $2)
{
load url1.php in frame "main"
}else
{
load url2.php in frame "main"
}
The frame "main" is an <iframeif that makes a difference.
It all depends on where $1 & $2 are coming from. If it's server-side, a
simple if statement and an echo()ed src attribute is all it takes.

--
Rik Wasmus
Jan 29 '07 #2

P: n/a
maybe I should have been clearer. I just need a line of code that will
automatically load a specific page in a specific frame.

I'm not sure what you mean by an echo()ed src attribute?

On Jan 29, 10:43 pm, Rik <luiheidsgoe...@hotmail.comwrote:
McGowan <Boome...@gmail.comwrote:
the basic idea here is that I want a web page that is made up of
frames to redirect automatically to a frame depending on an if
statement...
if($1 == $2)
{
load url1.php in frame "main"
}else
{
load url2.php in frame "main"
}
The frame "main" is an <iframeif that makes a difference.It all depends on where $1 & $2 are coming from. If it's server-side, a
simple if statement and an echo()ed src attribute is all it takes.

--
Rik Wasmus
Jan 29 '07 #3

P: n/a
Rik
McGowan <Bo******@gmail.comwrote:
On Jan 29, 10:43 pm, Rik <luiheidsgoe...@hotmail.comwrote:
>McGowan <Boome...@gmail.comwrote:
the basic idea here is that I want a web page that is made up of
frames to redirect automatically to a frame depending on an if
statement...
if($1 == $2)
{
load url1.php in frame "main"
}else
{
load url2.php in frame "main"
}
The frame "main" is an <iframeif that makes a difference.It all
depends on where $1 & $2 are coming from. If it's server-side, a
simple if statement and an echo()ed src attribute is all it takes.
maybe I should have been clearer. I just need a line of code that will
automatically load a specific page in a specific frame.

I'm not sure what you mean by an echo()ed src attribute?
Euhm? Does not make it clearer.

Here's what I can make of it with your info:

print '<iframe src="'.(($foo = $bar) ? 'url1.php' : 'url2.php' ).'">';
--
Rik Wasmus
Jan 29 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.