Results 1 to 4 of 4

Thread: Buttons not working for me

  1. #1
    Join Date
    Sep 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Buttons not working for me

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link href="ClassSchedule.css" rel="stylesheet" type="text/css" /> 
    <title>My Class Schedule</title>
    <meta name="sudha" content="text/html; charset=UTF-8"/>
    <h1><center>My Class Schedule </center> </h1>
    <div>
    <b>NAME : </b><i> Sudha Kovid Kolli</i><br />
    <b>STUDENT ID : </b><i>10797711</i><br />
    <b>SUBJECT : </b><i>IST 276</i><br />
    </div>
    </head>
    <body>
    <script type="text/javascript">
    function DoIST276()
    {
    var theDiv = document.getElementById("btn1");
    theDiv.innerHTML = "<p> Subject Name :IST 276 (Introduction to Internet Programming) <br/>" +
    "IST 276 deals with the client side work on Java Script,CSS and HTML...It is a very interesting subject for building" +
    "web-pages and make them look in very beautiful manner same as the professor himself. <br /><br /><br />" +
    "PROFESSOR : Dr.Bob "cool" Allen <br />" +
    "ROOM NO : 201-A Computer Science Building <br />" +
    "E-Mail : allen_r@mercer.edu </p>";
    }
    function DoCSC204()
    {
    var theDiv = document.getElementById("btn2");
    "<p> Subject Name : CSC 204 (Programming 1) <br />"
    "CSC204 deals with introduction to Java Programming it includes programming,Desiging 2D and 3D figures. <br />" +
    "This class meets in room:306 on mon,wed,thu @ 2:00PM and meets for lab on tuesday @ 1:30PM.<br />" +
    "PROFESSOR: Dr.Laurie White <br />" +
    "ROOM No : 202, ComputerScienceBuilding" +
    "E-Mail : white_la@mercer.edu</p>";
    }
    function DoCSC206(){
    var theDiv = document.getElementById("btn3");
    "<p> Subject Name : CSC 206 (Visual Programming) <br />" +
    "CSC 206 Deals with C#, Which needs a CSC204 as pre-requisit .net is very interesting subject because we will be desining lot" +
    "of images windows which we use in our daily professional life.This class meets every tuesday and thursday from 3:00PM to 4:15PM in room 204.<br />" +
    "PROFESSOR: Dr.Laurie White <br />" + 
    "ROOM No : 202, ComputerScienceBuilding" +
    "E-Mail : white_la@mercer.edu</p>";
    }
    function DoSSE591() {
    var theDiv = document.getElementById("btn4");
    "<p> Subject Name : SSE 591(Software System Engineering) <br />" +
    "SSE 591 has three projects it deals with masters degree program, writing a secure code,C++ on standard template library" +
    "and QT creator works. This class meets in school of engineering building <br/>" +
    "PROFESSOR : Dr.Paul MacNeil" +
    "E-Mail : Macneil_p@mercere.edu</p>";
    }
    
    </script>
    <div>
    <INPUT TYPE = "button" NAME = "IST276" VALUE = "IST276" onclick = "IST276">
    <button type="btn2" onclick="DoIST276();">IST 276</button>
    <button type="btn3" onclick="DoCSC206();">CSC206</button>
    <button type="btn4" onclick="DoCSC204();">CSC204</button>
    </div>
    <div id = "btn1" style = "background-color:black; color:white;">
    </div>
    <div id = "btn2" style = "background-color:black; color:white;"> 
    </div>
    <div id = "btn3" style = "background-color:black; color:white;">
    </div>
    <div id = "btn4" style = "background-color: black; color:white;">
    </div>
    </body>
    </html>
    Here above is my program the buttons I have assigned are not working can someone help me please.This is serious
    Last edited by jscheuer1; 09-28-2010 at 03:38 AM. Reason: format code

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link href="ClassSchedule.css" rel="stylesheet" type="text/css" /> 
    <title>My Class Schedule</title>
    <meta name="sudha" content="text/html; charset=UTF-8"/>
    <h1><center>My Class Schedule </center> </h1>
    <div>
    <b>NAME : </b><i> Sudha Kovid Kolli</i><br />
    <b>STUDENT ID : </b><i>10797711</i><br />
    <b>SUBJECT : </b><i>IST 276</i><br />
    </div>
    </head>
    <body>
    <script type="text/javascript">
    function DoIST276()
    {
    var theDiv = document.getElementById("btn1");
    theDiv.innerHTML = "<p> Subject Name :IST 276 (Introduction to Internet Programming) <br/>" +
    "IST 276 deals with the client side work on Java Script,CSS and HTML...It is a very interesting subject for building" +
    "web-pages and make them look in very beautiful manner same as the professor himself. <br /><br /><br />" +
    "PROFESSOR : Dr.Bob \"cool\" Allen <br />" +
    "ROOM NO : 201-A Computer Science Building <br />" +
    "E-Mail : allen_r@mercer.edu </p>";
    }
    function DoCSC204()
    {
    var theDiv = document.getElementById("btn2");
    theDiv.innerHTML = "<p> Subject Name : CSC 204 (Programming 1) <br />" +
    "CSC204 deals with introduction to Java Programming it includes programming,Desiging 2D and 3D figures. <br />" +
    "This class meets in room:306 on mon,wed,thu @ 2:00PM and meets for lab on tuesday @ 1:30PM.<br />" +
    "PROFESSOR: Dr.Laurie White <br />" +
    "ROOM No : 202, ComputerScienceBuilding" +
    "E-Mail : white_la@mercer.edu</p>";
    }
    function DoCSC206(){
    var theDiv = document.getElementById("btn3");
    theDiv.innerHTML = "<p> Subject Name : CSC 206 (Visual Programming) <br />" +
    "CSC 206 Deals with C#, Which needs a CSC204 as pre-requisit .net is very interesting subject because we will be desining lot" +
    "of images windows which we use in our daily professional life.This class meets every tuesday and thursday from 3:00PM to 4:15PM in room 204.<br />" +
    "PROFESSOR: Dr.Laurie White <br />" + 
    "ROOM No : 202, ComputerScienceBuilding" +
    "E-Mail : white_la@mercer.edu</p>";
    }
    function DoSSE591() {
    var theDiv = document.getElementById("btn4");
    theDiv.innerHTML = "<p> Subject Name : SSE 591(Software System Engineering) <br />" +
    "SSE 591 has three projects it deals with masters degree program, writing a secure code,C++ on standard template library" +
    "and QT creator works. This class meets in school of engineering building <br/>" +
    "PROFESSOR : Dr.Paul MacNeil" +
    "E-Mail : Macneil_p@mercere.edu</p>";
    }
    
    </script>
    <div>
    <INPUT TYPE = "button" NAME = "IST276" VALUE = "IST276" onclick = "DoIST276();">
    <button type="btn2" onclick="DoIST276();">IST 276</button>
    <button type="btn3" onclick="DoCSC206();">CSC206</button>
    <button type="btn4" onclick="DoCSC204();">CSC204</button>
    </div>
    <div id = "btn1" style = "background-color:black; color:white;">
    </div>
    <div id = "btn2" style = "background-color:black; color:white;"> 
    </div>
    <div id = "btn3" style = "background-color:black; color:white;">
    </div>
    <div id = "btn4" style = "background-color: black; color:white;">
    </div>
    </body>
    </html>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2010
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    HI john,

    did u found the error could please tell me my mistake. Thanks in advance

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Just compare the two files.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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