Announcement

Collapse
No announcement yet.

Change src files based on actions?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change src files based on actions?

    Howdy-

    I've been all over the web during the past 3 hours trying to find the right way to do this. Hopefully somebody can help me out.

    This is a theoretical example of what I want to accomplish.

    [*]Directory 1
    index.php
    * navigation1.html
    gymclass.php

    The index page for Directory 1 is a frameset that has navigation1.html as a nav frame, and gymclass.php as the content frame.
    [*]Directory 2
    index.php
    * navigation2.html
    running.php
    jumping.php

    The index page in Directory 2 is a frameset that has a navigation2.html as a nav frame and running.php as the content frame.

    * navigation2.html is the same as navigation1.html, except navigation2.html contains links to sub sections of the section that was chosen.

    Ex:
    navigation1.html
    Home
    Activities
    Hours of Operation
    Contact Us

    Navigation2.html
    Home
    Activities
    -Running
    -Jumping
    Hours of Operation
    Contact Us

    Okay this is the interesting part...

    On gymclass.php, I have two links for running.php and jumping.php. If you select running.php, it is linked to the index for Directory2 - no problem there. But if you select jumping.php, there is no way (that I can figure out) to make it show navigation2.html as a nav, and jumping.php as the main. It would show jumping.php in the frameset for Directory1.

    My question being, is there any way to specify what the main content page will be in the index file for Directory2. So I could call http://www.mygymclass.com/Directory2...action=jumping

    I've been thumbing through my php books, and digging through the manual on http://www.php.net, but I can't find any way to do this that looks right. There looks like there are some ways that I could work it out, but none jumped out as being "the way" to do it.

    I would assume that I would have to set both running.php & jumping.php up as actions, the code looking something like this:

    Code:
    if ($action=="") {
      $action="running";
    }
    
    if ($action=="running") {
    
      echo "<frameset>";
      echo "<frame name=\"navigation\" target=\"main\" src=\"navigation2.html\">";
      echo "<frame name="main" src="running.php">";
      echo "</frameset>";
    }
    
    if ($action=="jumping") {
    
      echo "<frameset>";
      echo "<frame name=\"navigation\" target=\"main\" src=\"navigation2.html\">";
      echo "<frame name="main" src="jumping.php">";
      echo "</frameset>";
    }
    Is that somewhat right? I'm mainly concerned with the syntax of the actions themselves.

    ANY help would be appreciated

    -jim


    "The dot-com bust has cleared out the carpetbaggers and left the Internet to those who really care about it"
    - Jon Ippolito, new-media curator, Guggenheim Museum

  • #2
    For once I answered my own question:

    http://www.bronx-bombers.com/Develop...action=running

    http://www.bronx-bombers.com/Develop...action=jumping



    That's neat

    -jim

    "The dot-com bust has cleared out the carpetbaggers and left the Internet to those who really care about it"
    - Jon Ippolito, new-media curator, Guggenheim Museum

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X