PHP or something

Discussion in 'Software' started by mastermosley, Apr 13, 2006.

  1. mastermosley

    mastermosley Sergeant

    Ok i have a list of links on the right side of my page for downloads when you click a link i don't want to have to go to another page but just make the information to appear in the table to the side of it, so i don't have to reload the page. How would i do this?
     
  2. Coco

    Coco Sergeant Major

    The simplest way would of course be frames. Although basicly everyone hates frames. The only other way to actually do that would be with layers, but that approach would require loading the entire site upon the first visit. Which is not only slow but a waste of bandwidth.

    Normally you just don't do this, as it's just considered bad management, but if you really want to you use frames. What you should really do is simply put all the links into a separate file and then just include that file on every page so that it automaticly gets added. This approach makes the entire page load each time, but saves you from having to edit each page when you edit one link.

    At any rate, you should look into frames (which is just plain html and easy to use). Or look up how to use server side includes, which is just a single line that says what file you want to include in your page.
     
  3. goldfish

    goldfish Lt. Sushi.DC

    Is there a really, really good reason to not want to reload the site?

    Remember if you use CSS and link an external sheet in, then that will be cached. Keep the HTML down to a reasonable size and reload times won't be too badly hit.

    If you're still attached to the idea of no reloading, you could use a script to replace the contents of a div (or whatever) when you hit a link.
     
  4. talk2bks

    talk2bks Private E-2

    The best weapon is using PHP Functions. Write a function for your column on the right. Then place your headers and footers in other functions. Then each page will just quickly call up the function and should cut down on download time dramatically. Plus, if you need to change something on our left column, you only have to do it once in that function and not on every single page. That's what I would do.
     
  5. mastermosley

    mastermosley Sergeant

    Ya thats what i got going on:

    the include function
     
  6. Colemanguy

    Colemanguy MajorGeek

    Whats wrong with frames? It seems to work for most people i know.
     
  7. talk2bks

    talk2bks Private E-2

    frames are nice but they are not always consistant between browsers. This is something they are always trying to fix. This is especially true if someone is using a non-updated brower. If you are wanting to do what you are saying, try using Java. I'm not a java coder but I know it could be done.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds