HTML, text and input, to go up - javascript

I have this HTML code:
<table border="0" cellspacing="0" width="100%">
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>
Titel
<span class="ms-formvalidation"> *</span>
</nobr>
</H3>
</td>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Textkörper</nobr>
</H3>
</td>
</tr>
<tr>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="New" FieldName="Title" __designer:bind="{ddwrt:DataBind('i',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Title')}"/>
<SharePoint:FieldDescription runat="server" id="ff1description{$Pos}" FieldName="Title" ControlMode="New"/>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="Body" __designer:bind="{ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Body')}"/>
<SharePoint:FieldDescription runat="server" id="ff2description{$Pos}" FieldName="Body" ControlMode="New"/>
</td>
</tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel" >
<H3 class="goup1">
<nobr>Läuft ab</nobr>
</H3>
</td>
</tr>
<tr>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="New" FieldName="Expires" __designer:bind="{ddwrt:DataBind('i',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Expires')}"/>
<SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="Expires" ControlMode="New"/>
</td>
</tr>
</table>
Textkörper have big input and "Läuft ab" is going a lot down.
How can I go up with "Läuft ab"? Some help with code please.
Here I've aded aded a new code so you can see full code. Thank you

Why don't you try and use margin attributes. That way you could influence the distance between two components.

Related

Showing a repeater in a popup div on hover

l would like to show the following repeater in a popup div . the repeater being bind to a data table at the back end (Vb.net code)
l would like to show it as part of the data-content on hover for the following image
<div class="widget-canvas">
<asp:Repeater ID="Rptjobs" runat="server">
<HeaderTemplate>
<table id="tblClients2" align="center" cellpadding="2" cellspacing="0" border="0" width="260px">
<tr>
<td>JOBDESCRIPTION</td>
<td>TOTAL</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr >
<td valign="top" >
<%#DataBinder.Eval(Container.DataItem, "JOBDESCRIPTION")%>
</td>
<td valign="top" >
<a style="padding-left:10px;" href="" class ="dashtext"> <%#DataBinder.Eval(Container.DataItem, "TOTAL")%></a>
</tr>
<br />
</ItemTemplate>
<AlternatingItemTemplate>
<tr >
<td valign="top">
<%#DataBinder.Eval(Container.DataItem, "JOBDESCRIPTION")%>
</td>
<td valign="top" >
<a style="padding-left :10px;" href="" class ="dashtext"> <%#DataBinder.Eval(Container.DataItem, "TOTAL")%></a>
</tr>
</AlternatingItemTemplate>
FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
<td><img src="Images/preview.png" style="width:18px; height:18px;" class="popTertiary" rel="popover" data-original-title=<%#DataBinder.Eval(Container.DataItem, "CURRENTSTATUS")%> data-content=""></td>

onclick="parent.location='#CustomerInformation'" is working good in IE8 but not working firefox and other browser [duplicate]

This question already has answers here:
onclick="parent.location is not working in firefox and Chrome
(2 answers)
Closed 9 years ago.
GQM Order ID:
Current Status:
<TD class="bold" valign="top" nowrap align="left" width="7%">
Customer Name:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="customerLastName" />,<logic:write
name="orderBean" property="customerFirstName" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="7%">
Shared Customer Name:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="shrCustomerLastName" />,<logic:write
name="orderBean" property="shrCustomerFirstName" /> </TD>
</TR> <TR>
<TD class="bold" valign="top" nowrap align="left" width="7%">Customer
Email:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="emailAddr" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="7%">Shared Customer
Email:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="shrEmailaddr" /></TD> </TR> <TR>
<TD class="bold" valign="top" nowrap align="left" width="12%">Phone
Number:</TD>
<TD valign="top" nowrap align="left" width="13%"><logic:write
name="orderBean" property="phone" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="12%">Shared Phone
Number:</TD>
<TD valign="top" nowrap align="left" width="13%"><logic:write
name="orderBean" property="shrPhone" /></TD> </TR> </TBODY> </TABLE> </DIV> <DIV align="center"> <TABLE
class="PatientBar" height="18" cellspacing="0" cellpadding="0"
width="98%" border="0"> <TBODY> <TR><TD> </TD> </TR>
</TBODY> </TABLE> </DIV> <DIV align="center"> <TABLE
class="PatientBar" height="18" cellspacing="0" cellpadding="0"
width="98%" border="0"> <TBODY>
<TR>
<TD class="bold" valign="top" nowrap align="left" width="14%"></TD>
<TD valign="top" nowrap align="left" width="12%"></TD>
<TD class="bold" valign="top" nowrap align="left" width="14%"></TD>
<TD valign="top" nowrap align="left" width="12%"></TD>
<TD class="bold" valign="top" nowrap align="left" width="12%">NPT Order:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="nptInd" /></TD> </TR> <TR>
<TD class="bold" valign="top" nowrap align="left" width="14%">Affiliate:</TD>
<TD valign="top" nowrap align="left" width="12%"><logic:write
name="orderBean" property="affiliate" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="14%">Affiliate
Order ID:</TD>
<TD valign="top" nowrap align="left" width="12%"><logic:write
name="orderBean" property="vendorOrderId" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="12%">Fulfillment
Type:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="fulfillmentTypeDesc" /></TD> </TR> <TR>
<TD class="bold" valign="top" nowrap align="left" width="18%">Order
Placed Date/Time:</TD>
<TD valign="top" nowrap align="left" width="16%"><logic:write
name="orderBean" property="orderPlacedDttm"
format="MM/dd/yyyy h:mm a" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="18%">Promise
Date/Time:</TD>
<TD valign="top" nowrap align="left" width="16%"><logic:write
name="orderBean" property="promisedDttm" format="MM/dd/yyyy h:mm a"
nullValue="<%=WAConstants.NULL_VALUE_DATE%>" /></TD>
<TD class="bold" valign="top" nowrap align="left" width="18%">Store
Number:</TD>
<TD valign="top" nowrap align="left" width="19%"><logic:write
name="orderBean" property="storeNbr"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD> </TR>
<TR>
<TD class="bold" valign="top" nowrap align="left">
Pay Type:
</TD>
<TD valign="top" nowrap align="left">
<logic:write name="orderBean" property="payType" nullValue="<%=WAConstants.NULL_VALUE_NA%>" />
</TD>
<TD class="bold" valign="top" nowrap align="left">
Pod Location:
</TD>
<TD valign="top" nowrap align="left">
<logic:write name="orderBean" property="podLocation" nullValue="<%=WAConstants.NULL_VALUE_NA%>" />
</TD>
<TD class="bold" valign="top" nowrap align="left">
Envelope Id:
</TD>
<TD valign="top" nowrap align="left">
<logic:write name="orderBean" property="envelopeId" nullValue="<%=WAConstants.NULL_VALUE_NA%>" />
</TD>
</TR> </TBODY> </TABLE> </DIV>
<table> <TBODY> <tr>
<td height="1"></td> </tr> </TBODY> </table>
<logic:notEmpty name="orderBean"> <table class="TheBox"
cellspacing="0" cellpadding="0" align="center"> <TBODY>
<tr>
<td><wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_READ%>">
<input type="button" value="Refresh" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" onclick="onClickRefresh()">
</wa:permission> <logic:equal name="orderBean"
property="fulfillmentTypeCd"
value="<%=CodesDecodes.FULFILLMENT_TYPE_STORE%>">
<logic:notEqual name="orderBean" property="statusCd"
value="<%=CodesDecodes.ORDER_STATUS_CANCELLED%>">
<logic:notEqual name="orderBean" property="statusCd"
value="<%=CodesDecodes.ORDER_STATUS_SOLD%>">
<wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_CANCEL%>">
<INPUT type="button" value="Cancel Order" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="Cancel Order"
onclick="onClickCancel()">
</wa:permission>
</logic:notEqual>
</logic:notEqual>
<%
if((String)session.getAttribute("isMobileVendor")=="true"){ %>
<wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_RESEND%>">
<INPUT type="button" value="Resend Mobile Order" class="buttonSuper"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="Resend Order" id = "Resend Order"
onclick="onClickResendMobile()">
</wa:permission>
<% } else{%>
<wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_RESEND%>">
<INPUT type="button" value="Resend Order" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="Resend Order" id = "Resend Order"
onclick="onClickResend()">
</wa:permission>
<%}%>
<wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_RESEND%>">
<INPUT type="button" value="Resend Status" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="Resend Status"
onclick="onClickResendStatus()">
</wa:permission>
</logic:equal> <wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_ERROR_DETAIL_READ%>">
<INPUT type="button" value="Error Details" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)"
onclick="onClickErrorDetail()">
</wa:permission>
<wa:permission
functionName="<%=WARequestFunctionName.DIGITALPHOTOGQM_ORDER_READ%>">
<INPUT type="button" value="Order Details" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="orderDetails"
onclick="onClickRefresh()">
</wa:permission> <INPUT type="button" value="Customer Details"
class="buttonSuper" onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="customerDetails"
style="" onclick="parent.location='#CustomerInformation'"> <INPUT
type="button" value="Status Details" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="statusDetails"
onclick="parent.location='#StatusInformation'"> <INPUT
type="button" value="Refund Details" class="buttonBig"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" name="refundDetails01"
onclick="parent.location='#RefundInformation'">
<input type="button" value="View Order URL's" class="buttonSuper"
onmouseover="onMouseOverButton(this)"
onmouseout="onMouseOutButton(this)" onclick="showOrderUrls();">
</td>
</tr> </TBODY> </table> </logic:notEmpty>
<table> <TBODY> <tr>
<td height="1"></td> </tr> </TBODY> </table>
<div id="mainContent" style="overflow: auto; width: auto; height:
auto"> <div class="error" id="errorText" style="display:
none"> This is where the error goes. Way to go on
generating an error.</div> <table class="SectionHeader1"
id="tableAddress"> <TBODY> <tr>
<td>Order Information</td> </tr> </TBODY> </table>
<table> <TBODY> <tr>
<td height="1"></td> </tr> </TBODY> </table>
<table class="TheBox"> <TBODY> <tr>
<td>
<DIV align="right">
<TABLE border="0" style="border-collapse: collapse" width="96%"
id="custInfoTable" class="BoxedIn" bgcolor="#ffffff">
<TBODY>
<TR>
<TH align="left" width="15%">WAG Customer Number:</TH>
<TH align="left" width="17%">Affiliate Customer ID:</TH>
<TH align="left" width="17%">Campaign ID:</TH>
<TH align="left" width="16%">PC+ Order ID:</TH>
<TH align="left" height="32" width="15%">Order Type:</TH>
</TR>
<TR class="onRow" id="custInfoTableR1">
<TD align="left" height="34" width="137"><logic:write
name="orderBean" property="walgreensCustomerId"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" height="34" width="163"><logic:write
name="orderBean" property="vendorCustomerId" /></TD>
<TD align="left" height="34" width="155"><logic:write
name="orderBean" property="campaignIdDesc"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" height="34" width="147"><logic:write
name="orderBean" property="pcpOrderId"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" width="137"><logic:write name="orderBean"
property="orderTypeDesc" /></TD>
</TR>
<TR class="onRow">
<TH align="left" height="32" width="17%">Last Four Digits of
Credit Card:</TH>
<TH align="left" height="32" width="17%">Credit Card Expiration
(MM/YY):</TH>
<TH align="left" height="32" width="16%">Shipping Method:</TH>
<TH align="left" height="32" width="169">Carrier:</TH>
<TH align="left" height="32" width="169">Tracking Number:</TH>
</TR>
<TR class="onRow">
<TD align="left" width="163"><logic:write name="orderBean"
property="creditCardNbrL4c"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" width="155"><logic:write name="orderBean"
property="creditCardExpiration"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" width="147"><logic:write name="orderBean"
property="shipToMethodDesc"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" width="169"><logic:write name="orderBean"
property="carrierDesc"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" width="169"><logic:write name="orderBean"
property="trackingNbr"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TH align="left" width="15%">Created By:</TH>
<TH align="left" width="17%">Create Date/Time:</TH>
<TH align="left" width="17%">Last Updated By:</TH>
<TH align="left" width="16%">Update Date/Time:</TH>
<TD align="left" bgcolor="#ffffff"></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" height="17" width="137"><logic:write
name="orderBean" property="createUserId" /></TD>
<TD align="left" height="17" width="163"><logic:write
name="orderBean" property="createDttm"
format="MM/dd/yyyy h:mm a" /></TD>
<TD align="left" height="17" width="155"><logic:write
name="orderBean" property="updateUserId"
nullValue="<%=WAConstants.NULL_VALUE_NA%>" /></TD>
<TD align="left" height="17" width="147"><logic:write
name="orderBean" property="updateDttm"
format="MM/dd/yyyy h:mm a"
nullValue="<%=WAConstants.NULL_VALUE_DATE%>" /></TD>
<TD align="left" height="17" bgcolor="#ffffff"></TD>
</TR>
</TBODY>
</TABLE>
</DIV>
</td> </tr> </TBODY> </table>
<TABLE class="TheBox" align="center"> <TBODY> <tr>
<td>
<fieldset><legend>Order Items</legend> <logic:define
id="orderItemList" name="orderBean" property="orderItemList"
scope="session" /> <wa:dbgrid id="orderItemGrid"
listBean="orderItemList" cssClass="BoxedIn" indice="i">
<wa:textcolumn dataField="gqmProductId"
headerText="GQM Product ID:" sortable="false" HAlign="left"
width="13%" />
<wa:textcolumn dataField="productDesc"
headerText="Product Description:" sortable="false" HAlign="left"
width="13%" />
<wa:textcolumn dataField="productQty"
headerText="Product Quantity:" sortable="false" HAlign="left"
width="8%" />
<wa:textcolumn dataField="unitPrice" headerText="Unit Price:"
sortable="false" HAlign="left" width="8%" dataFormat="$#,##0.00#" />
<wa:textcolumn dataField="productPriceBeforeDiscount"
headerText="Total Price before discount:" sortable="false"
HAlign="left" width="13%" dataFormat="$#,##0.00#" />
<wa:textcolumn dataField="productDiscountTotal"
headerText="Total Discount:" sortable="false" HAlign="left"
width="13%" dataFormat="$#,##0.00#" />
<wa:textcolumn dataField="productTotal" headerText="Item Total:"
sortable="false" HAlign="left" width="13%" dataFormat="$#,##0.00#" />
</wa:dbgrid>
<table>
<TBODY>
<tr>
<td height="1"></td>
</tr>
</TBODY>
</table>
<TABLE id="referralTable" class="BoxedIn" align="left">
<TBODY>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" width="13%" bgcolor="#ffffff" height="40"></TD>
<TD align="left" width="13%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%">Sub
Total Price:</TD>
<TD bgcolor="#ffffff" height="21" width="13%"><logic:write
name="orderBean" property="subTotalPrice" format="$#,##0.00#" /></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" width="13%" bgcolor="#ffffff" height="40"></TD>
<TD align="left" width="13%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%"></TD>
<TD bgcolor="#ffffff" class="bold" width="13%">Total Order
Discount:</TD>
<TD bgcolor="#ffffff" width="13%"><logic:write name="orderBean"
property="totalOrderDiscount" format="$#,##0.00#"
nullValue="<%=WAConstants.NULL_VALUE_MONEY%>" /></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" width="13%" bgcolor="#ffffff" height="40"></TD>
<TD align="left" width="13%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%"></TD>
<TD bgcolor="#ffffff" class="bold" width="13%">Order Freight:</TD>
<TD bgcolor="#ffffff" width="13%"><logic:write name="orderBean"
property="orderFreight" format="$#,##0.00#"
nullValue="<%=WAConstants.NULL_VALUE_MONEY%>" /></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" width="13%" bgcolor="#ffffff" height="40"></TD>
<TD align="left" width="13%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%"></TD>
<TD bgcolor="#ffffff" class="bold" width="13%">Order Tax:</TD>
<TD bgcolor="#ffffff" width="13%"><logic:write name="orderBean"
property="orderTax" format="$#,##0.00#"
nullValue="<%=WAConstants.NULL_VALUE_MONEY%>" /></TD>
</TR>
<TR class="onRow" bgcolor="#ffffff">
<TD align="left" width="13%" bgcolor="#ffffff" height="40"></TD>
<TD align="left" width="13%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD align="left" width="8%" bgcolor="#ffffff" height="21"></TD>
<TD bgcolor="#ffffff" class="bold" height="21" width="13%"></TD>
<TD bgcolor="#ffffff" class="bold" width="13%">Order Total:</TD>
<TD bgcolor="#ffffff" width="13%"><logic:write name="orderBean"
property="orderTotal" format="$#,##0.00#"
nullValue="<%=WAConstants.NULL_VALUE_MONEY%>" /></TD>
</TR>
</TBODY>
</TABLE>
</fieldset>
</td> </tr> </TBODY> </TABLE>
<table class="TheBox" align="center"> <TBODY> <tr>
<td>
<fieldset><legend>Order Promotions </legend>
<div align="center"><logic:define id="orderPromotionList"
name="orderBean" property="orderPromotionList" scope="session" />
<wa:dbgrid id="orderPromotionGrid" listBean="orderPromotionList"
cssClass="BoxedIn" indice="i">
<wa:textcolumn dataField="pluNbr" headerText="PLU Number:"
sortable="false" HAlign="left" width="13%" />
<wa:textcolumn dataField="pluDesc" headerText="PLU Description:"
sortable="false" HAlign="left" width="13%" />
<wa:textcolumn dataField="qtyApplied"
headerText="Quantity Applied:" sortable="false" HAlign="left"
width="13%" nullValue="<%=WAConstants.NULL_VALUE_NA%>" />
<wa:textcolumn dataField="TotalDiscount"
headerText="Total Discount:" sortable="false" HAlign="left"
width="13%" dataFormat="$#,##0.00#" />
</wa:dbgrid></div>
</fieldset>
</td> </tr> </TBODY> </table>
<A NAME="CustomerInformation"></A> <table class="SectionHeader1">
<TBODY> <tr>
<td>Customer Information</td> </tr> </TBODY> </table>
<TABLE class="TheBox" align="center">
<logic:define id="orderAddressBeanBilling" name="orderBean"
property="orderAddressBeanBilling" scope="session" />
<logic:define id="orderAddressBeanShipping" name="orderBean"
property="orderAddressBeanShipping" scope="session" />
<TBODY> <TR>
<TD>
<FIELDSET><LEGEND>Customer Address</LEGEND>
<DIV align="center">
<TABLE id="table5" class="BoxedIn">
<TBODY>
<TR>
<TH colspan="3" width="50%">Billing Address</TH>
<TH colspan="5" width="50%">Shipping Address</TH>
</TR>
<TR class="onRow" id="table5R1">
<TD align="left" height="29" colspan="3" width="473">
<DIV id="table5R1E2"><logic:notEmpty
name="orderAddressBeanBilling">
<logic:write name="orderAddressBeanBilling" property="lastName" />
<logic:write name="orderAddressBeanBilling" property="firstName" />
</logic:notEmpty></DIV>
<DIV id="table5R1E2"><logic:notEmpty
name="orderAddressBeanBilling">
<logic:write name="orderAddressBeanBilling"
property="streetAddr" />
</logic:notEmpty></DIV>
<logic:notEmpty name="orderAddressBeanBilling">
<logic:write name="orderAddressBeanBilling" property="city" />, <logic:write
name="orderAddressBeanBilling" property="state" />
<logic:write name="orderAddressBeanBilling" property="zipCode" />
</logic:notEmpty>
<DIV id="table5R2E2"><logic:notEmpty
name="orderAddressBeanBilling">
<logic:write name="orderAddressBeanBilling" property="countryCd" />
</logic:notEmpty></DIV>
</TD>
<TD align="left" height="29" colspan="5" width="469">
<DIV id="table5R1E20"><logic:notEmpty
name="orderAddressBeanShipping">
<logic:write name="orderAddressBeanShipping" property="lastName" />
<logic:write name="orderAddressBeanShipping"
property="firstName" />
</logic:notEmpty></DIV>
<DIV id="table5R1E20"><logic:notEmpty
name="orderAddressBeanShipping">
<logic:write name="orderAddressBeanShipping"
property="streetAddr" />
</logic:notEmpty></DIV>
<logic:notEmpty name="orderAddressBeanShipping">
<logic:write name="orderAddressBeanShipping" property="city" />, <logic:write
name="orderAddressBeanShipping" property="state" />
<logic:write name="orderAddressBeanShipping" property="zipCode" />
</logic:notEmpty>
<DIV id="table5R2E21"><logic:notEmpty
name="orderAddressBeanShipping">
<logic:write name="orderAddressBeanShipping"
property="countryCd" />
</logic:notEmpty></DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
</FIELDSET>
</TD> </TR> </TBODY> </TABLE>
I tried like window.location,document.location, any many way..bt dnt
know what is error.The '#CustomerInformation' denotes the point
where this script will jump to same page but it is not working
firefox.
Use
<button>Customer Details</button>
Its silly to involve Javascript in something this simple.
As Pointy points out, it may not really be valid. But its better than what you're doing.
Really, it should be
Customer Details

How to hide table class until data is returned?

As indicated in the code. The user enters data into one of the 6 input boxes. Query results are returned in (example: <td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="PROC_CODE" name="PROC_CODE"> </td>)
I need to have the blank <td><tr> hidden unless query results are returned.
The code is long but fairly simple and straight forward. Basically the user queries 1 record, 1 record displays. User queries 4 records 4 records display.
I already have the db working and pulling the results I need I just don't know how to hide the blank tables data
enter code here
<body style="text-align: center">
<a name="top"></a>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- xxxxxxx Logo -->
<td height="50" width="150">
<a href="http://xxxxxxx.xxxxxxx.com"><img src="http://xxxxxxx.xxxxxxx.com/contentowners/xxxxxxx_template/js/images/xxxxxxx_50.gif" alt="xxxxxxx" width="150"
height="50" border="0"></a>
</td>
<!-- xxxxxxx Search -->
<td height="50" align="right">
<iframe src="/provider_services/search.html" name="search" id="search" width="475" height="50" marginwidth="0" marginheight="0" align="right" scrolling="no" frameborder="0"></iframe>
</td>
</tr>
<tr>
<!-- Current Date -->
<td height="28" align="center" bgcolor="#CCFF66" class="smblue">
<script language="JavaScript" type="text/javascript" src="http://xxxxxxx.xxxxxxx.com/contentowners/xxxxxxx_template/js/date_short.js">
</script>
</td>
<td height="28" bgcolor="#99CC33">
<!-- Top Navigation (optional for your site) -->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="topnav" id="TOPNAV"> </td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- left col -->
<td width="150" valign="top" bgcolor="#ADD1EE">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<!-- Insert your site name here -->
<!-- Link this text to your homepage or main index -->
<h5 align="center" class="white"><img src="../../images/psc_logo_150x150.jpg" width="150" height="150"></h5></td>
<body onLoad="loadCommon();" style="text-align: center">
<script src="../../psc_nav_bar.js" language="javascript" type="text/javascript"></script>
<td class="leftnav" id="LEFTNAV">
</table>
</td>
<!--center col -->
<td valign="top">
<!-- begin content table -->
<form action="" method="post" name="frmTracking" id="frmTracking" onReset="clearControls(this);">
<input type="hidden" name="recordID" value="">
<p>
<br> <table width="100%" border="0" align="center">
<tr align="left">
<td align="left"> <p><U><strong>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <br></p>
</td>
</tr>
</table>
<table width="100%" border="0" align="center">
<tr align="left">
<td align="left">
<input name="searchRecord" id="searchRecord" type="text" size="8" maxlength="8">
<input name="searchRecord" id="searchRecord" type="text" size="8" maxlength="8">
<input name="searchRecord" id="searchRecord" type="text" size="8" maxlength="8">
<input name="searchRecord" id="searchRecord" type="text" size="8" maxlength="8">
<input name="searchRecord" id="searchRecord" type="text" size="8" maxlength="8">
<input name="searchRecord" id="searchRecord" type="text" size="8" maxlength="8">
</td>
</tr>
<td> <div id="TRACKBUTTONS" align="center">
<input type="button" name="btnFind" value="Find"
class="cmdBtn" onClick="return getDBRecord(this.form);"><input type="button" name="reset_form" value="Clear" onclick="this.form.reset(); history.go(0) " >
<!-- <input type="button" name="btnSave" value="Save" class="cmdBtn" title="Save current entry" onClick="return updateDBRecord(this.form);"> -->
</div></td>
</table>
<table width="100%" border="0" cellpadding="5" cellspacing="0">
<tr bgcolor="#F0F0F0">
<td colspan="5" align="center" class="th2">Procedure Code Record</td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure Code </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="PROC_CODE" name="PROC_CODE"> </td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Medicare Advantage </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="MEDICARE" name="MEDICARE"> </td>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="STATUS"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Specialty</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" class="tLBL1l" id="xxxxxxx_ID"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Precert Type
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1">
<td width="55%" class="tLBL1l" id="SYS_APP"> </td>
</td>
<td class="tLBL1l" id="DETAILS3"> </td>
<td width="1%" class="tdFieldHeadingsR1"> </td>
<td width="5%" class="tLBL1l" id="td"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Review Type:</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="SUBMITTER"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Guidelines:</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="EMAIL"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td4"> </td>
<tr bgcolor="#F0F0F0">
<td colspan="5" align="center" class="th2">Procedure Code Record1</td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure Code </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="PROC_CODE1" name="PROC_CODE"> </td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Medicare Advantage </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="MEDICARE1" name="MEDICARE"> </td>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="STATUS1"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Specialty</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" class="tLBL1l" id="xxxxxxx_ID1"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Precert Type
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1">
<td width="55%" class="tLBL1l" id="SYS_APP1"> </td>
</td>
<td class="tLBL1l" id="DETAILS31"> </td>
<td width="1%" class="tdFieldHeadingsR1"> </td>
<td width="5%" class="tLBL1l" id="td"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Review Type:</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="SUBMITTER1"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Guidelines:</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="EMAIL1"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td4"> </td>
<!--3rd set -->
<tr bgcolor="#F0F0F0">
<td colspan="5" align="center" class="th2">Procedure Code Record2</td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure Code </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="PROC_CODE2" name="PROC_CODE"> </td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Medicare Advantage </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="MEDICARE2" name="MEDICARE"> </td>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="STATUS2"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Specialty</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" class="tLBL1l" id="xxxxxxx_ID2"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Precert Type
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1">
<td width="55%" class="tLBL1l" id="SYS_APP2"> </td>
</td>
<td class="tLBL1l" id="DETAILS32"> </td>
<td width="1%" class="tdFieldHeadingsR1"> </td>
<td width="5%" class="tLBL1l" id="td"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Review Type:</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="SUBMITTER2"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Guidelines:</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="EMAIL2"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td4"> </td>
<!--4th set -->
<tr bgcolor="#F0F0F0">
<td colspan="5" align="center" class="th2">Procedure Code Record3</td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure Code </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="PROC_CODE3" name="PROC_CODE"> </td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Medicare Advantage </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="MEDICARE3" name="MEDICARE"> </td>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="STATUS3"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Specialty</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" class="tLBL1l" id="xxxxxxx_ID3"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Precert Type
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1">
<td width="55%" class="tLBL1l" id="SYS_APP3"> </td>
</td>
<td class="tLBL1l" id="DETAILS33"> </td>
<td width="1%" class="tdFieldHeadingsR1"> </td>
<td width="5%" class="tLBL1l" id="td"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Review Type:</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="SUBMITTER3"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Guidelines:</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="EMAIL3"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td4"> </td>
<!--5th set -->
<tr bgcolor="#F0F0F0">
<td colspan="5" align="center" class="th2">Procedure Code Record4</td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure Code </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="PROC_CODE4" name="PROC_CODE"> </td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Medicare Advantage </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="MEDICARE4" name="MEDICARE"> </td>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="STATUS4"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Specialty</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" class="tLBL1l" id="xxxxxxx_ID4"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Precert Type
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1">
<td width="55%" class="tLBL1l" id="SYS_APP4"> </td>
</td>
<td class="tLBL1l" id="DETAILS34"> </td>
<td width="1%" class="tdFieldHeadingsR1"> </td>
<td width="5%" class="tLBL1l" id="td"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Review Type:</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="SUBMITTER4"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Guidelines:</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="EMAIL4"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td4"> </td>
<!--6th set -->
<tr bgcolor="#F0F0F0">
<td colspan="5" align="center" class="th2">Procedure Code Record5</td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure Code </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="PROC_CODE5" name="PROC_CODE"> </td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Medicare Advantage </td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" bgcolor="#FFFFFF" class="tLBL1l" id="MEDICARE5" name="MEDICARE"> </td>
</tr>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Procedure</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="STATUS5"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Specialty</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td width="55%" class="tLBL1l" id="xxxxxxx_ID5"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Precert Type
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1">
<td width="55%" class="tLBL1l" id="SYS_APP5"> </td>
</td>
<td class="tLBL1l" id="DETAILS35"> </td>
<td width="1%" class="tdFieldHeadingsR1"> </td>
<td width="5%" class="tLBL1l" id="td"> </td>
<tr>
<td width="12%" align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Review Type:</td>
<td width="1%" align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="SUBMITTER5"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td"> </td>
<tr>
<td align="right" bgcolor="#CCCCCC" class="tdFieldHeadingsR1">Guidelines:</td>
<td align="right" bgcolor="#FFFFFF" class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="EMAIL5"> </td>
<td class="tdFieldHeadingsR1"> </td>
<td class="tLBL1l" id="td4"> </td>
<!-- <tr id="rowTIN">
<td align="right" class="tdFieldHeadingsR">Change Status</td>
<td class="tdFieldHeadingsR"> </td>
<td colspan="3" class="tdFieldHeadingsR"><!-- <input name="txtTinPin" type="text" title="TIN/PIN" value="" size="12"> -->
<!-- <label for="txtTinPin"></label>
<select name="txtTinPin2" size="1" id="txtTinPin">
<option value="Open" selected>Open</option>
<option value="Closed">Closed</option>
</select></td>
</tr>
<tr id="rowControlNumber">
<td align="right" valign="top" class="tdFieldHeadingsR">Handler Notes</td>
<td class="tdFieldHeadingsR"> </td>
<td colspan="3" class="tdFieldHeadingsR"><textarea name="txtControl" cols="50" rows="8" title="Handler Notes"></textarea></td>
</tr> -->
<tr align="center">
<td colspan="5">
<p></p>
</td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td valign="top">
<p align="center">
<img src="http://xxxxxxx.xxxxxxx.com/contentowners/xxxxxxx_template/js/images/up_arrow.gif" alt="" width="12" height="13" border="0" align="middle"> top of page</td>
<!-- Right column for boxes -->
</tr>
</table>
<!-- end content table -->
</td>
</tr>
<!-- end center column -->
<tr>
<td colspan="2">
<hr size="1">
</td>
</tr>
</table>
<a href="http://www.xxxxxxx.com/">
<img src=
"http://xxxxxxx.xxxxxxx.com/contentowners/xxxxxxx_template/js/images/logo_footer.gif" alt="xxxxxxx" width="149" height="65" border="0" align="right"></a>
<!-- begin footer -->
<p align="left" class="pubinfo" id="PUBINFO">
</body>
give table some id and call $(tableId).hide(); Optionally you may want to show the table but disable it until data is returned

Open a ModalPopupExtender on an UpdatePanel using javascript

I'm trying to open a ModalPopup with JavaScript, and i've searched here on stackoverflow and the general advice seems be to use something like this:
$('#inputAdd').live("click", function () {
$('#addRow').show();
$find('<%=mpeIndications.BehaviorID %>').show();
});
Where #inputAdd is an html input image that i have in the ModalPopup, its objective is to show a row (#addRow) where a TextBox is shown. However, when i click on the #inputAdd button, it show the row, but then the ModalPopup hide, I think the reason maybe because there is an UpdatePanel that include the ModalPopup, I am right? In that case which may be a solution? I've putted some of the code I've in the .ascx. Thanks.
<table class="content-box">
<tr>
<td valign="top">
<asp:UpdatePanel runat="server" ID="upAppointments">
<ContentTemplate>
<table>
<tr>
<td>
<asp:Button runat="server" ID="btnIndicationsHidden" Style="display: none;" />
<asp:Panel runat="server" ID="pnlIndications" CssClass="modalPanel" Style="display: none;">
<table class="content-box">
<tr>
<td>
<table style="width: 100%;">
<tr>
<td>
<asp:Panel runat="server" ID="pnlShowCurrentIndication" Style="padding: 13px 8px 8px 8px">
<table style="width: 100%; border: 0;">
<tr>
<td style="width: 30%; vertical-align: top;" rowspan="2">
<asp:RadioButtonList runat="server" ID="gvProfiles" OnDataBound="gvProfiles_DataBound"
DataTextField="Name" DataValueField="Id" Style="white-space: nowrap;" />
</td>
<td style="padding-left: 10px;" class="contentBox">
<table style="width: 100%;">
<tbody id="showTable">
<tr>
<td id="indicacionestd" runat="server">
Indicaciones:
</td>
</tr>
<tr>
<td>
<asp:BulletedList ID="blIndicaciones" DataTextField="Valor" runat="server">
</asp:BulletedList>
</td>
</tr>
<tr>
<td id="contraindicacionestd" runat="server">
Contraindicaciones:
</td>
</tr>
<tr>
<td>
<asp:BulletedList ID="blContraindicaciones" DataTextField="Valor" runat="server">
</asp:BulletedList>
</td>
</tr>
</tbody>
<tbody style="display: none;" id="addRow">
<tr>
<td style="text-align: left; white-space: nowrap;" class="colSepGran">
Nombre:
</td>
</tr>
<tr class="filSepGranRA">
<td class="colSepGran">
<asp:TextBox runat="server" ID="txbName" CssClass="txtNoWidth" Width="150px" ToolTip="Especifique el nombre del perfil"></asp:TextBox>
<act:FilteredTextBoxExtender runat="server" ID="ftbeName" FilterMode="ValidChars"
FilterType="UppercaseLetters, LowercaseLetters, Custom" TargetControlID="txbName"
ValidChars="ñ Ñ ' á é í ó ú Á É Í Ó Ú ü Ü ." />
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="text-align: center; vertical-align: middle;">
<table style="width: 100%;">
<tr>
<td>
</td>
<td>
<input type="image" src="../../App_Themes/Theme/Images/AppIcons/add.png/" id="inputAdd"
title="Adicionar perfil">
</td>
<td>
<input type="image" src="../../App_Themes/Theme/Images/AppIcons/add_document.png"
id="inputAddSimple" title="Adicionar indicación" />
</td>
<td>
<input type="image" src="../../App_Themes/Theme/Images/AppIcons/edit.png" id="inputEdit"
title="Editar perfil" />
</td>
<td>
<asp:ImageButton runat="server" ID="imbRemoveProfile" ToolTip="Eliminar perfil" ImageUrl="~/App_Themes/Theme/Images/AppIcons/delete.png" />
</td>
<td>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
<act:ModalPopupExtender ID="mpeIndications" runat="server" PopupControlID="pnlIndications"
BackgroundCssClass="modalBackground" TargetControlID="btnIndicationsHidden" CancelControlID="imbCloseIndications"
BehaviorID="mpeIndications">
</act:ModalPopupExtender>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
Then try this approach:
Add a hidden link for ModalPopup Extender to attach to(which will NEVER be used)
<a href="#" style="display:none;visibility:hidden;"
onclick="return false" ID="dummyLink" runat="server">dummy</a>
Add the ID of the hidden link to the ModalPopupExtender
<act:ModalPopupExtender ID="mpeIndications" runat="server" PopupControlID="pnlIndications"
BackgroundCssClass="modalBackground"
TargetControlID="dummyLink"
CancelControlID="imbCloseIndications"
BehaviorID="mpeIndications">
Showing the modal popup
$find('MyMPE').show();
http://www.geekzilla.co.uk/View38736C2B-BAD3-418A-A5B0-DAC4F1A5A83A.htm
Model Dialog Asp.Net With Jquery

Hide People Picker fields in SharePoint Designer 2010

I am trying to use some custom javascript in a CEWP to hide and show some fields when a dropdown value is selected. I have managed to hide the TextBox ("Your Name") but cannot hide the "Select Name" or "Supervisor's Name" fields - these two are people pickers. I have tried to apply some logic found elsewhere, but i still cannot find the controls.
Here is my Javascript code :
<script type="text/javascript">
_spBodyOnLoadFunctionNames.push("hideFieldsOnStart");
function hideFieldsOnStart() {
//hide the control at start
var nameID = getTagFromIdentifierAndTitle("input","TextField","Your Name");
var control = getTagFromIdentifierAndTitle("Textarea","UserField_downlevelTextBox","Select Name");
var supername = getTagFromIdentifierAndTitle("Textarea","UserField_downlevelTextBox","Supervisor Name");
//Hide the Course Material field by default
nameID.parentNode.parentNode.parentNode.style.display="none";
control.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.display="none";
//supername.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.display="none";
//add an onchange event to the dropdown
getTagFromIdentifierAndTitle("select","DropDownChoice","Do you have access to Email?").attachEvent("onchange", ChangeEvent);
}
function ChangeEvent()
{
//get the dropdown
var dropDown = getTagFromIdentifierAndTitle("select","DropDownChoice","Do you have access to Email?");
//get the selected value
var option = dropDown.options[dropDown.selectedIndex].text;
//get the control
var txtName = getTagFromIdentifierAndTitle("Input","TextField","Your Name");
//var selectSuper = getTagFromIdentifierAndTitle("div","People Picker","Supervisor Name");
//var selectName = getTagFromIdentifierAndTitle("div","People Picker","Select Name");
//show hide based on your condition
if(dropDown.options[dropDown.selectedIndex].text == "No")
{
//selectSuper.parentNode.parentNode.parentNode.style.display="";
txtName.parentNode.parentNode.parentNode.style.display="";
//selectName.parentNode.parentNode.parentNode.style.display="none";
}
else
{
//selectSuper.parentNode.parentNode.parentNode.style.display="none";
txtName.parentNode.parentNode.parentNode.style.display="none";
//selectName.parentNode.parentNode.parentNode.style.display="";
}
}
//this gets the field based on title identifier and tagname
function getTagFromIdentifierAndTitle(tagName, identifier, title) {
var len = identifier.length;
var tags = document.getElementsByTagName(tagName);
for (var i=0; i < tags.length; i++) {
var tempString = tags[i].id;
if (tags[i].title == title && (identifier == "" || tempString.indexOf(identifier) == tempString.length - len)) {
return tags[i];
}
}
return null;
}
</script>
And here is the code for my page :
<Xsl>
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="no"/>
<xsl:decimal-format NaN=""/>
<xsl:param name="dvt_apos">&apos;</xsl:param>
<xsl:param name="ManualRefresh"></xsl:param>
<xsl:variable name="dvt_1_automode">0</xsl:variable>
<xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
<xsl:choose>
<xsl:when test="($ManualRefresh = 'True')">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<xsl:call-template name="dvt_1"/>
</td>
<td width="1%" class="ms-vb" valign="top">
<img src="/_layouts/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/>
</td>
</tr>
</table>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="dvt_1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dvt_1">
<xsl:variable name="dvt_StyleName">ListForm</xsl:variable>
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
<div>
<span id="part1">
<table border="0" width="100%">
<xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows"/>
</xsl:call-template>
</table>
</span>
<SharePoint:AttachmentUpload runat="server" ControlMode="New"/>
<SharePoint:ItemHiddenVersion runat="server" ControlMode="New"/>
</div>
</xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows"/>
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<table>
<tr>
<td width="99%" class="ms-toolbar" nowrap="nowrap"><IMG SRC="/_layouts/images/blank.gif" width="1" height="18"/></td>
<td class="ms-toolbar" nowrap="nowrap">
<SharePoint:SaveButton runat="server" ControlMode="New" id="savebutton1"/>
</td>
<td class="ms-separator">
<xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&nbsp;</xsl:text>
</td>
<td class="ms-toolbar" nowrap="nowrap" align="right">
<SharePoint:GoBackButton runat="server" ControlMode="New" id="gobackbutton1"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<SharePoint:FormToolBar runat="server" ControlMode="New"/>
</td>
</tr>
<xsl:call-template name="dvt_1.rowedit">
<xsl:with-param name="Pos" select="concat('_', position())" />
</xsl:call-template>
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<table>
<tr>
<td width="99%" class="ms-toolbar" nowrap="nowrap"><IMG SRC="/_layouts/images/blank.gif" width="1" height="18"/></td>
<td class="ms-toolbar" nowrap="nowrap">
<SharePoint:SaveButton runat="server" ControlMode="New" id="savebutton2"/>
</td>
<td class="ms-separator">
<xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&nbsp;</xsl:text>
</td>
<td class="ms-toolbar" nowrap="nowrap" align="right">
<SharePoint:GoBackButton runat="server" ControlMode="New" id="gobackbutton2"/>
</td>
</tr>
</table>
</td>
</tr>
</xsl:template>
<xsl:template name="dvt_1.rowedit">
<xsl:param name="Pos" select="position()"/>
<tr>
<td>
<table border="0" cellspacing="0" width="100%">
<tr><td width="190px" valign="top" class="ms-formlabel"><span id="part2"><H3 class="ms-standardheader"><nobr>Do you have access to Email?<span class="ms-formvalidation"> *</span></nobr></H3></span></td>
<td width="400px" valign="top" class="ms-formbody"><span id="part8"><SharePoint:FormField runat="server" id="FormField1" ControlMode="New" FieldName="Do_x0020_you_x0020_have_x0020_ac" __designer:bind="{ddwrt:DataBind('i',concat('ff13',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Do_x0020_you_x0020_have_x0020_ac')}" /></span></td>
</tr>
<tr><td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader"><nobr>Name<span class="ms-formvalidation"> *</span></nobr></H3></td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="Your_x0020_Name" __designer:bind="{ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Your_x0020_Name')}" /></td>
</tr><tr><td width="190px" valign="top" class="ms-formlabel"><span id="part10"><H3 class="ms-standardheader"><nobr>Name<span class="ms-formvalidation"> *</span></nobr></H3></span></td><td width="400px" valign="top" class="ms-formbody"><span id="part11"><span id="part9"><SharePoint:FormField runat="server" id="FormField2" ControlMode="New" FieldName="Select_x0020_Name" __designer:bind="{ddwrt:DataBind('i',concat('ff14',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Select_x0020_Name')}" /></span></span></td></tr><tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Supervisor&apos;s Name<span class="ms-formvalidation"> *</span>
</nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="New" FieldName="Supervisor_x0027_s_x0020_Name" __designer:bind="{ddwrt:DataBind('i',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Supervisor_x0027_s_x0020_Name')}"/><SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="Supervisor_x0027_s_x0020_Name" ControlMode="New" /></td>
</tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Department<span class="ms-formvalidation"> *</span>
</nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff4{$Pos}" ControlMode="New" FieldName="NewColumn1" __designer:bind="{ddwrt:DataBind('i',concat('ff4',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#NewColumn1')}"/></td>
</tr>
<tr><td width="190px" valign="top" class="ms-formlabel"><H3 class="ms-standardheader"><nobr>Incident Option<span class="ms-formvalidation"> *</span></nobr></H3></td><td width="400px" valign="top" class="ms-formbody"><SharePoint:FormField runat="server" id="ff5{$Pos}" ControlMode="New" FieldName="Incident_x0020_Option" __designer:bind="{ddwrt:DataBind('i',concat('ff5',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Incident_x0020_Option')}" /><SharePoint:FieldDescription runat="server" id="ff5description{$Pos}" FieldName="Incident_x0020_Option" ControlMode="New" /></td></tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Department Location<span class="ms-formvalidation"> *</span>
</nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff6{$Pos}" ControlMode="New" FieldName="NewColumn10" __designer:bind="{ddwrt:DataBind('i',concat('ff6',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#NewColumn10')}"/>
<SharePoint:FieldDescription runat="server" id="ff6description{$Pos}" FieldName="NewColumn10" ControlMode="New"/>
</td>
</tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Location of Incident<span class="ms-formvalidation"> *</span></nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff7{$Pos}" ControlMode="New" FieldName="Incident_x0020_Location" __designer:bind="{ddwrt:DataBind('i',concat('ff7',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Incident_x0020_Location')}"/>
<SharePoint:FieldDescription runat="server" id="ff7description{$Pos}" FieldName="Incident_x0020_Location" ControlMode="New"/></td>
</tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Description
</nobr>
</H3></td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff8{$Pos}" ControlMode="New" FieldName="Description" __designer:bind="{ddwrt:DataBind('i',concat('ff8',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Description')}"/>
<SharePoint:FieldDescription runat="server" id="ff8description{$Pos}" FieldName="Description" ControlMode="New"/>
</td>
</tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Severity<span class="ms-formvalidation"> *</span></nobr>
</H3><p class="ms-standardheader">
<xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&nbsp; </xsl:text> </p><table><tr><td style="width: 21px; height: 21px"><img alt="" src="../../SiteAssets/Information_icon1.gif" width="20" height="20" /></td><td style="width: 130px"><span id="part5" style="font-weight: normal">Click here f<span style="color: #0072BC">or a guide</span></span></td></tr></table></td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff9{$Pos}" ControlMode="New" FieldName="Risk_x0020_Severity" __designer:bind="{ddwrt:DataBind('i',concat('ff9',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Risk_x0020_Severity')}"/>
<SharePoint:FieldDescription runat="server" id="ff9description{$Pos}" FieldName="Risk_x0020_Severity" ControlMode="New"/>
</td>
</tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Likelihood<span class="ms-formvalidation"> *</span>
</nobr>
</H3><p class="ms-standardheader">
<xsl:text xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:nbsp-preserve="yes" disable-output-escaping="yes">&nbsp;
</xsl:text> </p><span id="part6"><table><tr><td style="width: 21px; height: 21px"><img alt="" src="../../SiteAssets/Information_icon1.gif" width="20" height="20" /></td><td style="width: 130px"><span id="part7" style="font-weight: normal">Click here f<span style="color: #0072BC">or a guide</span></span></td></tr></table></span></td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff10{$Pos}" ControlMode="New" FieldName="Likelihood" __designer:bind="{ddwrt:DataBind('i',concat('ff10',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Likelihood')}"/>
<SharePoint:FieldDescription runat="server" id="ff10description{$Pos}" FieldName="Likelihood" ControlMode="New"/>
</td>
</tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader"><nobr>Status<span class="ms-formvalidation"> *</span></nobr></H3></td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff11{$Pos}" ControlMode="New" FieldName="Status" __designer:bind="{ddwrt:DataBind('i',concat('ff11',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Status')}"/>
<SharePoint:FieldDescription runat="server" id="ff11description{$Pos}" FieldName="Status" ControlMode="New" /></td>
</tr><tr id="idAttachmentsRow"><td width="20%" valign="top" class="ms-formlabel" nowrap="true"><SharePoint:FieldLabel ControlMode="New" FieldName="Attachments" runat="server" /></td><td width="80%" valign="top" class="ms-formbody"><SharePoint:FormField runat="server" id="AttachmentsField" ControlMode="New" FieldName="Attachments" __designer:bind="{ddwrt:DataBind('i','AttachmentsField','Value','ValueChanged','ID',ddwrt:EscapeDelims(string(#ID)),'#Attachments')}" /><script>
var elm = document.getElementById("idAttachmentsTable");
if (elm == null || elm.rows.length == 0)
document.getElementById("idAttachmentsRow").style.display=&apos;none&apos;;
</script></td></tr>
<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
<tr>
<td colspan="99" class="ms-vb">
<span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(#ID))" ddwrt:ammode="view"></span>
</td>
</tr>
</xsl:if>
</table>
</td>
</tr>
</xsl:template>
</xsl:stylesheet> </Xsl>
If someone could point me in the right direction with how to hide these two fields and show them when "Yes" is selected, then i would really appreciate it.
Thanks.
I see this is an old post but I thought it might be good to provide an answer since I'm sure many people have this issue.
First, I am quoting from my blog so for more information see here - SharePoint Gypsy - How to Manipulate the People Picker Control
Here is the entire code block:
//This runs the function when the form first loads
spBodyOnLoadFunctionNames.push("validatePeoplPicker");
function validatePeoplPicker()
{
var assignedToSubmitter = getSPPeoplePicker("MyPeoplePicker");
//This function finds and returns the proper SharePoint control's HTML
getTagFromIdentifierAndTitle(tagName, identifier, title) {
var len = identifier.length;
var tags = document.getElementsByTagName(tagName);
for (var i = 0; i < tags.length; i++) {
var tempString = tags[i].id;
if (tags[i].title == title && (identifier == ""
tempString.indexOf(identifier) == tempString.length - len)) {
return tags[i];
}}
return null;
}
//This function finds the People Picker control's Parent element
function getParentElementByTagName(baseNode, tagName) {
var currNode;
if (baseNode !== null) {
currNode = baseNode.parentNode;
while ((currNode !== null) && (currNode.nodeName != tagName)) {
currNode = currNode.parentNode;
}
return currNode;
}
else {
return null;
}}
//This function finds the People Picker control's Cell element
function getPeoplePickerCell(columnName) {
var search = 'FieldName="' + columnName + '"';
var nodes = document.getElementsByTagName("TEXTAREA");
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].title == "People Picker") {
var outerCell = getParentElementByTagName(nodes[i], "SPAN").parentNode.parentNode;
if (outerCell.innerHTML.indexOf(search) > 0) {
return nodes[i].parentNode;
}}}
return null;
}
//This function returns the People Picker object
function getSPPeoplePicker(columnName)
{
var cell = getPeoplePickerCell(columnName);
if(cell !== null)
{
return cell.childNodes[0].innerHTML;
}
else
{
return null;
} } }
I hope that helps!
Tom Molskow
SharePoint Gypsy

Categories