Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

What Language For Business Website?

Options
  • 30-05-2008 12:11pm
    #1
    Registered Users Posts: 8,449 ✭✭✭


    Hey guys, I might be helping my dad out with an attempt to make a website for his business but I've only ever done one website in college and that was in first year, a real simple one in HTML.

    I'm wondering what is the best languange to do a website in? HTML from what I remember seemed very basic. What language is this site done in for example? The drop down boxes wouldn't be possible in html would they?

    Anyway I've got a programming background so I have no problem with learning the stuff and doing the work, I'de just like to get some input from the knowledgeable people of boards.

    Thanks.


Comments

  • Registered Users Posts: 11,987 ✭✭✭✭zAbbo


    whats the website?


  • Registered Users Posts: 8,449 ✭✭✭Call Me Jimmy


    Well it's for a HR company that he'll be launching in the near future and will be basically for information about the company, contact details etc. Think of your typical small business website that doesn't do anything crazy.


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    Dropdown boxes are done in HTML; for instance this HTML will generate a dropdown list with three options and a submit button.

    [html]
    <select id="lstDropdown">
    <option value="1">Value 1</option>
    <option value="2">Value 2</option>
    <option value="3">Value 3</option>
    </select>
    <input type="submit" id="cmdSubmit" value="submit form" />
    [/html]

    However, to process what the user has entered when a form is submitted, you will most likely have to use a server-side scripting or programming language like perl, PHP, ASP, asp.net etc.

    If you were using ASP, you could use the following
    If Request.Form("cmdSubmit") <> "" Then
        Dim sOption
        sOption = Request.Form("lstDropdown")
        Response.Write("You selected: " & sOption)
    End If
    

    When the user submits the form, the code will check what option was selected and write a message to the screen saying the selected value. If you view the source of the page, you will only see the HTML for the dropdown boxes, but not the ASP code, as this is executed by the webserver, not the browser.


  • Registered Users Posts: 8,449 ✭✭✭Call Me Jimmy


    I see. Thanks for the info. So HTML would usually be the language of choice, with scripting providing the more advanced features.

    So basically is there any reason I shouldn't use HTML?

    And also are there any book recommendations you could make?


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    You can't not use (X)HTML really.

    http://www.w3schools.com/ is a good starter.


  • Advertisement
  • Registered Users Posts: 8,449 ✭✭✭Call Me Jimmy


    OK thanks, I'll check that out. I was just never clear on all that HTML/XHTML/ASP/PERL stuff I thought they were all exclusive.


  • Registered Users Posts: 7,739 ✭✭✭mneylon


    Your browser reads HTML. On the server side it could be perl, php, asp, asp.net etc.,

    It doesn't really matter :)


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    To structure the page you use (X)HTML. To define the formatting, you should use CSS.

    There's also client side scripting; normally JavaScript. This allows you to access the page elements, and get or set their attributes. For instance, when you click the "quick reply" button on this page, it makes the textbox at the bottom of the page editable.

    This is a basic example that has a text entry box and a button. When the user clicks the button, it will trigger a JavaScript function that shows a pop-up message displaying the text that the user entered.
    <script type="text/JavaScript">
        function doAlert()
        {
            var sValue = document.getElementById("txtInput").value;
            var x = alert("You entered " + sValue);
        }
    </script>
    <input type="text" id="txtInput" value="" />
    <input type="button" value="click me" id="btn1" onclick="doAlert()" />
    


  • Registered Users Posts: 8,449 ✭✭✭Call Me Jimmy


    Hmmm... interesting. So I should run through all the HTML and javascript stuff on w3schools, then have a look at CSS stuff (the point of which seems to be to avoid repitition?) and then I should have enough technical knowledge to have a go at a website, correct?


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    I would start with XHTML and CSS, and then look at JavaScript. One of the major points of CSS is to separate structure from design as well as avoiding the same declarations over again.

    e.g.

    [html]
    <font color="blue" face="arial" size="2"><b>text</b></font>
    <font color="blue" face="arial" size="2"><b>text</b></font>
    <font color="blue" face="arial" size="2"><b>text</b></font>
    <font color="blue" face="arial" size="2"><b>text</b></font>
    <font color="blue" face="arial" size="2"><b>text</b></font>
    [/html]

    can be changed to:

    [html]
    <style type="text/css">
    .myClass
    {
    font-family: arial;
    font-size: 10pt;
    color: blue;
    font-weight: bold;
    }
    </style>
    <div class="myClass">text</div>
    <div class="myClass">text</div>
    <div class="myClass">text</div>
    [/html]

    So, change the CSS in one place, and the changes are made throughout the site.


  • Advertisement
  • Registered Users Posts: 8,449 ✭✭✭Call Me Jimmy


    Ah yea I see, right so thanks for the help and examples, really appreciate it. No doubt I'll be back over the coming weeks!


Advertisement