Hi everybody,
I'm relatively new in this language and I'm lost. I hope that's easy for you. I have a three frames page, one of them with the title, other with a list of possible links and the last with the information. I want that when you push one of the links, a information with this link is envoy to the information frame, it does some operations, and represents information depends on the link I push before.
For example, I have a series of links with numbers and I want to send the number I push to the information frame, and it multiply the number and represents it in the frame.
I hope you understand the problem...
thanks
Charly
Refresh a frame from other frame
Moderator: General Moderators
-
CharlyChang
- Forum Newbie
- Posts: 2
- Joined: Wed Aug 17, 2011 1:39 am
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Refresh a frame from other frame
I don't think you can send a link up and then back down, but I don't know for sure. What you might try is putting the links into the main page itself, instead of a frame. Then just set the link target attribute to the ID attribute of the information page.
-
CharlyChang
- Forum Newbie
- Posts: 2
- Joined: Wed Aug 17, 2011 1:39 am
Re: Refresh a frame from other frame
thanks for the advice Johan,
but due to the nature of the project, the frames are required. I think is easyer with <div> and css but it's no possible.
Thanks,
Charly
but due to the nature of the project, the frames are required. I think is easyer with <div> and css but it's no possible.
Thanks,
Charly
Re: Refresh a frame from other frame
Hello
I solved a similar problem - two frames where the left one presents a kind of menu. A click one of the buttons (or links in your case) brings up a data entry form in the right frame. When the user saves the data, the menu on the left changes (in my case new options are added to enter "sub data"). Is this similar to what you want?
What I did:
a) Bringing up the correct form in the second frame is, as you said, easy. Pass the number as POST or something like that.
b) I suppose, as soon as the user hits the COMMIT button on the second frame, you will display a page with the result?
If so, include in that page:
echo "<SCRIPT>";
echo "window.top.frames['menu'].location='menu.php?NUMBER=".$number."';";
echo "</SCRIPT>";
where 'menu' is the name of the frame with the links, menu.php the script to diplay the links and $number the calculated number.
The frame with the links will be loaded again and all you have to do in menu.php is, check if $_REQUEST['NUMBER'] is set and if yes, display the number.
Let me hear, if that worked for you.
Gerhard
I solved a similar problem - two frames where the left one presents a kind of menu. A click one of the buttons (or links in your case) brings up a data entry form in the right frame. When the user saves the data, the menu on the left changes (in my case new options are added to enter "sub data"). Is this similar to what you want?
What I did:
a) Bringing up the correct form in the second frame is, as you said, easy. Pass the number as POST or something like that.
b) I suppose, as soon as the user hits the COMMIT button on the second frame, you will display a page with the result?
If so, include in that page:
echo "<SCRIPT>";
echo "window.top.frames['menu'].location='menu.php?NUMBER=".$number."';";
echo "</SCRIPT>";
where 'menu' is the name of the frame with the links, menu.php the script to diplay the links and $number the calculated number.
The frame with the links will be loaded again and all you have to do in menu.php is, check if $_REQUEST['NUMBER'] is set and if yes, display the number.
Let me hear, if that worked for you.
Gerhard