Results 1 to 4 of 4

Thread: Iframe set URL based on link clicked

  1. #1
    Join Date
    Sep 2007
    Location
    Australia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Iframe set URL based on link clicked

    OK, hopefully I won't confuse you because I'm confused when I try to explain it to myself.

    I have a calendar in /events/month.php which is shown in an iframe on events.php. On /events/month.php, when an event is on the calendar, the date can be clicked and it shows the info of, say, /events/view_entry.php?id=4&date=20070929

    On index.php I have an iframe of /events/upcoming.php which shows the upcoming events and links to, say, /events/view_entry.php?id=4&date=20070929.

    I'm wondering, is it possible to have the page change to events.php and show /events/view_entry.php?id=4&date=20070929 (or whatever link to the /events/ folder is clicked) in the iframe?

    Your help will be appreciated.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I'm lost. Sorry.

    I think what you want can be accomplished with the target="framename" attribute.

    using "_parent" on the iframe page will make it open in the whole window (clearing the iframe as well)
    and using "iframename" on the main page will open in the iframe.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Sep 2007
    Location
    Australia
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the quick reply.

    What I meant to say was:

    upcoming.php links to the calendar events and is in an iframe on index.php.
    Is it possible for the links in upcoming.php to change from index.php to events.php and go to the correct page?

    Let me know if I'm still not clear enough and I'll draw a diagram if need be.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Is the question the TARGET FRAME or the URL that it goes to?

    The URL can be changed in the PHP itself, probably, or, with way too much would you could change it with javascript, but that's just silly.

    The Target Frame can be changed like I said in the last post.

    I *think* what you are asking can be fixed using _parent.

    Just use the target attribute:
    <a href="?d=123" target="_parent">

    Or, if you have more than one frame to worry about, _top will the outermost frame:
    <a href="..." target="_top">
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •