473,473 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

My question for advance java related....

4 New Member
hi guys , In my case I working on one music portal..
I have one problem guys. In my system , after some ratings by users on uploader (artist) page . I want to display one hide button which is already there.
Ex- users are rate the particular song of artist then after I admin have satified after 3 rate out of 5 then one {send for license} button to display on artist page which is already hide.

Expand|Select|Wrap|Line Numbers
  1.  #btn1
  2.             {
  3.                 display:none;
  4.             }
this button is in one division which is separate,
Expand|Select|Wrap|Line Numbers
  1.  <div> 
  2.                 <form action="send_l.jsp">
  3.                     <input  id="btn1" type="submit" value="send for license"/>
  4.                 </form>
  5.             </div>
and I has been find ratings through ajax call to one jsp. and this counter display on artist_page jsp.]
Feb 2 '15 #1
3 1201
parthjpatel
4 New Member
Expand|Select|Wrap|Line Numbers
  1.  var a = 0;
  2.             setInterval(function ajaxcall()
  3.  
  4.             {
  5.  
  6.                 /*< audio controls >
  7.                      < source src = "bell-ringing-05.mp3" type = "audio/mpeg" >
  8.                      < /audio>*/
  9.                 var xmlhttp;
  10.                 if (window.XMLHttpRequest) {
  11.                     // code for IE7+, Firefox, Chrome, Opera, Safari
  12.                     xmlhttp = new XMLHttpRequest();
  13.                 }
  14.                 xmlhttp.onreadystatechange = function() {
  15.                     if (xmlhttp.readyState == 4) {
  16.                         var res = xmlhttp.responseText;
  17.                         //                        alert(res);
  18.                         if (res != a) {
  19.                             document.getElementById('counter').innerHTML = res;
  20.                             a = res
  21.                             abc();
  22.                             xyz();
  23.                         }
  24.                     }
  25.                 }
  26.                 xmlhttp.open("GET", "l_counter.jsp", true);
  27.                 xmlhttp.send();
  28.  
  29.             }, 6000); 
Feb 2 '15 #2
parthjpatel
4 New Member
Expand|Select|Wrap|Line Numbers
  1. <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
  3.  
  4. <sql:setDataSource driver="com.mysql.jdbc.Driver"
  5.                         url="jdbc:mysql://localhost:3306/music_portal"
  6.                         var="localSource"
  7.                         user="root"
  8.                         password=""/>   
  9.       <sql:query dataSource="${localSource}" var="result">
  10.           SELECT COUNT(s_id) as cnt from song_rating_tab where average>=3.5;
  11.       </sql:query>
  12.       <c:forEach items="${result.rows}" var="row">
  13.           <c:set var="cnt" value="${row.cnt}"> </c:set>
  14.  
  15.       </c:forEach>
  16.      <c:out value="${cnt}"/>
Feb 2 '15 #3
parthjpatel
4 New Member
above code is store the ratings in one divition name(counter).
Feb 2 '15 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: dlarsson | last post by:
Music CD experts: So, here's my problem. I burned (or tried to burn) my first audio or music CD on my computer using Windows Media Player. I "Rip-ed" the tracks from a source CD and...
15
by: Paul Morrison | last post by:
Hi all, I need to come up with some differences between arrays in Java and C, I have searched Google and so far all I have found is the following: Arrays in Java are reference types with...
6
by: sbalko | last post by:
Hi, I am trying to read Java-floats (IEEE 754 encoding) stored in a binary file from C (gcc on linux/i386, more specifically). Unfortunately, C seems to expect floats to be stored somewhat...
5
by: TZESENG | last post by:
DECEMBER 13, 2005 . Editions: N. America | Europe | Asia | Edition Preference News Analysis By Steve Hamm Source: http://www.businessweek.com/technology/content/dec2005/tc20051213_042973.htm...
5
by: Good Man | last post by:
Hi there I am trying to execute a custom-built java program on my linux server via PHP. Basically, a user uploads files via PHP, and then the java program performs some action on these files. ...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
8
by: jason.m.ho | last post by:
>From the common user perspective (like my grandma), why would they care if its a java applet or an ajax application? Say I want to make a chat system on my website...If i'm doing really involved...
1
by: PandurangPatil | last post by:
Can any one tell m why we r using destory(),exit(),halt() methods
3
by: Matt Ratliff | last post by:
Would all posts for NON Java programming please move to another newsgroup!! This group was established as a repository in which to communicate topics related to the Java programming language!!
7
by: Anthony Sox | last post by:
can anyone please provide me with the java new group server address e.g msnews.microsot.com thanx
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.