Good Morning, I am trying to pass a parameters to a JS page that will alter what position the tool tip will appear. Say for instance I pass 1, This move the tip to the right, I pass 2 It move the tip to the left. I am at a loss how to do this can some one help. I will include the code for my page as well as the JS.
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% Option Explicit %>
<!--#include file="Connections/connDB.asp" -->
<!--#include file="functions.asp"-->
<!--#include file="functions.js"-->
<%
Dim cmdDelete__DeleteID
cmdDelete__DeleteID = "0"
if(Request("DeleteID") <> "") then
cmdDelete__DeleteID = Request("DeleteID")
Dim cmdDelete
set cmdDelete = Server.CreateObject("ADODB.Command")
cmdDelete.ActiveConnection = MM_connDB_STRING
cmdDelete.CommandText = "dbo.spPlanProducerRemove"
cmdDelete.Parameters.Append cmdDelete.CreateParameter("@RETURN_VALUE", 3, 4)
cmdDelete.Parameters.Append cmdDelete.CreateParameter("@JunctionID", 3, 1,4,cmdDelete__DeleteID)
cmdDelete.CommandType = 4
cmdDelete.CommandTimeout = 0
cmdDelete.Prepared = true
cmdDelete.Execute()
end if
%>
<%
Dim Recordset1__PlanID
Recordset1__PlanID = "0"
If (Request("PlanID") <> "") Then
Recordset1__PlanID = Request("PlanID")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_connDB_STRING
Recordset1.Source = "{call dbo.spProducerSelectByPlanID(" + Replace(Recordset1__PlanID, "'", "'") + ")}"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim Recordset1_total
Dim Recordset1_first
Dim Recordset1_last
' set the record count
Recordset1_total = Recordset1.RecordCount
' set the number of rows displayed on this page
If (Recordset1_numRows < 0) Then
Recordset1_numRows = Recordset1_total
Elseif (Recordset1_numRows = 0) Then
Recordset1_numRows = 1
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
' if we have the correct record count, check the other stats
If (Recordset1_total <> -1) Then
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
If (Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (Recordset1_total = -1) Then
' count the total records by iterating through the recordset
Recordset1_total=0
While (Not Recordset1.EOF)
Recordset1_total = Recordset1_total + 1
Recordset1.MoveNext
Wend
' reset the cursor to the beginning
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
' set the number of rows displayed on this page
If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
End If
%>
<%
Dim MM_paramName
%>
<%
' *** Move To Record and Go To Record: declare variables
Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined
Dim MM_param
Dim MM_index
Set MM_rs = Recordset1
MM_rsCount = Recordset1_total
MM_size = Recordset1_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' Code added by RILEYK2 on 6/7/07
If (Request("ProducerID") <> "") then
dim c
dim rs
c = 0
set rs = Recordset1
rs.MoveFirst
While (Not rs.EOF)
If rs.Fields.Item("ProducerID").Value = CInt(Request("ProducerID")) then
MM_param = c
end if
c = c + 1
rs.MoveNext
wend
rs.movefirst
end if
' End of RILEYK2 on 6/7/07 code
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
' use index parameter if defined, otherwise use offset parameter
If (MM_param = "") Then ' line added by RILEYK2 6/7/07
MM_param = Request.QueryString("index")
End if ' line added by RILEYK2 6/7/07
If (MM_param = "") Then
MM_param = Request.QueryString("offset")
End If
If (MM_param <> "") Then
MM_offset = Int(MM_param)
End If
' if we have a record count, check if we are past the end of the recordset
If (MM_rsCount <> -1) Then
If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last
If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' move the cursor to the selected record
MM_index = 0
While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
If (MM_rs.EOF) Then
MM_offset = MM_index ' set MM_offset to the last possible record
End If
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range
If (MM_rsCount = -1) Then
' walk to the end of the display range for this page
MM_index = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = MM_index
If (MM_size < 0 Or MM_size > MM_rsCount) Then
MM_size = MM_rsCount
End If
End If
' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If
' move the cursor to the selected record
MM_index = 0
While (Not MM_rs.EOF And MM_index < MM_offset)
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
End If
%>
<%
' *** Move To Record: update recordset stats
' set the first and last displayed record
Recordset1_first = MM_offset + 1
Recordset1_last = MM_offset + MM_size
If (MM_rsCount <> -1) Then
If (Recordset1_first > MM_rsCount) Then
Recordset1_first = MM_rsCount
End If
If (Recordset1_last > MM_rsCount) Then
Recordset1_last = MM_rsCount
End If
End If
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
' create the list of parameters which should not be maintained
MM_removeList = "&ProducerID=&DeleteID=&index=" ' Edited by RILEYK2 6/7/07--added "&ProducerID=&DeleteID=" to this list
If (MM_paramName <> "") Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "") Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev
Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
MM_moveParam = "offset"
If (MM_keepMove <> "") Then
MM_paramList = Split(MM_keepMove, "&")
MM_keepMove = ""
For MM_paramIndex = 0 To UBound(MM_paramList)
MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
End If
Next
If (MM_keepMove <> "") Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If
' set the strings for the move to links
If (MM_keepMove <> "") Then
MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
End If
MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
MM_moveFirst = MM_urlStr & "0"
MM_moveLast = MM_urlStr & "-1"
MM_moveNext = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
MM_movePrev = MM_urlStr & "0"
Else
MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="js/ajax-dynamic-content.js"></script>
<script type="text/javascript" src="js/ajax.js"></script>
<script type="text/javascript" src="js/ajax-tooltip.js"></script>
<script language="JavaScript" type="text/JavaScript"></script>
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function fnRefresh()
{
window.location.reload();
}
function fnAddProducer() {
//alert("call spPlanProducerAdd(PlanID, ProducerID), then refresh this page, with the new producer displayed if possible");
// Code revision 8/6/07 RILEYK2
// Every time the page in an iframe changes, a new entry is created in the browser history.
// So to eliminate excess history entries, I now utilize the Replace() method.
window.location.replace("salesdetail_produceradd.asp?PlanID=<%=
Request("PlanID")%>");
}
function fnRemoveProducer() {
if (fnConfirm()) {
window.location = "salesdetail_producers.asp?PlanID=<%=Request("PlanID")%>&DeleteID=" + document.getElementById("hidJunctionID").value;
//fnRefresh(); // was causing deletes to fail for end users
}
}
function fnConfirm(){
// CONFIRM REQUIRES ONE ARGUMENT
var message = "You are about to remove this producer from the current proposal. This action cannot be undone. Proceed? \r\n(NOTE: This action will NOT delete the producer record from the entire database, just from this proposal).";
// CONFIRM IS BOOLEAN. THAT MEANS THAT
// IT RETURNS TRUE IF 'OK' IS CLICKED
// OTHERWISE IT RETURN FALSE
var return_value = confirm(message);
// TEST TO SEE IF TRUE|FALSE RETURNED
if (return_value == true) {
// YOUR 'OK' SCRIPT GOES HERE
return true
}
else {
return false
}
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_goToURL() { //v3.0
window.location = "salesdetail_produceradd.asp?PlanID=<%=Request("PlanID")%>"
}
//-->
</script>
<script language="VBScript">
<!--
function fnProducerLetterMailMerge(producerid)
Location.href = "salesdetail_producermailmerge.asp?PlanID=<%=Request.querystring
("PlanID")%>&ProducerID=" & producerid
end function
function fnEnrollmentAssistanceEmail(producerid)
dim answer
answer = msgbox("You are about to generate an Enrollment Assistance e-mail. You will have the opportunity to edit the message in Lotus Notes prior to sending it. Proceed?", vbOKCancel+vbDefaultButton2)
if answer=vbOK then
Location.href = "salesdetailemailenrollment.asp?PlanID=<%=Request.querystring
("PlanID")%>&ProducerID=" & producerid
else
msgbox("E-mail generation cancelled.")
end if
end function
-->
</script>
<style type="text/css">
<!--
@import url("CSS/NRCG.css");
.style2 {font-size: 9px}
body {
background-color: #99CCFF;
}
-->
</style>
<script type="text/javascript" src="js/ajax-dynamic-content.js"></script>
<script type="text/javascript" src="js/ajax.js"></script>
<script type="text/javascript" src="js/ajax-tooltip.js"></script>
<link rel="stylesheet" href="css/ajax-tooltip.css" media="screen" type="text/css">
<link rel="stylesheet" href="css/ajax-tooltip-demo.css" media="screen" type="text/css">
</head>
<body onload=javascript:<%If Recordset1.EOF and Recordset1.BOF then%>;MM_goToURL();<%else%><%end if%>;MM_preloadImages('Templates/RecordNavBar/first.gif','Templates/
RecordNavBar/previous.gif','Templates/RecordNavBar/next.gif','Templates/
RecordNavBar/last.gif','Templates/RecordNavBar/first_sunken.gif',
'Templates/RecordNavBar/previous_sunken.gif','Templates/RecordNavBar/
next_sunken.gif','Templates/RecordNavBar/last_sunken.gif','Templates/
RecordNavBar/first_inactive.gif','Templates/RecordNavBar/previous_inactive.
gif','Templates/RecordNavBar/next_inactive.gif','Templates/RecordNavBar/
last_inactive.gif')>
<div id="laySelect" style="position:absolute; left:0px; top:-8px; width:509px; height:200px; z-index:3; visibility: visible;">
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<input name="hidJunctionID" type="hidden" id="hidJunctionID" value="<%=(Recordset1.Fields.Item("JunctionID").Value)%>" />
<table width="550" border="0" cellpadding="0" cellspacing="0">
<tr height="16">
<td width="67"> <label>Record: </label>
<a href="#" onmouseover="ajax_showTooltip('sdtproducerdetail.asp?ProducerID=<%=
(Recordset1.Fields.Item("ProducerID").Value)%>',this);return false" onmouseout="ajax_hideTooltip()">Info</a></td> </td>
<td width="23">
<% If MM_offset <> 0 Then %>
<A HREF="<%=MM_moveFirst%>"><img src="Templates/RecordNavBar/first.gif"
alt="first record" name="first" width="23" height="16" border="0" id="first"
onmousedown="MM_swapImage('first',','Templates/RecordNavBar/
first_sunken.gif',1)"
onmouseup="MM_swapImgRestore()"
onmouseover="MM_swapImgRestore()" onMouseOut="MM_swapImgRestore()"></A>
<% End If ' end MM_offset <> 0 %>
<% If NOT MM_offset <> 0 Then %>
<img src="Templates/RecordNavBar/first_inactive.gif" border="0" />
<% End IF %>
</td>
<td width="23">
<% If MM_offset <> 0 Then %>
<A HREF="<%=MM_movePrev%>"><img src="Templates/RecordNavBar/previous.gif"
alt="previous record" name="previous" border="0" id="previous"
onmousedown="MM_swapImage('previous',','Templates/RecordNavBar/
previous_sunken.gif',1)"
onmouseup="MM_swapImgRestore()"
onmouseover="MM_swapImgRestore()" onMouseOut="MM_swapImgRestore()"></A>
<% End If ' end MM_offset <> 0 %>
<% If NOT MM_offset <> 0 Then %>
<img src="Templates/RecordNavBar/previous_inactive.gif" border="0" />
<% End IF %>
</td>
<td width="37">
<input name="textfield" type="text" value="<%=(Recordset1_first)%>" size="1" readonly/>
</td>
<td width="23">
<% If Not MM_atTotal Then %>
<A HREF="<%=MM_moveNext%>"><img src="Templates/RecordNavBar/next.gif"
alt="next record" name="next" width="23" height="16" border="0" id="next"
onmousedown="MM_swapImage('next',','Templates/RecordNavBar/
next_sunken.gif',1)"
onmouseup="MM_swapImgRestore()"
onmouseover="MM_swapImgRestore()" onMouseOut="MM_swapImgRestore()"></A>
<% End If ' end Not MM_atTotal %>
<% If MM_atTotal Then %>
<img src="Templates/RecordNavBar/next_inactive.gif" border="0" />
<% End If 'MM_atTotal %>
</td>
<td width="23">
<% If Not MM_atTotal Then %>
<A HREF="<%=MM_moveLast%>"><img src="Templates/RecordNavBar/last.gif"
alt="last record" name="last" width="23" height="16" border="0" id="last"
onmousedown="MM_swapImage('last',','Templates/RecordNavBar/
last_sunken.gif',1)"
onmouseup="MM_swapImgRestore()"
onmouseover="MM_swapImgRestore()" onMouseOut="MM_swapImgRestore()"></A>
<% End If ' end Not MM_atTotal %>
<% If MM_atTotal Then %>
<img src="Templates/RecordNavBar/last_inactive.gif" border="0" />
<% End If 'MM_atTotal %>
</td>
<td width="49"> of <span class="Data"><%=(Recordset1_total)%></span>
</td>
<td colspan="2" width="177"><input name="butNew" type="submit" class="Nav" id="butNew" onClick="javascript:fnAddProducer()" value="ADD" /> <input name="butDelete" type="button" class="Nav" id="butDelete" onClick="javascript:fnRemoveProducer()" value="REMOVE" /></td>
<td width="50"></td>
<td width="50"><label><div align="center"></div></label></td>
</tr>
</table>
<table width="550" border="0" cellspacing="2" cellpadding="2" bgcolor="#FFFFFF">
<tr>
<td width="75"><label>Name</label></td>
<td width="220" class="Data"><a href="producerdetail.asp?ProducerID=<%=Recordset1.Fields.Item("ProducerID")
.Value%>" target="_parent"><%=(Recordset1.Fields.Item("FirstName").Value)%> <% If Recordset1.Fields.Item("PreferredName").Value <> "" Then %>(<%=(Recordset1.Fields.Item("PreferredName").Value)%>) <% End If %><%=(Recordset1.Fields.Item("LastName").Value)%></a></td>
<td width="75"><label>RPC</label></td>
<td width="150" class="Data"><%=(Recordset1.Fields.Item("RPC").Value)%></td>
</tr>
<tr>
<td><label>Firm Name</label></td>
<td class="Data"><%=(Recordset1.Fields.Item("FirmName").Value)%></td>
<td><label>Internal</label></td>
<td><Span class="Data"><%=(Recordset1.Fields.Item("Internal").Value)%></Span></td>
</tr>
<tr>
<td><label>Brkr/Dealer</label></td>
<td class="Data"><%=(Recordset1.Fields.Item("BrokerDealer").Value)%></td>
<td><label>FSR</label></td>
<td><Span class="Data"><%=(Recordset1.Fields.Item("FSR").Value)%></Span></td>
</tr>
<tr>
<td height=5><SPACER TYPE="block" HEIGHT="1" WIDTH="1"></SPACER></td>
</tr>
<tr>
<td><label>Phone/Ext</label></td>
<td class="Data"><%=fnFormatPhoneNumber(Recordset1.Fields.Item("Phone").Value)%> / <%=(Recordset1.Fields.Item("Ext").Value)%></td>
<td><label>Toll Free</label></td>
<td class="Data"><%=fnFormatPhoneNumber(Recordset1.Fields.Item("TollFree").
Value)%></td>
</tr>
<tr>
<td><label>Cell Phone</label></td>
<td class="Data"><%=fnFormatPhoneNumber(Recordset1.Fields.Item("Cell").Value)%></td>
<td><label>Fax</label></td>
<td class="Data"><%=fnFormatPhoneNumber(Recordset1.Fields.Item("Fax").Value)%></td>
</tr>
<tr>
<td><label>E-mail</label></td>
<td colspan="3" class="email"><a href="mailto:<%=(Recordset1.Fields.Item("Email").Value)%>"><%=(Recordset1.
Fields.Item("Email").Value)%></a></td>
</tr>
<tr>
<td colspan="2"> <input type="submit" name="btnProducerLetterMailMerge" id="btnProducerLetterMailMerge" value="Producer Letter Mail Merge" onClick="fnProducerLetterMailMerge(<%=Recordset1.Fields.Item("ProducerID")
.Value%>)"/></td>
<td colspan="2"><input type="submit" name="btnEnrollmentAssistanceEmail" id="btnEnrollmentAssistanceEmail" value="Enrollment Assistance Email" onClick="fnEnrollmentAssistanceEmail(<%=Recordset1.Fields.Item("ProducerID").
Value%>)"/></td>
</tr>
</table>
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
</div>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<code>
This is the code for the JS
<code>
/* Custom variables */
/* Offset position of tooltip */
var x_offset_tooltip = 5;
var y_offset_tooltip = 0;
/* Don't change anything below here */
var ajax_tooltipObj = false;
var ajax_tooltipObj_iframe = false;
var ajax_tooltip_MSIE = false;
if(navigator.userAgent.indexOf('MSIE')>=0)ajax_tooltip_MSIE=true;
function ajax_showTooltip(externalFile,inputObj)
{
if(!ajax_tooltipObj) /* Tooltip div not created yet ? */
{
ajax_tooltipObj = document.createElement('DIV');
ajax_tooltipObj.style.position = 'absolute';
ajax_tooltipObj.id = 'ajax_tooltipObj';
document.body.appendChild(ajax_tooltipObj);
var leftDiv = document.createElement('DIV'); /* Create arrow div */
leftDiv.className='ajax_tooltip_arrow';
leftDiv.id = 'ajax_tooltip_arrow';
ajax_tooltipObj.appendChild(leftDiv);
var contentDiv = document.createElement('DIV'); /* Create tooltip content div */
contentDiv.className = 'ajax_tooltip_content';
ajax_tooltipObj.appendChild(contentDiv);
contentDiv.id = 'ajax_tooltip_content';
if(ajax_tooltip_MSIE){ /* Create iframe object for MSIE in order to make the tooltip cover select boxes */
ajax_tooltipObj_iframe = document.createElement('<IFRAME frameborder="0">');
ajax_tooltipObj_iframe.style.position = 'absolute';
ajax_tooltipObj_iframe.border='0';
ajax_tooltipObj_iframe.frameborder=0;
ajax_tooltipObj_iframe.style.backgroundColor='#FFF';
ajax_tooltipObj_iframe.src = 'about:blank';
contentDiv.appendChild(ajax_tooltipObj_iframe);
ajax_tooltipObj_iframe.style.left = '0px';
ajax_tooltipObj_iframe.style.top = '0px';
}
}
// Find position of tooltip
ajax_tooltipObj.style.display='block';
ajax_loadContent('ajax_tooltip_content',externalFile);
if(ajax_tooltip_MSIE){
ajax_tooltipObj_iframe.style.width = ajax_tooltipObj.clientWidth + 'px';
ajax_tooltipObj_iframe.style.height = ajax_tooltipObj.clientHeight + 'px';
}
ajax_positionTooltip(inputObj);
}
function ajax_positionTooltip(inputObj)
{
var leftPos = (ajaxTooltip_getLeftPos(inputObj) + inputObj.offsetWidth);
var topPos = ajaxTooltip_getTopPos(inputObj);
/*
var rightedge=ajax_tooltip_MSIE? document.body.clientWidth-leftPos : window.innerWidth-leftPos
var bottomedge=ajax_tooltip_MSIE? document.body.clientHeight-topPos : window.innerHeight-topPos
*/
var tooltipWidth = document.getElementById('ajax_tooltip_content').offsetWidth + document.getElementById('ajax_tooltip_arrow').offsetWidth;
// Dropping this reposition for now because of flickering
//var offset = tooltipWidth - rightedge;
//if(offset>0)leftPos = Math.max(0,leftPos - offset - 5);
ajax_tooltipObj.style.left = leftPos + 'px';
ajax_tooltipObj.style.top = topPos + 'px';
}
function ajax_hideTooltip()
{
ajax_tooltipObj.style.display='none';
}
function ajaxTooltip_getTopPos(inputObj)
{
var returnValue = inputObj.offsetTop;
while((inputObj = inputObj.offsetParent) != null){
if(inputObj.tagName!='HTML')returnValue += inputObj.offsetTop;
}
return returnValue;
}
function ajaxTooltip_getLeftPos(inputObj)
{
var returnValue = inputObj.offsetLeft;
while((inputObj = inputObj.offsetParent) != null){
if(inputObj.tagName!='HTML')returnValue += inputObj.offsetLeft;
}
return returnValue;
}