Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. website generator

website generator

Scheduled Pinned Locked Moved Web Development
ai-codinghelptutorialquestion
4 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Richard Blythe
    wrote on last edited by
    #1

    Hey guys, I have been toying around with the idea of writing a website creation program geared to novice computer users. I have googled it and I can't find anything helpful in regards to how to structure the program or writing code generation. Can anybody point me in the right direction? may your code be error free

    H 1 Reply Last reply
    0
    • R Richard Blythe

      Hey guys, I have been toying around with the idea of writing a website creation program geared to novice computer users. I have googled it and I can't find anything helpful in regards to how to structure the program or writing code generation. Can anybody point me in the right direction? may your code be error free

      H Offline
      H Offline
      hxhl95
      wrote on last edited by
      #2

      That's relatively simple to do if you want to keep the generated site simple, but it gets complicated with each option you add. Lets say you want a script to ask the user for the site title, background color, and content. Then you probably want to have 3 , one for each option. The user fills them out, then clicks some sort of submit button, and then you would do something like this in Javascript: function generatesite(){ var title=document.titlebox.value; var bgcolor=document.bgcolorbox.value; var content=document.contentbox.value; document.write("<html> <head> <title>"+title+"</title> </head> <body bgcolor=\""+bgcolor+"\">+ <p>"+content+"</p> </body> </html>"); } Is that of any help? Or are you thinking of some other kind of website generator?

      R 1 Reply Last reply
      0
      • H hxhl95

        That's relatively simple to do if you want to keep the generated site simple, but it gets complicated with each option you add. Lets say you want a script to ask the user for the site title, background color, and content. Then you probably want to have 3 , one for each option. The user fills them out, then clicks some sort of submit button, and then you would do something like this in Javascript: function generatesite(){ var title=document.titlebox.value; var bgcolor=document.bgcolorbox.value; var content=document.contentbox.value; document.write("<html> <head> <title>"+title+"</title> </head> <body bgcolor=\""+bgcolor+"\">+ <p>"+content+"</p> </body> </html>"); } Is that of any help? Or are you thinking of some other kind of website generator?

        R Offline
        R Offline
        Richard Blythe
        wrote on last edited by
        #3

        Yes that's sort of the idea. What I want to do is create a Windows app that a novice user can drag and drop objects onto a design area and a html page will be written from that. The software would then assist them in FTP-ing those pages to a server. I feel that I can convert to html fairly easy but the monster I see is these items: Storing the html code behind the scenes: How can I store the html code effeciently? Obviously I can't use a long string object because any time a change is made, a new string object is initialized internally. Object distinction: For instance, what if I have two identical graphics places in different places. If the user moves one image, how do I know what image they are refering to? Do you get what I'm saying? I just can't find any code to help me.:confused: Thanks for your help so far! Richard may you code be error free

        H 1 Reply Last reply
        0
        • R Richard Blythe

          Yes that's sort of the idea. What I want to do is create a Windows app that a novice user can drag and drop objects onto a design area and a html page will be written from that. The software would then assist them in FTP-ing those pages to a server. I feel that I can convert to html fairly easy but the monster I see is these items: Storing the html code behind the scenes: How can I store the html code effeciently? Obviously I can't use a long string object because any time a change is made, a new string object is initialized internally. Object distinction: For instance, what if I have two identical graphics places in different places. If the user moves one image, how do I know what image they are refering to? Do you get what I'm saying? I just can't find any code to help me.:confused: Thanks for your help so far! Richard may you code be error free

          H Offline
          H Offline
          hxhl95
          wrote on last edited by
          #4

          I can help you with the first one. You don't need to store all the html code, you only need many variables like what I was doing in my first post. As for your second question, I'm stumped. You should ask those Microsoft guys how they made FrontPage ;P

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups