Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Apr 2009
    Location
    Earth - sometimes sky :-)
    Posts
    121
    Thanks
    51
    Thanked 2 Times in 2 Posts

    How to load *.html into a DIV? or how to do this with HTML/CSS?

    Hi to all!

    How can I load an external .html file into a DIV? like the old school think with iFrame.

    Or how can I do that if I click on "Product" link in the left DIV then I should get the product.html content in the right DIV ?

    Thanks for any solution...

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    It's not SEO friendly AT ALL (not that frames are either), and it will not work so well for users with javascript disabled, but you can modify and use the method demonstrated and described here to achieve your goal:
    http://rowsdower.freehostia.com/page...avascript.html
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • Users who have thanked Rowsdower! for this post:

    joda (04-26-2009)

  • #3
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • Users who have thanked twodayslate for this post:

    joda (04-26-2009)

  • #4
    Regular Coder
    Join Date
    Apr 2009
    Location
    Earth - sometimes sky :-)
    Posts
    121
    Thanks
    51
    Thanked 2 Times in 2 Posts
    Ok,
    What is the best way to solve this problem?

    What is the best way to load an external .html to the current page into a DIV?
    Lets say if I have a left menu bar in a left DIV and if I clock on something in the left DIV I should load some .html page into the right DIV....

  • #5
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    Hi!

    Thank you for your time spent for me...
    Sorry if I make misspelling,English language is not my capital language...

    So,now, that wot the tab menu is very interesting for me but not the answer what I'm trying to figure out.
    Exactly,lets say:

    I have a left DIV and a right DIV.
    I load a menu into the left DIV with PHP from a menu.txt file where a can always modify the content of the menu.txt and so I modify the menu in the leht DIV. When I click on some menu lets it be "Mother board" I wish in the right DIV to load a page with all the motherboard I have at the moment filtered out from the database and saved the list in mb.html and that mb.html should be visible int the right DIV. If I click on the left menubar onto "LCD monitors" so I filter out from the database all the lcd monitors and generate a page lcds.html and should be loaded into the right DIV.

    It should be SEO friendly and I wish to use some script or some resolve with HTML,PHP and CSS.

    Thank you.
    php includes? the tabs will work - just put them to the left. it is actually better because you will have no external files.
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • #6
    Regular Coder
    Join Date
    Apr 2009
    Location
    Earth - sometimes sky :-)
    Posts
    121
    Thanks
    51
    Thanked 2 Times in 2 Posts
    Ok,this idea is great and I thinking about how to make a link between two DIV's. How can we make a link from the menu "Motherboard" in the left DIV to loading the included file to right DIV? Can you post a short code for as...?


  •  

    Posting Permissions

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