Unnamed: 0
int64
302
6.03M
Id
int64
303
6.03M
Title
stringlengths
12
149
input
stringlengths
25
3.08k
output
stringclasses
181 values
Tag_Number
stringclasses
181 values
3,798,614
3,798,615
Change direction of animation
<p>I am using this cloud effect <a href="http://solidgiant.com/2011/02/awesome-cloud-effect/" rel="nofollow">http://solidgiant.com/2011/02/awesome-cloud-effect/</a> but i want to change the direction of the cloud movement. i want them to move right to left, Can anyone help me with this</p> <p>i am done with the change...
javascript jquery
[3, 5]
3,476,738
3,476,739
two JS variables refer to same Json object how to keep one constant?
<p>I have </p> <pre><code> $.getJSON('json.ashx?mode=Gender', function (data) { memberInfo = data[1]; options.series = data; originalData = data[0]; ... ... }); </code></pre> <p>which returns</p> <pre><code>[ {"type" : "pie","name" : "Gender", "data...
javascript jquery
[3, 5]
5,566,950
5,566,951
C# display pdf document in iframe in asp.net page
<p>how can i display pdf document in iframe in c# web page:i have a drowpdownlist linked with pdf files,what i need is when i select one item from this list ,iframe will populated with the corresponding pdf document</p>
c# asp.net
[0, 9]
4,090,448
4,090,449
Android: Create a new class? Or can I use the current Activity?
<p>Really I guess I am looking for a best practice answer. I like to leave applications with the lightest amount of code possible and the least amount of repeated code especially. I have a few Android applications that I have created. My question is, if I create a new Activity which in turn also needs a class to be cre...
java android
[1, 4]
1,388,352
1,388,353
find the textfield which has got maximum value-jquery
<p>I have 5 input text fields on 5 rows . where all 5 textfields are optional .i want to get the id of the text field which has got maximum value </p> <pre><code>&lt;div class="dt_distance_slab"&gt; &lt;g:textField class ="number distanceSlab1" name="distanceSlabCost1" id = "distanceSlabCost1" value=""/&gt; ...
javascript jquery
[3, 5]
2,824,063
2,824,064
create persistent connection
<p>In my android application I am trying create persistent connection for downloading images. Here is my code </p> <pre><code> public class PersActivity extends Activity { ImageView img; String imageUrl="http://192.168.1.4/JRec/"; @Override public void onCreate(Bundle savedInstanceState) { sup...
java android
[1, 4]
1,479,329
1,479,330
How to get object values and properties in jquery?
<p>I am using jQuery selector to get the values of all CMS components on the page using <code>$('div.cmscomponent')</code> but how can I test this to see if am actually getting the list of compoents on the page. </p> <p>I use:</p> <pre><code>var temp = $('div.cmscomponent'); alert(temp); </code></pre> <p>and result ...
javascript jquery
[3, 5]
4,676,498
4,676,499
Faster Alternative to MD5 in JavaScript or JQuery
<p>I often code in PHP and for caching I like to use the md5 of a particular request (ie an sql statement) as the name of my cache key. md5 gives me a pretty string that is unique and thus, the reason why I use it.</p> <p>Now, I am trying to implement some caching at the browser level using JQuery. It is for an addres...
javascript jquery
[3, 5]
2,580,945
2,580,946
For a DIV with scrollbars, is it possible to make that div scroll all the way to the bottom, using JQuery?
<p>How would you do that using JQuery?</p>
javascript jquery
[3, 5]
1,762,116
1,762,117
Dynamically created checkbox checkedchanged event issue
<p>My issue is that i need to create checkboxes dynamically on a textchanged event of a textbox which are all checked and keeping their checked state count in an int variable assiging it to a label; till here all is successfully done but the problem is now if i uncheck any of the checkboxes i want their count to get de...
c# asp.net
[0, 9]
1,073,809
1,073,810
how to change an element type using jquery
<p>I have the the following code </p> <pre><code>&lt;b class="xyzxterms" style="cursor: default; "&gt;bryant keil bio&lt;/b&gt; </code></pre> <p>How would I replace the <code>b</code> tag to a <code>h1</code> tag but keep all other attributes and information?</p>
javascript jquery
[3, 5]
3,248,021
3,248,022
How to escape ' in setParameter
<p>I have a javascript function which is broken because the ' ('Côte d'Azur') is not escaped:</p> <p>Javascript:searchDay('month', 'France', 'Côte d'Azur', '0', '201208', '18');</p> <p>The parameters are set as followed:</p> <pre><code>$jsUrl = new JavascriptUrl( "searchDay", array("id", "country", "...
php javascript
[2, 3]
4,029,153
4,029,154
jQuery on(); function
<p>I'm learning Backbone and had some issues with the on()-function. But actually it's a very basic JavaScript question.</p> <p>Why is it that the first line of code below works, and the second doesn't? Using the second line, the render-function is never triggered. Mind the brackets.</p> <p><strong>Works</strong></p>...
javascript jquery
[3, 5]
4,377,250
4,377,251
jQuery .append() does not work from .js file
<p>I have the following line of code:</p> <pre><code>$('#text').append('&lt;h2 style="color:white"&gt;afdghadfg&lt;/h2&gt;'); </code></pre> <p>If I paste this code inside of a script tag in the html, it works fine. However, when placed inside a .js file it does nothing. </p> <p>Know that the .js file has plenty of o...
javascript jquery
[3, 5]
2,106,591
2,106,592
how to pass session parameter from jquery to ASHX handler
<p>Below is my Jquery code and I would like to pass Session paramater e.g. Session["ID"]. Jquery calls ASHX page</p> <p>All below parameters are working fine and the session parameter has a value, but how can I pass session paramater from Jquery?</p> <p>So below code "paramater Sessionparameter" should be replaced wi...
c# jquery asp.net
[0, 5, 9]
5,967,352
5,967,353
PHP / javascript live chat using too much bandwidth
<p>So I am learning about javascript, so I am making a live chat system with PHP and javascript. I have it so the javascript refreshes the log (each message gets logged in a file on the server), and it refreshes every second. Im using firebug to monitor the resource usage, and I see under the net tab each times its upd...
php javascript jquery
[2, 3, 5]
1,019,358
1,019,359
Text of the clicked link
<pre><code>&lt;ul class="Buttons"&gt; &lt;li&gt;&lt;a href="#" onclick="myFunc(); return false;"&gt;Accept&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" onclick="myFunc(); return false;"&gt;Reject&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" onclick="myFunc(); return false;"&gt;On Hold&lt;/a&gt;&lt;/li&gt;...
javascript jquery
[3, 5]
520,810
520,811
c# Convert string into URL friendly
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/37809/how-do-i-generate-a-friendly-url-in-c">How do I generate a Friendly URL in C#?</a> </p> </blockquote> <p>By URL friendly I mean turning:</p> <blockquote> <p>Convert string to DateTime in c#</p> </blockq...
c# asp.net
[0, 9]
4,960,266
4,960,267
jquery/javascript menu issue
<pre><code>$(function(){ $("li.level2").hide(); $("li.level3").hide(); $("ul.navigation").delegate("li.level1", "click", function() { $("li.level2").toggle().siblings("li.level3").hide();; }); $("ul.navigation").delegate("li.level2", "click", function() { $("li.level3").toggle(); ...
javascript jquery
[3, 5]
556,317
556,318
Keeping Pop-ups in viewport
<p>I am using a <a href="http://users.tpg.com.au/j_birch/plugins/superfish/#getting-started" rel="nofollow">Superfish</a> plugin to display menu pop-ups but the problem is when a menu item is big it gets overflow from viewport.</p> <p>How can I adjust the position of pop-up menu to always keep it in the viewport.<br> ...
javascript jquery
[3, 5]
1,534,779
1,534,780
Using HttpApplicationState outside ASP.NET session
<p>I have following problem. I am trying to use web services wrote in ASP.NET in application as intermediate layer, stored inside WCF service layer. So I am instancing some WebService classes and I call web methods like normal C# methods. Unfortunately some of them are using asp.net specific solutions like using HttpC...
c# asp.net
[0, 9]
4,402,115
4,402,116
ASP.NET - Internal messaging system
<p>I want to implement a messaging system in my Web application similar to the one Chase and Facebook have on their websites. Should I develop this on my own, or should I find a 3rd party control or other solution? Would google provide some sort of API to make this easy? I'm leaning towards developing this on my own...
c# asp.net
[0, 9]
3,132,956
3,132,957
add class and fadeIn using jquery
<p>I have the following code:</p> <pre><code>$("#rade_img_map_1335199662212").hover(function () { $("li#rs1").toggleClass("active"); //Toggle the active class to the area is hovered $("li#rs1").fadeIn("slow"); }); </code></pre> <p>I need to add the class active then fadeIn. I have css which has <code>li'rs...
javascript jquery
[3, 5]
5,326,733
5,326,734
How to apply tax, discount to invoice using jQuery
<p>How to apply Tax, discount to subtotal and calculate grand total??</p> <p>I have these paragraphs with the following ID's</p> <pre><code>&lt;p id="subtotal"&gt;15000&lt;/p&gt; &lt;p id="tax"&gt;10&lt;/p&gt; // In percentage &lt;p id="discount"&gt;1000&lt;/p&gt; &lt;p id="grandtotal"&gt;&lt;/p&gt; // Grandtotal wil...
javascript jquery
[3, 5]
2,767,016
2,767,017
How can I fire jQuery outside document.ready block?
<p>The common method of starting jQuery is putting it in</p> <pre><code>$(document).ready(function() { // put all jQuery stuff here }); </code></pre> <p>But what if I have a complicated site which uses basic jQuery in <code>&lt;head&gt;</code> <strong>and</strong> some custom functions that depend on the page typ...
javascript jquery
[3, 5]
5,845,316
5,845,317
Convert Python for -loop to PHP
<p><strong>How can you convert the following code to PHP?</strong></p> <pre><code>summat = [sum(arra[i:i+4]) for i in range(0,len(arra),4)] </code></pre> <p>My attempt</p> <pre><code>$summat = array() foreach ( range(0, $arra.length, 4) as $i) { $summat = array ( array_sum( array_slice( $array, $i, $i+5) ) )...
php python
[2, 7]
994,315
994,316
Fastest way of getting a list of installed packages in an Android device
<p>I'm getting a list of packages installed in an Android devices very similar to the code here - <a href="http://www.androidsnippets.com/get-installed-applications-with-name-package-name-version-and-icon" rel="nofollow">http://www.androidsnippets.com/get-installed-applications-with-name-package-name-version-and-icon</...
java android
[1, 4]
2,814,613
2,814,614
JQUERY / JAVASCRIPT won't work in mobile devices
<p>I got a message system which requires a minimum amount of characters. Therefore I use a a submit button which is disabled by default. When the character limit is passed the submit button needs to be enabled.</p> <p>The current code I use is:</p> <pre><code> $(window).load(function(){ var amountArray = new Ar...
javascript jquery
[3, 5]
15,069
15,070
jquery detecting mouseup
<p>I have a problem.</p> <p>The code works fine in Firefox but in Chrome it messes up.</p> <p>The code is rather basic. There's a div with a background. Upon jquery's mousedown upon that div I set a function to run at an interval. Upon mouseup the interval is cleared. Simple, right?</p> <p>So problem is this. Say th...
javascript jquery
[3, 5]
188,789
188,790
Displaying image on tooltip?
<p>In my application I would like to display an image on a tool tip.</p> <p>How can I do this? Can you help me, or provide me with any references?</p>
c# asp.net
[0, 9]
4,820,362
4,820,363
Wizard Control on next button submit not postbacking after previous button submit
<p>Struck of with this problem...... I google for this query but no help...........</p> <p>I have a wizard control with three steps, when user clicks the next button in first step it post back to server and then user comes back to previous page or the same page and click next button it doesn't post back to server.</p>...
c# asp.net
[0, 9]
1,632,125
1,632,126
How can I do OR in jquery for an element selector?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/10515888/combine-two-selectors-with-one-jquery-object">Combine two selectors with one jQuery object</a> </p> </blockquote> <p>I have the following jquery code:</p> <pre><code> $("#try").click(function(){ ......
javascript jquery
[3, 5]
2,619,528
2,619,529
How to set 'ClientValidationFunction' property in <asp:CustomValidator>
<p>I need to use asp:CustomValidator for a tool. The problem am facing is that on calling a function using the property 'ClientValidationFunction', the function is getting called but even a single line of javascript is not getting executed. I placed a simple alert() inside the function. Its also not executed.</p> <p>...
c# asp.net
[0, 9]
1,319,692
1,319,693
Executing program on server-side with ASP.Net
<p>I have an executable file that works fine by hand locally. It converts a file to another new file by some parameters. I'm using ASP.Net and that executable installed win2003 server sp2. I can use it from local but, I can't execute the program from a web browser using system.diagnosting.process. When I use that, I c...
c# asp.net
[0, 9]
3,138,863
3,138,864
Using punjabi character in my android application
<p>I am trying to read character from one of the URL : <a href="http://www.searchgurbani.com/hukum/sis_ganj" rel="nofollow">http://www.searchgurbani.com/hukum/sis_ganj</a> </p> <p>using the below code :</p> <pre><code> String htmltext=null; String inputLine; URL urlinstance = new URL(url); ...
java android
[1, 4]
2,469,353
2,469,354
jQuery - calling function with parameters inside method
<p>I'm wondering how is possible to call a function with parameters inside a method. I have 2 functions and i'd like to call function deleteCode() when clicked on list element which is created by addCode() function. I'm sure the solution is really simple, but i just can't see it right now. Many thanks!</p> <pre><code...
javascript jquery
[3, 5]
3,704,144
3,704,145
Run a Javascript On Page Load
<p>I would like to know how to run a javascript function on page load.. in my asp.net page. I do not want to do it in from my .cs file OnLoad, I want to keep it in the aspx page if at all possible.</p> <p>I am new to javascript so any ideas?</p>
c# javascript asp.net
[0, 3, 9]
1,107,186
1,107,187
how can i create a dynamic map that shows our company locations?
<p>I'm searching for a jquery plugin that allows me to create a dynamic world map and mark the countries that we have a branch there in a different color or put a logo of our company on that country. I need to have access to that map so when a user clicks on a country i can fire a jquery event.</p> <p>i think Google h...
javascript jquery
[3, 5]
2,128,086
2,128,087
Writing this jQuery click function in JavaScript
<p>I am slowly making my way from jQuery to vanilla JS, but I am struggling with wanting to write the following in JavaScript, would I have to setup a 'for' loop for each element? How would I target the child elements an an ID?</p> <p>Here's what I would want to understand:</p> <pre><code>$('#id li').click(function()...
javascript jquery
[3, 5]
5,461,358
5,461,359
Re-sizing the webpage content
<p>In my project I have a webpage which has 2 div areas right and left. The left div takes almost 60% of the whole page width and the right one takes around 36% of the page. I wanted to resize the both div areas in a proper ratio when I shrink the browser from the right side or left side. The UI is getting generated fr...
javascript jquery
[3, 5]
4,635,638
4,635,639
manipulate a property of a child element
<p>I have the following row element with a double click event atached to it.</p> <pre><code>&lt;tr ondblclick="onLabelDoubleClicked(this)"&gt; &lt;td&gt;&lt;label id="labelId" &gt;My Label&lt;/label&gt;&lt;/td&gt; &lt;td&gt;&lt;input type="text" id="myInput" data-bind="kendoDropDownList: { data: source, value: m...
javascript jquery
[3, 5]
2,921,922
2,921,923
Uncaught TypeError: Cannot read property 'safari' of undefined
<p>I have this jjavascript to resize iframes:</p> <pre><code> $(function () { var iFrames = $('iframe'); function iResize() { for (var i = 0, j = iFrames.length; i &lt; j; i++) { iFrames[i].style.height = iFrames[i].contentWindow.document.body.offsetHeight...
javascript jquery
[3, 5]
2,073,572
2,073,573
Capture who clicked a link from Website A to Website B?
<p>Assume I have a website called Website A and it has some links on it to other websites. One of these links could be a link to Website B. Is there a way, using some existing solution, open source, or something you have to pay for where you can track who, what, where, etc clicked the link to go from Website A to Web...
c# asp.net
[0, 9]
2,903,945
2,903,946
Use variable as key value for FormView Insert
<p>This sounds really simple and for the life of me I can not find out how to do this. I have a FormView where the user can create a new contact. I am passing into this page a key variable. In the insert statement I need to have this key be part of the insert statement. It is currently defined as a public variable ...
c# asp.net
[0, 9]
5,724,645
5,724,646
Most efficient way to select all elements with an array of values
<p>Let's suppose I have a <code>&lt;select&gt;</code> element:</p> <pre><code>&lt;select id="foobar" name="foobar" multiple="multiple"&gt; &lt;option value="1"&gt;Foobar 1&lt;/option&gt; &lt;option value="2"&gt;Foobar 2&lt;/option&gt; &lt;option value="3"&gt;Foobar 3&lt;/option&gt; &lt;/select&gt; </code><...
javascript jquery
[3, 5]
4,260,320
4,260,321
Jquery and PHP rating function problem
<p>I know that I was already posted similar question but I just can't find the answer and figure it out how to solve this problem.</p> <p>I'm trying to customize Jquery Star Rating plugin (<a href="http://php.scripts.psu.edu/rja171/widgets/rating.php" rel="nofollow">link text</a>) but I do not know what to do to show ...
php jquery
[2, 5]
2,820,715
2,820,716
Somehow accessing Javascript output?
<p>So,</p> <p>Say there's a remote PHP file that's generating some output in JavaScript.<br> I can do <code>&lt;script src='some_file.php type='text/javascript'&gt;&lt;/script&gt;</code>, and the code will run, but when I click View Source it just shows the above code. Is there any way I can access the actual code th...
php javascript
[2, 3]
3,382,727
3,382,728
People Like this button - dynamic counter increase when clicked
<p>I need to create a button that says 3 people like this and when clicked it goes to 4 etc.. See this example it is perfect, but only for WordPress. Any suggestions? Ideas?</p> <p>Thank you.</p> <p><a href="http://rosepritchard.ca/themeTests/" rel="nofollow">http://rosepritchard.ca/themeTests/</a></p>
java php jquery
[1, 2, 5]
1,546,109
1,546,110
How to write a jQuery function with a callback that you can pass Params to?
<p>I have the following function:</p> <pre><code>function loadProjects(pID) { $.ajax({ url: myURL, success: function (dataJS) {###Run any supplied call back here####} }); } </code></pre> <p>I call this function like so loadProjects(1);</p> <p>Issue is I want to be able to define a callBack f...
javascript jquery
[3, 5]
3,635,885
3,635,886
How is this website's architecture structured?
<p>Refer to this url: <a href="http://imagemechanics.com.au/" rel="nofollow">http://imagemechanics.com.au/</a></p> <p>Every page seems to have its own unique URL, but the "/#!/" leads me to believe it's all one giant page with anchor tags defining the sections. Is each section truly its own .html page or is it just on...
javascript jquery
[3, 5]
2,413,309
2,413,310
ProfileBase.GetProperty() does not work on a new thread
<p>Why does this code not work if called within a new thread? The error returned is <code>Object reference not set to an instance of an object.</code> on the </p> <pre><code>return pb.GetPropertyValue("Name").ToString(); </code></pre> <p>this works</p> <pre><code>GetFullName(m); </code></pre> <p>while this doesnt</...
c# asp.net
[0, 9]
667,791
667,792
Grid Sizer with jQuery
<p>I'm writing myself a little game in JavaScript, using jQuery. The game has a board, with cells in it, much like Minesweeper: the user clicks a cell, and its data needs to be changed in some way. Each cell is presented by a simple image, but has some more data associated with it.</p> <p>What I mostly need is, when t...
javascript jquery
[3, 5]
4,711,180
4,711,181
Javascript slider not sliding, how to tell if there is a JS conflict?
<p>I have an existing website that the image slider no longer performs its slideshow function or slide arrow no longer advance the slideshow. I'm assuming another script is causing this one to malfunction. Can anyone tell me how or take a look and tell me where the problem is from a browser by chance?</p> <p>URL: <...
php javascript jquery
[2, 3, 5]
1,935,274
1,935,275
inline image captions plugin?
<p>Is there such thing as an inline image caption plugin for jquery?</p> <p>So a user can someone select a point on an image, and then insert a text caption. Whenever someone hovers over the image, the caption displays.</p> <p>Flickr has this type of functionality.</p>
javascript jquery
[3, 5]
5,653,068
5,653,069
post selextbox values to php page in jquery
<p>I am using jquery button click to post all the values in a selectbox to a PHP page, but this code does not seem to work. Can anyone please help?</p> <pre><code>&lt;script type="text/javascript"&gt; $(function() { $("#btn1").click(function () { var arr= new Array; $("#target_select option").each (f...
php jquery
[2, 5]
893,548
893,549
Javascript update causing grief
<p>I am not a javascript developer by any means what so ever, however am stuck behind a JS problem.</p> <p>If somebody could help me figure out what the problem may be would be amazing.</p> <p>The bit of script that is falling over is:</p> <pre><code> $('button').each(function() { var ...
javascript jquery
[3, 5]
2,390,283
2,390,284
How to get the text of several td which have same id name?
<p>i have table in that five td which contain same id. Id="divParent" but in that different text, i want to access all the text in array which id ="divParent" in other page using java script. how to get this i tried to do this using this code;</p> <pre><code>var divParent=new Array(); divParent=window.parent...
javascript asp.net
[3, 9]
5,511,573
5,511,574
Iterate over defined elements of a JS array
<p>I'm using a JS array to Map IDs to actual elements, i.e. a key-value store. I would like to iterate over all elements. I tried several methods, but all have its caveats:</p> <pre><code>for (var item in map) {...} </code></pre> <p>Does iterates over all properties of the array, therefore it will include also functi...
javascript jquery
[3, 5]
4,498,168
4,498,169
How to add &ref=123 every link
<p>How would i be able to put the follow on the end of every link of my website with out editing every link?</p> <p>e.g <code>www.WebsiteName.com/?ref=123</code></p> <p>so if i went to <code>www.WebsiteName.com/aboutus.php</code> i want it to add <code>?ref=123</code> onto the end of the url.</p>
php javascript jquery
[2, 3, 5]
1,884,324
1,884,325
jQuery : drag and drop : find the id of the target
<p>I am developing a drag and drop app. I have a DIV that is draggable along the document and there are some other divs in the document, I can drag one div to other divs, but how can I find the id of the div to which I dropped the dragging DIV,</p> <p>I just want to know the id of the target DIV after placing another ...
javascript jquery
[3, 5]
1,950,131
1,950,132
Session from javascript
<p>I'd like to inspect the session variable. Best case something that works in the firebugs little interpreter, but if I have to put it in the file thats fine. Right now I just made a short PHP to output $_SESSION, but if I could find something analogous to be done right in the browser that would be ideal. document....
php javascript
[2, 3]
4,498,323
4,498,324
Jquery working with two or more variables at the same time
<p>I am having code like this:</p> <pre><code> var input = $('input'); var select = $('select'); var text = $('textarea'); var name = $('#name'); var email = $('#email'); var phone = $('#phone'); var subject = $('#subject'); var messag...
javascript jquery
[3, 5]
299,211
299,212
Display alert when the user enters text in input area
<p>I am trying to display an alert when the user enters text into the search box but it does not work. Please guide. </p> <p><a href="http://jsfiddle.net/zcH54/" rel="nofollow">http://jsfiddle.net/zcH54/</a></p> <pre><code>&lt;div id="form" style="float:right;" &gt; &lt;form method="get" &gt; &lt;input type="...
javascript jquery
[3, 5]
240,774
240,775
Highlighting characters by their number
<p>Consider having the following string and it's numerical value:</p> <p><img src="http://i.stack.imgur.com/YQ6Z4.png" alt="enter image description here"></p> <p>You then allow the user to type in to a textbox: <code>1|17|7|19</code>, how would I be able to highlight the text as follows:</p> <p><img src="http://i.st...
javascript jquery
[3, 5]
5,911,767
5,911,768
Is it considered bad practice if you use an <input> for a textbox compared to <asp:Textbox>?
<p>I have an ASP.NET page that contains a form and a button. In order to use the <code>OnKeyPress</code> and a javascript function (to stop the user from using the enter key and without adding a <code>FilteredTextBoxExtender</code>) attribute I had to change the <code>&lt;asp:Textbox&gt;</code> to an <code>&lt;input&gt...
c# javascript asp.net
[0, 3, 9]
5,580,996
5,580,997
Obtain Decimal values after Division
<p>How can i obtain the decimal value after division ? after doing this </p> <p><code>days = miliseconds/(24 * 60 * 60 * 1000)</code></p> <p>suppose the value(i.e days) is 27.8351 how do i get 8351 ? Tried </p> <p><code>hours = days % (int) days</code> thought it s doing 27.8351 / 27 but still it returned a big Zer...
java android
[1, 4]
1,773,225
1,773,226
How do I determine the checked state of checkboxes from an array returned by JQuery?
<p>How do I determine the state of a checkbox (i.e. checked or unchecked) with the following code:</p> <pre><code>function deleteItems() { var items = $('.td_checkbox'); for (var item in items) { // this doesn't work if ($(item).is(:checked) == true) alert('delete my div if checked...
javascript jquery
[3, 5]
5,653,737
5,653,738
Importing script files into ASP.NET page: intellisense shows the methods, but trying to call one errors. Any ideas?
<p>I put a function in an existing.js file (I tried two different files) so that the method would be available multiple places without repeating the code. I even created a simple function just to make sure it wasn't something my function was messing up. </p> <pre><code>function doNothing() { alert("Dammit."); } <...
javascript asp.net
[3, 9]
2,230,801
2,230,802
Converting a WS to WAP
<p>Ive been trying to convert my asp.net website into a web application following the guide provided on msdn. However, ive run into a problem with some of my usercontrols that implements templating, getting the following error:</p> <p><b>'System.Web.UI.UserControl' does not have a public property named 'ContentTemplat...
c# asp.net
[0, 9]
2,209,987
2,209,988
How can avoid this "A potentially dangerous Request"
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/81991/a-potentially-dangerous-request-form-value-was-detected-from-the-client">A potentially dangerous Request.Form value was detected from the client</a> </p> </blockquote> <p>A potentially dangerous Request.Fo...
c# javascript asp.net
[0, 3, 9]
5,433,998
5,433,999
maintain scroll postion from one page to the next page
<p>I want to maintain scroll postion from one page to the next page after clicking the link.</p> <p>Can some one tell how i can do this?</p> <p>e.g. I want to click a link in <code>index.php</code> and then after opening the next page it should have the same scroll position that was in <code>index.php</code>.</p>
php javascript
[2, 3]
94,977
94,978
Dynamically changing photo with dropdown
<p>I am new to PHP and am trying to figure out how to code some specific functionality. I have a product page that shows a photo and has two dropdown menus, one for size and one for color. What I would like to do is when the page first loads I set a variable that has the default product SKU. When the menus change I wan...
php javascript jquery
[2, 3, 5]
1,748,141
1,748,142
How to display List items in Listview?
<p>I have a ListView in my aspx file like this:</p> <pre><code>&lt;asp:ListView ID="ListView1" runat="server"&gt;&lt;/asp:ListView&gt; </code></pre> <p>and then I have List like this:</p> <pre><code>List&lt;string&gt; mylist = new List&lt;string&gt;(); </code></pre> <p>Im trying to populate the ListView like so:</p...
c# asp.net
[0, 9]
3,829,948
3,829,949
View Page source of web page on button click
<p>I am making a app on which I want to provide a facility to "VIEW SOURCE" of any webpage on button click.User will only enter URL and will get source of that page.I also want to show contents,stylesheets,images of that webpage .I want to get all these and show in my asp.net pages according to my formats.Please Help.....
c# asp.net
[0, 9]
1,625,143
1,625,144
How to Submit only after Jquery finished updating the field
<p>I have a form where a user inputs a word, when pressing the button I want it to translate the word (using the jquery script) into the same field. Only after completed to populate the field, it should continue and submit the translated word.</p> <p>everything is working except that it will submit as soon as it tran...
javascript jquery
[3, 5]
3,796,509
3,796,510
Loading stylesheet dependant on User Agent
<p>I have to load a different Stylesheet depending on whether the User Agent is an iPad or other. I know that generally, detecting browsers isn't the most fantastic idea and will probably cripple our maintainability sometime in the future..not my decision.</p> <p>So here we have some JavaScript to detect the user age...
javascript jquery
[3, 5]
2,139,864
2,139,865
use an anchor to load a page sending post data
<p>I'm not even sure if this is possible, but I need to send POST data to a page via a user-clicked link. Can this be done?</p> <p>To be clear, I do not want the data returned to the current page; the target page should load in the browser just as though the user had submitted a form, but I need to send the post data ...
javascript jquery
[3, 5]
5,764,702
5,764,703
how to close activity without actually finishing?
<p>I want to:</p> <pre><code>open 1, 2, 3 activities 1 &gt; 2 &gt; 3 back to #2 1 &gt; 2 open #4 activity 1 &gt; 2 &gt; 4 back to #2 1 &gt; 2 restore #3 activity 1 &gt; 2 &gt; 3 </code></pre> <p>"Restore" means open previously closed activity without re-creating. How can i do that?</p> <p>Thanks!</p>
java android
[1, 4]
1,493,491
1,493,492
How to open a new window with generated javascript code?
<p>I am trying to open a new window and write some elements and javascript tag.</p> <p>The code looks like,</p> <pre><code>var OpenWindow = window.open("ImagePreview.html", "mywindow","height=768,width=1024"); OpenWindow.document.write("&lt;style type='text/css'&gt;.normal{zoom:20%; -moz-transform:scale(0.2); cursor:...
javascript jquery
[3, 5]
2,966,408
2,966,409
Making table rows but not table headers clickable in jquery
<p>Currently I am using</p> <pre><code>$('#mytable tr').click(function() { blah blah }); </code></pre> <p>This makes all rows, including the headers clickable. How can I exclude the headers or <code>&lt;th&gt;</code>'s?</p>
javascript jquery
[3, 5]
4,114,789
4,114,790
Submit form after return false
<pre><code>$('#form').submit(function(e){ e.preventDefault(); $.ajax({ //ajax stuff success: functtion(data){ //do stuff with data, then submit form $('#form').submit(); // &lt;-- this wont submit the form } }); }); </code></pre> <p...
javascript jquery
[3, 5]
1,353,949
1,353,950
Using jQuery and PHP to Display Data
<p><strong>Background</strong></p> <p>I don't know much about PHP or jQuery, and I was wondering if what I'm trying to do is possible. I have a server with access to a database behind a firewall. I want to use jQuery to push the data out to an external server's PHP script every 5 seconds where it will be displayed pub...
php jquery
[2, 5]
3,029,294
3,029,295
Defining variables in jQuery
<p>Can someone explain the difference between using a $ when defining variables in jQuery and not. Does it have any impact on performance?</p> <pre><code>var $someVar = $("a"); var someVar = $("a"); </code></pre> <p>Also, what is the difference in calling variables with and without $(someVar) For example:</p> <pre><...
javascript jquery
[3, 5]
1,646,659
1,646,660
Getting A Specific Twitter Status
<p>I've been trying to get the contents of a specific status using the status url e.g <a href="http://twitter.com/#!/jquery/status/36102693709680640" rel="nofollow">http://twitter.com/#!/jquery/status/36102693709680640</a> and also get the username associated with the status. In this case, @jquery</p> <p>Is there a w...
php jquery
[2, 5]
2,808,409
2,808,410
Restrict the text length assigned for Link Button from DB
<p>I have some text being fetched from the DB, which I am binding to the DataList <code>ItemTemplate</code> in the following form:</p> <p><code>&lt;asp:LinkButton runat="server" Text='&lt;%#Eval("url")%&gt;' /&gt;</code></p> <p>The text that is fetched from the DB might be long and I want to restrict it to (let's say...
c# asp.net
[0, 9]
229,794
229,795
Is it better to learn the DOM or jQuery first?
<p>I have gotten very familiar with the core functionality of Javascript and now I am aiming at learning DOM manipulation. I have already thought of learning jQeury for this but I don't know if it is good idea to learning it before first getting familiar with the core functionality of the DOM.</p> <p>Should I first le...
javascript jquery
[3, 5]
5,924,874
5,924,875
Javascript Background color switching
<p>I am trying to use javascript to control the background color of a form element, what I have so far:</p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function() { $('option.POIs').click(function() { $(this) .css('background-color','#EE178C') }); ...
javascript jquery
[3, 5]
3,570,843
3,570,844
Programmatically add text to the clipboard in C#
<p>Is there a way to programmatically add text to the clipboard in C# (3.5) or javascript ? Does the client machine type make a difference? </p> <p>Edit: Sorry, forgot to mention am using asp.net.</p>
c# javascript asp.net
[0, 3, 9]
4,727,363
4,727,364
Fadeout div after executing script with jQuery
<p>With this function I want to submit data (res_id) to a script and fadeout the div by it's id (using variable pos), the script is executed but the div won't fade out. Why is that?</p> <pre><code>$('.remove_resort').click(function() { pos = $(this).attr("id"); rem_res(); }); function rem_res() { $.get("/...
javascript jquery
[3, 5]
4,454,739
4,454,740
How to logout of android app after particular time?
<p>I'm building an android app which has a login and logout option. How do I make the app go back to login screen if the user has logged in and not used it(or kept idle) for some time(say 10min)? Also, how do I check for multiple logins? Please note that my app uses an external database(mysql). I did this using php cod...
java android
[1, 4]
4,664,242
4,664,243
Setting IFrame size from within the IFrame
<p>I've been trying a few things like the following trying to get the iframe to be reset from within the iframe but I am not sure what I am doing wrong. Ideas?</p> <pre><code> window.top.$("#ID").width(324); window.top.$("#ID").height(369); </code></pre> <p>Has not worked.</p>
javascript jquery
[3, 5]
5,161,148
5,161,149
JQuery: get radio button value
<p>I have the following HTML:</p> <p>HTML:</p> <pre><code>&lt;input type="radio" name="abc" value="0" selected="selected" style="display:none" /&gt; &lt;input type="radio" name="abc" value="1" /&gt;1+ &lt;input type="radio" name="abc" value="2" /&gt;2+ &lt;input type="radio" name="abc" value="3" /&gt;3+ </code></pre>...
javascript jquery
[3, 5]
2,796,796
2,796,797
Redirection from HTML page to PHP page using jQuery
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4655535/how-to-redirect-by-using-jquery">How to redirect by using jquery?</a> </p> </blockquote> <p>In my site I want to redirect a user from HTML page to PHP page using jQuery.</p> <p>How can I do this? Is thi...
php javascript jquery
[2, 3, 5]
4,123,422
4,123,423
how to read text from notepad?
<p>I have a notepad with in fix format sentence like</p> <pre><code>name... Image... Text... </code></pre> <p>I need to read all Text option with given criteria from notepad.</p> <p>First i need calculate all words which are starting with #.</p> <p>Second i need to calculate repeated word excluding like a,an,the,is...
c# asp.net
[0, 9]
3,694,099
3,694,100
How do I tell difference between object and string in javascript?
<p>I have a javscript function (actually a jQuery plugin) which I will want to call as either</p> <pre><code>myFunction("some input"); </code></pre> <p>or</p> <pre><code>myFunction({ "prop": "value 1", "prop2": "value2" }); </code></pre> <p>How do I, in the function, tell the two apart?</p> <p>In other words, what...
javascript jquery
[3, 5]
4,454,691
4,454,692
How do you put a comma after the information from selected checkbox into a Textbox?
<pre><code> foreach (GridViewRow row in GridView1.Rows) { var chk = row.FindControl("myCheckBox") as CheckBox; if (chk.Checked) { var email = row.FindControl("LabelEmail") as Label; txtEmails.Text += (string.Join(",", email.Text)); } </cod...
c# asp.net
[0, 9]
2,311,497
2,311,498
Is calling $find a relatively expensive operation?
<p>I am just wondering what the pros/cons would be between these two styles of coding:</p> <pre><code>var foo; $(document).ready( function() { foo = $find(fooID); }); function OnBarClicked() { foo.doStuff(); foo.doMoreStuff(); } </code></pre> <p>compared to</p> <pre><code>function OnBarClicked() { $...
javascript jquery asp.net
[3, 5, 9]
4,916,843
4,916,844
jQuery: value.attr is not a function
<p>I have this snipped in my page:</p> <pre><code>$('#category_sorting_form_save').click(function(){ var elements = $("#category_sorting_elements &gt; div"); $.each(elements, function(key, value) { console.info(key," : ",value); console.info("cat_id: ",value.attr('cat_id')); }); }); </code>...
javascript jquery
[3, 5]
4,027,246
4,027,247
project.properties in android project
<p>I just cloned this from <a href="https://github.com/jgilfelt/android-mapviewballoons">github</a> and when I tried to import it to eclipse as an android project, it doesn't have a default.properties. Why is this and how do I handle this?</p>
java android
[1, 4]
1,210,489
1,210,490
sales tax calculation (city limits vs not in city limits)
<p>I've been tasked with creating a tool to calculate sales tax. So I signed us up for a monthly update of all zip codes and their associated tax rates. The problem I'm running into is that in 1 zip code you may have some addresses that are in city limits (so you have to charge city sales tax) and another that is out o...
php javascript
[2, 3]