Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2007
    Thanked 0 Times in 0 Posts

    Question Algorithm Feasibility Questions

    I am rather inexperienced when it comes to web development. I believe I have come up with a plan for how to do what I need to do, I need some direction as to whether this is the simplest implementation and/or where to go for help.

    I want to create about five *Div*s using JavaScript and the DOM, I would like to have the text in these Divs be imported from an already existing html files. Because I'm lazy and there just has to be a better way than retyping all this content into a CreateTextNode method. I'm guessing that Server Side Includes is the way to go with this, but really have no clue on how to make that really work, or even if it's the way to go.

    Once I have the *Div*s, then I am planning on using OnClick events to make them appear and dissapper using the visibility attribute. Does that sound like a good idea?

    TIA for any advice and reccomendations.

  • #2
    Regular Coder Actinia's Avatar
    Join Date
    Feb 2007
    Essex, UK
    Thanked 23 Times in 22 Posts
    This sounds as if using Ajax would be your best bet. The text to be included can be loaded as needed when the page is loaded (or on demand), and then used to populate your divs.

    You should also look at using the display property rather than the visibility property. Visibility: none still used space, display: none does not.

    John Rostron

  • #3
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Bucharest, ROMANIA
    Thanked 379 Times in 375 Posts
    hm... inexperience can be trated, but laziness...? Whichever solution you will choose you must experience it and get rid of laziness. Nothing is simple these days...

    Use includes. PHP includes. It is nothing fancy, except that your files should bear php extension, should be correct formatted (Doctype) and your server should accept php work on it. Google for PHP tutorials, includes, begginer, or things like that...
    Offshore programming


    Posting Permissions

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