View Full Version : Need some help with an idea for a family website. JS + PHP
bcarl314
11-05-2002, 12:58 PM
What I would like to do is create a site (for my family, friends, and relatives) that would allow them to post their Christmas, Birthday, Anniversary wish lists online.
Since alot of my relatives are not familliar with HTML in the slightest, I'm trying to design a site such that they will not need to copy and paste any URLs or the like.
I'm not too worried about the general page where you view what others would like, my problem is creating an EASY interface for people to post things they want (things they find online at amazon, target.com, or wherever).
With that in mind, here's my concept for the new product page:
1) Create a frame page with a "top" and "bottom" page.
The top page will contain a field for them to type in the site (ie www.amazon.com). Then they click on a button and that site is loaded into the bottom page.
2) They browse the site in the bottom page. While they're browsing, and clicking on links, the top frame is monitoring the current URL. So, when they get to an individual product page, they just click on a button on the top that says something like ("Add to my wish list")
This all sounds like fun but I've got 2 problems.
1) How can I stop the other site from busting out of the frameset
2) How can I monitor whats happening in the "bottom" frame from the top frame. Keep in mind, I cannot change the HTML from the bottom frame, because it's from other sites I don't own.
One option I've thought of is using PHP to include the other site and replace the "<head>" tag with "<head> some javascript interact with". But, I would rather find a way to access actions occuring on the bottom page from the top page.
Any ideas? tia
Roy Sinclair
11-05-2002, 03:33 PM
1) How can I stop the other site from busting out of the frameset
You can't. One of the basic principles enforced on the web is that your site can not be captured within someone else's site, thus your site can always break out of any frame some other site placed you in.
2) How can I monitor whats happening in the "bottom" frame from the top frame. Keep in mind, I cannot change the HTML from the bottom frame, because it's from other sites I don't own.
You can't. You not only can not alter those pages, you can not even read the url of those pages. If this was allowed a site could slip a hidden frame onto your browser then watch as you browsed a report that information back to the site [colr=red]without your knowledge[/color]. Add the other ability you wanted to prevent breakout and you could have a great big-brother spying system were those two things allowed.
Ok, now that we've got past all the bad news we've still got the problem of what you can do. I suggest you give them a button to pop-up another browser window where they can browse through links and when they find a link they want to post simply have them cut and paste the url from the other browser window to your browser window. Not as neat and tidy as what you wanted to do but this at least is possible and while your intentions were good it's should be obvious that those same capabilities you asked for could be misused in some very evil ways and that's why they aren't allowed.
snakewithatilda
11-05-2002, 04:08 PM
Originally posted by bcarl314
What I would like to do is create a site (for my family, friends, and relatives) that would allow them to post their Christmas, Birthday, Anniversary wish lists online.
Since alot of my relatives are not familliar with HTML in the slightest, I'm trying to design a site such that they will not need to copy and paste any URLs or the like.
I'm not too worried about the general page where you view what others would like, my problem is creating an EASY interface for people to post things they want (things they find online at amazon, target.com, or wherever).
With that in mind, here's my concept for the new product page:
1) Create a frame page with a "top" and "bottom" page.
The top page will contain a field for them to type in the site (ie www.amazon.com). Then they click on a button and that site is loaded into the bottom page.
2) They browse the site in the bottom page. While they're browsing, and clicking on links, the top frame is monitoring the current URL. So, when they get to an individual product page, they just click on a button on the top that says something like ("Add to my wish list")
This all sounds like fun but I've got 2 problems.
1) How can I stop the other site from busting out of the frameset
2) How can I monitor whats happening in the "bottom" frame from the top frame. Keep in mind, I cannot change the HTML from the bottom frame, because it's from other sites I don't own.
One option I've thought of is using PHP to include the other site and replace the "<head>" tag with "<head> some javascript interact with". But, I would rather find a way to access actions occuring on the bottom page from the top page.
Any ideas? tia
Heres an idea. Make a form. Have it so that all they do is fill in some simple questions. Like:
1) what is the occasion?
2) What is the website adress that you are talking about?( you said something like add to favorites. Well im not sure how you would do it but since windows can add to favorites then there must be a way of doing the same. Another idea for you. Make a umm (http://www. [text thing here for them to fill in the name of website] .com) maybe thatll be a little better.
3) What is it that you would like?
etc. etc.
:) I hope this works for ya, and good luck on your site :thumbsup: .
bcarl314
11-05-2002, 04:29 PM
Is there a way to get the url from a pop-up window in the parent window using JS??? If so, that may work.
Something like...
<!--
function getURL() {
myURL = parent.popUp.document.href;
return myURL;
}
//-->
mordred
11-05-2002, 04:38 PM
In JS, you can only retrieve URLs of documents that belong to the same server where the "asking" script also is hosted. Everything else should throw an "Access denied" error. Privacy matters.
SpeedFreak
11-06-2002, 10:53 AM
the easiest way to do it is instead of having a top frame to monitor, just have a popup to monitor which can be launched by submitting of a form on your site :)
dysfunctionGazz
11-09-2002, 02:41 PM
Um if ur relatives are gonna be posting stuff on the site, u could save urself some work and just use a message forum...?
www.proboards.com u can get it for free or 6.99USD a month, good deal.
Look at mine:
http://dy5function.proboards7.com
Yup.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.