website generator
-
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
-
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
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?
-
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?
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
-
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