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
4,806,898
4,806,899
Javascript variable problem
<p>I have a variable in javascript:</p> <pre><code>var activeSearchButton = document.getElementById('&lt;%=btnSearch.ClientID %&gt;'); </code></pre> <p>I want to set it like this:</p> <pre><code>&lt;asp:TextBox ID="WFTo" runat="server" onchange="activeSearchButton = document.getElementById('&lt;%=btnWFSearch.ClientI...
javascript asp.net
[3, 9]
1,983,309
1,983,310
toggle an input field
<p>i am trying this code:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function () { $('#individual,#company').hide(); $('input[name=radios]:radio:checked').change(function() { $('#individual').toggle(this.selectedIndex === 0); $('#company').toggle(this.selectedIndex === 1); }); });...
javascript jquery
[3, 5]
3,245,978
3,245,979
Writing to a label from a static function
<p>I'm trying to do something that I thought would be easy but can't figure out how to write to a label inside my stating function.</p> <pre><code>public static void StartProcessing(object data) { lblError.Text = "Blah Blah" } </code></pre> <p>I get the error "An object reference is required for the non-static fi...
c# asp.net
[0, 9]
2,389,256
2,389,257
Do I need to tell jslint about functions that have not yet been defined inside another function?
<p>I have code like this:</p> <pre><code>function dialog($link) { "use strict"; function doDialogAjax() { $.ajax({ cache: false, url: url, dataType: 'html' }) .done(onDialogDone) .fail(onDialogFail); } function onDialogDone(data...
javascript jquery
[3, 5]
4,439,933
4,439,934
I want Pause and Resume for this jquery animation
<pre><code>$(document).ready(function() { setTimeout("wave()", 0); }); function wave(){ $("#wave1") .animate({left:"100px", top:"400px" },2000) .animate({left:"200px", top:"0px" },2000) .animate({left:"300px", top:"400px" },2000) .animate({left:"400px", top:"0px" },2000) .animate({left:"500...
javascript jquery
[3, 5]
5,586,864
5,586,865
After each times click an increasing number?
<p>I want after each times click value <code>2011</code> an increasing number, how is it?</p> <p><strong><a href="http://jsfiddle.net/6ydUR/1/" rel="nofollow">Example:</a></strong></p> <pre><code>$('button').click(function() { var num = '2011'; var out = num ++1; alert(num); // i want this output: 2012 })...
javascript jquery
[3, 5]
5,244,264
5,244,265
Create multiple labels on fly in asp.net
<p>I want to create multiple labels on fly based on the number entered by user. For example if user writes 10 in textbox, 10 labels should be created with id label1 - label10 and i want to put separate text in those labels. Any idea how to do it in asp.net with c# sharp code ?</p>
c# asp.net
[0, 9]
5,923,454
5,923,455
Dynamically add some text and text boxes to existing web page
<p>I am trying to create a number of text boxes with specific captions in front of each text box, dynamically.</p> <p>I want the actual jquery code to create the textboxes and labels to lie within the following for loop---</p> <pre><code>function addelements(){ jQuery('&lt;form action="test" id="data-form" name=...
javascript jquery
[3, 5]
2,401,841
2,401,842
jQuery select all elements with a common class
<p>I want to handle a click event across a set of links so tried to approach this by adding a secondary class like following:</p> <pre><code>&lt;a href="..." class="foo external"&gt;Test 1&lt;/a&gt; &lt;a href="..." class="bar external"&gt;Test 2&lt;/a&gt; &lt;a href="..." class="car external"&gt;Test 3&lt;/a&gt; &lt;...
javascript jquery
[3, 5]
2,108,718
2,108,719
Scroll to a specific position on a page using Javascript / Jquery
<p>It is possible to move to a certain position on a page using #elementId. How can I do the same thing using Javascript / Jquery. When a JS function is called, I want to scroll to the specific position on that page.</p> <p>Thanks in advance.</p>
javascript jquery
[3, 5]
3,856,820
3,856,821
How can I add a script as code?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/148441/how-can-i-get-the-content-of-the-file-specified-as-the-src-of-a-script-tag">How can I get the content of the file specified as the ‘src’ of a &lt;script&gt; tag?</a> </p> </blockquote> <p>I want to print ...
javascript jquery
[3, 5]
5,925,475
5,925,476
javascript refreshing images every 5 seconds crashes web browser?
<p>I have a simple javascript code in an html page, refreshing an image every 5 seconds:</p> <pre><code>function refresh() { var unique = new Date(); document.images.EdwinImage.src = "http://192.168.0.125:8002/img?width=800&amp;height=480&amp;rnd=" + unique.getTime(); } </code></pre> <p>This code works fine o...
javascript android
[3, 4]
817,060
817,061
Problems Installing Android SDK
<p>I have had to install Java and Android on my new machine. I've downloaded <code>jdk1.6.0_27</code>. It's installed in C:\Program Files\Java\jdk1.6.0_27. </p> <p>I've set the classpath env var to C:\Program Files\Java\jdk1.6.0_27\lib and the path var to C:\Program Files\Java\jdk1.6.0_27\bin. in cmd java - version ...
java android
[1, 4]
1,928,212
1,928,213
jquery dynamic <tr><td>
<p>My webpage shows a list of 200 products. The user can use buttons to show and hide products. I would like to display 2 products per row. The problem is that the product may need to be on the left or right depending on what products are being shown.</p> <p>Here is a basic JSFiddle to use as a starting point to ex...
javascript jquery
[3, 5]
1,237,759
1,237,760
C# ASP.NET PostBackUrl to an anchor
<p>I have this link button here</p> <pre><code>&lt;asp:LinkButton ID="lnkButton" CssClass="Button" runat="server"&gt;Link Text&lt;/asp:LinkButton&gt; </code></pre> <p>and I am assign it a PostBackURL in my code behind like so</p> <pre><code>lnkButton.PostBackUrl = "#video"; </code></pre> <p>but its not going to an ...
c# asp.net
[0, 9]
4,794,874
4,794,875
jQuery slicing and click events
<p>This is probably a really simple jQuery question, but I couldn't answer it after 10 minutes in the documentation so...</p> <p>I have a list of checkboxes, and I can get them with the selector <code>'input[type=checkbox]'</code>. I want the user to be able to shift-click and select a range of checkboxes. To accompli...
javascript jquery
[3, 5]
2,517,331
2,517,332
How can I change the image url of an image based on #var=test variable?
<p>I'm trying to change an image's imageurl on an aspx asp.net c# page based on a variable from #var=1` (or 2, or 3, or 4)</p> <p>I know nothing about javascript unfortunately which is what I've been told I need. Can anyone point me at a novice based script I can try to learn via implementation?</p>
c# javascript asp.net jquery
[0, 3, 9, 5]
309,280
309,281
Print both in Android and pure Java
<p>How to print both to Log.e/d/etc. and to System.out/err/etc.? I have some code that I test on desktop and sometimes I use it on Android and I want to see logs there too.</p>
java android
[1, 4]
772,760
772,761
Page.User.Identity.Name returns empty string
<p>For some Page.User.Identity.Name always returns an empty string. Any ideas. I simply want to print it to the screen. IIS is set for integrated windows security.</p> <p>Response.Write("Name = " + Page.User.Identity.Name);</p> <p>Oops just noticed i hadnt set authentication to windows auth. Silly me</p>
c# asp.net
[0, 9]
3,760,043
3,760,044
jquery returns two objects when only one exists
<p>given this HTML,</p> <pre><code>&lt;div id="dd_container" class="dd dd_container"&gt; &lt;ul class="dd_deploy"&gt; &lt;li class="dd_deploy"&gt; more options &lt;/li&gt; &lt;/ul&gt; &lt;ul class="dd"&gt; &lt;li class="dd"&gt; el1 &lt;/li&gt; &lt;li class="dd"&gt; el2 &lt;/li&gt; ...
javascript jquery
[3, 5]
4,638,109
4,638,110
How to convert dateTime format in javascript
<p>How i could convert datetime <code>5/8/2011 12:00:00 AM</code> (m/d/yyyy) to dd-MMM-yyyy like <code>08-May-2011</code> in javascript.</p>
javascript asp.net
[3, 9]
1,753,962
1,753,963
Is dynamic is same as Object
<p>In "CLR via C#" book it's mentioned that dynamic keyword corresponding FCL type is System.Object. please clarify this .</p>
c# asp.net
[0, 9]
3,056,446
3,056,447
Which is the best file upload plugin for jquery?
<p>Which is the best file upload plugin available for jquery? I've read many problems occur with uploadify (the session id, etc) is not passed and it is not so much interoperable with SSL. If this is true which is the best file upload plugin for jquery?</p> <p>Thanks in advance:)</p>
jquery asp.net
[5, 9]
26,804
26,805
jQuery image gallary plugin
<p>I need to put image gallery jQuery similar to this, <a href="http://www.webdesign-flash.ro/p/html5_galery1/skinBlue.html" rel="nofollow">http://www.webdesign-flash.ro/p/html5_galery1/skinBlue.html</a> or can be better than this.</p>
javascript jquery
[3, 5]
3,645,136
3,645,137
AJAX Closures and targeting 'this'
<p>In the code example below the success callback function logs 'input#04.update' four times rather than each individual input, which makes sense seeing how closures work but how would I go about targeting each individual input using this. </p> <pre><code>&lt;input type="text" name="" id="01" class="update"&gt; &lt;in...
javascript jquery
[3, 5]
5,576,589
5,576,590
Replace Placeholder In Paragraph With Text Block jQuery
<p>I'm working on a snippet that will allow me to replace the placeholder in a paragraph with a text block of links. So it should look like this: <br /></p> <pre> Lorem Ipsum Some Text weird sound happy ever after funny </pre> <p>So ...
javascript jquery
[3, 5]
3,707,948
3,707,949
How to cache/save custom class object in Android?
<p>I want to save <code>ArrayList&lt;CustomClass&gt;</code>-object to somewhere in Android storage to retrieve quickly and display data in it.</p> <p>Is this possible or not? If yes, then which technique will be suitable, SQLite or external storage?</p>
java android
[1, 4]
318,727
318,728
Jquery-Binding each function with Live event does not work
<p>I have function </p> <pre><code>$('table tr:gt(0)').each(function() { if ($('td:contains("'+ pointName +'")', this).length == 0) $(this).hide(); }); </code></pre> <p>i want this function to be bind with live(). </p> <p>i have tried something like this which couldn't work.</p> <pre><code> $('table tr:gt(0)').live...
javascript jquery
[3, 5]
3,675,761
3,675,762
base64 encode audio file and send as a String then decode the String
<p>I have been stuck on this issue for a few hours now trying to get it working. Basically what I am trying to do is the following. Base64 encode an audio file picked up from an sdcard on an Android device, Base64 encode it, convert it into a String and then decode the String using Base64 again and save the file back t...
java android
[1, 4]
2,217,582
2,217,583
Custom events vs callbacks for jQuery plugins
<p>What is better architectural solution for my own plugins to give ability to extend them -- callbacks (like many other plugins do) or custom events?</p>
javascript jquery
[3, 5]
4,139,852
4,139,853
Retrieving and displaying dynamic content from SQL database into ASP.NET pages
<p>I am currently working on the development of news portal website in asp.net. I have created a table in sql server 2008 with parameters (NewsId, NewsTitle, NewsDetails, NewsCategory). I am now able to dynamically retrieve the NewsTitle from the database and displaying it in my aspx page. Now I want to pass the NewsI...
c# asp.net
[0, 9]
1,122,644
1,122,645
Textbox enter, invokes linkbutton in firefox, not in IE
<p>i have a textbox on my form with a linkbutton next to it. the textbox' id is textbox1 and the linkbutton is lbSearch</p> <p>in the page_load event i add:</p> <pre><code> this.TextBox1.Attributes.Add("onkeydown", "if(event.which || event.keyCode) { if ((event.which == 13) || (event.keyCode == 1...
asp.net javascript
[9, 3]
3,131,868
3,131,869
Can i Create the Paging user control for gridview?
<p>Hi please give me idea or reference to create Paging User control.</p> <p>Thank You very much in advance.</p>
c# asp.net
[0, 9]
642,554
642,555
CS0234 Error on runtime, for classes in the same assembly
<p>We have an ASP.NET 4 Web Application Project. This project contains a number of pages. After having made some changes I get an error at runtime (ASP.NET Compile time) that this or that namespace cannot be found.</p> <p>At design time (in Visual Studio 2010) there is no problem for Intellisense to see these namespac...
c# asp.net
[0, 9]
1,090,692
1,090,693
How can I make this jQuery "shrink text" function more efficient? With binary Search?
<p>I've built jQuery function that takes a text string and a width as inputs, then shrinks that piece of text until it's no larger than the width, like so:</p> <pre><code>function constrain(text, ideal_width){ var temp = $('.temp_item'); temp.html(text); var item_width = temp.width(); var ideal = parseInt(ideal_wi...
javascript jquery
[3, 5]
5,852,349
5,852,350
dblclick not working as expected
<p>II have some code here <a href="http://jsfiddle.net/ggHwH/" rel="nofollow">http://jsfiddle.net/ggHwH/</a> that increases a box border by 1px each time an UP button is pressed and decreases the border by 1px each time a DOWN button is pressed. Now I'd like to sense a double-click on the down button and have that red...
javascript jquery
[3, 5]
4,696,704
4,696,705
How to add jQuery in JS file
<p>I have some code specific to sorting tables. Since the code is common in most pages I want to make a JS file which will have the code and all the pages using it can reference it from there. </p> <p>Problem is: How do I add jQuery, and table sorter plugin into that .js file?</p> <p>I tried something like this:</p>...
javascript jquery
[3, 5]
4,256,368
4,256,369
Problem while inserting html control in my database in Asp.Net
<p>My problem is that I'm inserting HTML control using Server.HtmlEncode() method <code>&lt;a href=''&gt;Apply now!&lt;/a&gt;</code> in my database through text box but whenever I'm inserting it throws an exception. </p> <p>My Code is Here</p> <pre><code>textbox1.text=Server.Server.HtmlEncode("`&lt;a href=''&gt;Appl...
c# asp.net
[0, 9]
5,248,420
5,248,421
jQuery Tooltip not working with detach(), appendTo, etc?
<p>I'm trying to use this jQuery Tools <a href="http://flowplayer.org/tools/tooltip/index.html" rel="nofollow">ToolTip widget</a>.</p> <p>It works great in a situation like this:</p> <pre><code> ... &lt;a id="A1"&gt;trigger&lt;/a&gt; &lt;script&gt; $(document).ready(function () { $("#trigger").tooltip...
javascript jquery
[3, 5]
845,408
845,409
jQuery - Many toggle sliders, only one visible at the time
<p>I have four jquery sliders in a page with these scripts:</p> <pre><code>$(document).ready(function(){ $("#information").click(function(){ $("#information_show").slideToggle("medium"); }); }); $(document).ready(function(){ $("#menu").click(function(){ $("#menu_slide").slideToggle("medium"); }); }); ...
javascript jquery
[3, 5]
2,512,118
2,512,119
how to make a jquery hint password with asterisks
<p>example: <a href="http://jsfiddle.net/na2tD/" rel="nofollow">http://jsfiddle.net/na2tD/</a></p> <p>currently the password is not asterisks as 'type' for password text field needs to be type="text" so it cannot be changed to type="password" which is needed if i want asterisks. How do I get both jquery hint and aste...
javascript jquery
[3, 5]
4,568,147
4,568,148
Splitting code in to multiple files for easier management
<p>I am currently using jQuery to write an online application, that started off with a couple of lines of code, and have quickly now become over a 1000 lines.</p> <p>My code's structure is simple. I have a window.load which wraps my javascript, and inside it I start adding my click event handlers, and the various func...
javascript jquery
[3, 5]
4,343,330
4,343,331
Paul Irish 'duck punching' pattern question
<p>Had a question about the 'duck punching' pattern I first encountered on Paul Irish's blog. I get the general premise... save a ref to an existing function, then replace the existing function with a conditional branch that will call a new function if condition is met, or the old version if not. My question is why ...
javascript jquery
[3, 5]
2,249,247
2,249,248
Accessing individual array elements using jQuery each()
<p>I can't seem to find the answer for this but how can you access an individual array element by it's index number in jQuery's each method?</p> <p>Stright JS would do it like this:</p> <pre><code>for(i=0; i&lt;myArray.length; i++) { if(i === 1) { // do something } } </code></pre> <p>But I ca...
javascript jquery
[3, 5]
1,663,323
1,663,324
setting a background connection to a site
<p>i am doing a application now that is able to read a message from a site</p> <p>now i am doing the part on deleting a message via a link</p> <p>the text is stored on <a href="http://www.example.com/test/file.txt" rel="nofollow">http://www.example.com/test/file.txt</a> i have a php script on <a href="http://www.exam...
java android
[1, 4]
4,683,439
4,683,440
Using FontSelector to change font family
<p>I am using jQuery font selector plugin posted here</p> <p><a href="http://www.fullfatcode.com/2011/04/10/jquery-font-selector-version-2/" rel="nofollow">http://www.fullfatcode.com/2011/04/10/jquery-font-selector-version-2/</a></p> <p>It's all good, except, I want to do something when the actual font is selected. A...
javascript jquery
[3, 5]
436,578
436,579
Animating list item with more efficiency
<p>I want to bump up a li on hover and let it get to original state when the mouse leaves. This works but does the hover animat(up) another time when the mouse is leaving which gives me a delay and inefficient code. Do you guys have some suggestions for me to make this more efficient?</p> <pre><code>function HoverList...
javascript jquery
[3, 5]
665,142
665,143
TinyMCE Editor: A potentially dangerous Request.Form value was detected from the client
<p>I have aspx in that I am calling a ascx user control in that i am using tinymce editor. When I am trying to save data i am getting the error..</p> <p>A potentially dangerous Request.Form value was detected from the client (UserControl1$TextBox1="<p>fgh</p><p>fghj <p>I already check <a href="http://stackoverflow.co...
c# asp.net
[0, 9]
4,674,413
4,674,414
Why does Android use Java?
<p>OK, this should really be asked to someone from Google, but I just want other opinion.</p> <p>Even Android supports Native code applications, the main development tool is Java. But why? I mean, isn't it too slow to interpret code on a mobile device? when introducing Froyo, Google said that new JIT compiler can achi...
java android
[1, 4]
4,983,760
4,983,761
export a list of table to CSV file
<p>I am trying to export a list of table to comma-separated value(CSV) .but not getting the correct output .output coming from this code is in the form of html table. Here is my code,Help Me .... Thanks</p> <pre><code> public void ExportToCsv() { DataClassesDataContext db = new DataClassesDataContext...
c# asp.net
[0, 9]
2,628,633
2,628,634
Using Regex to remove anything within "<!--" and "/-->"
<p>Hey guys, I have a string like this:</p> <blockquote> <p>Something useful (<strong>less than sign</strong>)!--?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /--(<strong>greater than sign</strong>) Other useful stuff</p> </blockquote> <p>I need to remove anything within the "". Is th...
c# asp.net
[0, 9]
3,945,719
3,945,720
saving the canvas as a jpg
<p>Want to save the current state of my canvas as a picture, jpg file, how do u do this? </p>
java android
[1, 4]
851,978
851,979
Image animation keeps requesting the images
<p>I test the code in IE7, FF, Chrome, Safari and this problem occurs in Firefox only.</p> <p><strong>I have checked that the problem only occurs in FF 3.5.x, but not FF 3.0.x.</strong></p> <p>I want to make an image animation which has 10 images in total.</p> <p>Currently, I use the following code to do it:</p> <p...
javascript jquery
[3, 5]
2,530,843
2,530,844
Getting all HTML elements in the DOM where an attribute name starts with some-string
<p>I've stumbled upon a tricky one, that I haven't been able to find any references to (except one here on Stackoverflow, that was written quite inefficiently in Plain Old Javascript - where I would like it written in jQuery).</p> <p><strong>Problem</strong></p> <p>I need to retrieve all child-elements where the <str...
javascript jquery
[3, 5]
107,678
107,679
How to access Parent from child in JS
<p>I want to access an object's own function from a jQuery method which fails.</p> <pre><code>function obj(){ this.send = function(){ $.get("send.php",null,function(data){ this.success(); }).error(function(){ this.fail(); }); } this.fail = function(){ alert("fail"); ...
javascript jquery
[3, 5]
3,189,927
3,189,928
How to get Host IP address in android?
<p>Q:-Now a days I am facing problem in getting IP address of android device using programming. Can any one give ma a code for solving that problem. I have already read lot of thread about it but not getting solid answer from that. Please give me any suggesting about it its appreciated. Thanks in advance. </p>
java android
[1, 4]
2,632,669
2,632,670
Jquery - multiple checkbox and multiple textbox
<p>I have 4 check box when i select anyone of the check box need to display the respective check box and text box.</p> <p>input type="checkbox" id="acheck[]" value='name' </p> <p>input type="textbox" id="productfield" value=' '</p> <p>jquery Code:</p> <pre><code> $(document).ready(function(...
javascript jquery
[3, 5]
1,404,045
1,404,046
Why do for loop executes before Jquery Selector in this code?
<p>In the code below the <code>for</code> loop executes always first, the jQuery selector comes later. But I want to run this for loop after changing the value of the selected sliders.</p> <pre><code>$('div[name="FirstSliderselector"]').slider('value', $("#MasterSlider").slider("value")); var FirstSliders = $('div[nam...
javascript jquery
[3, 5]
4,820,932
4,820,933
Sort Arraylists according to Dates with particular format
<p>I have a problem that I want to sort multiple Arraylists with respect to Date Arraylist with a format as: 2011-07-18T10:39:32.144Z. How to that in java? Can anyone Help me out?</p> <p>Thanks in advance.</p>
java android
[1, 4]
3,511,548
3,511,549
Need help understanding code
<p>hi all i am new in jquery</p> <p>this code in book jQuery in action page 219</p> <p>why he use <code>.end()</code> method </p> <p>and thanks :)</p> <pre><code>(function($){ $.fn.setReadOnly = function(readonly) { return this.filter('input:text') .attr('readOnly',readonly) .css('opacity', readonly ? 0.5 : 1.0) .e...
javascript jquery
[3, 5]
3,139,246
3,139,247
How to use the ajax() function in JQuery?
<p>In my javascript file I have the following:</p> <pre><code>&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $.ajax({ type: 'post', url: 'script.php', data: '', success: function(output)...
javascript jquery
[3, 5]
953,372
953,373
Display 'Accept digital certificate' prompt using PHP and Javascript
<p>I'm developing a GIS: a web client to see some maps loaded from OGC servers.</p> <p>The user can switch between use HTTPS connections and HTTP to load the maps, so I want to include some link to provide this funcionallity (because some maps can be loaded from an HTTPS url like this <a href="https://serverurl/ogc/" ...
php javascript
[2, 3]
2,890,327
2,890,328
JavaScript compatibility issue in chrome
<p>I am using the javascript code for print that is working fine in IE and Firefox but not working good in Chrome. Any one have some idea. My code is below:</p> <pre><code>$(document).ready(function() { $("#hrf1").click(function() { var win = window.open(); self.focus(); win.document....
javascript jquery
[3, 5]
330,023
330,024
Is it possible to intercept/handle/parse the HTML inside of the body tags before the browser?
<p>I'm wondering if it is at all possible to take whatever is inside of the tags, run it through Javascript and manipulate it before throwing it back for the browser to then parse.</p> <p>I'm sure it can be done, however it may not be as straightforward as I am suggesting.</p> <p>For instance, is there a way for the...
javascript jquery
[3, 5]
3,804,205
3,804,206
DropDownList selected value set using jQuery is lost after page postback
<p>DropDownList selected value set using jQuery is lost after page postback. My question is how do I retain the value changed/selected using jQuery after the page postback? Please note that I have disabled my DropDownList on the client before posting back and my forms submitdisabledcontrols property set to true declara...
jquery asp.net
[5, 9]
1,043,377
1,043,378
Keep a JavaScript variables value after a page refresh?
<p>i am working with one project in which variable is assigned a value i need that value when browser is refreshed.Is there any way get that value? </p>
javascript jquery
[3, 5]
3,972,180
3,972,181
embedded javascript that is based on jQuery
<p>I'm building a service that allows people to put a javascript code I gave them to their site. The javascript code is based on jQuery.</p> <p>My question is how to do this to be safe and optimized, cause I don't want to break certain users website.</p> <p>The thing I'm looking for so far( you can update if you thin...
javascript jquery
[3, 5]
3,582,522
3,582,523
Checking radio group either empty/null
<p>I want to check in android that radiogroup is empty or null i.e submitted without clicking on any radio button in that group??</p> <p><strong>Xml Code</strong></p> <pre><code>&lt;RadioGroup android:id="@+id/lift" android:layout_width="match_parent" android:layout_height="match_...
java android
[1, 4]
2,246,456
2,246,457
Is it possible to do this using java on android?
<p>How can I include this code snippet within each activity without explicitly copy and pasting the code in each activity? For example can I just place it in one place and all other activities would Reference this piece of code?</p> <pre><code> @Override public boolean dispatchTouchEvent(Moti...
java android
[1, 4]
1,313,203
1,313,204
Getting the width of an html element in percent % with jQuery
<p>If i <code>alert</code> the element which has a css selector set to <code>width:100%</code> I get it's with in <code>px</code>, does exists some way to get it in <code>%</code> as set from css, I need it to fix some script with fluid layouts;</p> <pre><code>// css .my-element { width:100%; } // javascript aler...
javascript jquery
[3, 5]
5,046,152
5,046,153
how to eliminate space in forms in php
<p>how can i prevent a form to be submitted when it only contains a space? for example a user presses the space bar on a field, the space will be considered as a character so the forms submits. how can i prevent that in php?</p>
php javascript
[2, 3]
2,257,139
2,257,140
jQuery hide() works, but show() does not
<p>I'm having trouble getting this script to work.</p> <pre><code> &lt;asp:DropDownList CssClass="workUnit" Width=80 ID="dropdownWorkUnit" runat="server" Visible="false" _clientId="comboboxWorkUnit" /&gt; </code></pre> <p>For some reason, the combobox will not become visible when I run this JavaScript.</p> <pre><co...
jquery asp.net
[5, 9]
845,099
845,100
Shift focus with arrow keys in JavaScript
<p>I want to be able to navigate through all the focusable elements on my webpage with the arrow key. So when the down-key is pressed the focus should shift to the focusable element beneath the current focussed element. You get the idea for the other arrow keys, when there is not a focusable element to shift to, the fo...
javascript jquery
[3, 5]
5,143,293
5,143,294
JQuery Check All/ Uncheck All not working on ASP.NET
<pre><code>$(document).ready(function() { $('#chkRFI').click( function() { $("INPUT[type='checkbox']").attr('checked', $('#chkRFI').is(':checked')); }); }); &lt;div class="grid_3"&gt; &lt;div class="box"&gt; &lt;div class="boxheader"&gt; ...
c# jquery asp.net
[0, 5, 9]
5,391,375
5,391,376
How to make callback from AsyncTask to fragment Activity?
<p>I have requests to web service implemented using AsyncTask. Normally callback to Activity i do using interface:</p> <pre><code>public interface AsyncTaskComplete&lt;T&gt; { public void onTaskComplete(T result); public void onTaskFailed(T result); } </code></pre> <p>In AsyncTask:</p> <pre><code>private A...
java android
[1, 4]
5,461,647
5,461,648
Switched from singleton to application object, still getting null pointer exceptions
<p>I switched from a singleton to an application object to store application data because as I understood it, there was a much better chance of my cached data surviving in an application object, than in a regular singleton. </p> <p>I am still having issues however. If I switch to several other apps, and come back to...
java android
[1, 4]
4,518,871
4,518,872
how dynamically Delete or reset an element from a javascript object
<p>I am trying to delete an object from its parent object without success... When i use 'delete' directly it works, but when i am in a loop over multile objects, i can't get it to work? What am i doing wrong in that $.each loop below:</p> <pre><code>&lt;script&gt; rc = { oc: { 'Amt': 30, 'mpA': 3000, 'ipP': 1, 'ppP'...
javascript jquery
[3, 5]
1,745,702
1,745,703
Are those dangerous idioms/usages in C++ avoidable in C#?
<p>In this Herb Sutter's article '<a href="http://www.gotw.ca/publications/advice97.htm" rel="nofollow">Write What You Know, and Know What You Write</a>', he warns about the dangerous idioms in C++.</p> <pre><code>T&amp; T::operator=( const T&amp; other ) { if( this != &amp;other ) { this-&gt;~T(); new (th...
c# c++
[0, 6]
3,991,704
3,991,705
Binding a TreeView control
<p>I am using ASP.NET and C# to bind a tree view control in my application. The following code is used in WinForms, but it's not working in WebForms. Can someone help to convert this to WebForms?</p> <pre><code>private TreeNode AddNode(TreeNode node, string key) { if (node.Nodes.ContainsKey(key)) { ret...
c# asp.net
[0, 9]
4,479,260
4,479,261
Mappath and FileStream in external class doesn not work correctly on server
<p>This is my code that is written in a class in a sub-folder of a main directory:</p> <pre><code>string c = global.RandomCode(32) + "." + ext; using (FileStream fs = new FileStream(HttpContext.Current.Server.MapPath(@"..\adimgs\"+c),FileMode.CreateNew,FileAccess.Write)) { byte[] a = Convert.FromBase64String(img);...
c# asp.net
[0, 9]
3,096,986
3,096,987
How to access Hidden Field of Parent page from child page
<p>In my ASP.NET main page I have one hidden field and and one button. When the user clicks the button I am showing the pop up (child page). I need to access a Hidden field while the pop up is loading. How could I access the Hidden field using c#?</p>
c# asp.net
[0, 9]
3,468,845
3,468,846
Check if checkbox is checked
<p>Why does the following code not work?</p> <p><strong>Example:</strong> <a href="http://jsfiddle.net/ZZe5X/18/" rel="nofollow">http://jsfiddle.net/ZZe5X/18/</a></p> <pre><code>$('.submit').submit(function () { e.preventDefault() if ($('input[type="checkbox"]').is(':checked')) { alert('ok') } els...
javascript jquery
[3, 5]
4,388,818
4,388,819
Is there anything I can do to optimize the tab loading in javascript?
<p>My colleagues have create a website and there is a webpage which contains a Tab. He Implement the tab with the following method: </p> <p>1.Load all content of the page<br> 2.Use javascript to display those group content as block and organize them into tabs.<br> 3.when user click one tab, then acitve it, and hide a...
javascript asp.net
[3, 9]
5,042,981
5,042,982
javascript jquery checkbox
<p>I'm working on a piece of JavaScript. I'm completely new to JS, But I have a group of checkboxes part of the domainchkb class and with the name, all with different values. I am trying to group those into an array to format into JSON. When executing the code the debugger stops at <code>return this.parent().text();</c...
javascript jquery
[3, 5]
4,978,710
4,978,711
Can set the div content with jquery
<p>Why can't I put dynamic text on a div called foo? The following is on a metho in the asp.net codebehind.</p> <pre><code>StringBuilder script = new StringBuilder(); script.Append("&lt;script type='text/javascript'&gt;"); script.Append(" $(document).ready(function () {")...
c# javascript jquery asp.net
[0, 3, 5, 9]
1,875,338
1,875,339
javascript / jquery - map a range of numbers to another range of numbers
<p>In other programming languages such as processing, there is a function which allows you to convert a number that falls within a range of numbers into a number within a different range. What I want to do is convert the mouse's X coordinate into a range between, say, 0 and 15. So the browser's window dimensions, while...
javascript jquery
[3, 5]
3,616,988
3,616,989
Pass uploaded file as a parameter to javascript method
<p>I am passing the uploaded file as a parameter in the JavaScript method. Then Firebug is throwing error like <code>SyntaxError: illegal character</code>.</p> <pre><code>&lt;input type="file" id="fileUpload" name="employerLogoUpload" /&gt; &lt;a id="_fileUploadLink" href="#" onClick="javascript:ajaxFileUpload(" +doc...
javascript jquery
[3, 5]
1,987,671
1,987,672
Javascript confirmation or other type of confirmation
<p>Hello I have a c# application that has a button "Submit" and in the code behind i am evaluating some stuff when it is clicked. But now, I have a FileUpload in the same page, the one that comes with the standard "Browse" button which I can not code against (and company rules, can not change it to a regular button).</...
c# javascript jquery asp.net
[0, 3, 5, 9]
5,081,785
5,081,786
target both android and iphone
<p>I want to develop an application targeting both android and iphone. I guess they use Java and Objective-C. Can I use single language like Python? Is it the best route? Will I lose performance, features, etc. by using Python. Are there any limitations that I will run into?</p>
iphone android python
[8, 4, 7]
3,704,389
3,704,390
Is there a Util to convert US State Name to State Code. eg. Arizona to AZ?
<p>I need to convert full state name to its official state address code. For example from the String New York, I need to produce NY. Now I could put this all in a hashmap, but it seems there must be a utility for this? I am in an Android environment. I don't want to import a large library just for this one util howe...
java android
[1, 4]
520,380
520,381
How do I get URL query parameters into an object literal?
<p>When looking at location.search, what's the best way to take the query parameters and turn them into an object literal? Say I've got a URL that looks like this:</p> <blockquote> <p><a href="http://foo.com?nodeId=2&amp;userId=3&amp;sortOrder=name&amp;sequence=asc" rel="nofollow">http://foo.com?nodeId=2&amp;userId=...
javascript jquery
[3, 5]
3,397,366
3,397,367
Need to save a high score for an Android game
<p>It's quite simple, all I need to do is save a high score (an integer) for the game. I'm assuming the easiest way to do this would be to store it in a text file but I really have no idea how to go about doing this.</p>
java android
[1, 4]
2,131,282
2,131,283
class and interface
<p>I wonder 3 things.</p> <p>1: If I have implemented an interface (with a method) in a superclass where im declaring that method, and then I extend that superclass in another class. Then I don't have to redeclare that method right?</p> <p>2: But if I don't declare that method in the superclass but in the child class...
java php
[1, 2]
432,312
432,313
how to fill navigation bar dynamically using jquery
<li>Home </li> <li>Company <li>Departments</li> <li>Users</li> <li>Departments</li> <li>Page Info</li> <li>Agreements</li> <li>Inquiries</li> </li> <p>HOME and Company are the li's under main ul,and Company has Departments...
jquery asp.net
[5, 9]
4,634,282
4,634,283
how to pass a php values to javascript?
<p>here is the code??</p> <p>posting code:</p> <pre><code>$.post('get.php',{selected:"aaaa"},function(return){alert(return);}); </code></pre> <p>when i check the values of "selected" value using </p> <pre><code>&lt;?php $r=$_POST['selected']; echo $r; ?&gt; </code></pre> <p>is displays the value "aaaa" correctly...
php javascript jquery
[2, 3, 5]
2,586,297
2,586,298
Path Problem in ASP.net
<p>Hi I am trying to do the following I am building asp.net website with c# language I want to read a text file from my project(the file is inside the project) I tried to get the file Path by this way :</p> <pre><code>string path=Request.PhysicalApplicationPath+"filename.txt"; </code></pre> <p>but I can't use The "R...
c# asp.net
[0, 9]
48,913
48,914
Updating Android Application
<p>I was wondering if there is a way I can update my Android application which is not listed on the Android Market. I mean, maybe thorough my website? Any ideas? Many Thanks!</p>
java android
[1, 4]
3,742,076
3,742,077
perform function after x number of calls with setInterval
<p>In <a href="http://stackoverflow.com/a/2956980/1252748">this article</a>, the following function is given to perform an operation <em>x</em> times with setInterval()</p> <pre><code>setIntervalX(function () { animateColor(); //or something }, 3000, 4); function setIntervalX(callback, delay, repetitions) { ...
javascript jquery
[3, 5]
310,927
310,928
Ajax jquery returns blank page
<p>I have this JavaScript code:</p> <pre><code>$(document).ready(function(){ $('#sel').change(function(){ $.ajax({ type: "POST", url: "modules.php?name=TransProject_Management&amp;file=index", data: "&amp;op=index_stat&amp;stat="+$...
php jquery
[2, 5]
622,960
622,961
Why does this simple JQuery code throw an error?
<pre><code>&lt;script type="text/javascript"&gt; $(function(){ for(var i=0;i&lt;7; i++){ var guy_html = '&lt;div class="aname"&gt;&lt;input type="text" class="chatter_input autofriend" name="guy'+String(i) + '" /&gt;&lt;/div&gt;'; $("div#guy_boxes").append(guy_html); } })...
javascript jquery
[3, 5]