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
1,468,030
1,468,031
How to position a custom shape inside a view?
<p>I've defined a custom shape in my res/drawable folder:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"&gt; &lt;stroke android:color="#FF404040" android:width="1dp" android:dashGa...
java android
[1, 4]
4,969,821
4,969,822
Download an Excel file
<p>I have read some past posts here on how to download a Excel file from a website. So, I have setup the below code:</p> <pre><code>string path = MapPath(fname); string name = Path.GetFileName(path); string ext = Path.GetExtension(path); string type = "application/vnd.ms-excel"; if (forceDownload) { Response.Ap...
c# asp.net
[0, 9]
1,285,374
1,285,375
How can I center a background image on a web page for different screen resolutions using JavaScript?
<p>I want to determine the screen resolution of the client machine and the set the background image in the center using JavaScript.</p> <p>I have come so far:</p> <pre><code>function centerBackGroundImage() { var browserWidth = document.documentElement.clientWidth; var browserHeight = document.documentElement...
javascript jquery
[3, 5]
179,371
179,372
Android Row becomes Unclickable with Button
<p>I have a listView, where each row has a button in the row layout. However, this seems to make the row itself unclickable. How can I make both the button and row clickable? </p> <p>Thanks.</p>
java android
[1, 4]
574,743
574,744
Append Trakt.tv API
<p>I'm trying to query trakt.tv for my latest activity, but I only get a blank screen on proceeding with this script using jquery-1.4.4.js:</p> <pre><code> $(document).ready(function(){ // on document load show_trakt(); }); function show_trakt() { var user = 'INSERT_USERNAME'; var akey = 'INSERT_API_KEY...
javascript jquery
[3, 5]
2,983,843
2,983,844
storing a byte array in web.config
<p>I have a developer key </p> <pre><code> byte[] key = new Byte[] { 0x01, 0x42, 0xA0, 0xE1, 0x5E, 0xEE, 0xA7, 0x01, 0x71, 0x9A, 0xCB, 0xAB, 0x58, 0xEB, 0xED, 0x44... </code></pre> <p>that I want to store in my web.config, can I do something like as follows</p> <pre><code>&lt;add key="spo...
c# asp.net
[0, 9]
1,697,667
1,697,668
How to find a text using javascript or jquery.
<p>I need to find a text from a paragraph using java script. Is there any code in JavaScript like we do in c# to find a text using "string.Contains("")" method.</p> <p>Pls help...</p> <p>Thanks Guys..</p>
javascript jquery
[3, 5]
1,763,680
1,763,681
how to display a array element one by one with a spacebar in a input field in jquery?
<p>i have a large array with a lot of string i want to display it in a text field one by one with a space bar concatenate to each one automatically </p> <p>my code here</p> <pre><code>&lt;script&gt; x=0 function abc(){ for (i=0;i&lt;words[x].length;i++){ if(x=0) x++; document...
javascript jquery
[3, 5]
5,353,156
5,353,157
Disable (most) events on a page?
<p>I have a bunch of buttons with different events.</p> <p>When the app is in 'super' mode I need to disable all of these events, but keep 2-3 of them active. </p> <p>What would the best approach to do something like this? Do I need to unbind every handler or can I super some event that prevents default behavior?</p>...
javascript jquery
[3, 5]
4,199,419
4,199,420
jquery mouseover
<p>I have a button on my asp.net page and I am using ajax jquery to create a mouseover effect.I want to show alert on mouse over. How can i do this ?</p>
jquery asp.net
[5, 9]
2,898,952
2,898,953
How to change view-state value dynamically?
<p>I have textbox and button controls in my page. For textbox I have enabled view state, page-load event I am setting text box value “Hello Mr!”. Now I want to change the view state value for text box to “Hello Mr Pradeep!” when post back occurs, how can I do that? And in which all page events I can do that.</p> <pre>...
c# asp.net
[0, 9]
3,461,533
3,461,534
Click event takes two clicks to fire in asp.net
<p>Good afternoon, hopefully someone will be able to assist me in diagnosing an issue that I am having on a web form using Post method to submit data to another domain. within this page I am using asp button control. It is having button_click event.</p> <p>Now the question is, button click event two clicks. (reason i...
c# asp.net
[0, 9]
5,766,739
5,766,740
Using the ontextchange event to update the database
<p>I am trying to use the onTextChange event to update the a textbox and then i am using a button to update it in the Database. Every time i try to use is it sets the value as "" i really dont know if i am doing something wrong or if i am doing it right. if someone could please help that would be great. thanks</p> <p>...
c# asp.net
[0, 9]
2,423,756
2,423,757
Finding element in Javascript object array
<p>I have a javascript object array like</p> <pre><code>var objArr = [Object{key="1", value="a"}, Object{key="2", value="b"}, ...] </code></pre> <p>Do we have any Jquery method find the object and delete it. I know using <code>$.each</code></p> <pre><code>$.each(objArr, function(index, obj) { }) </code></pre> <p>B...
javascript jquery
[3, 5]
216,443
216,444
Trigger JQuery function when passed half way down the page
<p>Is there a way to tell if you have scrolled passed the center of the web page or in other words, when you have scrolled passed exactly half of the web page and your scrollbar is situated in the lower half of the browser window? </p> <p>I want to be able to trigger this: $('.pineapple-man').show(); when I have scro...
javascript jquery
[3, 5]
4,859,180
4,859,181
Bind ready event on javascript dom element creation
<p>i would like to know if we can bind a loaded or ready event on an item created by a script when the dom is loaded. I heard from live() but it's not something clickable, it's just an item which has to load.</p> <p>Thanks for your help!</p>
javascript jquery
[3, 5]
204,717
204,718
Writing file from PHP page android
<p>In my project a compressed file is displayed on a php in bytes. I am trying to find a way to read the php page, decompress the file using <strong>GZIP</strong>, and write it out to the assets folder. The file that I am reading in has to be placed in the <code>data/data/package/database</code> file. </p> <p>I have...
java php android
[1, 2, 4]
5,383,549
5,383,550
How to get element by point in jQuery/Javascript
<p>I want to get an element by specifying the point values in page.</p> <pre><code>var point = this.svgRenderer.getPoint(serPoint,chart); </code></pre> <p>This will return exact point location of the page. That point contains some SVG element either circle or rectangle or image or other elements. I want to get the el...
javascript jquery
[3, 5]
3,805,329
3,805,330
How to get the installed application name in a list
<p>I have tried this:</p> <pre><code>final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); final List pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0); </code></pre> <p>this code gives me the list of the installed app's package...
java android
[1, 4]
3,669,636
3,669,637
Get new dropdownlist boxes On button click in asp.net c# with different Ids and assign datasource, along with selection changed functionality
<p>I need to generate 3 DropDownList Boxes in a row Dynamically on ADD Button click event. Once the DDL is generated i should be able to assign Data source to it and also do DDL-selectedEventChanged functionality on them in c# asp.net.<br> Below link was exactly am looking for but i couldn't assign data source or i cou...
c# asp.net
[0, 9]
5,059,824
5,059,825
On every click text should add in page
<p>I want to add value on every click on my function.</p> <p>for example i click on then value is coming but i want to click again and another value should come without replacing the existing value</p> <pre><code> &lt;script&gt; function dearq(selected){ var value = $(".textvaluenonw").val(); $...
javascript jquery
[3, 5]
1,149,579
1,149,580
Switching to Java from C++: What are the key points?
<p>I'm an experienced developer, but most of my OO programming experience has been with C++ (and a little Delphi). I'm considering doing some Android work, hence Java.</p> <p>Coming from the C++ background, what areas of Java are most likely to surprise/annoy/delight me?</p> <p>I felt sure this would already have bee...
java c++
[1, 6]
2,786,954
2,786,955
MapPath vs VirtualPathUtility.ToAbsolute
<p>I am using c#, asp.net and working on a web application. </p> <p>I initially had a relative path as such which I needed to be an absolute path. The below works but need to get the absolute path:</p> <pre><code> return Chart.RenderChartHTML("../../Charts/MSLine.swf"); </code></pre> <p>I tried the following whi...
c# asp.net
[0, 9]
1,477,381
1,477,382
why does this jquery image swap not work in chrome and on first load in firefox
<p>I am trying to use jquery to replace an image on rollover (with fade) you can see this on the bottom left here:</p> <p><a href="http://www.anzie.com/index_rollover.php" rel="nofollow">http://www.anzie.com/index_rollover.php</a></p> <p>However in chrome it just fades to near opaque. and in firefox on the first load...
javascript jquery
[3, 5]
1,921,112
1,921,113
How to retrieve content passed back from remote server when the server reponds with a System.Net.WebException 422
<p>I am working with an api that also returns a valid xml string containing the error that was encountered on their system.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;error&gt; &lt;request&gt;Request made to server&lt;/request&gt; &lt;message&gt;No user found for account 12345&lt;/message&gt...
c# asp.net
[0, 9]
5,100,464
5,100,465
jquery or js code to obtain exact node data for currently selected form item/text/image in a web page
<p>I want to obtain the exact details for the item on a web page that has been clicked on, using jquery.</p> <p>That item can be a form item (like a checkbox, text box, text area etc) or section of text (in a paragraph or div or other) or list or image ...</p> <p>What I figured out is the following--</p> <pre><code>...
javascript jquery
[3, 5]
4,105,878
4,105,879
I'm getting a null pointer exception when I subclass an OnClickListener()
<p>I'm trying to subclass one of my <code>OnClickListener()</code> 's and I'm getting a 'null pointer' exception, but I'm not sure why.. I'm going nuts over this.. any help would be greatly appreciated..</p> <p>Here is the code in my Utilities Class located in com.Tools</p> <pre><code>public class Utilities { public...
java android
[1, 4]
372,760
372,761
Does Rhino have a future?
<p>I'm looking to add serious scripting into my Java app and JavaScript would be a great language choice. My concern though is the Rhino project and its future.</p> <p>While Groovy/Jruby etc have seen constant updates, and engines like V8 and SpiderMonkey make continuous and significant performance boosts; Rhino langu...
java javascript
[1, 3]
5,999,976
5,999,977
add "readonly" to <input > (jQuery)
<p>How can i add "readonly" to a specific <code>&lt;input &gt;</code>? .attr('readonly') does not work.</p>
javascript jquery
[3, 5]
2,118,262
2,118,263
jQuery .nextUntil() equivalent
<p>I need an alternative for jQuery's <code>.nextUntil()</code>. I'm currently using <code>jQuery 1.3.1</code> and updating it is out of the question :(</p> <p>I have this HTML:</p> <pre><code>&lt;h4&gt;...&lt;/h4&gt; &lt;p&gt;...&lt;/p&gt; &lt;p&gt;...&lt;/p&gt; &lt;p&gt;...&lt;/p&gt; &lt;h4&gt;...&lt;/h4&gt; &lt;p&...
javascript jquery
[3, 5]
3,334,426
3,334,427
Adjusting height of scrolling div Javascript
<p>I am combining two scripts together a scroller and a content fader. When I swap the content (fading), div's with alot of content make the scrolling div super long. I was reading on the plugin demo for content scrolling: <a href="http://manos.malihu.gr/jquery-custom-content-scroller" rel="nofollow">http://manos.mal...
javascript jquery
[3, 5]
956,662
956,663
Comparing two input fields - What am I doing wrong?
<p>Forgive me but I'm just starting to learn Javascript. I'm trying to get the sum of two input fields, and I'd like to update the result "live" so to speak, on every keyup event.</p> <p>At the moment the result field just disappears when values are entered into the input fields.</p> <p>What am I doing wrong?</p> <p...
javascript jquery
[3, 5]
4,135,705
4,135,706
How to Read a webpage and extract certain links using jQuery?
<p>Its on the same domain.. both my Jquery code and the url to read.</p> <p>What i want to do is first read the webpage using Jquery and then parse certain links which has "ProductDetails.php" and extract "ProductCode" from the webpage into array.</p> <p>The html page may have many instances of a href="ProductDetails...
javascript jquery
[3, 5]
2,692,292
2,692,293
Simulating shell command in JAVA
<p>If I run the command <code>adb shell cat /dev/input/event0</code> at command prompt, it shows some raw data corresponding to user actions on Android emulator.</p> <p>I want to simulate this command programmatically with Java to record user actions.</p> <p>How can I achieve this?</p>
java android
[1, 4]
547,757
547,758
Create a link on the fly when a user enters a code in a form box
<p>I have a form....</p> <pre><code>&lt;form id="orderform" method="post" orderform="" name=""&gt; &lt;table width="533" cellspacing="0" cellpadding="2" border="0" id="ordertable"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Product Code&lt;/td&gt; &lt;td&gt;Meterage&lt;/td&gt; &lt;td&gt;Sample Img...
php jquery
[2, 5]
2,168,827
2,168,828
JQuery not returning value
<p>I'm using <a href="http://valums.com/ajax-upload/" rel="nofollow">Valum's AJAX file uploader</a>. I am trying to send a parameter with the GET request made by the jQuery plugin. This code used to work a few hours ago. But it isn't now!</p> <p>Can't see any error in Firebug either.</p> <p>Help!</p> <pre><code>$(do...
php javascript jquery
[2, 3, 5]
544,460
544,461
jquery how to get the index of a click event when after doing an ajax call
<p>In the following code how would I use <code>$(this).parents('#friendRequest').remove();</code> in my ajax success callback function, and use <code>$(this)</code> to get selector of the click event in the first line?</p> <pre><code>jQuery(".notyAcceptFriendRequest").on('click', function() { notyId = jQuery(this)...
javascript jquery
[3, 5]
4,355,378
4,355,379
How to reliably detect an Internet connection at Android phone wake up
<p>I have an App that relies on Internet connection at startup, and I am able to detect that ok with the code below.</p> <p>However when the phone has been idle for some time and I unlock it and start my app it does not find the connection immediately and I have to re-start the app again to get success.</p> <p>I have...
java android
[1, 4]
5,474,718
5,474,719
Disable upload button after uploading image http://valums.com/ajax-upload/
<p>I am using this, valums ajax fileupload: <a href="http://valums.com/ajax-upload/" rel="nofollow">http://valums.com/ajax-upload/</a> , It is working fine for me. I want to disable the upload button as I upload an image and want add 2 more buttons beside it "Delete" and "View". How would I do this using existing JS ...
javascript jquery
[3, 5]
3,855,235
3,855,236
Set default time in trentrichardson timepicker
<p>How can i set default time in <code>trentrichardson timepicker</code>. I checked <em>trentrichardson.com</em> for the documentation, but the site is down. Any suggestions will be appreciable. Thanks.</p>
javascript jquery
[3, 5]
3,523,253
3,523,254
check two timestamps are same day
<p>I am getting some data from SQL which has <strong>timestamp</strong> and i Wanna check whether they are same day or not....</p> <p>In a loop i am trying to check the previous loop timestamp is same as the current loop timestamp...... I am trying something like this.....</p> <pre><code>$.each(data, function(key, va...
javascript jquery
[3, 5]
3,780,771
3,780,772
Javascript multiply function failed when together
<p>Javascript function does not work when </p> <pre><code>function loadcontents(obj) { var params = $(obj).attr('href').split('?'); $.getJSON(IVIDPLAY_BASE_DIR+'content/load2.php?'+params[1], function(json) { if (json.returnval == 1) { $('#contents').fadeOut('fast', function() { $(this).html('json.contents'...
php javascript
[2, 3]
5,767,700
5,767,701
Complete CONNECTIVITY_SERVICE test
<p>My application connects to the internet onCreate, it does this in an AsyncTaks class and all works fine. I have some error checking in place to make sure there is internet available and works great if I say put my phone on Flight Mode.</p> <p>My problem is when I’m on WIFI, where I live the WWW drops out from time...
java android
[1, 4]
1,100,283
1,100,284
An array is undefined in javascript
<p>I am actually trying to retrieve something for a sqlite database and store the results in an array. So I create an array and pass it as an argument to the function. Then after the function returns, the array remains undefined. What is the problem with that?</p> <pre><code>function initGraphView() { var resultsAr...
javascript jquery
[3, 5]
2,780,041
2,780,042
C#: Base64 encoding
<p>Can anyone please let me know where I made a mistake in this code? This code is written in C#.NET. I need to write an algorithm for encoding a string using base64 format using C#.NET, and then decoded with base64_decode() using PHP. Please see the snippit below:</p> <pre><code>System.Security.Cryptography.RijndaelM...
c# php
[0, 2]
1,476,772
1,476,773
Javascript remove event
<p>Guys i have a little problem , huge for me , so that is why i have to ask you ... Anyway problem is , i want to copy table row from one table and add it to another table , but before i add it to another table i need to remove all of its events , i used google allot but its not helping me </p> <pre><code>var $UserRo...
javascript jquery
[3, 5]
1,464,843
1,464,844
how to write javascript in asp.net in code behind using C#
<p>Greetings, how can I write JavaScript code in asp.net in code behind using C#. For example, I have click button event when I click the button I want to invoke this java script code:</p> <pre><code>alert("You pressed Me!"); </code></pre> <p>I want to know how to use java script from code behind.</p> <p>Thank you...
c# asp.net javascript
[0, 9, 3]
3,530,134
3,530,135
Multiple concurrent $.post causing blocking
<p>I have an app where multiple concurrent ajax requests are sent out to my nodeJS backend server. The calls are sent out in rapid succession and immediately sent out again after data is received.</p> <p>I don't mean all of JS is being blocked, please view the screenshot (bottom right corner) to see what I'm referring...
javascript jquery
[3, 5]
195,764
195,765
Equivalent to PHP function number_format in jquery/javascript
<p>PHP Function:</p> <pre><code>function formatNumberForDisplay($number, $decimal=0, $decimalSeperator='.', $numberSeperator=',') { return number_format($number, $decimal, $decimalSeperator, $numberSeperator); } </code></pre> <p>My need: Can any body suggest me the equivalent functionality in jquery/javascript. ...
php javascript jquery
[2, 3, 5]
1,396,183
1,396,184
Getting a PHP variable in jQuery
<p>So I have this:</p> <pre><code>&lt;?php echo ' &lt;script&gt; $(function(){ $("a#yeah").click(function(){ $.ajax({ url: "ajax.php?action=yeah&amp;id='.$id.'", success: function(html){ $("a#yeah").html("your cool") } }) }) })&lt;/script&gt;'; ?&...
php jquery
[2, 5]
1,501,919
1,501,920
send data to android set
<p>how to send data from a php page that is open in browser to a particular person who has android set with him.The person is connected to the Internet and me also.i know the person IMEI number.kindly tell me all the possible solutions.please i am new to android</p>
php android
[2, 4]
3,599,917
3,599,918
jquery: How to know if a page is not in focus?
<p>For example, if user is doing other things but not viewing this page, jquery/javascript can know?</p> <p>I don't need to be very accurate, just roughly.</p>
javascript jquery
[3, 5]
4,152,655
4,152,656
Selecting a random image from a flickr set and appending it to a div
<p>I've run into a bit of a problem and was hoping to get a little help. I am trying to select a random image from a flickr set and append it to a div to use as a background image. Here is the function:</p> <pre><code>$.getJSON("http://***", function (data){ ...
javascript jquery
[3, 5]
2,105,517
2,105,518
Conflicting javascript
<p>I've got a bunch of jquery/javascript running on a new site I'm building, and of course I've run into a conflict. I can't figure out where it's coming from as I'm not that great with js. There is a sticky relocate function that's supposed to show a navigation bar when you start scrolling the page but since I've adde...
javascript jquery
[3, 5]
3,330,012
3,330,013
Injected javascript does not execute
<p>I'm trying to write a piece of javascript that integrates a webpage with an external system. Currently, what I have is a very small amount of code that dynamically inserts a script element into the page.</p> <pre><code>$(document).ready(function() { var script = document.createElement("script"); script.type...
javascript jquery
[3, 5]
2,493,938
2,493,939
USING windows control library in ASP.net
<p>I created a control library by adding refrence to office interop excel to do some excel automation in client.The control works fine in windows forms Now i need to add the control in asp.net can somebody tell how to do that.</p>
c# asp.net
[0, 9]
2,699,300
2,699,301
Select text on click for multiple textbox with random IDs
<p>I have multiple textboxes on my page, their ID starts with 'Text' and followed by a random string like this 'Textc0816e05-d7c0-4acc-b233-bef152781cac', How can I have the textbox' value selected when user click on it?</p>
javascript jquery
[3, 5]
2,598,354
2,598,355
Is there a way to capture the alert ok button click event?
<p>Is there a way to capture the alert ok button click event? In jQuery? </p>
javascript jquery
[3, 5]
1,430,947
1,430,948
jquery hide problem
<p>I use this to toggle my div elements, and hide all them when the DOM is ready...</p> <pre><code> $('div[class*="showhide"]').hide(); $('input:image').click( function() { var nr = $(this).attr('id').substr(7,2); $('div.showhide' + nr).toggle(400); }); </code></pre> <p>I have dynamically creat...
php jquery
[2, 5]
560,787
560,788
how i trigger javascript function in jquery hover
<p>I have one javascript function. Which i want to call on hover of li</p> <pre><code> var Divhtml='&lt;div&gt;hover&lt;/div&gt;'; $('li a').hover(function(){ $(this).html(Divhtml); //here i want to fire hovercall(); which will work on "Divhtml" i.e. innerHtml,this contains visual effe...
javascript jquery
[3, 5]
4,693,939
4,693,940
How to seperate path from a filename
<p>I have a path to a file like:</p> <blockquote> <p>C:\NewFolder\Test\file1.doc</p> </blockquote> <p>How do I remove the filename from the path .I require only </p> <blockquote> <p>C:\NewFolder\Test\</p> </blockquote>
c# asp.net
[0, 9]
1,374,571
1,374,572
why value change in jquery ajax
<p>in this blow code, after printing $tarikh_sal i can see <code>2012-10-27</code> correctly, but in <code>$.post</code> that changed to <code>1975</code>, i do not change that. why?</p> <p><strong>php code</strong></p> <pre><code>echo $tarikh_sal; //-&gt;2012-10-27 if ( $khoms &gt; 0) {?&gt; &lt;script&gt; ...
php jquery
[2, 5]
3,273,421
3,273,422
How to specifically validate a certain form field using Jquery Validation plugin
<p>I'm using the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" rel="nofollow">Jquery Validation plugin</a> to validate my form on the client before submitting.</p> <p>There is a specific field in my form that I want to validate using ajax to the server, once the user has filled out that fiel...
javascript jquery
[3, 5]
2,369,609
2,369,610
Performing a Process on an Uploaded File .NET
<p>I'm programming in ASP.NET 3.5.</p> <p>I need to process a file that has to be uploaded by a user. The file is in a specific format. Basically, I need to take the information in the file, parse it, and insert it into a SQL db. I have no problem doing that, but I was wondering how to do this from a web site. </p...
c# asp.net
[0, 9]
5,484,296
5,484,297
JavaScript: Highlight/select word under mouse pointer
<p>How do I highlight (css: background-color) a word with JavaScript when the mouse pointer is hovering over it? It should be possible to select it by clicking on it then and saving it in a variable.</p>
javascript jquery
[3, 5]
4,547,670
4,547,671
how to replace a button text in jQuery mobile
<p>Below is my app code</p> <pre><code>&lt;li class="ui-block-e"&gt; &lt;a href="#login" data-transition="slide" data-role="button" data-theme="b" data-mini="true" id="UserLoginButtonP5" data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="span" class="ui-btn ui-btn-inline ui-mini ui-btn-...
javascript jquery
[3, 5]
760,983
760,984
Inserting 1 or 0 in Bit field in sqlDatabase based on Checkbox checked in GridView
<p>I have a gridview which has a Checkbox Template Field, I am using C# code and basically when the user checks all the Checkboxes in the datagrid view I want to add a 1 or 0 into an SQL database with a datatype field Bit based on the checkbox being checked or not. Here is my code so far;</p> <pre><code>protected void...
c# asp.net
[0, 9]
3,138,204
3,138,205
adding classes to element
<p>In the code below,do after method generate new jquery object .If not ,why addClass method is addind class 'foo' on both the <em>div</em> as well as <em>p</em> element</p> <pre><code>$('&lt;div/&gt;').after('&lt;p&gt;&lt;/p&gt;').addClass('foo') .filter('p').attr('id', 'bar').html('hello') .end() .appendTo('body')...
javascript jquery
[3, 5]
4,829,587
4,829,588
Is it possible to display a message in php on javascript is disabled?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5334329/display-enable-javascript-message-only-when-javascript-is-disabled">Display “Enable JavaScript” message only when JavaScript is disabled</a> </p> </blockquote> <p>I have a php document which contains bot...
php javascript
[2, 3]
1,641,322
1,641,323
Unable to ping host from app but can otherwise
<p>Here's my code:</p> <pre><code>InetAddress address = InetAddress.getByName("www.whyoceans.com"); if (!address.isReachable(3000)) { Toast.makeText(this, "Unable to ping host", Toast.LENGTH_SHORT).show(); } </code></pre> <p>The isReachable always fails, yet I can open a shell and ping it just fine (from ...
java android
[1, 4]
3,935,024
3,935,025
Android save state of listview with multipleChoice
<p>I have a listview that contains some values with the multipleChoice enabled in my xml file. I want to be able to save what has been checked by the user when the app is exited, then re-check what they have selected upon opening again. My code works for a radio group, but I can't seem to get it to work for this.</p> ...
java android
[1, 4]
1,706,969
1,706,970
Reliable way to get the "ancestor" of an object with a specific classname, using jQuery
<p>I've got a javascript function that gets called on change event of a select form element. So, the "this" variable in js refers to the select element.</p> <p>This select element is in a td tag, in a tr tag. The tr tag has a classname of "FilterDetailsRow".</p> <p>Now, I've tested, and if I use this syntax:</p> <...
javascript jquery
[3, 5]
1,317,740
1,317,741
International Character Issue
<p>I have a string with value:</p> <p><code>'Reserva de Usos M\xfaltiples de la Cuenca del Lago de Atitl\xe1n-RUMCLA (Atitl\xe1n Watershed Multiple Use Reserve)'</code></p> <p>How do I get the <code>\xfa</code> and <code>\xe1</code> to show up as characters?</p> <p>Thanks Eric</p>
java android
[1, 4]
3,540,866
3,540,867
Iterate through and delete empty HTML table rows with jQuery
<p>I am attempting to iterate through a HTML table using jQuery and delete empty rows. The page is driven by ASP.NET and with certain permission, items in the table will be hidden. Therefore, I wanted to create this script to remove the empty rows and get rid of the space between the other items that are still displaye...
javascript jquery
[3, 5]
1,614,538
1,614,539
How to display hidden placeholder without refreshing the page?
<p>I have two placeholders in one page and basically my requirement is that I want to show other placeholder on click of button which is in first placeholder without refreshing the page.</p> <p>But when I m clicking on the button in 1st placeholder it is refreshing the page and then showing me second placeholder.I m o...
c# asp.net
[0, 9]
845,963
845,964
JavaScript: how to control progress speed?
<p>Is there any option to increase and decrease the speed of the progress? Sometimes progress takes time and sometime very very slowly to finish: </p> <pre><code>var value = 0, interval = setInterval(function(){ value = ((+value) + .1).toFixed(1); if(value == 80.5) clearInterval(interval); $('p').ht...
javascript jquery
[3, 5]
2,529,421
2,529,422
How to Read the value in a hiddenField from javascript
<p>I want to read a value in the hidden field in javascript/Jquery.How can i acheive this ??</p>
c# javascript asp.net
[0, 3, 9]
1,793,850
1,793,851
Why doesn't .on() work for links that weren't preloaded on the page?
<p>After trying hashchange and finding out it simply doesn't work in Internet Explorer, I decided to try a click() approach instead. What below is supposed to do is when a link is clicked, check to see if the url contains the page, then change the link_content's html to a div content with an id equal to the hash. </p...
javascript jquery
[3, 5]
787,463
787,464
How can I call a method that are in my code-behind via Javascript or Jquery
<p>I have the follow line in my Javascript code </p> <pre><code>credenciadausuario = '&lt;%= getCredenciada() %&gt;'; </code></pre> <p>In my code-behind I have this method </p> <pre><code>public string getCredenciada() { Utilidade.QuebraToken tk = new Utilidade.QuebraToken(); string credenciada = tk.CarregaT...
c# javascript jquery asp.net
[0, 3, 5, 9]
726,065
726,066
bottom left & bottom right of HTML element
<p>How could I get bottom left x-y &amp; bottom right x-y of any HTML element? I wanted to assign it to another <code>&lt;div&gt;&lt;/div&gt;</code></p>
jquery asp.net
[5, 9]
4,387,292
4,387,293
Creating dynamic objects with Javascript
<p>I'm trying to create a new Javascript object from attributes pulled from the DOM using jQuery. The info I'm trying to pull is the data-* from this:</p> <pre><code> &lt;button type='button' class='pickup' data-name="apple" data-weight='1' data-color='red'&gt;food&lt;/button&gt; </code></pre> <p>So I want to get ...
javascript jquery
[3, 5]
214,384
214,385
How to bind two document objects to single jquery function
<p>I have a custom jquery function that I need to bind to two iframe document objects. </p> <p>Currently it will work with just one doing something like:</p> <pre><code>$(window.frames["iframeName"].document).bind('textselect', function(e) { }); </code></pre> <p>what I'm looking to do is something like:</p> <pre>...
javascript jquery
[3, 5]
2,307,835
2,307,836
Beginner To Programming
<p>I am in my second semester at my local college. My major is computer science and this is the second part of the Java course. The thing is, even though I passed with a C,(highest grade in the class) I want to do better and get where I need to be. Just like most people it was a up hill battle to learn because it was a...
java c++
[1, 6]
3,032,540
3,032,541
Paging implementation in C# using Stored Procedure (SQL 2000)
<p>Anyone with a link to a sample code with paging that can be changed to work within a (10000+ records) table? I want to display the records on my asp.net page.</p> <p>Cheers</p>
c# asp.net
[0, 9]
2,768,282
2,768,283
jquery text area length count?
<p><br/> I have a text area field where i need to provide information about the word count when the user enters some text in the field. Length of the field is supposed to be 500 Characters. Initialy it must show </p> <blockquote> <p>min characters:100 | 0 of 500 // 0 of 500 must be in red color</p> </blockquote> <p...
javascript jquery
[3, 5]
773,049
773,050
Jquery How to use history plugin?
<p>In my web application I am using ajax and now I'd like the back and forward browser buttons to work. So I went looking for a jquery history plugin and found this one: <a href="http://stilbuero.de/jquery/history/" rel="nofollow">http://stilbuero.de/jquery/history</a></p> <p>In my code I use a function to load a page...
javascript jquery
[3, 5]
1,563,372
1,563,373
Jquery, adding input element
<p>i have successfully added input element into div, which looks like this :</p> <pre><code>$(document).ready(function() { $('#jumlah').change(function() { var jum = $('#jumlah').val(); for(i=1;i&lt;=jum; i++){ $('#jawaban').append('&lt;label&gt;Jawaban Soal ' + i + ' : &lt;/label&gt;&lt;input type="text" na...
php jquery
[2, 5]
2,814,263
2,814,264
Debug on the Samsung Galaxy I7500 Android Phone
<p>I am having Samsung Galaxy phone and i am trying it to connect to my Vista ,I have installed the Samsung PC suite . When i start the USB debugging on it asks for new driver , i give the path for sdk but still it never worked . The firmware version of phone is 1.5 .I am having sdk 1.6. I have done some changes in inf...
java android
[1, 4]
5,764,414
5,764,415
Jquery popup with single enabled datetimepicker
<p>I have a dialog with a few controls and datetimepicker. When I disable all component, except datetimepicker a datetimepicker select dialog appears. He get focus and select date triggers. How can I fix this problem? I want just to show text box with date. </p> <p><img src="http://i.stack.imgur.com/9Om7u.png" alt="e...
javascript jquery
[3, 5]
1,879,851
1,879,852
selection index change is not working of drop down list
<p>i have only one element in drop downlist so selection index change is not working... the datasource is given to run time... if it was on designing time i can give the select one list item... but at run time what should i do????????</p>
c# asp.net
[0, 9]
5,705,608
5,705,609
Fading colors with jquery?
<p>I have a regular color change using jquery, but I'd like to have it so it has a smooth color change. At the moment, the code changes the color of a link on hover and then removes it when the mouse is removes. I have seen one tutorial but it doesn't explain it and it does not look like my current code. This is what i...
javascript jquery
[3, 5]
2,956,381
2,956,382
Adding and changing checkbox names + labels on change
<p>This is what I am working with:</p> <p><a href="http://jsfiddle.net/VkYnQ/" rel="nofollow">http://jsfiddle.net/VkYnQ/</a></p> <p>The goal is to select as many times you want, and then select what time, and then it should add and show the times under the <code>'Copy to more dates?'</code> .</p> <p>Currently it has...
javascript jquery
[3, 5]
3,452,287
3,452,288
How to prevent the user to change page with jQuery
<p>I have a page with a form that is submittes via ajaxSubmit() (so, without changing the page).</p> <p>My goal is that, when the user try to change page (or even to close the browser), i ask him if really want to exit the page without sending the form (exactly as gmail does).</p> <p>Gmail for example do this with a ...
javascript jquery
[3, 5]
1,849,794
1,849,795
How to select first child with jquery
<p>How do I select the first div in these divs (the one with <code>id=div1</code>) using first child selectors? </p> <pre><code>&lt;div class="alldivs"&gt; &lt;div class="onediv" id="div1"&gt; &lt;/div&gt; &lt;div class="onediv" id="div2"&gt; &lt;/div&gt; &lt;div class="onediv" id="div3"&gt; &lt;/div...
javascript jquery
[3, 5]
4,278,324
4,278,325
How do i Turn ON/OFF the Caps lock key
<p>We can able to detect the Caps lock key is ON/OFF using Jquery. My question is </p> <p>"can we possible to Turn ON/OFF the Caps lock key using Jquery or Javascript in Keypress event".</p> <p>And also using C#, How to achieve this?</p> <p>Thanks in advance !!!</p>
c# javascript jquery
[0, 3, 5]
4,842,865
4,842,866
Convert String to jQuery Object for HTML Parsing
<p>I have a simple string e.g.</p> <pre><code>var s = "&lt;p&gt;Hello World!&lt;/p&gt;&lt;p&gt;By Mars&lt;/p&gt;"; </code></pre> <p>How do I convert <code>s</code> to a jQuery object? My objective is to remove the <code>&lt;p&gt;</code>s and <code>&lt;/p&gt;</code>s. I could have done this using regex, but that's rat...
javascript jquery
[3, 5]
4,942,687
4,942,688
jQuery.inArray() function
<p>if we have an array like the following one</p> <pre><code>var x = [[1326844545000,89.59143829345703],[1326844545000,89.59143829345703], [1326844550000,89.4941635131836]] </code></pre> <p>how can we use jQuery.inArray() function ?? and also how can we know the location of that item</p> <p>Thanks </p>
javascript jquery
[3, 5]
2,850,204
2,850,205
How to get correct table format ? Jquery ques
<p>This code prints output as given below... <strong>code</strong>:</p> <pre><code>$('#calendar').append('&lt;table&gt;&lt;thead&gt;&lt;tr&gt;'); var i; for(i=0;i&lt;=6;i++) { $('#calendar').append('&lt;td&gt;'+week[i]+'&lt;/td&gt;'); } $('#calendar').append('&lt;/tr&gt;&lt;/th...
jquery javascript
[5, 3]
2,645,120
2,645,121
pass javascript value to asp.net function
<p>the question says it all : i have a linkbutton to which i pass through CommandArgument a value and i need that value to be a javascript value. Thanks!</p> <p>Edit : </p> <p>here is my linkbutton tag :</p> <blockquote> <p>&lt; asp:linkbutton id="prevBut" runat="server" OnCommand="load_com" CommandArgument=...
javascript asp.net
[3, 9]
138,885
138,886
Call jQuery function from JavaScript
<p>I have some jQuery code:</p> <pre><code>$(function(){ function someFunc(){ /*do something*/ }; ............. }); </code></pre> <p>And now I want call someFunc from JavaScript like below:</p> <pre><code>function test(){ $.fn.someFunc(); } </code></pre> <p>But it doesn't work! I've seen an article <a h...
javascript jquery
[3, 5]