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.. thanks in advance

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

Ads









Related Tutorials/Questions & Answers:
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<
Advertisements
ModuleNotFoundError: No module named 'marquee'
ModuleNotFoundError: No module named 'marquee'  Hi, My Python... 'marquee' How to remove the ModuleNotFoundError: No module named 'marquee... to install padas library. You can install marquee python with following command
ModuleNotFoundError: No module named 'marquee-scroll'
ModuleNotFoundError: No module named 'marquee-scroll'  Hi, My... named 'marquee-scroll' How to remove the ModuleNotFoundError: No module named 'marquee-scroll' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'marquee-sdk'
ModuleNotFoundError: No module named 'marquee-sdk'  Hi, My Python... 'marquee-sdk' How to remove the ModuleNotFoundError: No module named 'marquee-sdk' error? Thanks   Hi, In your python environment
html
html  diffrence between html and xml
html
html  How to add the calendar in html code
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 to convert html page into jsp page
html
html  i want a registration page in html with good background
HTML
HTML  how can we give the unlimited size in the 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
html  how we can give the form actions in html after register button in the login page
html
Adding Header in HTML  what we can do to add a header in the html page
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
HTML
HTML  I have created an info.html file for the applet.The class file is located in a directory different from the HTML file.The info.html file I have created is below. <HTML> <HEAD> <BODY> <APPLET Code
HTML
HTML  in html how can we can upload the file <tr> <td><strong>Video of the work:</strong> <td><b>... the file give me the code for this in html and java
HTML
HTML  how can we design the gird form view in html i want the following fields in the grid form The fields are Name of the candidate,Title... me the coding for this in html
Html
Html  I was designing a webpage, i need to create selection boxes one beside other, how i'll be able to do it using HTML code, Please give me a sample code for that... looking forward for your usefull code
Html
:48:44 PM Author : SAMSUNG --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...; <head> <meta http-equiv="Content-Type" content="text/html
Html
:48:44 PM Author : SAMSUNG --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01...; <head> <meta http-equiv="Content-Type" content="text/html
HTML
where i can store in the database SEND ME THE CODE FOR THIS IN JAVA AND HTML
Html
Html  in html form for the address by using input as textarea i am writing the code as <tr> <td valign="top"><strong>Address: </strong></td> <td><textarea name="Address" rows="8
Html
Html  can we send data from one html page to another html page? if yes how?   Yes, using javascript. 1)page1.html: <html> <form type=get action="page2.html"> <table> <tr> <td>First Name
HTML
it shows as null. here is the html code for date of birth: <tr> <

Ads