![]() | ![]() | ![]() |
| |||||||
| Forums | Register | Groups | Awards | Arcade | Pets | T-Bucks / T-Store | Invite Your Friends | Blogs | Mark Forums Read |
| Web Design Forums and discussions on webdesign |
Web Design | |||||||||
|
|
|
|
| |||||
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Civilians | Hi there, I'm building a page in PHP which displays a calendar. Each day on the calendar is a hyperlink, which should update two inline frames on that very same page. When the user clicks on one of the hyperlinks (that represents a day) a variable should be passed to both of the iframes, like this : <a href="Grapic_day.php?day=31" target="Graphic_day">31</a> <a href="List_day.php?day=31" target="List_day">31</a> though, now I've made TWO links, and I would like BOTH iframes updated trough ONE link. Is there any way to do this, using some kind of javascript, so that both destination urls will get the correct variable, WHITHOUT refreshing the parent window?!? I didn't get much further then : <a href="#" onclick="document.Graphic_day.src="Graphic_day.php ?day=31"; document.List_.src="List_day.php?day=31";">31</a> But that didn't work. Forgive me if this looks a little bit stupid, but I'm no javascript expert... can anyone help me on this?!? |
|
| | #2 (permalink) |
| Civilians | Well, to give an answer to my own question... :-S I've been searching for about a day right now, and I've come up with this solution, which I found somewhere on this discussion board. In the header of my document I've put this script : <SCRIPT LANGUAGE="javascript"> function SwitchFrames(url1,url2,url3) { parent.Graphic_day.location.href = url1 parent.List_dayly_views.location.href = url2 parent.List_dayly_hits.location.href = url3 } </SCRIPT> And in the body, where the links of each day appear I've used this link, which can perfectly be generated 31 times trough a PHP script, while passing on a different set of variables each time : <a href="javascript:SwitchFrames('Graphic_day.php?day =31','List_dayly_views.php?day=31','List_dayly_hit s.php?day=31');"> Worked for me! Hope it might be usefull for someone else too someday... ;o) Greetz! |
|
![]() |
| Bookmarks |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: updating multiple powerpoint presentations? | Steve Rindsberg | Microsoft Applications | 1 | 10-05-2005 18:00 |
| Re: How do I run multiple PC's automatically after updating Powerpoin. | Steve Rindsberg | Microsoft Applications | 1 | 02-14-2005 20:00 |
| updating multiple charts at the same time | =?Utf-8?B?RWxsZW4=?= | Microsoft Applications | 2 | 11-23-2004 16:00 |
| updating multiple data sheet links | =?Utf-8?B?c3Bpeg==?= | Microsoft Applications | 1 | 11-11-2004 22:55 |
| Passing variables to a PivotChart? | steveski | Microsoft Applications | 1 | 06-16-2004 00:29 |
![]() | ![]() | ![]() |