can you.... frame question..

liunx

Guest
Hi there, this is my first post here!<br />
<br />
I'm no html expert by any means so please bear with me :D <br />
<br />
Heres the deal<br />
<br />
I have a frames page split right smack down the middle..<br />
On the left side I have a site page loaded with my little 'submit links' page in it..<br />
<br />
On the right side, I have lets say a search engine loaded..<br />
<br />
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)<br />
<br />
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?<br />
<br />
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...<br />
<br />
Any ideas on this? <br />
<br />
Thanks! Zaaephod :cool:<!--content-->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?<!--content-->Yup, I have the database part covered.. I'm, using PHP with mySQL for another database, and that one is working no prob.. <br />
<br />
The thing i was wondering about was getting the url from the right frame into the page on the left in some form (variable)<br />
<br />
the code that you posted may be what I need, I will give that a try, but any other ideas would be great :)<br />
<br />
Oh by the way, I am writing the code in HTML mainly, with some PHP and mySQL bits in there too =)<!--content-->hmm. well first you will need to 'name' the frame with the site on it. eg.. 'urlframe' or something.<br />
<br />
Im not sure of the exact js code but i doubt it wont look much different to this<br />
<br />
document.urlframe.url<br />
<br />
probably<!--content-->
 
Back
Top