Go Back   Trackpads Community > General Discussions > Computer and Technology > Web Design

Web Design Forums and discussions on webdesign

Web Design

Reply
 
LinkBack Thread Tools
Old 06-15-2004, 13:44   #1 (permalink)
Joop
Civilians

 
Default Updating multiple iframes and passing variables

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?!?
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Trackpads Information
Click to Visit
Old 06-16-2004, 11:23   #2 (permalink)
Joop
Civilians

 
Default Re: Updating multiple iframes and passing variables

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!
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


Community Information
Options
Quick Options
Trackpads Non-Commercial Ad
Copyright Information Click to Visit
Time
Server Time
All times are GMT -4. The time now is 09:58.
Copyright
Copyright Information
The header is based off of work by Vipixel.com and modified by this site. Trackpads and the Trackpads Logo are both Registered Trademarks of Jason Edwards and cannot be used without prior written permission.  The only exception is as a link back to this site. Trackpads is a private website run by a small legion of volunteers, 3 dogs, 12.5 cats and an army of small, super smart, bio-engineered mice with pointy hats and tutu's. Search Engine Friendly URLs by vBSEO 3.2.0 RC7
Archive Links
Archive Links
Page generated in 0.86263 seconds with 19 queries