I have tried that above but the font awesome icons are not visible right.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Callpatientnurse.aspx.vb" Inherits="SulaSignar.Callpatientnurse" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
if (!('speechSynthesis' in window)) {
alert("You don't have speechSynthesis");
}
$('[id*=gvDetails]').on('click', function () {
debugger;
var term = $(this).closest('tr').find('[id*=lblName]').html();
var termroom = $(this).closest('tr').find('[id*=lblRoomNo]').html();
var message = term + "Please Come and see the Nurse in :";
message += "\nRoom No:" + termroom;
var voices = window.speechSynthesis.getVoices();
var speech = new SpeechSynthesisUtterance();
speech.voice = voices[2];
speech.rate = 1;
speech.pitch = 1;
alert(term);
speech.text = message;
speechSynthesis.speak(speech);
return false;
});
});
</script>
</div>
<table class="auto-style1">
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="Back To Menu" />
</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="auto-style2" colspan="3">
<asp:GridView ID="gvDetails" runat="server" AutoGenerateColumns="False" Width="447px">
<Columns>
<asp:BoundField DataField="Account" HeaderText="Account" />
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
<asp:LinkButton ID="lblVoice" runat="server" CssClass="voice"><i class="fa fa-volume-down"></i></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RoomNo">
<ItemTemplate>
<asp:Label ID="lblRoomNo" runat="server" Text='<%# Eval("acnos") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="timein" HeaderText="TimeIn" />
</Columns>
</asp:GridView>
</td>
</tr>
</table>
</form>
</body>
</html>
Account | Name | Room No | Time In |
05-00009 |
|
1 |
10:18 AM |
05-00013 |
|
2 |
10:46 AM |
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CallPatient.aspx.vb" Inherits="SulaSignar.CallPatient" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="../Css/Fontawesome4.7.0.css">
<link rel="stylesheet" href="../Css/Fontawesome4.7.0.css"/>
<script type="text/javascript" src="../Scripts/jquery-1.8.3.min.js"></script>
<asp:Button ID="Button1" runat="server" Text="Back Menu" />
<asp:GridView ID="gvProduct" runat="server" AutoGenerateColumns="False" Width="583px">
<Columns>
<asp:BoundField DataField="account" HeaderText="Account" />
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<div>
<asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
<asp:LinkButton ID="lblVoice" runat="server" CssClass="voice"><i class="fa fa-volume-down"></i></asp:LinkButton>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Room No">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("acnos") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblRoomNo" runat="server" Text='<%# Eval("acnos") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="timein" HeaderText="Time In" />
</Columns>
</asp:GridView>
<script type="text/javascript">
$(function () {
if (!('speechSynthesis' in window)) {
alert("You don't have speechSynthesis");
}
$('[id*=gvProduct]').on('click', function () {
debugger;
var term = $(this).closest('tr').find('[id*=lblName]').html();
var termroom = $(this).closest('tr').find('[id*=lblRoomNo]').html();
var message = term + "Please Come and see the Doctor in:";
message += "\nRoom No:" + termroom;
var voices = window.speechSynthesis.getVoices();
var speech = new SpeechSynthesisUtterance();
speech.voice = voices[3];
speech.rate = 1;
speech.pitch = 1;
alert(term);
speech.text = message;
speechSynthesis.speak(speech);
return false;
});
});
</script>
</form>
</body>
</html>