I must add a Post Back Button to refresh all site to the Update Panel. How Could I do it ?
This is my code ASPX:
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<tr><td style="border: 1px solid #676767; width:200px;"><span style="color:#FF0000; font-weight:bold;">Wstaw datę dla dnia projektowego: </span></td><td style="border: 1px solid #676767"><asp:TextBox ID="TextBox3" runat="server" Width="249px" style="margin-right:3px;"></asp:TextBox></td><td style="border: 1px solid #676767"> format (2012-10-30)</td></tr>
<tr><td style="border: 1px solid #676767; width:200px;"><span style="color:#FF0000; font-weight:bold;">Wstaw procent zaangarzowania: </span></td><td style="border: 1px solid #676767"><asp:DropDownList ID="DropDownList2" runat="server" Width="273px"></asp:DropDownList></td><td style="border: 1px solid #676767"> od (1/8..8/8)</td></tr>
<tr><td colspan="3" style="border: 1px solid #676767;"><asp:Button ID="Button2" runat="server" Text="Dodaj pojedyńczy dzień projektowy" onclick="Button2_Click" Width="600px" /></td></tr>
</ContentTemplate>
</asp:UpdatePanel>
I added this code, and it worked ;)
<Triggers>
<asp:PostBackTrigger ControlID="Button6" />
</Triggers>
Related
I need to select a value of a td based on another td's text in the same row. The XPath should be the same and only text will be changeable. In the following HTML, I have to select $33.00 based on Labor, $0.66 based on Finance, $33.66 based on Total, and so on.
* {margin: 0; padding: 0;}
body {font-family:"Times New Roman", "serif","Arial","tahoma"; font-size: 12px;}
.center {width: 1200px; margin: auto;}
.top-left {float: left; width: 70%; font-weight: bold;}
.top-right {float: right; width: 30%; text-align: right;}
h2 {margin: 0 0 10px; border-bottom: 1px solid #ccc; padding: 10px 0;}
.terms {margin: 15px 0 0; font-weight: normal;}
.invoice-to {margin: 15px 0 0;}
.clear {clear: both;}
.table-holder {margin: 50px 0 0; font-size: 12px;}
table {border-collapse: collapse;}
.table-holder table th {border: 1px solid #ccc; border-bottom: 2px solid #ccc; text-align: left; padding: 4px 2px;}
.table-holder table td {border: 1px solid #ccc; padding: 4px 2px;}
.table-holder table td p {padding: 4px 2px;}
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<title>Invoice :: 6</title>
</head>
<body style="">
<div class="center" id="wrapper">
<h2>INVOICE</h2>
<div class="table-holder">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="tbl" style="font-size: 9px;">
<tbody><tr>
<th>Invoice ID</th>
<th>Fund</th>
<th>Work ID</th>
<th>Provider ID</th>
<th>Provider Name</th>
<th>Provider Location</th>
<th>Client</th>
<th>Project</th>
<th>Manager</th>
<th>Service Title</th>
<th>Location Name</th>
<th>Street</th>
<th>City</th>
<th>State</th>
<th>ZIP</th>
<th>Service Date</th>
<th>Completed Date</th>
<th>Approved Date</th>
<th>Total Hours</th>
<th>WO Subtotal</th>
<th>OAI Fee</th>
<th>Service Fee</th>
<th>International Fee</th>
<th>General Liability Liaison Fee</th>
<th>High Value Supply Fee</th>
<th>State Taxes Fee</th>
<th>Total Payment</th>
</tr>
<tr>
<td>6</td>
<td>ID# 20</td>
<td>WO177</td>
<td>695</td>
<td>Constantin Jenkins</td>
<td>CHAMPLIN, MN</td>
<td></td>
<td></td>
<td>Gideon Keebler</td>
<td>Basic Work Order</td>
<td></td>
<td>938 Randolph Avenue </td>
<td>Saint Paul</td>
<td>MN</td>
<td>55102</td>
<td>09/09/2020 8:00AM</td>
<td>09/09/2020 10:56PM</td>
<td>09/09/2020 10:56PM</td>
<td>0.00</td>
<td>$30.00</td>
<td>$0.00</td>
<td>$1.50</td>
<td>$0.00</td>
<td>$1.50</td>
<td>$0.00</td>
<td>$0.00</td>
<td>$33.00</td>
</tr>
<tr>
<td colspan="27" style="background: #ccc; padding: 1px;"></td>
</tr>
<tr>
<td colspan="25" style="border: none;"></td>
<td style="border: none;">
<p>Labor</p>
<p>Finance(2.00%)</p>
<p><strong>Total</strong></p>
</td>
<td style="border: none;" align="right">
<p>$33.00</p>
<p>$0.66</p>
<p><strong>$33.66</strong></p>
</td>
</tr>
</tbody></table>
</div>
</div>
</body>
</html>
Help me please someone
Try this one to get required output:
//td[p="Total"]/following-sibling::td/p[count(//p[.="Total"]/preceding-sibling::p) + 1]
I've just modified #JaSON 's answer and now it's working fine
//td[contains(., "Finance")]/following-sibling::td/p[count(//p[contains(., "Finance")]/preceding-sibling::p) + 1]
OS: OSX macOS Sierra 10.12.6
Selenium Version: 3.6.0
Browser: Safari
Browser Version: 11.0.1(12604.3.2)
Expected Behavior - click() action should work on a button located inside an iframe in Safari browser
Actual Behavior - No action when performed button.click() action on Safari browser
Steps to reproduce -
Open safari browser
Access web application login screen
Enter valid credentials and click on Login button, pop up appears
Switch to iframe
Click on button placed inside an iframe
No action when clicked on button. Same code is working fine in other browsers(Chrome, Mozilla, IE11)
Below is the code:
SafariOptions options = new SafariOptions();
options.setUseCleanSession(true);
driver = new SafariDriver(options);
driver.manage().window().maximize();
driver.get("testurl");
driver.findElement(By.id("UN")).sendKeys("admin");
driver.findElement(By.id("UN")).sendKeys("admin$");
driver.findElement(By.id("Login")).click();
driver.switchTo().frame(driver.findElement(By.xpath("//*[starts-with(#class,'dijitDialog') and contains(#style,'z-index: 950;')]//*[starts-with(#id,'AxDojo_Dialog_frame')]")));
driver.findElement(By.xpath("//*[#id='ButtonPlaceHolder']/button[2]")).click();
No action when last step is executed.
As work around found an alternate to perform click on the button with below code
driver.findElement(By.xpath("//*#id='ButtonPlaceHolder']/button[2]")).sendKeys(Keys.ENTER);
But like this we need to change in many areas, Selenium is browser independent and maintenance of code browser wise is tedious task to us. Please can anyone look into this issue.
Please find HTML code inside iframe.
<iframe id="AxDojo_Dialog_frame_1508320744505" name="AxDojo_Dialog_frame_1508320744505" style="border: 0px; width: 605px; height: 159px;" width="605" height="136px" scrolling="auto" frameborder="0" src="about:blank" axpageload="1"></iframe>
#document
<!DOCTYPE html>
<html style="overflow-y: hidden"><head>
<title>Login</title>
<link href="../AxCommon/Styles/ECDefault/main.css" type="text/css" rel="stylesheet">
<script language="javascript" type="text/javascript" src="../Packages/Scripts/JQuery/jQuery.js"></script>
<script type="text/javascript" language="javascript" src="../AxCommon/Scripts/AxSystemBroadcast.js"></script>
<script type="text/javascript" src="../AxCommon/Scripts/AxMyParent.js"></script>
<script type="text/javascript" src="./Scripts/AxDialog.js?v=14082015"></script>
<style type="text/css">
.DialogBtn{width: 80px; font-size: 10pt;white-space:nowrap;}
.DialogCustomBtn{font-size: 10pt;white-space:nowrap;}
#popupMandatoryDiv { display:none;position:relative;height:auto;background:#FFFFFF;z-index:999999;overflow:auto;border:1px solid black;padding:5px 20px 10px 18px;font-size:12px;}
li {list-style: none; }
/*li:before {content:'\2022'; display: block; position: relative; max-width: 0px; max-height: 0px; left: -13px; top: -4px; color: red; font-size: 20px;padding-right: 5px;}*/
li:before {content:'\2217'; display: block; position: relative; max-width: 0px; max-height: 0px; left: -13px; top: -2px; color: red;font-weight:bold}
</style>
</head>
<body>
<div id="divMask" style="height: auto; width: auto;">
<table id="Table1" cellspacing="6" cellpadding="4" border="0">
<tbody><tr>
<td rowspan="3" style="width: 3px; height: 5px" valign="top" align="center"></td>
<td colspan="2" valign="top" align="center" height="10"></td>
</tr>
<tr style="width:100%">
<td valign="top" align="center" width="10%">
<img id="IconImage" src="../AxCommon/Images/28 information.gif">
</td>
<td valign="middle" align="left" height="5" width="90%">
<div id="divPrompt" align="left" style="DISPLAY: block; FONT-SIZE: 9pt; OVERFLOW: hidden; DIRECTION: ltr;">You are already logged into Excelicare in other active session(s). Please choose one of the options below:</div>
</td>
</tr>
<tr style="width: 100%; display: none;">
<td valign="top" align="center" width="10%">
</td>
<td valign="top" align="left" height="5" width="90%">
<div id="popupMandatoryDiv" align="left" style="DISPLAY: block; FONT-SIZE: 9pt; OVERFLOW: auto; DIRECTION: ltr;display:none">
</div>
</td>
</tr>
<tr>
<td valign="middle" align="center" colspan="2" style="padding-top: 10px">
<div id="ButtonPlaceHolder"><button class="DialogCustomBtn" onclick="AxSysF_CloseWindow(6)">Open new session / <br>end other session(s)</button>
<button class="DialogCustomBtn" onclick="AxSysF_CloseWindow(7)">Open new session / <br>retain other session(s)</button>
<button class="DialogCustomBtn" onclick="AxSysF_CloseWindow(0)">Cancel login<br> </button> </div>
</td>
</tr>
<tr id="trchkPlaceHolder" style="visibility: hidden; display: none;">
<td> </td>
<td valign="middle" align="left" colspan="3" id="tdchkPlaceHolder">
<div id="checkPlaceHolder"></div>
</td>
</tr>
</tbody></table>
<div>
<br>
<div id="lblInfo" style="display: block;"><b>Note : </b> If you choose to <i>Open new session/end other session(s)</i> any unsaved data in the other session(s) will be lost.</div>
</div>
</div>
<input id="hdnTitle" type="hidden" value="Login">
<script type="text/javascript">
var strProductType = '<%=System.Configuration.ConfigurationSettings.AppSettings("ProductType")%>';
strModulePageName = 'frmdialog';
$(document).ready(function() { PageLoaded();setTimeout('self.focus()', 10);});
function setCallback(CallbackFn) {
_CallbackFn = CallbackFn;
}
document.oncontextmenu = function (event) {return false;};
</script>
</body></html>
As per the screenshot/HTML you provided, there needs some modification in your code block as follows:
The line :
driver.switchTo().frame(driver.findElement(By.xpath("//*[starts-with(#class,'dijitDialog') and contains(#style,'z-index: 950;')]//*[starts-with(#id,'AxDojo_Dialog_frame')]")));
Though the outer HTML element does have the class attribute as dijitDialogPaneContent but doesn't have style attribute as z-index: 950;.
The line :
driver.findElement(By.xpath("//*[#id='ButtonPlaceHolder']/button[2]")).click();
As you are using xpath with index e.g. button[2] the xpath becomes brittle and vulnarable. I would have prefered to expand the <button> tag and use the <span> or any other tag/text present within to construct an unique css/xpath.
Following those 2 observation you can make some minor changes in your code as follows:
driver.switchTo().frame(driver.findElement(By.xpath("//div[#class='dijitDialogPaneContent')/iframe[starts-with(#id, 'AxDojo_Dialog_frame')]")));
//clicking the first button
driver.findElement(By.xpath("//button[#class='DialogCustomBtn' and contains(.,'end other session(s)')]")).click();
In-case the loading sequence of this <iframe> is constant, our xpath would be much more generic as follows:
driver.switchTo().frame(driver.findElement(By.xpath("//div[#class='dijitDialogPaneContent')//following::iframe[1]")));
//clicking the first button
driver.findElement(By.xpath("//button[#class='DialogCustomBtn' and contains(.,'end other session(s)')]")).click();
I've tried everything I can think of, but I cannot get the whitespace between cells to show in Outlook 2013. This is being sent from NationBuilder. How do I add cellspacing so that it renders in Outlook?
Thank you!
<!DOCTYPE html PUBLIC"-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="initial-scale=1.0"> <!-- So that mobile webkit will display zoomed in --> <meta name="format-detection" content="telephone=no"> <!-- disable auto telephone linking in iOS --> <title>NationBuilder</title> <style type="text/css"> body {
background-color: #ffffff;
-webkit-text-size-adjust: none;
-ms-text-size-adjust: none;
font-family: 'Palatino Linotype', serif;
}
body {
color: #333333;
margin: 0;
padding: 0;
}
A:link {
color: #2594aa;
text-decoration: none
}
A:visited {
color: #2594aa;
text-decoration: none
}
A:active {
color: #2594aa;
text-decoration: none
}
table {
border-spacing: 0;
border-collapse: collapse;
border-spacing: 0;
}
table td {
border-collapse: collapse;
}
#bodytable {
border-spacing: 10;
border-collapse: sepatate;
}
#bodytable td {
border-collapse: separate;
}
p {
font-family: chaparral-pro, Helvetica, Arial, sans-serif;
margin-bottom: 8px;
margin-top: 5px;
}
.body-content img {
max-width: 100%;
}
ul {
font-family: font-family: chaparral-pro, Helvetica, Arial, sans-serif;
text-align: left;
}
h1 {
margin-top: 35px;
margin-bottom: 10px;
font-weight: bold;
text-align: left;
font-size: 20pt;
color: #e37c00;
font-family: 'Trebuchet MS', sans-serif;
text-transform: uppercase
}
h2 {
margin-top: 10px;
margin-bottom: 10px;
font-weight: bold;
text-align: left;
font-size: 14pt;
color: #c8d300;
font-family: 'Trebuchet MS', sans-serif;
text-transform: capitalize
}
h3 {
margin-bottom: 0px;
margin-top: 10px;
font-weight: bold;
text-align: left;
font-size: 12pt;
color: #000000;
font-family: 'Trebuchet MS', sans-serif;
text-transform: capitalize;
text-decoration: underline
}
dt {
font-weight: bold;
margin-top: 10px;
margin-bottom: 6px;
}
/* Constrain email width for small screens */
#media screen and (max-width: 600px) {
table[class="container"] {
width: 100%!important;
}
}
/* Give content more room on mobile */
#media screen and (max-width: 480px) {
table[class="container"] {
width: 100%!important;
}
div[class="body-content"]img {
width: 100%;
}
}
/* Styles for forcing columns to rows */
#media only screen and (max-width: 600px) {
/* force container columns to (horizontal) blocks */
table[class="container"] {
width: 100%!important;
}
}
</style> </head> <body style="margin:0; padding:0;" bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <!-- 100% wrapper --> <table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0" bgcolor="#ffffff"> <tr> <td align="center" valign="top" bgcolor="#ffffff"> <!-- header --> <table cellpadding="0" cellspacing="0" border="0" width="100%" style="background-color:#2594aa;"> <tr> <td align="center"> <table width="600" cellpadding="0" cellspacing="0" class="container" border="0"> <tr> <td width="600" style="padding:20px; font-family:chaparral-pro,Helvetica,Arial,sans-serif;" valign="middle" height="100"> <img src="{{ settings.site.meta_image_url }}" alt="{{ settings.official_name }}" width="120" height="auto" border="0" valign="middle" style="vertical-align:middle;"> <a style="color:#000000;font-weight:bold;text-decoration:none;padding:20px;font-size:28px;" href="{{ settings.site.full_url }}"> {
{
settings.official_name
}
}
</a> </td> </tr> </table> </td> </tr> </table> <!-- ### 600PX CONTAINER ### --> <table style="font-size: 14px;" width="600" cellpadding="0" cellspacing="0" class="container" border="0"> <tr> <td height="30"></td> </tr> <tr> <td style="font-family:'proxima-nova','Helvetica',Arial,sans;padding: 20px;line-height:1.5;background-color:#ffffff;-webkit-border-radius:5px;-moz-border-radius: 5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;" bgcolor="#ffffff" class="body-content"> {
{
body
}
}
</td> </tr> <tr> <td height="30"></td> </tr> <tr> <td style="font-family:'proxima-nova','Helvetica',Arial,sans;padding:20px;line-height:1.5;background-color:#ffffff;-webkit-border-radius:5px;-moz-border-radius: 5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px;"> {
{
settings.official_name
}
}
{
% if settings.has_address? %
}
·
{
{
settings.address.one_line
}
}
{
% endif %
}
<br/>This email was sent to <a style="color:#505054;" href="{{ recipient.email }}"> {
{
recipient.email
}
}
</a>. To stop receiving emails,
<a style="color:#505054;" href="{{ settings.site.unsubscribe_url }}">click here</a>. <br/><b>Don't forget to like us on Facebook!</b>
<br/>You can also keep up with {
{
broadcaster.name
}
}
on Twitter,
Facebook or Instagram. </td> </tr> </table> <p style="text-align:center;margin: 20px 40px; font-size: 0.8em;font-family:Helvetica,Arial,sans-serif;">Created with NationBuilder,
software for leaders.</p> <!-- ### 600PX CONTAINER ### --> </td> </tr> </table> <!--/100% wrapper--> </body> </html>
<html>
<head>
<meta name="generator" content="HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39" />
<title></title>
</head>
<body>{{ recipient.first_name_or_friend }} --
<h1 style="color: #e37c00; font-family: 'Trebuchet MS', sans-serif; text-transform: uppercase; text-align: center;">The
Rogers Park Food Co-op has some exciting upcoming events!</h1>
<table id="bodytable" border="0" cellspacing="10" cellpadding="20" width="100%" style="border-spacing: 10px !important; border-collapse: separate !important; background-color:#ffffff;">
<tbody>
<tr>
<td style="background-color: #f8febf; border-collapse:seperate !important;">
<h2 style="text-decoration: none; font-family: 'Trebuchet MS', sans-serif; text-transform: capitalize; color: #2594aa;">
Berger Park Sustainability Open House
</h2>
<p>
<strong>Date: April 22, 2016 from 7 - 8:30pm</strong>
<br />
<strong>Location:
Berger Park Cultural Center
<br />
6205 N Sheridan Rd</strong>
</p>
<p>
Come celebrate the renovation of Berger Park,s south lawn! The architects plan will be unveiled. Also, Edgewater organizations committed to sustainability will have presentation tables. Share your ideas for other improvements to your park.
</p>
<a href="https://d3n8a8pro7vhmx.cloudfront.net/rogersparkfoodcoop/pages/177/attachments/original/1460228200/April_22BergerPark2016-SustainOpenHouse.pdf?1460228200">
<img align="right" style="margin: 6px 1px; border: 1px solid black; float: right;" title="BergerSmall.gif" src="BergerSmall.gif" alt="BergerSmall.gif" width="100" height="129" />
</a>
<p>Presentation Tables:</p>Berger Park South Lawn Renovation
<br />Loyola Sustainability Institute Student sustainability projects
<br />Edgewater Environmental Sustainability Project
<br />Monarch butterfly project at Berger Park
<br />LetsGOChicago
<br />Rogers Park Food Co-op
<br />Free Little Libraries
<p>Please RSVP at
https://nextdoor.com/events/il/chicago/earth-month-at-berger-park-sustainability-open-house-581265
</p>
</td>
</tr>
<tr>
<td style="background-color: #f8febf;">
<h2 style="text-decoration: none; font-family: 'Trebuchet MS', sans-serif; text-transform: capitalize; color: #2594aa;">
Meet the Farmers
</h2>
<p>
<strong>Date:
April 27, 2016 at 5pm - 7pm</strong>
<br />
<strong>Location:
Uncommon Ground
<br />
1401 W Devon Ave</strong>
</p>
<a href="https://d3n8a8pro7vhmx.cloudfront.net/rogersparkfoodcoop/pages/174/attachments/original/1458565305/Meet_the_Farmers.jpg?1458565305">
<img align="right" style="float: right; margin: 6px 1px; border: 1px solid black;" title="MeettheFarmers_sm.jpg" src="MeettheFarmers_sm.jpg" alt="MeettheFarmers_sm.jpg" width="100" height="155" />
</a>
<p>FREE EVENT!</p>
<p>Get some face-time with the local farmers who supply the best Chicago restaurants and Farmers Markets!</p>
<p>Learn about where your food comes from by talking to the people who grow it!</p>
<p>Get 10% off Dinner from Uncommon Ground!</p>
<p>Stay for live musicfrom 8-10 pm.</p>
<p>RSVP
here
</p>
</td>
</tr>
<tr>
<td style="background-color: #f8febf;">
<h2 style="text-decoration: none; font-family: 'Trebuchet MS', sans-serif; text-transform: capitalize; color: #2594aa;">
Farm Fresh Jams
</h2>
<p>
<strong>Date:
April 27, 2016 at 8pm - 10pm</strong>
<br />
<strong>Location:
Uncommon Ground
<br />
1401 W Devon Ave</strong>
</p>
<a href="https://d3n8a8pro7vhmx.cloudfront.net/rogersparkfoodcoop/pages/173/attachments/original/1458531431/PosterDraft.PNG?1458531431">
<img align="right" style="float: right; margin: 6px 1px; border: 1px solid black;" title="FarmFresh_sm.jpg" src="FarmFresh_sm.jpg" alt="FarmFresh_sm.jpg" width="100" />
</a>
<p>Fundraiser Concert for the Rogers Park Food Co-op</p>
<p>
<strong>Featuring performances by:</strong>
</p>
<p>Signal-to-Noise</p>
<p>Luna Blu</p>
<p>Abbie & Marlon</p>
<p>Abud: A Bard.</p>
<p>
<strong>Get 10% off Dinner from Uncommon Ground!</strong>
</p>
<p></p>
<p>RSVP
here
</p>
</td>
</tr>
<tr>
<td style="background-color: #f8febf;">
<h2 style="text-decoration: none; font-family: 'Trebuchet MS', sans-serif; text-transform: capitalize; color: #2594aa;">
Moah's Ark 4th Annual Plant Sale
</h2>
<p>
<strong>Date:May 7th and 8th</strong>
<br />
<strong>Location:Moah's ark</strong>
<br />
<strong>1839 W Touhy Ave</strong>
</p>
<a href="https://d3n8a8pro7vhmx.cloudfront.net/rogersparkfoodcoop/pages/173/attachments/original/1458531431/PosterDraft.PNG?1458531431">
<img align="right" style="float: right; margin: 6px 1px; border: 1px solid black;" title="moah.jpg" src="moah.jpg" alt="moah.jpg" width="250" height="188" />
</a>
<p>Our 4th annual plant sale will feature a big variety of heirloom tomatoes and peppers, plus herbs, flowers and more.
</p>
<p>We have several new tomatoes, including 7 varieties of dwarf heirlooms, old favorites like the cherokee purple, green and chocolate, Moah's yellow, and a couple new italian imports.</p>
<p>This is a 2 day event, Saturday and Sunday, which is Mother's Day. Mom's get a free plant.</p>
<p>RSVP to this event so that you will be notified of the full list which i will be putting up soon.</p>
<p>Happy spring!!</p>
<p>RSVP
here
</p>
</td>
</tr>
<tr>
<td>
<h2 style="color: #e37c00; font-family: 'Trebuchet MS', sans-serif; text-transform: uppercase; text-align: center;">
Click Here For Full Event Listing
</h2>
</td>
</tr>
<tr>
<td style="background-color: #f8febf;">
<h2 style="text-decoration: none; font-family: 'Trebuchet MS', sans-serif; text-transform: capitalize; color: #2594aa;">
Exclusive Offers for Co-op Owners!</h2>
<p>In our effort to provide value for our Owners, the Rogers Park Food Co-op is excited to offer the following exclusive deals for owners!</p>
<h3>$50 Discount to Natures Farm Camp</h3>
<p>To celebrate their love of Co-ops, Nature's Farm Camps has decided to offer a $50.00 discount for Natures Farm Camp registrations to the Chicago-area food cooperative members.</p>
<p>
<em>
<strong>Owners will receive a coupon code in an upcoming email.</strong>
</em>
</p>
<p>From naturesfarmcamp.com:</p>
<blockquote>We are an overnight summer camp where kids (ages 8-14) step out of their every day and immerse themselves in nature growing, foraging, cooking, making, building and exploring. Campers do with their hands, head and heart. In the process they
discover more about life and themselves, all while having a blast with new friends in the great outdoors.
</blockquote>
<hr />
<h3>Biggest Slim-Down with Hank: Help The Co-op While Getting Fit!</h3>
<p>Every few months, personal trainer Hank Rouse and his team of coaches run a Biggest Slim Down Contest. This past Holiday Season we had a Maintain Don't Gain Contest. To win cash prizes, all the contestants had to do was maintain their weight
(or even lose weight). I'm so excited to announce an Exclusive Opportunity for RPFC Co-Owners.</p>$25 will be donated to the Rogers Park Food Co-op for each participating Co-Owner who achieves the 3% Body Weight (Loss/Gain) benchmark.
<p>NEW Contest: Begins April 18th</p>
<p>Applications accepted until April 13th.</p>More Information at
http://www.facebook.com/events/495659513953786/
<br />
</td>
</tr>
</tbody>
</table>{{ broadcaster.name }}
<br />
{{ settings.site.full_url }}
</body>
</html>
Here is the HTML: https://jsfiddle.net/63v8cra7/1/
Screenshot from Thunderbird:
From Outlook:
I am trying to define fixed column width for a primefaces datatable. Apparantly, setting width didn't work, so created a CSS file, but this also is not working. Any hint or solution would be much appreciated. Thanks!
<p:dataTable id="messagesTableId" emptyMessage="#{messageBundle.tableNoResultsFound}"
value="#{messageSearchBean.lazyModel}" var="message"
styleClass="messageOccurenceResult-table">
<f:facet name="header">
<h:outputText value="#{messageBundle['global.search.results']}"/>
</f:facet>
<p:column headerText="#{messageBundle['message.send.date']}"
styleClass="messageOccurenceResult-table" >
<h:outputText value="#{message.sendDate}"/>
</p:column>
<p:column headerText="#{messageBundle['message.cc.email']}" style="width:*;
word-wrap:break-word;">
<h:outputText value="#{message.ccEmailIds}" />
</p:column>
<p:column headerText="#{messageBundle['message.messages.sent']}"
style="word-wrap:break-word;">
<h:outputText value="#{fn:length(message.messageOccurrence)}"/>
</p:column>
</p:dataTable>
The CSS file is below
.messageOccurenceResult-table td:nth-child(1) {
width:75px !important;
}
.messageOccurenceResult-table td:nth-child(2) {
width:125px !important;
}
.messageOccurenceResult-table td:nth-child(3){
width:75px !important;
}
Inner structure as shown in firebug
<table role="grid">
<thead>
<tr>
<tr>
<tr role="row">
<th id="messageDisplayForm:messagesTableId:j_idt86"
class="ui-state-default ui- sortable-column ui-state-active" style="width:10%;"
role="columnheader">
<div class="ui-dt-c">
<span class="ui-sortable-column-icon ui-icon ui-icon-carat-2-n-s ui-icon-triangle-1-
s"></span>
<span>Date Sent</span>
</div>
</th>
<th id="messageDisplayForm:messagesTableId:j_idt88"
class="ui-state-default ui-sortable-column" style="width:10%;" role="columnheader">
<div class="ui-dt-c">
<span class="ui-sortable-column-icon ui-icon ui-icon-carat-2-n-s"></span>
<span>Subject</span>
</div>
</th>
<th id="messageDisplayForm:messagesTableId:j_idt90" class="ui-state-default"
style="width:20%;" role="columnheader">
<div class="ui-dt-c">
<span>Message Category</span>
</div>
</th>
<th id="messageDisplayForm:messagesTableId:j_idt92" class="ui-state-default ui-sortable- column" style="word-wrap:break-word;" role="columnheader">
<div class="ui-dt-c">
<span class="ui-sortable-column-icon ui-icon ui-icon-carat-2-n-s"></span>
<span>Sender Email</span>
</div>
</th>
<th id="messageDisplayForm:messagesTableId:j_idt98"
class="ui-state-default" style="width:50px;" role="columnheader">
<div class="ui-dt-c">
<span>Messages Sent</span>
</div>
</th>
</tr>
</thead>
<tfoot>
<tbody id="messageDisplayForm:messagesTableId_data"
class="ui-datatable-data ui-widget-content">
</table>
Various PrimeFaces features need/want to know column widths (scrollable), so for PrimeFaces 3.4 you'll want to specify the width as follows:
<p:column ... width="52">
...
</p:column>
Units are in pixels.
Do something like below
table:
<p:datatable tableStyleClass="ui-datatable-tst1" styleClass="mystyle" ....>
css tableStyleClass:
.ui-datatable .ui-datatable-tst1 {
background-color: black;
background-image: inherit;
background-position: 0 0;
background-attachment: scroll;
background-repeat: repeat;
color: black;
padding-top: 0px;
padding-bottom: 0px;
left:0px;
width:70%!important;
height:350px;
position: absolute;
}
css styleClass: (ref: http://forum.primefaces.org/viewtopic.php?f=9&t=22443 )
.mystyle.ui-datatable .ui-datatable-header{
height: 20px !important;
width: 100%;
position: absolute;
margin-top: -10px;
padding-top: 0px;
padding-bottom: 0px;
}
.mystyle.ui-datatable .ui-datatable-data{
height: 70% !important;
width: 100%;
position: absolute;
top:70px;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
padding-top: 0px;
padding-bottom: 0px;
}
.mystyle.ui-datatable .ui-datatable-odd.ui-state-hover{
background: blue;
}
.mystyle.ui-datatable .ui-datatable-even.ui-state-hover{
background: cadetblue ;
}
.mystyle.ui-datatable .ui-datatable-even.ui-state-highlight{
background: cadetblue ;
}
.mystyle.ui-datatable .ui-datatable-odd.ui-state-highlight{
background: blue;
}
.mystyle.ui-datatable .ui-datatable-data-empty td {
color:red;
font-weight:bold;
}
.mystyle.ui-datatable th {
font-family: verdana;
font-size: 1em;
margin-top: 0px;
}
.mystyle.ui-datatable .ui-expanded-row-content{
background:white;
}
.mystyle.ui-datatable .ui-datatable-data tr{
height : 24px;
margin-top: 0px;
margin-bottom: 10px!important;
margin-left: 0px;
margin-right: 0px;
padding-top: 0px;
padding-bottom: 10px!important;
left: 0px;
right: auto;
top: 0px;
bottom: auto;
}
column:
<p:column headerText="tst" styleClass="ui-column1-size">
css:
.ui-datatable .ui-column1-size{
width:15%;
height: 8%;
font-size: 90%;
left:0%;
right:15%;
position:absolute;
}
Create above css for all the column (ensure the left & right values are correct)
I created Ajax Calender Extender as a user control and using the same in various pages. My problem with the calender user control is, When I click on the Next and Previous buttons in the calender It is not navigating previous month or next month.
AJAX version is : 4.1.40412.2
AJAX Calendar CSS :
.ajax_calendar
{
position: relative;
left: 0px !important;
top: 0px !important;
visibility: visible;
display: block;
background-color: Red;
}
.ajax_calendar iframe
{
left: 0px !important;
top: 0px !important;
}
Here is my user Control is :
<%# Control Language="C#" AutoEventWireup="true" CodeBehind="UCCalender.ascx.cs"
Inherits="test.Web.Pages.UserControls.UCCalender" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxControl" %>
<div style="position:relative;border:solid 1px red;">
<asp:TextBox ID="txtDate" MaxLength="10" CssClass="txtBox medium" ToolTip="DD/MM/YYYY"
Style="width: 85px;" Font-Size="11px" runat="server"></asp:TextBox>
<asp:ImageButton ImageUrl="~/Resources/Images/calendar.gif" ID="imgCalender" runat="Server"
BorderWidth="0" ImageAlign="absmiddle" />
<ajaxControl:CalendarExtender ID="AjaxCalenderCtrl" runat="server" Format="dd/MM/yyyy" PopupPosition ="TopLeft"
TargetControlID="txtDate" FirstDayOfWeek="Sunday" PopupButtonID="imgCalender">
</ajaxControl:CalendarExtender>
<ajaxControl:TextBoxWatermarkExtender WatermarkCssClass="watermark" ID="txtWaterMarkDate"
runat="server" WatermarkText="DD/MM/YYYY" TargetControlID="txtDate">
</ajaxControl:TextBoxWatermarkExtender>
<asp:RegularExpressionValidator ID="regexpvalEndDateEdit" ErrorMessage="!" ValidationExpression="(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d"
ControlToValidate="txtDate" runat="server"></asp:RegularExpressionValidator>
</div>
And I am using the same UserControl in the pages in this way:
<table id="inputDetails" style="padding: 0px; width: 700px;" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 198px; position: relative" align="left">
<asp:Label ID="lblBeginning" runat="server" Text="Beginning :" Style="margin-left: 10px;"></asp:Label>
<asp:TextBox ID="tbxBeginCalendar" TabIndex="3" runat="server" Style="width: 85px;" Font-Size="11px"></asp:TextBox>
<asp:ImageButton ID="BeginCal" runat="server" ImageUrl= "~/Resources/Images/calendar.gif" />
<uc1:UCCalender ID="UCCalStartDate" runat="server" />
</td>
</table>
Please provide the solution for this post.
This problem happens when you browse the CalendarExtender in IE8. You need to add the following CSS class to have the problem solved:
.MyCalendar .ajax__calendar_title
{
border: none; /* Fixes the "previous" and "next" buttons in the popup title */
}
This is explained here: http://ajaxcontroltoolkit.codeplex.com/workitem/22894
I have just come across this same issue. It was seemingly being caused because I had applied position:relative to the parent element.
Adding this this CSS fixed the issue for me:
.ajax__calendar_prev, .ajax__calendar_next{z-index:1;}
Hope that helps!