
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

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>

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
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.