Click to See Complete Forum and Search --> : can you.... frame question..


Zaaephod
04-03-2003, 01:53 PM
Hi there, this is my first post here!

I'm no html expert by any means so please bear with me :D

Heres the deal

I have a frames page split right smack down the middle..
On the left side I have a site page loaded with my little 'submit links' page in it..

On the right side, I have lets say a search engine loaded..

The user browses in the right window, and when the arrive at the page they want to submit a link to, they click a button in the left frame (my page) and it either puts the URL into a variable, or saves it to a file (or whatever)

How do i get my page to grab the current url of the right side page exactly as it would appear in the address bar?

I would like this info to be put into a variable, to be added to a database (mySQL) ... i can handle that part .. its just getting the URL into a variable...

Any ideas on this?

Thanks! Zaaephod :cool:

PeOfEo
04-03-2003, 02:03 PM
Ok for updating that data base you are going to need a server side language. I would use asp.net, but thats the language what I am most comfortable with, you can use asp, asp.net, cgi, php, jsp. Anyways I am assuming that the frame on the left is the parent frame right since you are browsing on the left. This is going to involve some communication between the frames, I would like to say you can do something like x = frame1.url or something but it really depends on what language you use. I know it can be done with java script but I dont know that off the top of my head. The real qustion is after you have a value for the url do you know how to update your data base? Do you have a plan?

Zaaephod
04-03-2003, 02:20 PM
Yup, I have the database part covered.. I'm, using PHP with mySQL for another database, and that one is working no prob..

The thing i was wondering about was getting the url from the right frame into the page on the left in some form (variable)

the code that you posted may be what I need, I will give that a try, but any other ideas would be great :)

Oh by the way, I am writing the code in HTML mainly, with some PHP and mySQL bits in there too =)

smokingkills
04-03-2003, 05:08 PM
hmm. well first you will need to 'name' the frame with the site on it. eg.. 'urlframe' or something.

Im not sure of the exact js code but i doubt it wont look much different to this

document.urlframe.url

probably