Posted By: zawam ()
Posted On: 02/26/2008 08:00 am
|
Hey
This is what i am trying to do.
Have a page, with two frames, in the upper frame there is a terms of service, and an agree button, Call it agree.html. in the lower frame there is a warning "Please agree to tos", call that warning.html.
When the terms are agreeded to, the top goes to a control panel, i want the bottom frame to know when the top frame is no longer agree.html.
Like an if statement, if agree.html in upper frame, show warning.html, if not agree.html then show content.html
Any ideas on how i can do this?
Thanks
|
|
Posted By: Dinkar (Moderator)
Posted On: 02/26/2008 10:35 am
|
Add JS code to change the source of the lower frame.
|
|
Posted By: g1smd (Moderator)
Posted On: 02/26/2008 11:14 am
|
I would completely dump the frames and use PHP includes to build the page at the server end and have some scripting on the server to sort it all out. I wouldn't use Javascript at the browser end.
|
|
Posted By: Prowler (Moderator)
Posted On: 02/27/2008 12:41 am
|
When it comes to implementing a solution - many developers never agree on a common theme. It is like the old days where in a clock showroom none of the clocks will be synchronized with each other.
It is like the Perl's motto: 'There's more than one way to do it.'
Use any method which will achieve what you need with the lowest number of man hours spent which at the same time gives you the maximum flexibility.
Another technique to consider is the use of AJAX here.
|
|
Posted By: Hampstead ()
Posted On: 02/27/2008 12:45 am
|
It could be built in Flash too.
|
|
Posted By: g1smd (Moderator)
Posted On: 02/27/2008 12:13 pm
|
Does the solution need to be search-engine friendly?
|
|
Posted By: Hampstead ()
Posted On: 02/27/2008 11:44 pm
|
if so php would be best.
|
|
Posted By: zawam ()
Posted On: 03/04/2008 04:24 pm
|
Hey
I decided JS was the best solution for the project. I realise i could do this in flash, php, asp and all the other languages, however, it wouldnt work how i wanted it.
Its either PHP and AJAX or HTML and HTML...
Frame use is a must, there is a very good reason, however i dont want to go into it...
I have more or less come up with the solution, its a little rough, might go for AJAX and PHP to perfect it...
|
|
Posted By: g1smd (Moderator)
Posted On: 03/04/2008 05:09 pm
|
Not everyone will have JS installed.
SE bots certainly don't execute JS code.
Beware that you might be locking search engines out of your site.
|
|
Posted By: Prowler (Moderator)
Posted On: 03/05/2008 12:23 am
|
If it is an internal page like "Accept TOS" then Search engines are not such an issue and the JS route is probably the simplest.
|
|
Posted By: zawam ()
Posted On: 03/11/2008 10:50 am
|
SEO is no worry, it is indeed tos, and other documents.
Still stumped on how to get it to work though. I just need a JS Code to detect if the main frame = x , else
|
|
Posted By: Curt ()
Posted On: 03/12/2008 10:05 pm
|
Think you are looking for code like this:
The code is testing if the page is the top page in the heirarchy of pages in the browser window or if it falls inside of a frameset. If it is not inside a frameset, it will redirect the page to the frameset that would normally contain that page within it. Hope that makes some sense. There are of course more elaborate codings to use, but the code above is about as simple as it's gonna get.
|
|
|