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
2,078,229
2,078,230
SimpleWeather jquery plugin
<p>I'm playing with the SimpleWeather jquery plugin, on an asp.net page and its working fine. <a href="https://github.com/monkeecreate/jquery.simpleWeather" rel="nofollow">https://github.com/monkeecreate/jquery.simpleWeather</a></p> <p>I just have 2 questions:</p> <ol> <li><p>I get the times in AM and PM, is there so...
jquery asp.net
[5, 9]
2,215,097
2,215,098
jquery, continue the reading after html() call
<p>The following Javascript code:</p> <pre><code>o_value.html(); </code></pre> <p>give me</p> <pre><code>&lt;span id="legaloffice_city_value"&gt;some text&lt;/span&gt; </code></pre> <p>All that I want now is to modify, javascript code, to just get: <code>legaloffice_city_value</code>. What can I do?</p>
javascript jquery
[3, 5]
1,768,857
1,768,858
jquery: is there a concise way to conditionally use a 2nd selector if a 1st selector comes back empty?
<p>In python, I can do the following, to conditionally use a 2nd list if a 1st one is empty:</p> <pre><code>&gt;&gt;&gt; x = [ ] or [1, 2] &gt;&gt;&gt; x [1, 2] </code></pre> <p>In javascript, however,</p> <pre><code>&gt;&gt;&gt; x = [ ] || [1, 2]; [ ] </code></pre> <p>So, if the "or trick" is off the table, I'm wo...
javascript jquery
[3, 5]
4,701,602
4,701,603
Difference between console.log enabled verification
<p>I have seen <code>jquery-ui-1.8.11.js</code> verify <code>console.log</code> functionality by doing</p> <pre><code>if (this.debug) console.log() </code></pre> <p>I have also seen people define an anonymous function that is a no-op for browsers with no console logging like IE7.</p> <pre><code>if(typeof console ...
javascript jquery
[3, 5]
335,255
335,256
What are my options to get all the necessary data using javascript and/or jQuery for the following scenario?
<p>I'm not sure how to best word this, so I'll give it a shot and hopefully revise it as it comes to me.</p> <p>Using javascript/jQuery, let's say I want to get some data from a clicked element to a function for processing. A couple of options:</p> <p>OPTION 1:</p> <pre><code>$('.classOfInterest').click(function() ...
javascript jquery
[3, 5]
200,054
200,055
Name convention Controls on Forms Tips
<p>I found out this article I would like share with you.</p> <p><a href="http://10rem.net/articles/net-naming-conventions-and-programming-standards---best-practices" rel="nofollow">http://10rem.net/articles/net-naming-conventions-and-programming-standards---best-practices</a></p> <p><a href="http://stackoverflow.com/...
c# asp.net
[0, 9]
2,511,496
2,511,497
Ball line collision
<p>In my Android game I detected the collision of a ball and line, but I don't know how to change ball velocity in relation with line angle.</p> <pre><code>if(ball.collidesWith(line)){ ball.nextTile(); ball.mPhysicsHandler.setAngularVelocity(65); float xvelo=ball.mPhysicsHandler.getVelocityX(); float y...
java android
[1, 4]
5,171,759
5,171,760
ASP.Net Multi image upload .net compatible commercial control
<p>We are currently planning on trying to allow a user to be able to select multiple images to upload to an ASP.NET website. Can anyone give me some suggestions as to which commercial and free controls which we can use?</p> <p>Requirements would be that:</p> <ul> <li><p>is browser independent (works on IE, Firefox, C...
c# asp.net
[0, 9]
1,298,346
1,298,347
How to disable a control in command field control in gridview
<p>how to find a command field control in the gridview.</p> <p>in a method not in the row data bound.</p> <p>so far i have used this coding but i cant find the control.</p> <pre><code>&lt;asp:CommandField ButtonType="Image" ShowEditButton="True HeaderText="Enter Leave" EditImageUr...
c# asp.net
[0, 9]
1,369,667
1,369,668
.change() not working in ie and when changed to .click() same issue
<p>My issue: This code works in firefox chrome and safari but not in IE 8. I had <code>.change</code> but i found out that it does not work in ie so i did <code>.click</code> and tried it again in all the browsers, all is working, try in ie still not working. The anythingSlider is a jquery library im using and i know f...
javascript jquery
[3, 5]
1,979,963
1,979,964
Getting jQuery to work with if statement
<p>I'm pretty new to jQuery so I'm trying to get working a small piece of code. I'm trying to create sort of an accordion menu. </p> <p>First, (after looking at some tutorials) I did something very similar to what I wanted:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $(".con...
javascript jquery
[3, 5]
5,449,235
5,449,236
Make PHP execute and communicate with a Java application on a web server
<p>I have a java application that will take the image as an input and output another image. I have a website with a popular host (PHP+MYSQL Hosting). I want to create a page on the website with PHP with a form where a user can upload an image which will then pass the image onto the Java application.</p> <p>What I am p...
java php
[1, 2]
2,850,711
2,850,712
Read value of an array - JAVA/Android
<p>The seems like it would be easy and basic but I just don't know enough about Java/Android and don't know how to get a specific value from an array. Do you have to iterate though it or can you just call the key/value pair or smth? Any example would be grateful.</p> <p>thanks e.g. </p> <pre><code>String[] x = Patte...
java android
[1, 4]
2,007,869
2,007,870
is it possible to find if someone views page source
<p>Is it possible to find any information about people who view the source of a web page ? Is it possible to perhaps have a javascript to detect a keystroke entered on your page ? </p>
php javascript
[2, 3]
1,060,205
1,060,206
How can I add a simple counter function in javascript jquery?
<p>I'm using Shadowbox a jquery overlay and I wanted to count how many people are actually using the overlay. Thus, I would need a function that would write a counter to a file or sending a query through a php api...</p> <p>has to be a a php url api because I cant use php on the server where the overlay is.</p> <p>So...
php javascript jquery
[2, 3, 5]
4,716,594
4,716,595
How to Replace <br\ /> tag
<p>We are developing a app. In which we getting a data from a json array . In that i want to replace a tag.But the emulator throws an error .Like Invalid Syntax . my code:</p> <pre><code>top=top.replaceall("&lt;br\/&gt;"," "); </code></pre> <p>Please help. Thanks In Advance</p>
java android
[1, 4]
4,194,761
4,194,762
How to convert date format to milliseconds?
<p>How to get the millisecond time from date? I have the following code. </p> <pre><code>Date beginupd = new Date(cursor1.getLong(1)); </code></pre> <p>This variable beginupd contains the format </p> <blockquote> <p>Wed Oct 12 11:55:03 GMT+05:30 2011</p> </blockquote> <p>Now how to convert this format to the mill...
java android
[1, 4]
4,518,067
4,518,068
javascript not execute at live
<p>I am using Visual Studio. My javascript is functioning if I debug it at local host, the function is very simple, photo change at mouseOver.</p> <p>But after I upload my file to my server, this function is not working. I have tried it on Chrome, Firefox, IE and Safari:</p> <pre><code>function mouseOver1() { var...
c# javascript
[0, 3]
4,175,556
4,175,557
alternatives to jquery animate?
<p>On hover I want my div to scroll down.</p> <p>I know i can use the <code>.animate({left: 0}, "slow");</code> but this doesnt go down but what else does jquery have to offer?</p> <p>Here is my jsfiddle: <a href="http://jsfiddle.net/WZvPk/4/" rel="nofollow">http://jsfiddle.net/WZvPk/4/</a></p> <p>hover over the sec...
javascript jquery
[3, 5]
1,468,818
1,468,819
How do update and redirect to previous page using javascript
<p>I have a news page in witch comments can be added. If i click a comment i go to a comment page where i can choose to delete the comment. If i delete the comment i want to go back to the news page and refresh the page so that the comments disapears.</p> <p>I tryed adding this but then the remove function was not rea...
c# javascript jquery asp.net
[0, 3, 5, 9]
5,105,349
5,105,350
How to turn php time function into javascript function?
<p>I'm not that good at javascript (yet), so I need some help, with an alternative version of this php script (In javascript)</p> <pre><code>function until($format = ""){ $now = strtotime("now"); $nextTuesday = strtotime("-1 hour next tuesday"); $until = $nextTuesday - $now; if(empty($format)){ ...
php javascript
[2, 3]
2,503,413
2,503,414
Cross-Page PostBack error when posted from one folder to another
<p>I'm getting the 'Object reference not set to an instance of an object.' error on PreviousPage after using PostBackUrl.</p> <p>I created a simple test page to recreate the problem, however it worked fine, until I moved the source and destination pages into different folders. Is this the reason the PreviousPage objec...
c# asp.net
[0, 9]
1,865,201
1,865,202
jQuery image manipulation
<p>I want to draw gridlines of varying frequency on top of a static image in jquery, any suggestions as to the best/easiest approach - thanks!</p>
javascript jquery
[3, 5]
1,208,285
1,208,286
jQuery .data() and plugins
<p>I am trying to use jQuery's .data() tool in a jQuery plugin but I'm getting some odd results. Here is a cut down version of my plugin with the relevant code:</p> <pre><code>(function( $ ){ var methods = { init : function( options ) { // Do some stuff this.data('name', 'New Co...
javascript jquery
[3, 5]
5,005,725
5,005,726
Website that allows me to properly run C++ code that uses cin?
<p>Is there a website where I can run Java or C++ code online that lets me use <code>cin</code> in c++? Codepad and many others just let you see your program but don't let the user provide input, and I wanted to know if I could find a website that allows that.</p> <p>Ideone doesn't seem to do the input right : This is...
java c++
[1, 6]
2,115,666
2,115,667
Why use callback in JavaScript, what are its advantages?
<p>Could someone explain, why do we use callback in JavaScript? I found examples, but they could be implemented by using the normal functions. What is the advantage of using it? I got answers to "how" to use it and not "why and when" do we need to use it.</p> <p>Typically, I found it being used in AJAX. on the <code>h...
javascript jquery
[3, 5]
406,311
406,312
Taking a Variable value from the code behind and use in aspx page
<p>I need to validate the textbox(quantity) where the data(quantity) from the database is stored in code behind and I have to validate the given input value with the variable value from the code behind so that the user cannot use more quantity then the value in database.</p>
c# asp.net
[0, 9]
492,685
492,686
Search list of objects
<p>I get a list of security groups a user belongs to as array of objects. I use DirectoryEntry to get active directory properties and one of the properties is "memberOf" (de.properties["memberOf"].value). The return values is an "array of objects". Each element of this array of objects look something like:</p> <pre><c...
c# asp.net
[0, 9]
5,204,009
5,204,010
jquery element not defined, but it used to skip it
<p>I recently transferred a site to a new host. Reloaded everything, and the javascript that worked fine before is breaking at an element it can't find. $('#emailForm') is not defined.</p> <p>Now, the #emailform isn't on the page, but it wasn't before either, and JS used to skip this and it would just work. Not sure w...
javascript jquery
[3, 5]
2,582,516
2,582,517
$(this).attr does not work
<p>With alert debug, the branch of if was executed. But the code tag that matched did not get the "data-language" attribute.</p> <pre><code>divs.html(function (index, oldhtml) { var newhtml = converter.makeHtml(oldhtml); var pat = /\{-# CODE (.+?) #-}/i; $('code', newhtml).text(function (index, text) { ...
javascript jquery
[3, 5]
1,413,355
1,413,356
Get an attributes value of the ALT attribute of a hyperlink
<p>My a-tag (link) contains innerHTML which is an image like this:</p> <pre><code>.innerHTML = &lt;img alt="hello world" src="/Content/Images/test.png"&gt; </code></pre> <p>How can I get the text of the <code>alt</code> attribute with JQuery?</p>
javascript jquery
[3, 5]
5,434,695
5,434,696
How to add a placeholder attribute if "value" field is empty
<p>Is there a way to add a placeholder attribute (placeholder tag, not "defaultvalue" and similar approaches) if you have an text input field that has "value" property empty?</p> <p>I have seen many similar questions here, but most of them use defaultvalue. I need placeholder tags and additionally I can't influence HT...
javascript jquery
[3, 5]
542,684
542,685
is it possible to retrive all values from local storage using php?
<p>is it possible to retrive the data from local storage using php?</p> <p>actually i can store form values in local storage by using sysphus, a jquery plugin. if it was possible, can you suggest a piece of code for retrieving the data from local storage using php only?</p>
php jquery
[2, 5]
2,393,485
2,393,486
What's the average line number per method/class?
<p>I'm interested what's the <strong>average</strong> line number per <strong>method or class</strong>. Programming language is <strong>JAVA</strong> and it's an <strong>Android</strong> project.</p> <p>I know there is no specific number, but I'm interested what's the <strong><em>good programming practice</em></strong...
java android
[1, 4]
4,462,524
4,462,525
Hide and then show div depending on screen height or scroll
<p>I am trying to write a script that basically shows a div if the screen height is greater than 750 but hides the div it is less than 750. However, if the screen is less than 750 but the user scrolls past 750, the div is made visible. Once div is made visible, in either case, it stays that way.</p> <p>My knowledge i...
javascript jquery
[3, 5]
620,340
620,341
div.Visible not executing before other code
<p>I am making a web app in asp.net using c# that collects a lot of information from http web services at one time. Since this data collection process takes 10-20 seconds, I want to display a small loading frame with a small rotating image.</p> <p>To make this happen on one page, I have a div called <code>loadingdiv<...
c# asp.net
[0, 9]
1,384,961
1,384,962
How to select the value of the label for a form field
<p>I'm stuck on this one. I'd like to grab the <strong><em>value of the label</em></strong> for a field to use it in an alert as part of a validation script. Here is my code:</p> <p>(The function is being called on the <code>onblur</code> event (<code>isFieldBlank(this)</code>).</p> <pre><code>function isFieldBlank(t...
javascript jquery
[3, 5]
5,634,264
5,634,265
How can i dismiss a function which is set by settimeout
<p>here if user second time clicks on the '#subject-class-switch the previous settimeout should dismiss how can i achive this</p> <pre><code>$('#switchsubjects').click(function(e) { i++; var x=$('#subject-class-switch').html(); if(i&lt;2) { $(this).append('&lt;ul id="dcl"...
javascript jquery
[3, 5]
5,207,004
5,207,005
Handling client Creation failiers
<p>I am creating a android client app to connect to my server using the following code</p> <pre><code>Socket socket = new Socket(MYIP, PORT); </code></pre> <p>When the server is available it works well , but when the server is not available i want to tell <strong>No server found.</strong> But unfortunately no any ex...
java android
[1, 4]
3,792,848
3,792,849
Does jquery makes the browser slow?
<p>I'm using jQuery in my web page. Will this make the web page to load contents slow?</p> <p>Using jQuery is advantage than JavaScript or not why?...</p>
javascript jquery
[3, 5]
1,839,755
1,839,756
how to append a div tag generated by jQuery dynamically with a javascript div tag element
<p>I want to append a div tag generated by jQuery dynamically with a javascript div tag element. My code looks like this:</p> <pre><code>$(".remove_item").click(function(){ $(this).hide("fast", function(){ var id = $(this).parent().attr("id"); var remove_item_id = document.getElementById(id); var block_element...
javascript jquery
[3, 5]
1,402,286
1,402,287
jQuery and JavaScript
<p>Is it necessary to learn JavaScript before jQuery?</p>
javascript jquery
[3, 5]
5,528,120
5,528,121
Can I get a forloop in an .append(), that already is in a forloop?
<p>I'm trying to create a Table based on "width"(columns) and "height"(rows) but I just can't get it right. So is there Something wrong with my code?</p> <p>Code:</p> <pre><code>for(var i=0;i&lt;width;i++){ $('#map').append( '&lt;tr&gt;'+ for(var e=0;e&lt;height;e++){ ...
javascript jquery
[3, 5]
4,735,029
4,735,030
Javascript form/textbox/alert
<p>It's my first day working with JavaScript, and I need help on a simple demo. I need to take the value from <code>class="populateValue"</code>, and make it fill in the text box and alert when the button is clicked.</p> <p>Right now it is returning <code>'[object Object]'</code> in both text box and alert.</p> <p>My...
javascript jquery
[3, 5]
455,211
455,212
Dynamically build combo/radio options
<p>I will have a product page that could have up to 20 different SKUs on a single page, but all have the same master record. The master record has aload of flags in it saying if it has height/depth/width/length. </p> <p>I am trying to dynamically generate selectable options on a product page and build an 'option map...
c# javascript asp.net
[0, 3, 9]
4,182,368
4,182,369
Send value on onsubmit
<p>I want to send <code>document.getElementById('source').value</code> onsubmit. How can i send? thanks this value <code>document.getElementById('source').value</code> working fine. But I want to call this on submit. Because some time user could change the value.</p> <pre><code>new AjaxUpload(btnUpload, { acti...
javascript jquery
[3, 5]
926,003
926,004
Cloning HTML Element with the Events
<p>I have an HTML image element as shown below: </p> <pre><code>var actionImage = $("&lt;img&gt;&lt;/img&gt;"); actionImage.attr("id", getRandomString()); actionImage.attr("width", "16").attr("height", "16").attr("src", "Action_normal.png"); actionImage.attr("style", "cursor: hand;"); actionImage.bind...
javascript jquery
[3, 5]
2,587,530
2,587,531
How Can I get Text Inside an Element with Children using jQuery
<p>I have text stored in a variable which contains several span tags.<br /> I want to get all the contents inside every span at once. How can I do that with jQuery or javascript?</p> <pre><code>&lt;htmlText&gt; Researchthe university has been given a 5 star rating in the current Research Assessment Exercise. It is...
javascript jquery
[3, 5]
5,462,545
5,462,546
Why it skips the if block
<p>Apology for another newbie question. I have this block of code in my MainActivity should check the users and returns an appropriate activity based on the if else statement. Problem is that it skips the if block and I can't figure out why. All I know is that the getID function works fine on other classes. Thank you f...
java android
[1, 4]
5,219,371
5,219,372
Can Dynamic Data website concept of ASP .Net used in Enterprise level application
<p>There are 3 Options available in front of me for architecting application</p> <ol> <li>Formview / Gridview &amp; LINQDataSource</li> <li>Dynamic Data Website </li> <li>Classic Design (Using Textbox &amp; other controls, writing code to get and set data from entity classes)</li> </ol> <p>Please guide me ...what opt...
c# asp.net
[0, 9]
5,657,339
5,657,340
closing a modal pop up
<p>I have a modal pop up that comes up when a hyperlink is clicked.. now i want to add a button withing the modal pop up to close it.. but i am not sure how to., i tried this</p> <pre><code>&lt;ajaxToolKit:ModalPopupExtender ID="mPopup" runat="server" TargetControlID="HyperLink" PopupControlID="pnlItem" Background...
c# asp.net
[0, 9]
1,427,548
1,427,549
Pause switch statement until AJAX success
<p>I have a form inside a slider, and elements inside each section of the slider are controlled by their respective case in a switch statement. For example:</p> <p>HTML</p> <pre><code>&lt;ul class="slider"&gt; &lt;li class="slide"&gt; &lt;span class="next"&gt;Next&lt;/span&gt; &lt;/li&gt; &lt;li c...
javascript jquery
[3, 5]
5,237,219
5,237,220
Clone a div and then clone again from the child
<p>I have the following simple code, where I double click a div (with class <strong>container</strong>) and it's simply clones itself inside another div (with id <strong>containment-wrapper</strong>):</p> <p><strong>html</strong></p> <pre><code>&lt;span class="container"&gt;div one&lt;/span&gt; &lt;div id="containme...
javascript jquery
[3, 5]
5,382,719
5,382,720
Asp.net codebehind from javascript?
<p>Is it possible to call asp.net codebehind function from javascript in vs2008?<br> My problem is, I have two codebehind methods, one is for some validation and it will return true or false. This method will be called when user click submit button and if return value is true, I want to call javascript function for con...
javascript asp.net
[3, 9]
4,829,406
4,829,407
How to call a function inside a function in Jquery?
<p>I am using <a href="http://flesler.blogspot.com/2008/02/jqueryserialscroll.html" rel="nofollow">jQuery.SerialScroll</a> so I can have a slider. In the code it has a function that looks like this:</p> <pre><code>var j=jQuery.noConflict(); //some code here jQuery(function(j) { //code goes here. //Then i need...
javascript jquery
[3, 5]
473,214
473,215
unbindService vs. stopService
<p>I have an single Activity application that starts a Service and binds to it. I want the Service to continue to run even after I exit the Activity.</p> <p>Right now I am doing a stopService then an unbindService. My assumption is that I do need to unbind but to keep it running I shouldn't (obviously) call stopServi...
java android
[1, 4]
273,601
273,602
Custom control that detects first child which will be rendered as a html input field
<p>Im trying to develop a custom control that automatically detects the first child control which will be rendered as an input-tag. I'm doing this because I want to know if I should render my associated title as a label or a span element in the HTML (a bit like the <code>asp:Label</code> works when an <code>AssociatedC...
c# asp.net
[0, 9]
3,687,378
3,687,379
Store checkbox values in cookie
<p>I need to store checbox values in a cookie to use in a comparison page. </p> <p>Please help. Thanks, C</p>
javascript jquery
[3, 5]
3,593,579
3,593,580
System.Web.UI.Controls.ControlCollection.Add Throws ArgumentOutOfRangeException
<p>I'm trying to make a tabbed user interface using an asp:Panel and the asp:TreeView. I'm keeping both TreeViews initialized in the background and when I need to display one, I clear the panel and then add the appropriate TreeView.</p> <p>I'm keeping the TreeView's stored in the Session variable so they don't go away...
c# asp.net
[0, 9]
927,684
927,685
Adjusting JS modal dialog to the browser window size
<p>I wire up Shadowbox dialog provider to my links or button like this:</p> <pre><code> &lt;%=Html.ActionLink(Resources.Localize.Routes_WidgetsEdit, "Edit", Model.ContentType.ToString(), new {slug = Model.Slug, modal = true}, ...
javascript jquery
[3, 5]
2,917,628
2,917,629
Binding a Button click event in code behind
<p>I'm building a button in my code behind file and want to bind the click function to an existing click function of a different button. How do I handle this? I was hoping for something simple like:</p> <pre><code>Button b = new Button(); b.onClick = otherClickEvent(); </code></pre> <p>but apparently that's not doa...
c# asp.net
[0, 9]
4,706,928
4,706,929
Threading won't work on Godaddy
<p>Hey guys, I'm sure this doesn't only apply to godaddy, but it may help illuminate the issue. The issue is that I need my webpage to run a thread in the background, and everything works fine when I do it in my local IIS, but when I upload it to godaddy's servers it simply doesn't work.</p> <p>The code:</p> <pre><co...
c# asp.net
[0, 9]
2,357,793
2,357,794
simple Java problem
<p>Example 1 - works</p> <pre><code>public class MainScreen extends Activity implements OnClickListener { public void onClick(View v) { Button touchedButton = (Button) v; Test (MainScreen.this, touchedButton.getId()); } public void Test (MainScreen mainscreen, int touchedButton) { ...
java android
[1, 4]
3,633,995
3,633,996
Hiding div on ready
<p>This hide/show script currently loads the div as visible when the page is downloaded. What do I change in the script so the #box div begins as hidden?</p> <pre><code>$(document).ready(function () { var hidden = false; $('.arrow').click(function () { if (hidden) { hidden = false; $('#box').slideD...
javascript jquery
[3, 5]
2,367,113
2,367,114
JavaScript/jQuery | Open link in new tab while remaining focus (mimic ctrl/cmd click)
<p>Basically, I want to be able to open links (using key commands not the mouse) in new tabs while remaining focus on the current window.</p> <p>The only example I've seen of this being done is like so...</p> <pre><code>window.open("http://mysite.com/thing.php?id=" + thingid, '_blank'); self.focus(); </code></pre> <...
javascript jquery
[3, 5]
3,319,985
3,319,986
jQuery: take existing HTML, modify one node, then reinject
<p>I have a blob of HTML that I'm retrieving using simple jQuery selectors, something like the following:</p> <pre><code>&lt;div id="stuff"&gt; &lt;ul&gt; &lt;li&gt;some&lt;/li&gt; &lt;li class="ninja"&gt;stuff&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>I'm basically doing:</p> <pre><code>var mybl...
javascript jquery
[3, 5]
4,042,185
4,042,186
setAlpha for view programmatically
<p>I saw in the Android documents there is a setAlpha API Level 1.I have a View that I try to use setAlpha(float) on the view, but the compiler says no such method exists. Am I missing something?</p>
java android
[1, 4]
3,489,809
3,489,810
Add fade effect to jQuery image replace on hover script
<p>There were a few topics about this already but they didn't quite help in my case. I've written a small script to change the image source of some social icons when hovered over. I'm trying to add a fadeIn and fadeOut effect so it isn't just a straight up image swap. Here is my script:</p> <pre><code>$(".social_icons...
javascript jquery
[3, 5]
1,898,834
1,898,835
getElementFromPoint(x,y) - whaaaat?
<p>I have <em>definitely</em> used this code before, but this time around it throws an error.</p> <p>My code:</p> <pre><code>$(document).click(function (e) { var getPoint = document.getElementFromPoint(e.pageX,e.pageY); alert(getPoint); }); </code></pre> <p>And I get:</p> <blockquote...
javascript jquery
[3, 5]
939,560
939,561
details view display problem
<p>I have a grid view and details view. My details view is in the update panel and it should be displayed for edits of the gridview. I have a file Upload control inside detailsview, Now when I click the upload button the whole page gets refreshed. </p> <p>Please help me, what do I do and where do I do . I think it sho...
c# asp.net
[0, 9]
4,024,324
4,024,325
sorting xml in javascript/jquery
<p>I was trying to sort some xml with jquery, but this code doesn't affect the actual xml or not returning a sorted result.</p> <p>Anything wrong with this code?</p> <pre><code>$(xml).find('Tag').get().sort(function(a, b) { return $(a).find('Name').text() &lt; $(b).find('Name').text() ? -1 : 1; }); </code></pre>
javascript jquery
[3, 5]
4,603,656
4,603,657
hide toggle div when clicking control in toggle div
<p>I use a toggle div in page. I have a textbox and a dropdownlist in it.</p> <pre><code> &lt;div class="Search" style="display: none" &gt; &lt;table width="100%" style="border: 1px solid #fff; border-radius:5px;padding:15px"&gt; &lt;tr&gt; &lt;td width="60px"&gt;دسته بندی&lt;/td&gt; &lt;td&gt; &lt;a...
javascript asp.net
[3, 9]
529,409
529,410
Standard way of prompting user to select folder to write a file to?
<p>My goal is to have a button that, when clicked, pops open a 'Select Folder' window. I'd like to work with the path they selected afterwards.</p> <p>I did a bit of reading around on this and I kept coming up with the FolderBrowserDialog class from Windows.Forms. Is this still the accepted means of capturing the path...
c# asp.net
[0, 9]
5,782,170
5,782,171
How to delete a GridView Row
<p>I have this code until now:</p> <pre><code>&lt;asp:TemplateField ShowHeader="False" ItemStyle-Width="150px" HeaderStyle-BackColor="#003ca1" HeaderStyle-ForeColor="white"&gt; &lt;ItemTemplate&gt; &lt;asp:LinkButton ID="linkDelete" runat="server" CausesValidation="False" CommandName="Delete" OnClientClick...
c# asp.net
[0, 9]
4,679,709
4,679,710
Failed to load viewstate when page contains viewstate variables
<p>I got this error when I don't use or do processing on pages which contain viewstate for couple minutes and reload the page:</p> <p><strong><code>Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. Fo...
c# asp.net
[0, 9]
5,216,963
5,216,964
Updating database from an EditText
<p>I have a text field in SQLite database, which I want the user to be able to update.</p> <p>So I extract and display the text in an EditText view. The user edits it and presses "Update" button. At this point I want to update the text field in database with whatever user has in the EditText.</p> <p>Here's the proble...
java android
[1, 4]
4,047,662
4,047,663
Best Practice: Initialize class fields in constructor or at declaration?
<p>I've been programming in C# and Java recently and I am curious what people would consider the best practice concerning when you should initialize your classes fields?</p> <p>Should you do it at declaration?:</p> <pre><code>public class Die { private int topFace = 1; private Random myRand = new Random(); ...
c# java
[0, 1]
4,595,914
4,595,915
Javascript/Jquery - Setting default value in function
<p>Using javascript/jquery is there a way to set a variable to a default value if no value is passed in the function? For example</p> <pre><code>function someFunction(data1,data2) { } </code></pre> <p>If data1 or data 2 is empty it gives me an undefined value. In php I could do just this:</p> <pre><code>function s...
javascript jquery
[3, 5]
545,343
545,344
javascript return value of function binded as object value
<p>I can not return values bools / strings using the following convention.</p> <p><a href="http://jsfiddle.net/eQWyY/" rel="nofollow">http://jsfiddle.net/eQWyY/</a></p> <pre><code>&lt;input id="lol" type="text" value="ahh" /&gt; &lt;script&gt; function test() { var flag = false; if ($('#lol').val()) { ...
javascript jquery
[3, 5]
2,527,630
2,527,631
How to change webpage background colour multiple times by clicking on the same button?
<p>I'm an absolute beginner at JavaScript/jQuery. </p> <p>I was wondering if I could achieve an effect where I can continuously toggle multiple background colours of the webpage by clicking the same button multiple times. </p> <p>This is the script I found on the Internet: </p> <pre><code>&lt;script&gt; $("#change...
javascript jquery
[3, 5]
4,816,863
4,816,864
Is there any catch/gotcha in this JavaScript boilerplate?
<p>I'm developing a website with jQuery and organize code into several script files.</p> <p>If I didn't get it wrong, there's a best practice of organizing your code like this boilerplate (which creates a separated scope and set the <code>undefined</code> value correctly):</p> <pre><code>(function($, undefined) { ...
javascript jquery
[3, 5]
5,116,143
5,116,144
select the text in a text field when clicked?
<p>how can you so that the text in the text field is selected when the user clicks on the text input field?</p> <p>i have used this code:</p> <pre><code> $("input[type=text]").focus(function() { $(this).select(); }); </code></pre> <p>but it doesnt work in safari. and in FF it works sometimes.</p>
javascript jquery
[3, 5]
329,598
329,599
jquery .click() event not working
<p>This is my jquery code:</p> <pre><code>$(function(){ $.post("/person/keywords/get/", function(data){ for(i=0; i&lt;data.length; i++) { count = count + 1; $(".keywords-set").append('&lt;div class="keyword-item"&gt;&lt;span class="keyword" id="keyword-'+count+'"&gt;'+data[i]+'&lt;/span&gt;&lt;...
javascript jquery
[3, 5]
5,353,389
5,353,390
how to add onclick event to anchor tag that is sitting within iframe?
<p>before clicking this anchor tag I would like to do something else:</p> <pre><code>anchorref.onlick= function() { //do something //progress to goal.com return (true); } </code></pre> <p>my html looks (something) like this, the point is having an anchor tag witin a button that you would like to do something else fi...
javascript asp.net
[3, 9]
1,663,422
1,663,423
How to solve the bug in CheckBoxPreference Default Value in android?
<p>Because my mainActivity does not run my Tab2Activity at startup until the user press the setting button to run the PreferenceActivity, therefore i have to first check the audioStatus boolean value in order to avoid unwanted boolean result but after this step i'm kinna lost because of the bug in CheckBoxPreference it...
java android
[1, 4]
1,758,249
1,758,250
Multi edit/save grid (hiddenfield + javascript)
<p>I got a gridview which contains 10 rows where 1 of the columns is a combobox that can be edited. When I click on an "edit" button, all of the 10 rows becomes editable and I want to keep track of which rows I have changed so that I dont save all 10 rows to the DB if there has only been made changes to 2 of them. My t...
javascript asp.net
[3, 9]
2,869,918
2,869,919
Redirecting Application-Level Error Handler
<pre><code>protected void Application_BeginRequest(object sender, EventArgs e) { const int maxFileSizeKBytes = 10240; //10 MB const int maxRequestSizeKBytes = 305200; //~298 MB if (Request.ContentLength &gt; (maxRequestSizeKBytes * 1024)) { Response.Redirect(".aspx?req...
c# asp.net
[0, 9]
3,220,003
3,220,004
Long integer to 16 character Hex for Google Reader sync
<p>Python Code </p> <pre><code>h = "%s"%("0000000000000000%x"%(i&amp;0xffffffffffffffff))[16:] </code></pre> <p>I'd like to know how this would be done in PHP.</p> <p>The application is for google reader syncronization. An initial sync list comes with numeric values, but the actual article id hex.</p> <p>Example Lo...
php python
[2, 7]
1,023,081
1,023,082
Voting box (plus/minus, not star rating)
<p>I'm looking for a voting script/widget (preferably jQuery), but not a star rating one, one with +1 and -1 options like this (admire my profesionnal MSPaint skills ^^) :</p> <p><img src="http://i.stack.imgur.com/D47pv.png" alt="alt text"></p> <p>Anyone know about one ?</p> <p>Thanks a lot !</p>
javascript jquery
[3, 5]
5,992,742
5,992,743
Clearing UrlData
<p>In a partial asp.net page I have a menu that create links with a foreach statement, which sends the user to another page like this:</p> <pre><code>&lt;a href="Products/@category.CategoryName"&gt;@category.CategoryName&lt;/a&gt; </code></pre> <p>In the Products page I pick up the category chosen by the user in the ...
c# asp.net
[0, 9]
2,731,072
2,731,073
jQuery conditions pass through
<p>I made my own form validation just for 2 inputs, one is for Phone number and another one for Email address. and also I have 2 forms in 1 page.</p> <p>my code is </p> <pre><code>var email, phone; if (email address validation passed) { email = true; } else { email = false; } if (phone number validation pas...
javascript jquery
[3, 5]
542,256
542,257
What is the best way to test for an empty string with jquery-out-of-the-box?
<p>What is the best way to test for an empty string with jquery-out-of-the-box?</p> <p>I.e., without plugins. I tried this: </p> <pre><code>http://zipalong.com/blog/?p=287 </code></pre> <p>But it did't work at least out-of-the-box. It would be nice to use something that's builtin.</p> <p>I wouldn't like to repeat <...
javascript jquery
[3, 5]
1,185,711
1,185,712
Response an xml file in modal popup
<p>This code is in control.ascx and control is put in ModalPopup.aspx page.</p> <p>First ai try with response.end() - this code throw exception. After ai try coment this line, but nothing is hapen.</p> <p>Browser is IE8</p> <pre><code>try { //export StringBuilder sb = ExportToExcelXml(); ...
c# asp.net
[0, 9]
662,151
662,152
How to design Internet dial-up in a web application(Asp.net)?
<p>I am doing a project in asp.net.I am not getting the idea on how to design the Internet dialup in my website.Can anybody help me how to design it?Thanks in advance.</p>
javascript asp.net
[3, 9]
924,883
924,884
Enter fires the form submit
<p>I have a div (nice gif dislayed as-if it's a button), on that div is a piece of javascript that handles the ENTER as-if it's a click ($(this).click()). The click does its own thing.</p> <p>In FireFox, it all works perfectly: the user presses the enter on the button and the click is fired. In IE, the form is submitt...
javascript jquery
[3, 5]
2,302,709
2,302,710
jquery tear paper advertising
<p>I want <strong>tear paper</strong> script like as <a href="http://www.mgmgrand.com/" rel="nofollow">MGM Grand Hotel Website</a> at the corner advertising, but no need flash animation. I want in jquery or any ideas.</p> <p>How to call that effect?</p>
javascript jquery
[3, 5]
3,908,559
3,908,560
Python to C# conversion
<p>In python i'm creating <code>.an</code> file using</p> <pre><code>commandStr="dpan.exe -np -Lwork_%s.lib -Owork_%s.lib %s %s.an" %( option1, option2, Sourcefile, Destination file) os.system( commandStr ) </code></pre> <p>This will create the <code>.an</code> file (Destination file) from Sourcefile. </p> <p>Now i'...
c# python
[0, 7]
5,148,682
5,148,683
Android: moving ball through touch
<p>I am making a simple game for class on an Android phone in which you can change a ball's position by touch. I had it working in Processing by simply using mouse position. In Android, I am using the gesture scanner and corresponding methods for various gestures, but I can't figure out the exact way to pull in the c...
java android
[1, 4]
5,400,716
5,400,717
jQuery ID Number Range
<p>I am trying to write a jQuery script that will add a class to list items within a certain ID range. I use numbers in my ID's and want to adjust a range of ID's.</p> <pre><code>&lt;li id="item-15"&gt;Something&lt;/li&gt; &lt;li id="item-16"&gt;Something&lt;/li&gt; &lt;li id="item-17"&gt;Something&lt;/li&gt; &lt;li i...
javascript jquery
[3, 5]
3,569,524
3,569,525
On page load - how to go to page anchor
<p>I have an url like that ../page/5/product</p> <p>This page have anchors to ../page/5/product/10#anchor01 , ../page/5/product/8#anchor01 etc.</p> <p>How is it possible to jump, after the page is loaded, to the anchor displayed on the new page. </p> <p>Hope someone could give me a hint.</p>
javascript jquery
[3, 5]