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,881,153
1,881,154
Change <body> to <body id"something" runat="server'>
<p>We have a huge website with main.master that is used in a lot of places.. If I change the tag to runat="server", would any other regular stuff continue working or it would not get affected if I change it?</p> <p>Thank you</p>
c# asp.net
[0, 9]
5,266,504
5,266,505
C# Call Event Handler Dynamic
<p>I am trying to save all the controls from one WebForm using a serialized Dictionary (controlId - string, controlValue - string). Next i want to deserialize that Dictionary and dynamically fill the controls with their values.</p> <p>The problem is that some of my controls have AutoPostBack true and also event handle...
c# asp.net
[0, 9]
1,475,395
1,475,396
Execute javascript function from java
<p>I want to know if it's possible to execute a javascript function from java. Basically I have a javascript function to which I want to pass a string and then get the output from that function.</p> <p>If it's possible, how do I accomplish it?</p> <p>EDIT - </p> <p>I couldn't find a solution to this, what I did was ...
java javascript android
[1, 3, 4]
3,835,985
3,835,986
How to remove row on click on confirm message true?
<p>I have a asp gridview. On row databound I add onclick event to view item details. I have also delete button. The problem is <strong>When I click item delete, it deletes item but also redirect to item preview page.</strong> It should not do a postback and redirect</p> <p>here is my code</p> <pre><code> protected vo...
c# javascript jquery asp.net
[0, 3, 5, 9]
1,333,607
1,333,608
Array Dynamic Menu Logic?
<p>Ok what I am trying to do is create a dynamic menu based on an array First dimesion elements will be top level and Second dimension levels will be sub items of said parent how will I do this?</p> <pre><code>$(document).ready(function(e) { //var maxLevels = 3;//Max Levels Of The List TO Traverse var nav = new Array...
javascript jquery
[3, 5]
2,321,872
2,321,873
How to avoid duplicate items being added from one CheckBoxList to another CheckBoxList
<p>While adding items from one <code>CheckBoxList</code> to another <code>CheckBoxList</code> how to check if the item is already present in the second <code>CheckBoxList</code> using asp.net c#</p> <p>The code I have written to move between <code>CheckBoxLists</code> is:</p> <pre><code>protected void add_Click(objec...
c# asp.net
[0, 9]
4,772,684
4,772,685
When to use Literal vs LiteralControl?
<p>What are the appropriate use of these two controls? From time to time I build up HTML in the code behind. Sometimes I want to output white space and I end up doing something like this.</p> <pre><code>const string twoSpaces = "&amp;nbsp;&amp;nbsp;"; p.Controls.Add(new Literal { Text = twoSpaces }); </code></pre> <p...
c# asp.net
[0, 9]
5,389,915
5,389,916
Any way to clear the data of a DataInputStream in Java? (an Android application)
<p>First of all thanks for helping and apologize for my English, I'm from Spain.</p> <p>I'm receiving images from a computer via TCP using a socket. For every image I get the number of layers (RGB), rows and columns of every layer, then the values of each pixel. To collect the data I use a <code>DataInputStream</code>...
java android
[1, 4]
2,803,133
2,803,134
Android: Obtain Java source code from jar
<p>I have a jar library that I use for my app and I want to make changes to the source code. After using JD-GUI to obtain the source code from the class files, I put the files in my project in Eclipse. But the source code contains many errors. For example, it says that the constructor does not exists, but the source co...
java android
[1, 4]
4,220,491
4,220,492
DropDownList in Repeater control, can't fire SelectedIndexChanged
<p>I have a repeater control where in the footer I have a DropDownList. In my code-behind I have:</p> <pre><code>protected void ddMyRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { ...
c# asp.net
[0, 9]
4,670,331
4,670,332
my first jQuery plugin, only seems to bind to the first form of eight forms on the page
<p>I'm writing a small jQuery plugin that binds to 8 divs on a page, each of which contains a form. There are two links for each widget that increment or decrement a field within the form and then POSTs the form. The problem is that all 16 links on the page all submit the first form on the page.</p> <p>The source code...
javascript jquery
[3, 5]
4,407,716
4,407,717
LINQ-to-SQL DataContext is null on certain server
<p>I have a very unusual problem. I have an ASP.NET application that uses LINQ-to-SQL a lot, and works fine on most servers. However the application exists on another server on the same network, and after a recent update, whenever I open a new DataContext like this:</p> <pre><code>LINQDataContext dc = new LINQDataCont...
c# asp.net
[0, 9]
3,993,402
3,993,403
Why is object/associative array values not setting when I use $item.data("something").x
<p>Why is it when I do something like </p> <p><a href="http://jsfiddle.net/sUhn9/" rel="nofollow">http://jsfiddle.net/sUhn9/</a></p> <p><em>Added relevant HTML</em></p> <pre><code>&lt;div id="container" data-physics='{x: 10, y: 5}'&gt;Hello&lt;/div&gt; </code></pre> <p>JavaScript:</p> <pre><code>$(function() { ...
javascript jquery
[3, 5]
309,399
309,400
Alternative for Java Swings in php
<p>Can anyone please help me to write php code using the below java code.</p> <p>I strucked somewhere and i have so many questions:</p> <p>how to write java JFrame, BorderLayout, setJMenuBar, setVisible in php.</p> <pre><code> // init the frame this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.se...
java php
[1, 2]
433,234
433,235
Disabling submit button stops form from being submitted PHP / Javascript
<p>I think I got a classic problem but I was not able to find a working solution so far.</p> <p>I have got a form , the user clicks "Send" and everything works fine using a PRG pattern and doing both client-side and server-side validation.</p> <p>The problem arises when any user (let's assume he entered valid inputs)...
php jquery
[2, 5]
1,279,788
1,279,789
Function to look through folder and use a wildcard
<p>been a lurker on Stack Overflow for a while, love the site.</p> <p>Now its my turn. From the code below, i am making the background image random each time the page loads.</p> <p>Would anyone be so kind as to help me make this more efficient so that i don't have to manually enter my filenames ? Im looking for some ...
javascript jquery
[3, 5]
1,798,692
1,798,693
Will aspx not see changes made by javascript?
<p>I am changing the contents of a span with javascript. I can see that it has changed with view source. </p> <p>When I try to get the contents in a c# function right after, it still has the old value. </p> <p>My guess is that asp is just seeing the html that it sent the client, and that javascript is changing the c...
javascript asp.net
[3, 9]
3,507,658
3,507,659
convert decimal to string without removing 0 "zero(s)"?
<pre><code>nStr = 12.00; alert(typeof(nStr));// getting number x = nStr.split('.'); // Other than string Split function Through an error, nStr = 12.00; nStr += ''; alert(typeof(nStr));// getting string x = nStr.split('.'); x1 = x[0]; x2 = x.length &gt; 1 ? '.' + x[1] : ''; alert(x1+x...
javascript jquery
[3, 5]
1,872,130
1,872,131
Gridview editing without postback
<p>I am using Gridview with Edit option. When i click on Edit button row becomes editable with Update &amp; cancel button. But this process causes a postback which degrades performance in my scenario. Is there any other way available to make row editable without causing a postback(maybe using javascript)?</p>
javascript asp.net
[3, 9]
2,212,843
2,212,844
Android service - check if variable asynchronously changes over period of time?
<p>Let's say I have a boolean isAction. In my service I want to run some sort of timer mechanism and if this boolean changes state, call some function X, else do nothing. </p> <p>What would be the best way to do this? I've tried using timers to no avail, and I'm not sure if a handler with postDelayed would be appropri...
java android
[1, 4]
4,894,699
4,894,700
Android: Include External Jar in Build (Without Eclipse)
<p>I'm working with Android at the moment, trying to avoid using Eclipse (for which I have an irrational hatred).</p> <p>I need to include an external <code>.jar</code> file (used in my <code>Activity</code>)and have no idea how to link it for <code>ant debug</code>...</p> <p>I've read up on <code>build.xml</code> fi...
java android
[1, 4]
4,203,507
4,203,508
jQuery AutoComplete missing?
<p>I was building something using jQuery's AutoComplete plugin last week, but today I found that it's not working.</p> <p>After some debugging, it seems that the external scripts I've been loading no longer exist:</p> <p><a href="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js" rel="n...
c# asp.net jquery
[0, 9, 5]
86,944
86,945
MasterPage issues with anchor tags and fancyBox
<p>I've got some ASP:Hyperlink controls on the master page for a set of global links. I'm using the 'permissions' property so I'm hoping to keep these.</p> <p>If I setup the control like this:</p> <pre><code>&lt;asp:HyperLink ID="inlineMileageCalc" runat="server" NavigateUrl="~/#mileageCalc"&gt;Mileage Calculator&lt;...
c# asp.net
[0, 9]
3,201,331
3,201,332
Pass value from parent to iframe dropdown box
<p>I need to pass a value from a parent to an iframe (on a different server, not in my control) and have the value make a selection in a dropdown in the iframe.</p> <p>Example: mydomain.com/?agent=12345 (target will be the iframe)</p> <p>In the iframed page, the dropdown has several choices, I need to have the value ...
php javascript
[2, 3]
2,247,057
2,247,058
jquery with check box in asp.net adding click event
<p>I have textbox and checkbox in asp.net page. if the check box checked should have an input mask and if its uncheck should have another input mask. my code is always picking up second condition and I've been advised that I should add click event to run the code whenever the checkbox is clicked and because I'm new wit...
asp.net jquery
[9, 5]
5,027,229
5,027,230
Timer with multiple things to do
<p>I am making an android app which reminds people via notifications of events they have to do over the course of a day. The way I currently do this is have each event on a seperate timer using the Timer class. However, I don't think this is great way of doing things. Is there any way maybe to have just one timer which...
java android
[1, 4]
64,203
64,204
How to remove a live submit event in jQuery?
<p>I have two forms on our site #footer_leads and #footer_leads2 and i have a live submit event but need to verify a few things before the form gets summitted so i have this code</p> <pre><code>$('#footer_leads2, #footer_leads').live('submit', function(e){ e.preventDefault(); console.log('again'); ...
javascript jquery
[3, 5]
5,636,096
5,636,097
javascript catch comet socket disconnect
<p>So I have implemented comet sockets on my server, and am able to push data to the browser fine. But what I would like to do is catch in javascript/jquery when the comet server drops out. </p> <p>I have my iframe:</p> <pre><code>&lt;div id="iframeDiv" style="visibility:hidden; height:0px"&gt; &lt;iframe id="com...
javascript jquery
[3, 5]
4,333,040
4,333,041
Passing multiple Eval parameters to a JavaScript function from ASPX
<p>I already know how it works with a single parameter </p> <pre><code>OnClientClick='&lt;%# String.Format("confirm_ticket({0});return false;",DataBinder.Eval(Container,"DataItem.idAgir"))%&gt; ' </code></pre> <p>but is it possible to pass 2 parameters?</p> <p>thanks in advance</p>
c# javascript asp.net
[0, 3, 9]
1,282,251
1,282,252
How to open a new tab/window on clicking on ItemTemplate asp:Image Button with Query String?
<p>I have a ImageButton inside the DataList ItemTemplate, I am trying to open a new page (new tab) on clicking on ImageButton, but its opening in same tab. </p> <pre><code>&lt;ItemTemplate&gt; &lt;asp:ImageButton ID="ibtmImage" runat="server" ImageUrl='&lt;%# Eval("Image") %&gt;'OnCommand="ibtmImage_Command" Comman...
c# asp.net
[0, 9]
2,060,527
2,060,528
Form Submission after remote validation
<p>I am trying to use Jquery's validation plugin "remote" method. If I use "async": true with that, the form submits even before the validation succeeds. If I use "async": false, it works fine in Firefox and Chrome, but in IE8 and IE9, it freaks out, by not displaying a "div" that's shown in the validation plugin's "be...
javascript jquery
[3, 5]
3,502,532
3,502,533
Getting stuck on sh-3.2# when issued su command over adb in C++ program
<p>I am trying to perform some operations which require superuser permissions but after issuing su command using adb with c++ program like this http:/pastebin.com/XaHsbVnw It gets stuck to sh-3.2# and doesn't proceed to next command that is <a href="http://pastebin.com/4k8AV57L" rel="nofollow">http://pastebin.com/4k8AV...
android c++
[4, 6]
5,820,012
5,820,013
jquery load script conflict
<p>I'm using JQuery to append a script tag to a div, ex.:</p> <pre><code>$("#special_div").append("&lt;script src="http://blablabla.com/id.php?id=0000"&gt;&lt;/script&gt;"); </code></pre> <p>and that script returns: </p> <pre><code>document.write("&lt;object ....&gt;&lt;/object&gt;"); </code></pre> <p>but when I ap...
javascript jquery
[3, 5]
4,886,199
4,886,200
Anyone know of javascript for this drop down navigation?
<p>I'm a beginner to web design, does anyone know of a script that has this EXACT drop down navigation style?</p> <p><a href="http://behance.vo.llnwd.net/profiles4/172375/projects/4109265/b262ce1df694cced3f3fa5fe3cb8dc97.jpg" rel="nofollow">http://behance.vo.llnwd.net/profiles4/172375/projects/4109265/b262ce1df694cced...
javascript jquery
[3, 5]
5,778,567
5,778,568
What is difference between jquery.js and jquery.lite.js?
<p>When I download JQuery zip file <a href="http://jqueryjs.googlecode.com/files/jquery-1.2.5-release.zip" rel="nofollow">LINK</a>. It gives me 4 different files</p> <ul> <li>jquery.js</li> <li>jquery.lite.js</li> <li>jquery.min.js</li> <li>jquery.pack.js</li> </ul> <p>pack is the most compressed one of that js file ...
javascript jquery
[3, 5]
1,167,853
1,167,854
ImageView Width And Height Programmatically In TableLayout
<p>Actullay all I want is in question title. I want to set fix width and height for ImageView in TableLayout. How can I do it?</p> <p>This is my code:</p> <pre><code>public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.buddy_list); TableLayout budd...
java android
[1, 4]
1,862,080
1,862,081
Android List Preferences: have summary as selected value?
<p>I have a Preference activity which uses a List Preferences as defined by my XML file. How would I set the summary of the list activity to the value that is selected?</p> <p>Thank you!</p>
java android
[1, 4]
1,591,844
1,591,845
how to create valued stacked bar chart using javascript or php
<p>How to create <em>valued stacked bar</em> chart using javascript? </p> <p>I am using the below code but I am not getting the required result</p> <pre><code>&lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; google.load("visualization", "1...
php javascript
[2, 3]
298,643
298,644
Label is missing error eclipse
<pre><code> float f1 = 4.0F; localPaint.setTextSize(f1); int j = howManyBreaks(str, localPaint, paramInt1); int i = 0; while (true) { if ((f1 &gt;= f2) || (j &gt; paramInt2)) break label142; //getting error here i = 1; f1 += 0.5F; if (f1 &gt;= f2) break; localPaint.setTextSi...
java android
[1, 4]
2,864,977
2,864,978
Dynamically create and repeat the set of fields
<p>I have a PHP form which shows one 'User details' block by default. 'User details' section has first name, last name and address etc. I have a requirement to repeat the same block after clicking on the button so the user can enter 'n' number of users into on the form. Also I need to save all the information in MyS...
php javascript
[2, 3]
2,317,457
2,317,458
How to pass extra parameter in jquery post request from outside click event?
<p>Hi i have jquery request like below ,</p> <pre><code>$('#filterForm').submit(function(e){ e.preventDefault(); var dataString = $('#filterForm').serialize(); var class2011 = document.getElementById("2011").className; //var validate = validateFilter(); alert(dataString); ...
javascript jquery
[3, 5]
1,823,585
1,823,586
Jquery changing images on on click
<p>i have a problem with my click changing image, i have database messages , every message has a status 0 or 1 , from my code o have to click on status image and it will change, its changes BUT only for the first Message. When i click to other message status it not changes but changes only for the first status. how can...
php javascript jquery
[2, 3, 5]
1,730,518
1,730,519
update jquery dialog when listview inside dialog is databinded with new data
<p>I have a Jquery dialog with an ASP listview control inside. Before showing the dialog the listview is already filled on Page_Load, but I want to change this. I want to fill the listview when a dropdownlist is changed in the .aspx page, which triggers a postback to databind the listview.</p> <p>The problem I'm havin...
c# asp.net jquery
[0, 9, 5]
5,468,679
5,468,680
Resetting A webform on the ClientSide
<p>I have a webform with 3 textboxes, a checkbox and a Reset button. I need these to be reset to null values when i click the button "Reset" and i need it to be a Client-Side operation. The JS code that i have tried for this is as follows but for some reason it doesnt work. Any Help PLease?</p> <pre><code>&lt;code&gt;...
javascript asp.net
[3, 9]
1,217,074
1,217,075
how to turn a function from function(element) syntax to $(element).function() syntax
<p>I have a function that accepts the element it needs to operate on as a parameter <code>element</code></p> <pre><code>function changeColor(element){ $(element).find('.middleBox').each(function(){ $(this).//do some stuff that does not matter now; }); } </code></pre> <p>and I call it this way </p> <pre>...
javascript jquery
[3, 5]
896,798
896,799
submit event not firing after blur event triggers javascript confirmation
<p>I have a simple form, where on blur event of textfield I am showing a confirm message to the user, which simply auto populates another hidden textfield. Which works good so far. The problem happens when the user directly clicks the submit button instead of clicking another field or anywhere else on the form. This sh...
javascript jquery
[3, 5]
343,092
343,093
unbind and then bind the onclick function(with dynamic param) to the anchor tag in repeater in jquery or javascript
<p>I want to unbind the function(which is with parameters<br> &lt;%#Eval('')%>) and after thta on button click bind that function in jquery or javascript</p> <pre><code> &lt;ItemTemplate&gt; &lt;tr&gt; &lt;td nowrap="nowrap" align="center"&gt; ...
javascript jquery
[3, 5]
1,152,616
1,152,617
javascript written before doctype is working. But it is written after doctype then it is not working
<p>I am writing some js code before doctype and this code generate one array. If i am writing this code inside of doctype or head tag then it is not working.</p>
php javascript jquery
[2, 3, 5]
5,604,232
5,604,233
jQuery.each() undefined issue
<p>I have the following code</p> <pre><code>function myFunction(items) { // this prints out 11 alert(items.length); $(items).each(function(i, item) { // item is undefined for some reason } } </code></pre> <p>It I alert the length of items, it has elements in it (11 to be exact). so how could 11 it...
javascript jquery
[3, 5]
3,454,453
3,454,454
c# display doc/docs in exactly format in website
<p>Below is my code to read a doc/docs file. </p> <p>it can read, but the output format not exactly as in the docs, if that any way to display exactly format in aspx?</p> <pre><code>protected void Button2_Click(object sender, EventArgs e) { var wordApp = new Microsoft.Office.Interop.Word.ApplicationClass(); ...
c# asp.net
[0, 9]
1,520,096
1,520,097
How do I find a control I placed inside a panel?
<p>I have a button inside a Panel. I'm trying to find the id of the button, but my code doesn't work:</p> <pre><code>protected void pnl_nocutomer_Load(object sender, EventArgs e) { Button btn; btn = this.FindControl("btn_clear") as Button; Page.LoadComplete += new EventHandler(Page_LoadComplete); stri...
c# asp.net
[0, 9]
3,706,852
3,706,853
Datetime format in C#
<p>I have a <code>DateTime</code> saved in <code>dtmNextPayment</code>. I want that to showed in the label in mm/dd/yyyy way. I have tried using</p> <p><code>lbltakeeffectdate.Text = dtmNextPayment.ToString("mm/dd/yyyy");</code></p> <p>But month is always shown as 00. I have no idea why? Please let me know what shoul...
c# asp.net
[0, 9]
3,775,747
3,775,748
How to scroll a div to the bottom after appending something to that div?
<p>So I am currently using <a href="http://stackoverflow.com/questions/270612/scroll-to-bottom-of-div">this solution</a> to scroll a div to the bottom by writing something like</p> <pre><code>$(document).ready(function() { $('#comment_list').scrollTop($('#comment_list').scrollHeight) } </code></pre> <p>But I noti...
javascript jquery
[3, 5]
3,213,250
3,213,251
Dynamically generated div isn't attaching my event listener
<p>I made a modal plugin but for some reason one of the divs that I generate isn't getting a click event listener that I am attaching to it.</p> <p><code>&lt;a class="close" id="js-close-modal"&gt;&lt;/a&gt;</code> is what I'm referring to. I'm using jQuery's on, but that doesn't seem to help.</p> <pre><code> ...
javascript jquery
[3, 5]
4,623,167
4,623,168
Android: Show Dialog in SearchDialog Activity
<p>Is there a way to show a Dialog or AlertDialog that is launched by the Search Activity that is set as the default search activity? I have a SearchDialog that is working as intended but i want to show a dialog with extra search option each time a search is executed. It wont work by simply implementing the dialog in t...
java android
[1, 4]
3,389,122
3,389,123
Multiple mobile platform game development (Android/iOS)
<p>I'm currently developing a small indie game for the Android framework, however in order to save my some future work - I was wondering, is there a way to develop a game for the Android and iOS at the same time?</p> <p>I'm aware of HTML 5 solutions, but I'm unsure if you can use them in order to develop games. My req...
android iphone
[4, 8]
3,920,654
3,920,655
Difference between " and ' characters in JQuery
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/242813/when-to-use-double-or-single-quotes-in-javascript">When to Use Double or Single Quotes in JavaScript</a> </p> </blockquote> <p>I think <code>$('#id')</code> and <code>$("#id")</code> both is valid so <cod...
javascript jquery
[3, 5]
1,463,591
1,463,592
Jquery and clone html sections?
<p>I have this template <code>div</code></p> <pre><code>&lt;div class="divDetails"&gt; &lt;div class="divRowData" style="display: none "&gt; &lt;span class="spanColor"&gt;&lt;/span&gt; &lt;span class="spanText"&gt;&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>It is hidden.</p> ...
javascript jquery
[3, 5]
4,491,487
4,491,488
Android AsyncTaskLoader doesn't start loadInBackground?
<p>I am trying to implement a loader example on Android but can't get it to start the loader. I am using the following code. It will hit the "Create Loader" but it will never reach the "Loading started" log message. Am I missing a call that I need?</p> <p>Activity:</p> <pre><code> public class TestingZoneActivity ...
java android
[1, 4]
832,133
832,134
Android Search Dialog soft keyboard stays open for too long
<p>I'm trying to use Android's built-in <a href="http://developer.android.com/guide/topics/search/search-dialog.html" rel="nofollow">Search Dialog</a>, and it's working fine except when I try to use it with a <a href="http://developer.android.com/reference/android/app/ProgressDialog.html" rel="nofollow">ProgressDialog<...
java android
[1, 4]
711,077
711,078
get the last value of an object Javascript or jQuery
<p>I have an object which I'm trying to get the last value of every key and put it into another object. </p> <pre><code>var setA = { 'a':'001, 007, 101', 'b':'052, 004, 006, 005', 'c':'003, 002, 001' } </code></pre> <p>What I'm trying to do is get the last ones like this:</p> <pre><code>var setB = { ...
javascript jquery
[3, 5]
5,737,765
5,737,766
iPhone save game state
<p>I'm implementing a save game feature to my game, so I'm looking for the best way to store the saved game.</p> <p>Since I'm using C++ everywhere it's possible, I can't use NSKeyedArchiver to store the state of the game. I am thinking in saving the state manually in a file, so I have a questions about that:</p> <p>I...
iphone c++
[8, 6]
4,927,604
4,927,605
Assigning clicked element's ID as classname to another element
<p>I am working on a project but the code that I wrote is really wrong:</p> <pre><code>$('#lart').click(function(){ $("#form3").addClass("lart"); }); $('#posht').click(function(){ $("#form3").addClass("posht"); }); $('#majt').click(function(){ $("#form3").addClass("majt"); }); $('#djatht').click(function(){ $(...
javascript jquery
[3, 5]
3,951,300
3,951,301
To cache or not to cache $(this) in jQuery
<p>Does creating and reusing a reference increase performance appreciably when the selector is <code>$(this)</code>?</p> <p>I create references for my jQuery selectors when I use the same selector multiple times in the same scope. The following is more efficient </p> <pre><code> var jSel = $('div.some_class input...
javascript jquery
[3, 5]
3,993,269
3,993,270
how to make an checkboxlist select only one item selected
<p>i am using an checkboslist binding to a datatable. but here i need to make user select only one item selected from checkbox list is there way we can aachive this</p> <p>either JQuery, javascript, c# thank you </p>
asp.net jquery
[9, 5]
2,469,101
2,469,102
jQuery select list issue
<p>I have a code something like </p> <pre><code> if($('#nodeNo').val() == null){ cityChange(1); $('#nodeNo option[value=&lt;%=request.getAttribute("nodeval")%&gt;]').attr('selected','selected'); } </code></pre> <p>There is an Ajax call in cityChange(1) to popul...
javascript jquery
[3, 5]
479,081
479,082
BIG Resource eater
<p>This script is eating up a lot of resource on my members computers. I have other interval scripts that don't eat up any resource. I've tried extending the time but that slows down the refresh. Any suggestions?</p> <pre><code>&lt;script type="text/javascript"&gt; $('document').ready(function(){ updatestatus(); s...
php jquery
[2, 5]
1,006,711
1,006,712
to perform validation for amout(price) in ASP.net
<p>I'm using 'Amount' as a column in my datatable for my application.</p> <p>I want to perform the following validations w.r.t 'Amount' which is a string variable.</p> <p>1) i want to check if the amount has more than 2 digits after the decimal point</p> <p>2) if the amount is positive or negative .. (as in case of ...
c# asp.net
[0, 9]
4,438,784
4,438,785
How to active next & prev controls on Android Mediacontroller?
<p>I want to activate next and previous controls on Android Media controller in an android app. I tried hard but still not achieve. How can i activate that controls? Any help will be appreciated.Code is: MediaController mc = new MediaController(this); mc.setPrevNextListeners(null, null); vv.setMediaControll...
java android
[1, 4]
4,533,591
4,533,592
delete table row
<p>I have a table like this:</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td&gt;foo&lt;/td&gt; &lt;td&gt;&lt;button&gt;delete&lt;/delete&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;foo&lt;/td&gt; &lt;td&gt;&lt;button&gt;delete&lt;/delete&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre...
javascript jquery
[3, 5]
5,361,033
5,361,034
Trying to understand this code (pub/sub library)
<p>This is Peter Higgins's pub sub library: <a href="https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js" rel="nofollow">https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js</a></p> <pre><code>(function (d) { var cache = {}; d.publish = function (topic, args) { ...
javascript jquery
[3, 5]
3,591,980
3,591,981
insert html content inside a class in jquery
<p>I am using jquery to insert html content like,</p> <pre><code>$.get("_html/saveme.html", function(data){ $(".saveWin .modalCSS").html(data); //Error here }); </code></pre> <p>In Firefox it is giving me error as,</p> <pre><code>Node cannot be inserted at the specified point in the hierarchy </code></pre> <p>I...
javascript jquery
[3, 5]
5,159,355
5,159,356
Store queue of strings in javascript/jQuery
<p>I am writing an application using jQuery (with the jPlayer plugin) that needs to store a queue of songs to play. I plan to just simply store the strings of the song names in the queue... is there a really good, simple queue implementation in javascript that anyone would recommend? jQuery's queue doesn't seem to be...
javascript jquery
[3, 5]
3,032,682
3,032,683
How to determine which enemy is hit and destroy it alone
<p><a href="http://jsfiddle.net/5DB6K/" rel="nofollow">http://jsfiddle.net/5DB6K/</a></p> <p>I have this game being made where you shoot enemies from the sides of the screen. I've got the bullets moving and being removed when they reach the end of the screen (if they didn't hit any enemy) and removing the enemy when t...
javascript jquery
[3, 5]
2,386,418
2,386,419
jquery stopPropagation() and sending "event"?
<p><a href="http://jsbin.com/imager/2/edit" rel="nofollow"><strong>(jsbin)</strong></a></p> <p>I created a table with a button inside.</p> <p><img src="http://i.stack.imgur.com/x6GEF.jpg" alt="enter image description here"></p> <p>The Table has <code>onclick</code> event and also the inside Button</p> <p>But when I...
javascript jquery
[3, 5]
2,425,069
2,425,070
How to replace a page by date
<p>There is way to replace page at some date&amp;time ?</p> <p>example: i want that at friday the default.aspx will down, and other page will turn to default.aspx... and then at sunday the first default.aspx will return.</p> <p>someone have an idea? maybe will be better to change the display of the default.aspx. i ne...
c# asp.net
[0, 9]
2,887,339
2,887,340
Trying to make a div appear in the centre of a scrollable page - bug in my code?
<p>Just as a preface to make sure I am clear, I don't want the div to appear dead centre in the middle of the page, I want it in the middle of the viewable window. So if you imagine a long page and the user has scrolled down to near the bottom and clicks the button the div will appear in the centre of the screen near t...
javascript jquery
[3, 5]
3,815,644
3,815,645
How to get attributes of container in jquery?
<p>How can I get attributes values from an container using jquery ?</p> <p>For example:</p> <p>I have container div as:</p> <pre><code>&lt;div id = "zone-2fPromotion-2f" class = "promotion"&gt; </code></pre> <p>here how can I get attribute id value using jquery and than how can I trim the value to get component inf...
javascript jquery
[3, 5]
1,812,951
1,812,952
Passing 'this' as parameter in JavaScript
<p>I have the following code:</p> <p><strong>HTML:</strong></p> <pre><code>&lt;label id="copyAddress" class="copyAddress" onclick="CopyAddress(this);"&gt; Copy Address &lt;/label&gt; </code></pre> <p><strong>JS:</strong></p> <pre><code>function CopyAddress(copyAddressLink) { PopulateTarget(copyAddressLink...
javascript jquery
[3, 5]
1,683,583
1,683,584
What is the Java equivalent for the following C# code?
<p>I have an interesting question. I understand the following C# code enables users to input null values in parameters:</p> <pre><code>public DateTime? date (DateTime dt) {} </code></pre> <p>What is the equivalent when coding in Java?</p>
c# java
[0, 1]
1,890,596
1,890,597
refreshing views of Preferences when using PreferenceActivity
<p>I'm trying to force <code>PreferenceActivity</code> to refresh. Does anyone know how to do this?</p> <p>I have a <code>ResetDefaultsPreference</code> class that subclasses <code>Preference</code> and, when clicked, is supposed to reset to defaults all preferences whose keys start with a certain prefix. It works, bu...
java android
[1, 4]
5,036,220
5,036,221
Set Value of a Dynamically Generated DropDown
<p>I have a dropdown menu that gets automatically populated. I need to set its selected value to a certain option whose ID is being passed in. This code seems to work with dropdowns that were created on page load:</p> <pre><code> $('select[id$=DropDown1] option').each(function (index) { if ($(this).val() ==...
javascript jquery
[3, 5]
1,305,843
1,305,844
any website monitoring library/modules to use in my website?
<p>I'm trying to build a site which user can add their websites which should be monitored and can view a detailed report and statistics of it. And also it should be able to monitor local webservices (mainly), </p> <p>1) is there any popular java library to use for monitoring a website? (in sense to ping a website and...
java javascript
[1, 3]
316,730
316,731
Master page - Only one instance of a ScriptManager can be added to the page
<p>I am using ajax toolkit in my project. My project is having a master page and i am inheriting this master page in my web pages.I am using Script manager on every page but now requirement came to display a real time clock also on the master page.I had written the code using Timer to display real time clock on master ...
c# asp.net
[0, 9]
2,331,276
2,331,277
foreach not initialising the loop variable
<p>I'm using a foreach to loop through an IList of objects in a Partial View in ASP.NET MVC.</p> <p>Here's the entire code (Message is one of my classes from the Model).</p> <pre><code>&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;IList&lt;Message&gt;&gt;" %&gt; &lt;% if (ViewData.Model.Co...
c# asp.net
[0, 9]
1,446,652
1,446,653
jQuery index of dom element?
<p>I have...</p> <pre><code>element = document.elementFromPoint(x, y) </code></pre> <p>then I want to do something like...</p> <pre><code>index = $(element).index() </code></pre> <p>The DOM element is a <code>li</code> and I need its position in the list. </p> <p>Thanks!</p> <p>EDIT: If what i'm doing is correct ...
javascript jquery
[3, 5]
4,250,582
4,250,583
Display a string for each day of the year
<p>I want to play around with making an Android app that displays a famous quote of the day. So I will have 365 quotes and each day will display a new one. Any thoughts on how to accomplish this? Do I need 365 @strings in my <code>string.xml</code> file? Is there a way to access an array of strings (or another data st...
java android
[1, 4]
3,905,706
3,905,707
How to enable a linkbutton server control using javascript?
<p>I have a linkbutton server control in my page whose Enabled attribute is initially set to "false". When a text box's text changes I would like to enable the linkbutton. I tried the following but it does not work. Could you let me know if i am missing something.</p> <pre><code>function TextBox_TextChanged() { va...
asp.net javascript
[9, 3]
5,489,053
5,489,054
jquery - reveal answer in definition list
<p>I have an FAQ page that looks like the markup shown below</p> <p>When the page loads I'd like to reveal the answer that corresponds to the bookmark in the URL</p> <p>The url will be of the form www.mydomain.com/page#q1</p> <p>I am trying to do it like this but it wont't work - any ideas how to fix it?</p> <pre><...
javascript jquery
[3, 5]
3,031,879
3,031,880
save the user name in session from the login page
<p>Can I ask you guys here, how to create session from login page? I want to make an edit page which user can view only their data in the gridview so they need to call the username session in order to retrieve only their records in db. If you guys have any doubts regarding to my question, pls ask me. Thank you.</p>
c# asp.net
[0, 9]
2,273,718
2,273,719
Find a string after a special character, move it and wrap a div around it
<p>I have this HTML code, for example:</p> <pre><code>&lt;div class="new"&gt; &lt;div class="in"&gt;&lt;/div&gt; &lt;label&gt;some text now watch this | the-thing&lt;/label&gt; &lt;/div&gt; </code></pre> <p>I want to:</p> <ol> <li>find the text thats after the "|" charecter</li> <li>move it outside the label</li> ...
javascript jquery
[3, 5]
957,041
957,042
wp_register_script Question
<p>I need to add the following JS to the head, but I don't know how to add the "data-cfasync="false" " by using "wp_register_script" or "wp_enqueue_scripts". Please help!!</p> <pre><code>&lt;script data-cfasync="false" type="text/javascript" src="http://use.typekit.com/YOUR-KIT-ID.js"&gt;&lt;/script&gt; &lt;script dat...
jquery javascript
[5, 3]
5,980,267
5,980,268
What is the best gaming framework for android and iphone
<p>What is the best gaming framework that can I use for both android and iPhone ?? </p>
android iphone
[4, 8]
5,358,118
5,358,119
Select element(s) without specific element
<p>Hi this is my problem:</p> <pre><code>&lt;ul&gt; &lt;li&gt;&lt;span class="show"&gt;*&lt;/span&gt;Show&lt;/li&gt; &lt;li&gt;&lt;span class="show"&gt;*&lt;/span&gt;Show&lt;/li&gt; &lt;li&gt;&lt;span class="show"&gt;*&lt;/span&gt;Show&lt;/li&gt; &lt;li&gt;&lt;span class="show"&gt;*&lt;/span&gt;Show&lt;/li...
javascript jquery
[3, 5]
3,834,682
3,834,683
Can anyone tell me what's wrong with this script?
<p>The script is working just fine but IE is giving me the error "Done but with errors on page" and I can't figure out why.</p> <pre><code>(function($){ $.fn.extend({ tabify: function() { function getHref(el){ hash = $(el).find('a').attr('href'); if(hash) ...
javascript jquery
[3, 5]
1,122,366
1,122,367
Creating a google plus / digg like social bookmark button
<p>For a client of ours we need to create a share button for his site so that the users of his site can add this button to their blogs / sites and others can click on it and it will just open up a popup asking the user to login (if already logged in, the link bookmark page appears) to the clients site and bookmark it. ...
php javascript
[2, 3]
5,562,775
5,562,776
How to clone element with new id?
<p>I have some elements on the page. Here is example of one element:</p> <pre><code>&lt;div id="119" class="message"&gt; &lt;div class="messageAuthor"&gt;iggy&lt;/div&gt; &lt;div class="messageBody messageMessage"&gt;hello&lt;/div&gt; &lt;div class="messageDate messageCreate_date"&gt;12:13&lt;/div&gt; &lt;/div&gt; </c...
javascript jquery
[3, 5]
1,377,343
1,377,344
Displaying number of days in form field depending on month
<p>I want to validate the basic date format in the form. The date has three fields in form, Month, Day and Year. I want to make it so that, if a month January, March, May, July, August, October or December is selected then it should display 31 days in the day field. If february is selected, then it should display 28 da...
javascript jquery
[3, 5]
598,739
598,740
Execute function every nth second
<p>Total JavaScript n00b question right here:</p> <p>I've made this snippet that clicks a link after 10th second:</p> <pre><code>function timeout() { window.setTimeout(function() { $('img.left').click(); }, 1000); setTimeout("timeout()", 1000); } timeout(); </code></pre> <p>My question is, how do I...
javascript jquery
[3, 5]
2,894,533
2,894,534
jQuery: Issue Using Bind & Click Methods
<p>Any idea why this click event isn't working? (I'm sure the answer is obvious - I'm just not seeing it).</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; ...
javascript jquery
[3, 5]