Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa HTML marquee in html
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


sai kumar
marquee in html
2 Answer(s)      2 years and 7 months ago
Posted in : HTML


hie frns,i am creating a web site and in that if any user enter any text it shoul scroll in the web site at bottom as marquees..how can i recive da msg frm user how can i do it using html..can any one help me.. thanks in advance


Advertisement
View Answers

May 25, 2012 at 5:10 PM


The given code displays the marquee in the horizontal direction. Firstly, it will allow the user to enter text. As the user clicks the button, the function will create a marquee tag that will display text given by you.

<script>
function showMarquee(){
var text = document.getElementById('text');
  if (text.value!== " ") {
    document.write("<marquee behavior='scroll' direction='right'>" + text.value + "</marquee>");
  }
  else {
    alert("Enter Input!");
  }
}
</script>
<pre>
Enter text: <input type="text" id="text"> <input type="button" value="submit" onclick="showMarquee();">
</pre>


May 25, 2012 at 5:35 PM


hi thanks for replying boss i have another doubt.if the database contains a message of time 05:00 to 06:00 the same msg should be displayed as marquee in the bottom of the page.below is the example if the data base contains a message"hai" with timings 04:00 to 05:00 it shoul display from 04:00 to 05:00 as a marquee similarly every msg will contain certain timings and that message should be displayed in that time only as a marquee.i have done a code but i am not getting the output corectly. below is the code

<%@page import="java.util.Date"%> // <%@page import="java.util.Calendar"%> <%@page language="java" import="java.sql.*"%> <%@page language="java" import="java.io.*"%>

<%
    /* String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/"; */

    /* Calander c = (new Date()).;
     System.out.println(Short.valueOf((short) c.get(Calendar.HOUR)));

    int val = Short.valueOf((short) c.get(Calendar.HOUR)); */
    Date d = new Date();
    long l = d.getTime();
    String query = "select messag from message where broadcast_in_time>="
            + l + "and broadcast_end_time<=" + l;
     String msg = "";

    try {

        String connectionURL = "jdbc:mysql://localhost:3306/messgbro";
        Connection connection = null;
        Statement statement = null;
        ResultSet rs = null;
        Class.forName("com.mysql.jdbc.Driver").newInstance();
        connection = DriverManager.getConnection(connectionURL, "root",
                "");
        if (connection == null) {
%>
<%="connection is null"%>
<%
    }
        statement = connection.createStatement();

        String QueryString = "SELECT messag from message";
        rs = statement.executeQuery(QueryString);
    while (rs.next()) {
        msg = rs.getString("messag");
%><%=msg%>
<%

%>
<FONT SIZE="4" FACE="courier" COLOR=blue><MARQUEE WIDTH=100%
        BEHAVIOR=SCROLL LOOP=10><%=msg%>
    </MARQUEE> </FONT>
<%
    }
    } catch (Exception except) {
        except.printStackTrace();
    }
%>

please correct it if any corrections are to be made

thanks in advance



Related Tutorials/Questions & Answers:
MARQUEE in HTML
MARQUEE in HTML  How can use MARQUEE in HTML
MARQUEE in HTML
MARQUEE in HTML  hii, How can use MARQUEE in HTML?   hello,, Marquee is used in order to rotate the text which is enclosed in marquee tags. <marquee> welcome</marquee>
Advertisements
marquee in html
marquee in html  hie frns,i am creating a web site and in that if any user enter any text it shoul scroll in the web site at bottom as marquees..how can i recive da msg frm user how can i do it using html..can any one help me
HTML marquee tag
HTML marquee tag  What is Marquee Tag in HTML?  Marquee Tag in html rolls the text horizontally or vertically based on the parameters. A simple syntax to use marquee is as follows: <marquee>Hello World<
HTML
HTML  What is a tag? How can we use MARQUEE in HTML
HTML
HTML  What is Semantic HTML? What are the reasons for validating a HTML
HTML
HTML  What is Semantic HTML? What are the reasons for validating a HTML
HTML
HTML  What is SPAN in HTML
html
html  How to add the calendar in html code
html
html  diffrence between html and xml
Html
Html  What is HTML? What is a Hypertext link
HTML
HTML  What is BODY in HTML document
HTML
HTML  What is HTML? What is a Hypertext link
HTML
HTML  What is HTML? What is a Hypertext link
html
add a header in the html page  what we can do to add a header in the html page
html
html  what we can do to add a header in the html page
html
html  what we can do to add a header in the html page
HTML
HTML  how can we give the unlimited size in the html
html
html  i want a registration page in html with good background
html
html  how to convert html page into jsp page
HTML
HTML  How do we specify page breaks in HTML
HTML
HTML  Hi, What is the full form of HTML? Thanks   Hi, The HTML stands for HyperText Markup Language. HTML is used to create webpage for world wide web. Web pages are accessed by web browsers and then shown
html
html  sir i am new to eclipse and i am created a html program and also tomcat is running successfully in side the eclipse.but now how i deploy that html program in the eclipse
html
Adding Header in HTML  what we can do to add a header in the html page
html
html  how we can give the form actions in html after register button in the login page
HTML
HTML  How do we create a link? What are the three types of form tags in HTML
html
html  Can we Access database through html page and how,if not then why
html
html  For what is used HTML?   Using HTML we can create a Web Page which can be viewed through a Web Browser over Internet. HTML describes... or the End Tag is defined as </> . The whole HTML document is enclosed
Html
Html  in the web page if judge select the age and category then automatically under that conditions the details will be display in the form of grid give me that code in html and java
html
html   write a html program to print "HELLO WORD"in red coaler font size 12 and italic stile   Here is a html code that display the message "Hello World" in red font with size 12 and in italics. <html> <
Html
Html  i am select the dateofbirth through the html browser.but it can not save into the sql server 2008 database.any special code required to store the date in database by using java servlets
Advertisements
 

 

 

DMCA.com