More Virtual Promote ... Gazette · Webmaster & SEO Tools · Scumware.com · Free Website Templates

SEF

Search Engine Forums
Helping to make the Web - Since 1998
Hyperseek Search Engine
Login Password Forget your password?    Trouble Logging In?
.
Forums Index Active Topics New Topics My Topics Search My Profile Register Inbox   Rules & TOS
.
 
Forum Index · Search Engine Forums · Building, Hosting & Maintaining Your Website · Coding & Databases - PHP, ASP, Perl, etc. · JS and Frames - Detect and Change
 
Add to hotlist
Reply to this thread Create a New Topic in this forum
Mark This Forum Read
Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend  
Moderator(s): Prowler, jcokos
Previous Topic Next Topic
Member Message

zawam
Joined: Oct 13, 2005
# Posts: 90

View the profile for zawam Send zawam a private message

Posted: 02/26/2008 08:00 am
Edit Message Delete Message Reply to this message

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






Dinkar
Moderator
Joined: Aug 12, 2001
# Posts: 4270

View the profile for Dinkar Send Dinkar a private message

Posted: 02/26/2008 10:35 am
Edit Message Delete Message Reply to this message

Add JS code to change the source of the lower frame.



g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10086

View the profile for g1smd Send g1smd a private message

Posted: 02/26/2008 11:14 am
Edit Message Delete Message Reply to this message

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.



Prowler
Moderator
Joined: Aug 14, 2000
# Posts: 1666

View the profile for Prowler Send Prowler a private message

Posted: 02/27/2008 12:41 am
Edit Message Delete Message Reply to this message

When it comes to implementing a solution - many developers never agree on a common theme. wink 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.



Hampstead
Joined: Feb 20, 2001
# Posts: 1942

View the profile for Hampstead Send Hampstead a private message

Posted: 02/27/2008 12:45 am
Edit Message Delete Message Reply to this message

It could be built in Flash too.



g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10086

View the profile for g1smd Send g1smd a private message

Posted: 02/27/2008 12:13 pm
Edit Message Delete Message Reply to this message

Does the solution need to be search-engine friendly?





Hampstead
Joined: Feb 20, 2001
# Posts: 1942

View the profile for Hampstead Send Hampstead a private message

Posted: 02/27/2008 11:44 pm
Edit Message Delete Message Reply to this message

if so php would be best.



zawam
Joined: Oct 13, 2005
# Posts: 90

View the profile for zawam Send zawam a private message

Posted: 03/04/2008 04:24 pm
Edit Message Delete Message Reply to this message

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...



g1smd
Moderator
Joined: Jul 28, 2002
# Posts: 10086

View the profile for g1smd Send g1smd a private message

Posted: 03/04/2008 05:09 pm
Edit Message Delete Message Reply to this message

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.



Prowler
Moderator
Joined: Aug 14, 2000
# Posts: 1666

View the profile for Prowler Send Prowler a private message

Posted: 03/05/2008 12:23 am
Edit Message Delete Message Reply to this message

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.



zawam
Joined: Oct 13, 2005
# Posts: 90

View the profile for zawam Send zawam a private message

Posted: 03/11/2008 10:50 am
Edit Message Delete Message Reply to this message

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



Curt
Joined: Eons Ago
# Posts: 3674

View the profile for Curt Send Curt a private message

Posted: 03/12/2008 10:05 pm
Edit Message Delete Message Reply to this message

Think you are looking for code like this:


Code: [copy]




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.


 
Forum Index · Search Engine Forums · Building, Hosting & Maintaining Your Website · Coding & Databases - PHP, ASP, Perl, etc. · JS and Frames - Detect and Change
Who's Online?
There are 211 guests and 1 members in the forums right now.
Reflects user activity within the last 5 minutes
Previous Topic Next Topic
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
  1. You have not yet logged in, or registered properly as a member
  2. You are a member, but no longer have posting rights.
  3. This is a private forum, for which you do not have permissions.

If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

If you cannot find this message, click here to Re-Send it.

If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread



Related Forum Topics



© 1995 - 2006  ·  iWeb, Inc  ·  DBA JimWorld Productions