w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Why does adding a jquery animate method break all the AJAX on the page?
It turned out to be a syntax error which was breaking the code. I still don't have the yellow fade working, but the rest of my code is now working. In create.js.erb, I had: $('#current_item').css({'background-color: #88ff88'}).animate({"background-color: #114411"}, 1000); when I should have had $('#current_item').css({'background-color': '#88ff88'}).animate({"background-color:" "#114411"}, 1000); I didn't get my quotation marks right. I had it 'background-color: #88ff88' when I should have had two sets, one around background-color and one around the color itself. I don't have the gem working, and if anyone has answers on that, I'd love to hear them but at least I fixed why the code was breaking.

Categories : Ruby On Rails

How to get DataList's ItemTemplate items Url on server
try below <asp:ImageButton ID="ImageButton1" runat="server" Height="110px" ImageUrl='<%# Eval("Pic_Path") %>' Width="111px" onclick="ImageButton1_Click"/> and change method as protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { var btn = sender as ImageButton; var url = btn.ImageUrl; }

Categories : C#

Jquery adding items to a list without reloading page
Add id for textarea fields <textarea rows="4" cols="50" placeholder="Responsibilities" id="resplist"></textarea>Add responsibility<br /> <textarea rows="4" cols="50" placeholder="How to apply" id="inputresp"></textarea> You need Jquery. Use this js code var i=0; $("#send").click(addresp); function addresp() { if (i<10) { $("#resplist").val($("#resplist").val()+$("#inputresp").val()+' '); $("#inputresp").val(""); i++; } } http://jsfiddle.net/br0nsk1y/bDE9W/

Categories : Javascript

Binding client side event to dyanamic datalist items using jquery
$(document).ready(function () { $('body').on('click', '.item' ,function () { //do something here }); }); $('body') make it more specific based on your html

Categories : C#

Asp.Net : Retrieving Row Data from Datalist with the buttoncontrol inside the Datalist
Try this. protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e) { if (e.CommandName == "call") { string text = ((Label)DataList1.Items[e.Item.ItemIndex].FindControl("lblid12")).Text; } }

Categories : Asp Net

How to mathematically subtract items in two lists in Python and only output those items which meet a condition?
Without using numpy: A = ["40", "60", "80"] B = ["10", "42", "100"] newA = filter(lambda a: all([abs(int(a) - int(b)) >= 5 for b in B]), A) newB = filter(lambda b: all([abs(int(a) - int(b)) >= 5 for a in A]), B) print newA print newB

Categories : Python

How to clear/remove shopping cart items before adding new items in magento?
here is the solution for remove as well as add products into cart $params['qty'] = 1; $product = $this->_initProduct($_product); // here initialize the product $cart = Mage::getModel('checkout/cart'); $cart->truncate(); // remove all active items in cart page $cart->init(); $cart->addProduct($product,$params); $cart->save();

Categories : Magento

Pagination - 2 items per page on page 1, 10 items per page on other pages
In first page put the SQL query with LIMIT 0,2 On second page LIMIT 2,10 On third page LIMIT 12,10 In PHP you can do this like this: <?php if($p==1){ $start=0; $amount=2; }else{ $start=$p*10-18; $amount=10; } $sql="SELECT * FROM table LIMIT $start,$amount";

Categories : PHP

Printing a Gridview - how to print n rows on each page using page break
CSS page-break-after not working cross browser I tested page-break-after: always; with ie10 and firefox 22 - it works in both; in Chrome 30 it does not work. So its difficult to tell why it does not work for you in firefox 22. If your user base is mostly IE and firefox (like in our company). This will work: .pagebreak { page-break-after: always; } Apparently the support for css pagebreak is not ideal: pagebreak does not work in chrome or pagebreak not working in all browsers A search for chrome issues lead me to issue 99124 - Printed table content does not respect page-break CSS properties; reported on Oct 4, 2011 and still untriaged: Confirmed, not reviewed for priority and assignment. It seems that printing is just not important. Adding this css did not help either: @medi

Categories : Javascript

Why am I getting a break in the output of this WHERE loop?
This is not produce valid HTML at all. Who knows how browsers are going to try to render this page. Two things I see off the bat: Your <br> tags are not correct. You are starting a bunch of forms and then ending those tags once. You can fix those with this code: <?php if ($switch == 0) { echo '<a href="/index.php">Exit Voting Booth - You May Vote Again Later</a></br>'; echo '<div role="main" id="main"><div class="wrapper">'; echo '<h3>Ballot Questions:</h3><br />'; ; // This was </br> $query = "SELECT * FROM ballot_questions"; $ballots = mysql_query($query, $link) or die("Unable to select: " . mysql_error()); $x = 1; echo '<form action="vote_engine.php" method="post">'; // This will cre

Categories : PHP

break string and arrays down intro separate items
You need to iterate over the third item in the sequence. for item in filecontent: print 'Month %s' % item[0] print 'Section %d' % item[1] for name, hours in item[2]: print "%s has worked %d hours" % (name, hours)

Categories : Python

SSRS - Is there a way to have a table split by a page break to appear on the same page?
I think your data presents a bit of a problem. As you've already figured out, typically for this sort of setup you'd set up a row group with an expression like: =(RowNumber(Nothing) - 1) Mod 6 And a column group expression like: =Ceiling(RowNumber(Nothing) / 6) This would create a six row tablix that would grow horizontally as required. See this SO question for a similar example. However, you currently have the requirement of also grouping by another column - pass_no in your case. Normally you can approximate a group-level row number with an expression like: =RunningValue(Fields!pass_no.Value, CountDistinct, "DataSet1") Unfortunately, when you try to add this into one of the grouping expressions like: =Ceiling(RunningValue(Fields!pass_no.Value, CountDistinct, "DataSet1") / 6)

Categories : SQL

Break shell output to files
Yes, use logrotate logrotate is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation, compression, removal, and mailing of log files. Each log file may be handled daily, weekly, monthly, or when it grows too large.

Categories : Java

Render speed: adding one DOM item at a time or adding set of items at once
What I would do is use document.createDocumentFragment() and do all possible operations there, and touch the real DOM once. (Beside in a loop might be a good idea to cache the selector once): var frag = document.createDocumentFragment(); $.each(results, function(key, val){ var a = document.createElement("div"); a.innerHTML = val; frag.appendChild(a); }); $(".results").append(frag);

Categories : Javascript

HTML print second page with no page break?
Try this: .divTag p { page-break-before: always; } 'auto' only inserts a printing page break if determined necessary by the browser. Also, you may want to wrap that css like this: @media print { .divTag p { page-break-before: always; } } Or you can use this css: @media print { .page-break { display: block; page-break-before: always; } } And put the .page-break class on the element where you wish to have the break.

Categories : HTML

Floated items in "gallery" layout break to next line at random browser widths
Hmmm, I can't say this is the only solution, but here's how I feel you could fix this problem: Looking at the site, I believe the issue lies with the dimensions of the images being used for those <div class="promoItem"> elements. The variation between heights of your assets (264px-265px) seems to be causing the line breaks. You can fix this in a couple of ways: Standardize the heights of the assets you use in those instances. Since you don't have many images there, this shouldn't be a very lengthy task - but if they change, you'll have to remember the correct height to make the new assets with. Or, you can... ...Change your CSS to be a bit more flexible. These changes seem to work for me: div.promoItem { position: relative; display: inline-block; width: 29%; margi

Categories : HTML

Does Google Chrome Frame break IE8 console output?
From Google Chrome Frame documentation: You can use the Web Inspector in GCF just as you would in the Google Chrome browser. To use it, right-click and choose "Inspect Element". Logging is available via the console.log method, and you can set breakpoints and inspect network activity.

Categories : HTML

Adding contact to group break sync
I discovered that this problem was due to the group not having a source_id (found by looking at the Log.d messages - there were messages from the sync adapter). I asked a related question HERE and eventually figured out the cause of that as well.

Categories : Android

adding line break on pseudo element
Why don't you just use borders? h2 { border-bottom: 4px solid #000; } and then you could just adjust the padding on the bottom of the H2: h2 { padding-bottom: 15px; border-bottom: 4px solid #000; } UPDATE BASED ON COMMENTS To keep the dash the same width regardless of the title width I simply styled the :after pseudo element with a border and display block: http://jsfiddle.net/uzVhz/2

Categories : CSS

Adding a line break to D3 graph y-axis labels
The problem is that you're adding the tspan elements as text without a namespace. This way they get interpreted as HTML. If you add them using D3 or explicitly create the elements with a namespace, it should work, i.e. el.text(''); d3.select(el).append("tspan").text(sections[0]); ...

Categories : Javascript

Break Page after 6 div using page-break-after?
You could do it this way: FIDDLE .wrapper div:nth-child(6n) { margin-bottom: 300px; } Which means: after every 6 containers - add a bottom margin of x px (how ever much you need) so that it pushes the next boxes to the next page.

Categories : HTML

Add page break in css and pdf
You need to set the page margin. This will prevent the page content from rendering in the space allocated for the header and footer.. @page { margin: 120px 50px 35px 50px; } You will also need to set the top on your header to a negative value to push the element outside of the margin. The same applies to the footer. top: -90px You can test it by pasting the code below into the DOMPDF Demo <html> <head> <style> @page { margin: 120px 50px 80px 50px; } #footer { position: fixed; bottom: -50px; height: 30px; background-color: #333399; } #header { position: fixed; top: -100px; width: 100%; height: 116px; background: url('http://ibadep.local/img/header2.png') no-repeat; } /* Type some style rules here */ </style> <

Categories : PHP

[google form]Creating form with a script : Page Break and go to page issue
You only need to change the order of your operations; you do not need to keep the operations on item together. Here's an example, using your code: function createForm() { var title = 'Multipage Form Test'; var description = 'Stackoverflow question 17083500'; var form = FormApp.create(title) .setDescription(description) .setConfirmationMessage('Thanks for responding!'); var page1 = form.addPageBreakItem() .setTitle('First page'); var item = form.addMultipleChoiceItem(); var page2 = form.addPageBreakItem() .setTitle('Second page'); var page3 = form.addPageBreakItem() .setTitle('Third page'); item.setTitle('Question') .setChoices([ item.createChoice('Yes',page2), item.createChoice('No',page3) ]); Logger.log(fo

Categories : Forms

how to set break for print page(div) using css?
I remember when I needed to do this. These 2 links are what got me through it very quickly and simply: http://www.w3schools.com/cssref/pr_print_pageba.asp http://davidwalsh.name/css-page-breaks

Categories : Javascript

Adding Sharepoint 2010 List Items to a List with external Items
One option is to create an SQL server trigger. This trigger would fire whenever a new sales order is created in your source database. You could make it a CLR trigger, and in the function make use of the SharePoint client interface. After you provided a clearer description of the problem: I believe that you're looking for something like the list event handler. This will run on the events you care about, and you can pull from the database at the appropriate time. Essentially, you need to make a Visual Studio SharePoint project (from my past experience this method requires you to use VS right on the SharePoint server, or else you have to copy a lot of DLLs manually from the server); and make an event receiver.

Categories : SQL

Break line automatically when user input long text without adding white-space
If you're down with CSS3 you may try the 'word-break' property. To see a demo: http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_word-break

Categories : PHP

Page break on print issue
I don't know in what lenguage you want the code, and what varibles are using, but it's a way in java: int lines=3; int i = 0,aux=lines; lines=lines*2; do { if(lines>aux){System.out.print(i);if(i==4){lines--;System.out.println("");}if(lines>aux && i==4){i=-1;}} i++; if(lines!=0 && lines<=aux){System.out.print(i);if(i==9){lines--;i=4;System.out.println("");}} } while (lines>0); change the int lines to change the number of double lines you want in HTML the only way is using JavaScript, I hope this can help you!

Categories : Javascript

how can I make a page break using itext
Calling document.newPage() tells iText to place subsequent objects on a new page. The new page will only actually get created when you place the next object. Also, newPage() only creates a new page if the current page is not blank; otherwise, it's ignored; you can use setPageBlank(false) to overcome that. Refer below link for an example: http://itextpdf.com/examples/iia.php?id=99

Categories : Java

{page-break-after: always} not working when printing
I've been dealing with this too. It appears that using the page-break-after property in a break line is a no-no in IE10. According to Internet Explorer’s current documentation supporting CSS 2.1 Section 13.3.1, the page-break-after property does not support line break or header elements. See the remarks in this link: http://msdn.microsoft.com/en-us/library/ie/ms530842. I had to switch my code to use a div with the break after class but that doesn't seem to work in IE9 which is awesome.

Categories : HTML

Unable to page-break as desired with css
Try adding :first-child to your css here is a great site for css, it's helped me a lot in the past. http://css-tricks.com/almanac/selectors/f/first-child/

Categories : HTML

How can I get values to print out with a page break using php?
I'm not sure I understand your question entirely, but if I do, when you put them into the textarea they are shown one per line, but on printing them with PHP, they're all on the same line? If this is the case, it's because textareas use newline characters to create a line break. Browsers will interpret this as any other whitespace, so will print it just as a space. You can fix this in your php but using nl2br, e.g. nl2br($endwallPanels), which converts newline characters to HTML <br> characters.

Categories : PHP

html2pdf page-break-after creating issue
I'm having the same problem, and have tried using page-break-before as well as page-break-after, both using the DIV tag. It appears that HTML2pdf class is not resetting the vertical start point of the next line of text, after the page break occurs. Sample code: (code for first page here) // Supplement Schedule invoice page $htmlfile[] = "<div style="page-break-before:always"></div>"; $htmlfile[] = "<h1 style="text-align:center; margin-bottom:0; ">Supplement Estimate</h1>"; $htmlfile[] = "<h4 style="text-align:center; margin:0">($visit->next_visit Weeks)</h4>"; [more code] Sample code using page tag to insert page break: (code for first page here) // Supplement Schedule invoice page $htmlfile[] = "<page>"; $htmlfile[] = "<h1 style="text

Categories : PHP

Page break in rdlc report with Condition
You will need to have a group based on Bin - you may already have one. In the Bin group properties, make sure Page Breaks -> Page break options is set to Between each instance of a group:

Categories : C#

Find page break in Word using OPEN XML
Figured out there is another way a page break gets added to the word document . That is using the sectPr tag the page size property . If the content size increases then the exceeding content is pushed to the next page .

Categories : C#

Menu items break on Chrome/Safari (Mac) but not on Firefox and Chrome for Win
This is probably because Chrome is rendering the fonts slightly differently and there will be a few pixels difference (about 4 or 5px over the screen width in this case). Here's a little trick I picked up a while ago to center the nav without padding and such: .site-header .site-nav ul { display: table; margin: 0 auto; } .site-header .site-nav li { display: block; float: left; } Notice there's no other margins or padding on the ul apart from the auto left and right. You'll also need to clear the ul with a clearfix because the li's are now floated. Or if you don't like using display:table you can do the same with display:inline-block on the ul, then set text-align:center on the .site-nav

Categories : HTML

Insert page break for each month in crystal report
you have to set the property that. select group section -> select option tab -> insert 1 in the text box of the filed name new page after 1 visible group Thus your problem should be solve.

Categories : C#

I can't seem to access the header I want to make a page break before in CSS what am I doing wrong?
Your selector for your page break is wrong. Your h2 isn't the last child of the section, so it won't be selected. Based on your markup, you could do this: section > h2 + ul + h2{ page-break-before:always; } You could make things less brittle by simply applying a class or ID to the element in question and build a selector off that. UPDATE This is working as expected: <html> <head> <title>Foobar</title> <style> @media print { @page { size:8.5in 11in; margin: 0.5in; } @page { size : portrait } #left, header, #right, footer, #center hgroup h2, #center p:last-child, aside { display:none; } section#center h1 { font-size:200%; } section#center h2 { font-size:150%;

Categories : CSS

URLs break when a html page is ending with a slash
Are you trying this with localhost and you're not able to see localhost/domainexample/page.html/ because of trailing slash? if yes then you better look for virtual host so your domain will look like live domain

Categories : HTML

xsl:fo doesn't create a multipage PDF inspite of page-break
Your problem is that you are using an absolutely-positioned block container: it encapsulates your table on a single page and so your table isn't breaking to a new page. If you didn't use an absolutely-positioned block container then your table would be free to engage page-breaking and regular page flow.

Categories : Xml

Adding PHP code to Drupal Page for adding Javascript
This is more typically handled via a custom module or theme function. But assuming this is being put into a field on a node your code should work. The issue is likely a text format setting. Assuming this is Drupal 7, you can go to /admin/config/content/formats. I assume you are using PHP format. So you will want to inspect the settings for this format and make sure the PHP filter is enabled.

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.