Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16
  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    6
    Member #
    28602
    So here is what im trying to do. I have a website section in div's one will contain upcomming events is there a way to have an external file so that if i want to update the upcomming events "aside" div i can do it just once instead of going to every page and updating the information? my teacher told me it had to do with ajax but that he doesnt cover that in his class.....and now i just got to figure it out lol !!! see attached pictures and code.

    Please not im new to webdesign and my codding may not be the best practices. THANKS!!!

    This is what i want to go into the aside content but i want it to be pulled form an external file on my site.






    HTML Code:
                    <h2>Upcoming Event 1</h2>
                        <p>
                            blandit vel fermentum at, ultrices ac magna. Aliquam augue sem, tincidunt id tempor id, facilisis ut risus. Proin placerat felis ut sapien posuere adipiscing in ut dolor.
                        </p>
                    <h2>Upcoming Event 2</h2>
                        <p>
                            blandit vel fermentum at, ultrices ac magna. Aliquam augue sem, tincidunt id tempor id, facilisis ut risus. Proin placerat felis ut sapien posuere adipiscing in ut dolor.
                        </p>
                    <h2>Upcoming Event 3</h2>
                        <p>
                            blandit vel fermentum at, ultrices ac magna. Aliquam augue sem, tincidunt id tempor id, facilisis ut risus. Proin placerat felis ut sapien posuere adipiscing in ut dolor.
                        </p>
                    <h2>Upcoming Event 4</h2>
                        <p>
                            blandit vel fermentum at, ultrices ac magna. Aliquam augue sem, tincidunt id tempor id, facilisis ut risus. Proin placerat felis ut sapien posuere adipiscing in ut dolor.
                        </p>
                    <h2>Newsletter Signup</h2>
                        <p>
                            <form action="" method="">
                                <table>
                                    <td>
                                        <label for="email">Email:</label>
                                        <input type="text" name="email" id="email" />
                                    </td>
                                    <td>
                                        <input type="submit" value="Subscribe" />
                                    </td>
                                </table>
                            </form>
                        </p>

  2.  

  3. #2
    WDF Staff George Dolidze's Avatar
    Join Date
    Apr 2011
    Location
    Irvine, CA
    Posts
    2,487
    Member #
    27540
    Liked
    416 times
    It's quite simple. Just use PHP Includes. It's super easy and you have to know exactly 0 PHP.
    Also check out iframes and CMS's, although I don't know a thing about those.
    My freelancer website: DolidzeDesign



    You only need a parachute if you plan on skydiving twice.

  4. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    6
    Member #
    28602
    Thanks for your quick response i still need alittle guidance please here is what i have tried to no avail

    in my aside div tag i placed

    <div id="aside">
    <?php include("aside.php"); ?>
    </div>
    I then created a aside.php file containing

    Code:
                    <h2>Upcoming Event 1</h2>
                        <p>
                            blandit vel fermentum at, ultrices ac magna. Aliquam augue sem, tincidunt id tempor id, facilisis ut risus. Proin placerat felis ut sapien posuere adipiscing in ut dolor.
                        </p>
                    <h2>Upcoming Event 2</h2>
                        <p>
                            blandit vel fermentum at, ultrices ac magna. Aliquam augue sem, tincidunt id tempor id, facilisis ut risus. Proin placerat felis ut sapien posuere adipiscing in ut dolor.
                        </p>
                    <h2>Upcoming Event 3</h2>
                        <p>
                            blandit vel fermentum at, ultrices ac magna. Aliquam augue sem, tincidunt id tempor id, facilisis ut risus. Proin placerat felis ut sapien posuere adipiscing in ut dolor.
                        </p>
                    <h2>Upcoming Event 4</h2>
                        <p>
                            blandit vel fermentum at, ultrices ac magna. Aliquam augue sem, tincidunt id tempor id, facilisis ut risus. Proin placerat felis ut sapien posuere adipiscing in ut dolor.
                        </p>
                    <h2>Newsletter Signup</h2>
                        <p>
                            <form action="" method="">
                                <table>
                                    <td>
                                        <label for="email">Email:</label>
                                        <input type="text" name="email" id="email" />
                                    </td>
                                    <td>
                                        <input type="submit" value="Subscribe" />
                                    </td>
                                </table>
                            </form>
                        </p>
    And no luck all my files are located in the same folder so i know its not that kind of issue

  5. #4
    WDF Staff George Dolidze's Avatar
    Join Date
    Apr 2011
    Location
    Irvine, CA
    Posts
    2,487
    Member #
    27540
    Liked
    416 times
    Did you give your main page a .php extension? Also, you have to upload it to a server that has the php software. Unless you want to get the software for your computer.
    My freelancer website: DolidzeDesign



    You only need a parachute if you plan on skydiving twice.

  6. #5
    Junior Member
    Join Date
    Jul 2011
    Posts
    6
    Member #
    28602
    ah that might be the problem im not using a server its just a folder on my computer with the files so when you "navigate" it its just linking to files saved on my pc

  7. #6
    WDF Staff George Dolidze's Avatar
    Join Date
    Apr 2011
    Location
    Irvine, CA
    Posts
    2,487
    Member #
    27540
    Liked
    416 times
    Yeah, you either need a server, or PHP software.
    There's some free hosting out there that you can use. It's fast sign-up, and simple to use. 000webhost.com is a good one
    Runt {} likes this.
    My freelancer website: DolidzeDesign



    You only need a parachute if you plan on skydiving twice.

  8. #7
    Junior Member
    Join Date
    Jul 2011
    Posts
    6
    Member #
    28602
    Ah thanks for the information but unfortunately that wont work for me in this case because my teacher just copies my folder to his computer and views it like that....and i know he wont go through to trouble .

  9. #8
    WDF Staff George Dolidze's Avatar
    Join Date
    Apr 2011
    Location
    Irvine, CA
    Posts
    2,487
    Member #
    27540
    Liked
    416 times
    You could give him a link... but okay, sorry I couldn't help
    My freelancer website: DolidzeDesign



    You only need a parachute if you plan on skydiving twice.

  10. #9
    Junior Member
    Join Date
    Jul 2011
    Posts
    6
    Member #
    28602
    Oh, Please dont take what i said the wrong way i really appreciate it i am actually looking into your link just to try and learn a little more about it... but my teacher is ....welll he is a teacher lol. you have been a great help!

  11. #10
    WDF Staff George Dolidze's Avatar
    Join Date
    Apr 2011
    Location
    Irvine, CA
    Posts
    2,487
    Member #
    27540
    Liked
    416 times
    Quote Originally Posted by Runt {}, post: 212913
    Oh, Please dont take what i said the wrong way i really appreciate it i am actually looking into your link just to try and learn a little more about it... but my teacher is ....welll he is a teacher lol. you have been a great help!
    Nah dude it's cool, I didn't take it the wrong way
    My freelancer website: DolidzeDesign



    You only need a parachute if you plan on skydiving twice.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

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

Search tags for this page

load external html in div

Click on a term to search for related topics.
All times are GMT -6. The time now is 10:29 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com