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,194,596
2,194,597
Issue with a logical condition to find the value lies in which logical set
<p>We have a generic slider functionality implemented in our product. We need to read the item index value from URL and scroll the slider to show the active item. </p> <p>Following code logic is used to show the active thumbnail and for that i need to animate the DIV to negative left. </p> <p>First, we get the total ...
javascript jquery
[3, 5]
5,435,612
5,435,613
ASP.NET Async jQuery and SetIsValid
<p>I have this code to check email availability - in JS script file <br> When i use <br> (async: false) and cntr.SetIsValid(false); <br> IsValid action doesn't apply on cntr <br> but If i use <br> (async: true) and cntr.SetIsValid(false); <br> IsValid action apply succesfully on cntr <br> Why ?</p> <p>I want to use as...
javascript jquery asp.net
[3, 5, 9]
3,083,548
3,083,549
Wait for the execution of an async method to return
<p>I have a callback when a file is sent for upload, where I need to return <code>false</code> if I want to prevent the upload. I want to abort when the image size is not appropriate :</p> <pre><code>onSend = function(data) { $.when(self._readImage(data[0])).then(function(img) { if (img.width &gt; 42) ...
javascript jquery
[3, 5]
4,565,494
4,565,495
change ringvibrate pattern of mobile
<p>Hi all i want to change the default ring pattern of android and same i want to do for sms ring i want to change the pattern of smsring too please help</p> <pre><code> protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ...
java android
[1, 4]
749,712
749,713
Click handler fired only once
<p>I have a set of links that I iterate over and add click handlers. Each link when clicked, fires an ajax request which upon success creates a div containing response data, and appends it to the DOM. The newly appended div (a floating div similar to a small lightbox) however, is removed when the user clicks close(on...
javascript jquery
[3, 5]
5,972,672
5,972,673
Why can't I call JS function from external file while function works if directly in head?
<p>I would like to be about to call a JS function from an external file in the following way:</p> <p><code>&lt;div class="some_class" onlick="someFunction();"&gt;&lt;/div&gt;</code></p> <p>Whenever I try this, I get 'ReferenceError: someFunction is not defined' in the console. If I put the function directly in the <...
javascript jquery
[3, 5]
4,369,611
4,369,612
how to change zIndex .dragndrop question
<p>first, have to look at this dragndrop (http://code.google.com/p/jquery-drag-and-drop/)</p> <p>what i want to ask is , isit possible to add a ACTIVE "window" onClick???</p> <p>example:</p> <p>i got 3 window dragable, name drag1 , drag2 and drag3</p> <p>drag1 zIndex="98"</p> <p>drag2 zIndex="99"</p> <p>drag3 zIn...
javascript jquery
[3, 5]
3,698,166
3,698,167
Jquery - If DIV is shown //do something
<p>I have a slot machine plugin here that rotates UL's and shows one of them randomly.</p> <p>I would like the shown UL to set a value.</p> <p>Something like this:</p> <pre><code>if ($("#1").is(":visible") == true) { dial.setValue(8); }; </code></pre> <p>Hope you can help.</p> <p>Thanks.</p>
javascript jquery
[3, 5]
2,829,447
2,829,448
How to access session from generic handler
<p>In ashx: I'm putting data in list of entities &amp; assinging it to session.</p> <pre><code>context.Session["objList"] = myEntityCollection; </code></pre> <p>I want to get this Session through response; in code behind. How it is achieved?</p> <pre><code>context.Response.ContentType = ??? ..... context.Response.Wr...
c# asp.net
[0, 9]
4,480,887
4,480,888
C# .NET equivalent to PHP time()
<p>I am working with C# .NET and PHP and need some standard way of recording time between the two. I want to use seconds since 1970 = <code>&lt;?php echo time(); ?&gt;</code> because I'm already using some of php's cool functions like: date() &amp; strtotime() in my project. Is there something in .net that is equivalen...
c# php
[0, 2]
4,165,689
4,165,690
Asp.net 2 buttons return same page with different data
<p>On my Ascx page ive got 2 buttons, those buttons redirect to same page atm. (because page should be exactly same). In Page_Load() method sender parameter doesnt have any parameters. How do i tell Page_Load event which button was clicked? so i can load different data depends on which button was clicked? </p> <p>Are ...
c# asp.net
[0, 9]
1,226,502
1,226,503
Detecting referral url
<p>I can't detect referral url if user type url directly to browser or if he has some anti-virus or firewall which removes referral url. Is it possible to detect when user typed url directly in browser?</p>
php asp.net
[2, 9]
5,939,877
5,939,878
jQuery $ is not a function in Firefox, works in Chrome and works with $(document).ready()
<p>I'm implementing jQuery in a site and am getting the "$ is not a function" in Firefox when I try to use a selector, but $(document).ready() works perfectly right before it. My code looks like this</p> <pre><code>&lt;script&gt; $(document).ready(function(){ alert("hi") }); // Works fine func...
javascript jquery
[3, 5]
1,420,527
1,420,528
How can I abort a javascript function if a second call to it is made?
<p>Google has failed me (which probably means it can't be done).</p> <p>Is there a way to kill a Javascript function if it's still running when it gets called again?</p> <p>Situation is this. I have an HTML5 Android app which has a search function. As the user types, it searches the HTML5 database for matches. Each k...
javascript android
[3, 4]
3,767,208
3,767,209
How to create widget to my android application?
<p>I created app in android it shows all the images,when user pressed the next button it show another image,if he pressed the previous button it show the previous image.Now i want to create widget to my app.</p> <p>Will any one tell me the steps to do what i thought? If you showed with sample code it helps me alot </p...
java android
[1, 4]
351,595
351,596
How to modify the HTML in Javascript and then read the changes in ASP.NET on the postback?
<p>This is a two-fer, and I've looked in a lot of places and could not put together a solution for this particular scenario.</p> <p>I will have the user enter multiple values using a single text field, such as: </p> <pre><code>&lt;div style="margin-left: 5px; display: block;"&gt; &lt;div id="divTemplateLine" sty...
c# javascript asp.net
[0, 3, 9]
4,377,560
4,377,561
Is there something more standard for handling "this" without making "that" reference to "this"
<p>I have some code here:</p> <pre><code>App.prototype.binds = function(){ var that = this; $('.postlist li').live('click', function(){ that.selectPost(this);} ); } App.prototype.selectPost = function(){ this.function(); } </code></pre> <p>I am creating a reference of "this" as "that" in my binds functio...
javascript jquery
[3, 5]
4,163,050
4,163,051
Using jquery $.ajax on window.onerror in ie
<p>I got a script going on ff and chrome (don't care about safari) where when there is a javascript error it send an email.</p> <p>It works on FF &amp; chrome.</p> <p>On ie8 I see the console.log or alert I added in the success of the ajax call but the call itself is never made, this makes me crazy that it actually g...
javascript jquery
[3, 5]
153,063
153,064
Object expected error
<p>My site is working perfectly in all browsers except the IE. The error box is prompted when the page is load in IE with the error msg below: Line: 227 Error: Object expected</p> <p>when i start debugging, the error is from here below at the first line.</p> <pre><code>$().ready(function() { // Hide all elements ...
javascript jquery
[3, 5]
350,766
350,767
Difference between HtmlGenericControl and TagBuilder
<p>This is more or less the same as this question, <a href="http://stackoverflow.com/questions/3043800/difference-between-htmltable-and-tagbuildertable">Difference between HtmlTable and TagBuilder(&quot;table&quot;)</a> and <a href="http://stackoverflow.com/questions/3043654/why-use-tagbuilder-instead-of-stringbuilder"...
c# asp.net
[0, 9]
2,060,181
2,060,182
Using jQuery.each() to manipulate the elements of an Array/Object in place
<p>Playing around with JavaScript and jQuery over here. Making a function that produces timestamps. </p> <p>I've got the following code:</p> <pre><code>var timestamp = function () { var now = new Date(); var components = [now.getHours(), now.getMinutes(), now.getSeconds()]; components.zero_pad = function...
javascript jquery
[3, 5]
4,069,834
4,069,835
Open local file from a web page using link in gridview c#
<p>I need to open a some types of files like .jpg, word, .pdf when the user clicks on link in gridview. Right now i am using this code and its not opening up. </p> <p>It is a web application and i have to open the file which is present in the local drive of user. I would be binding the path of file in NavigateUrl prop...
c# asp.net
[0, 9]
115,143
115,144
Find controls being rendered in master page at runtime
<p>I have a master page which has a number of controls on it both from the content page and the master page itself. All these controls extend System.Web.UI.UserControl and some implement an interface called IControlInjector.</p> <p>When the master page loads, is there any way I can check in the master page what contro...
c# asp.net
[0, 9]
2,877,797
2,877,798
why jquery/javascript code get conflict with other jquery/javascript?
<p>While using jquery or javascript code most of the time i have to face the problem of jquery or javascript conflict.</p> <p>Still i haven't got the reason why this stuff get conflict with other code?</p> <p>Any one have any idea about this?</p> <p>And any solution so that next time this issue will not occur while ...
javascript jquery
[3, 5]
4,201,838
4,201,839
asp net javascript Cache clear
<p>I have a website that i did some time ago now they request some new features and i did some changes in some javascript files, but when i publish the clients that use the IE have problems with cache so in they browser they have old version of javascript. How can i clear the client cache so when they visit website the...
c# asp.net javascript
[0, 9, 3]
1,545,478
1,545,479
Is there really no way to programmatically click a link using PHP?
<p>I have been trying for a while now trying to figure out how to programmatically click a link using PHP and/or javascript. I have it setup so if the user clicks a link it will refresh a table. You don't really need to know why I want to do this b/c then it will go down a whole long road of confusion. Just know that t...
php javascript
[2, 3]
387,585
387,586
Android parse KML file for time
<p>I've been trying to work out how to obtain the travel time between two locations (walking, driving etc...).</p> <p>As I understand it, the only way to do this accurately is by retrieving a KML file from google, then parsing it.</p> <p>Research has shown that it then needs to be parsed with SAX. The problem is, I c...
java android
[1, 4]
1,173,679
1,173,680
Replay on BG Music
<p>I made a service that play background music, but when the music finished I want to replay it again. Which method can I use in my service?</p> <pre><code>public class BackgroundSoundService extends Service { private static final String TAG = null; MediaPlayer player; public IBinder onBind(Intent arg0) { ...
java android
[1, 4]
908,925
908,926
transfer data from received email to an app on android
<blockquote> <p>I am creating an app that emails data to contacts and want to, on a user's click, copy data to a live app on the receivers phone.</p> <p>can this be done?</p> </blockquote>
java android
[1, 4]
5,503,574
5,503,575
Jquery event chaining
<p>Based on this <a href="http://stackoverflow.com/questions/451491/what-is-the-best-way-to-emulate-an-html-input-maxlength-attribute-on-an-html-text">question</a></p> <p>I don't want to litter my ready stuff waiting for a "click event" AND a "change event" AND a "mouseover event" I want to have all that stuff in a s...
javascript jquery
[3, 5]
1,780,074
1,780,075
how can i get the value of the loop both text fields and hidden fields in php using jquery
<p>How can I get the values of each input field (both hidden and visible) using jQuery?</p> <pre><code>&lt;?php $date = date('m-d-Y'); $ts = strtotime($date); $year = date('o', $ts); $week = date('W', $ts); for($i = 1; $i &lt;= 7; $i++) { ?&gt;&lt;td&gt;&lt;?php $ts = str...
php jquery
[2, 5]
4,469,682
4,469,683
Difference of definition of function in javascript/jQuery
<p>version 1: </p> <pre><code>function add(){ var a = 2; ... ... ... } </code></pre> <p>version 2: </p> <pre><code>$(function(){ var ... .. .. }); </code></pre> <p>Where is the main difference of two versions? For version 2, it does not have the function name. If it just simply run the code in the function, why n...
javascript jquery
[3, 5]
5,507,107
5,507,108
toggle two images on click
<p>I'm trying to use someone's code from an earlier post that I posted on here, and in it, he provided a <a href="http://jsfiddle.net/D9VvV/" rel="nofollow">jsFiddle</a> that shows how to toggle between two images.</p> <p>I'm trying to replicate exactly what that person is doing, but it doesn't seem to work on my code...
javascript jquery
[3, 5]
459,301
459,302
Change value of Onclick function vars
<p>I have the onClick function attached to a button. I want to be able to change the function var from 'create' to 'update' on the page load and through other functions. I have tried the code below but no luck.</p> <pre><code>&lt;input type="button" name="save_customer" id="save_customer" value="Save" onClick="custome...
javascript jquery
[3, 5]
3,928,214
3,928,215
Stop MediaScanner scanning of certain directory
<p>Is there a way to notify MediaScanner service on Android platform not to scan certain directories? I have application that encrypts images on SD card and after I do that MediaScanner goes wild in LogCat (writing out "not JPEG" exception... and there are time I have over 1000 pics in directory).</p> <p>Thanks</p>
java android
[1, 4]
2,311,359
2,311,360
Could someone explain what this line does?
<p>In this blog: <a href="http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/" rel="nofollow">http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/</a></p> <p>It is one line <code>this.getReadableDatabase();</code>, I don't understand what it does, ...
java android
[1, 4]
1,783,500
1,783,501
When to use JavaScript in ASP.NET?
<p>I am a beginner in ASP.Net. We have Validation Controls in ASP.Net. But I want to know, In which scenarios we need to use JavaScript?</p>
javascript asp.net
[3, 9]
5,281,438
5,281,439
How to catch asp.net textbox1.text via jquery
<p>net textbox control. so I try to catch via jquery. but I cant. How can I do this. Thanks...</p>
javascript jquery
[3, 5]
5,822,307
5,822,308
The simplest way to allow a web user to update a text file using PHP and Javascript?
<h2><strong>Problem:</strong></h2> <p>I dont know the simplest way to allow a single web viewer to <em>update data</em> in a text file on a server. (ie. only 1 person will be changing the data.)</p> <h2><strong>Objective:</strong></h2> <p>To make a prototype web application just <em>one person needs to input</em> in...
php javascript jquery
[2, 3, 5]
2,366,435
2,366,436
How can a new object of Activity for each notification?
<p>I have code for creating notification:</p> <pre><code> NotificationManager notifyMngr=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE); Notification notification=new Notification(mId, "New alert!", System.currentTimeMillis()); Intent alert = new Intent(this, AlertInfoActivity.class); ...
java android
[1, 4]
1,555,265
1,555,266
converting class file to jar file using c++
<p>Is it possible to convert <code>.class</code> file to <code>.jar</code> file using c++ code?</p> <p><strong>(i.e can we write a code in c++ that when executed converts given .class file to .jar file)</strong></p> <p>If yes,how can i do that?</p>
java c++
[1, 6]
1,620,718
1,620,719
Picking an element within a DIV with JQuery
<p>I have an HTML page with a variety of divs on it. For instance, something like this:</p> <pre><code>&lt;div id="myDiv1"&gt; &lt;input id="myInput1" type="text" /&gt; &lt;input id="myInput2" type="text" /&gt; &lt;input id="myButton" type="button" value="Button" /&gt; &lt;/div&gt; &lt;div id="myDiv2"&gt; &lt...
javascript jquery
[3, 5]
4,050,641
4,050,642
Redirect to url then again redirect to main url
<p>I know it is really confusing. Let me explain:</p> <p>I want to open the urls on my site (http://domain.com) to a (http://domain.com/url='the submitted url') and then the submitted url is opened.</p> <p>Eg: When we open any other site link from Google+ let the example</p> <p><a href="http://www.youtube.com/watch?...
php javascript
[2, 3]
2,821,763
2,821,764
meaning of this jquery code
<p>I posted a question <a href="http://stackoverflow.com/questions/3560381/next-not-working">http://stackoverflow.com/questions/3560381/next-not-working</a> and gota reply which is working fine, but can somebody explain me what exactly is going on here:</p> <pre><code>$(this).closest('tr').next('tr').find("img.cc").to...
javascript jquery
[3, 5]
3,221,529
3,221,530
Managing sessions between different servers
<p>How are session of same user maintained when a load balancer is used with different web servers at backend . In other words lets suppose there is a load balancer to distribute load between different servers and a user is directed to one server where its session is stored and then next time the same user is directed ...
php asp.net
[2, 9]
5,745,327
5,745,328
C# calling a Java web service with a Calendar parameter
<p>I'm writing a C# desktop client that needs to call a web service written in Java. Two of the parameters are of type Calendar. I'm having great difficulty in trying to pass these two dates to the web service.</p> <p>I've tried the following ways, all without success.</p> <pre><code>DateTime startDate = DateTime.Now...
c# java
[0, 1]
3,760,974
3,760,975
Accessing android.os.Debug methods in javascript
<p>I would like to access some of the static methods in the <a href="http://developer.android.com/reference/android/os/Debug.html" rel="nofollow">Debug class</a>; part of the android.os package.</p> <p>However, when I include calls to these functions javascript gives me a undefined ReferenceError; it cannot find the a...
java javascript android
[1, 3, 4]
2,254,415
2,254,416
Can I get repeater item count in the javascript script method?
<p>I have one requirement. I have a repeater in the usercontrol and devexpress button in the parent view. I'm calling clientsideevents from the button like below:</p> <pre><code> &lt;dx:ASPxButton ID="btnNextStep" runat="server" Text="Proceed to Step 2" AutoPostBack="False" UseSubmitBehavior="False"&gt; ...
c# javascript jquery asp.net
[0, 3, 5, 9]
5,595,949
5,595,950
How to attach this listener in an activity
<p>I was wondering how do i attach this(OnGenericMotionListener) listener inside an activity. Do i have to register it to each view? thanks</p> <p>note: please provide code.</p>
java android
[1, 4]
4,532,739
4,532,740
Disable fadein animation
<p>I am trying to create a splash screen for my app. The problem is it first renders empty layout with default title bar and then fades in my image.</p> <p>This is all I have <code>onCreate</code></p> <pre><code>super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); this.setContentVie...
java android
[1, 4]
916,121
916,122
replaceWith but permanent - another way to store
<p>I have a div which I update with a count of contents of a shopping cart - when a user adds to the cart, i count the number of lines, then update the div to say e.g. 2 Lines</p> <p>I currently use:</p> <pre><code>&lt;script type="text/javaScript"&gt; $(document).ready(function(){ $("#lines2").replaceWith($('#lines'...
javascript jquery
[3, 5]
1,279,466
1,279,467
How to prevent page reload after alert box on key down event?
<p>I want to prevent page reload after clicking ok on alert box. click search button is ok. But now I meet problem in enter key down event. Someone help me please.</p> <p>This is my html</p> <pre><code>&lt;div id="email"&gt; &lt;input type="text" id="txtSearchEmail" name="email" onkeydown="Javascript: if (event.key...
javascript jquery
[3, 5]
5,110,711
5,110,712
validation not working for js
<pre><code>&lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;form class="form-horizontal cmxform" id="validateForm" method="get" action="../../course_controller" autocomplete="off"&gt; &lt;input type="text" id="course_name" name="course_name" placeholder="Enter Course Name..." class="row-fluid" required onkeyu...
javascript jquery
[3, 5]
240,393
240,394
Getting error Uncaught TypeError: string is not a function
<p>I'm using this code here for a webpage I'm fooling around with:</p> <pre><code>$(function() { console.log('Here'); $.ajax({ type: 'POST', url: 'http://api.bf3stats.com/pc/playerlist/', data: { players: ['xxx', 'xxxx', 'x'] }, success: function(data) { ...
javascript jquery
[3, 5]
547,540
547,541
How can i keep the selected tab selected even after postback
<p>I have some listed tab controls on my aspx form which is as below</p> <pre><code> &lt;div id="tabs"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#tabs-1"&gt;Tab A&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tabs-2"&gt;Tab B&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#tabs-3"&gt;Tab C&lt;/a&gt;&...
c# jquery
[0, 5]
5,286,429
5,286,430
How make jquery loop over with number
<p>I am trying to assign a number to my variable i.e. colorswap1, colorswap 2, colorswap 3</p> <p>I have the following</p> <pre><code>var i = 1-36; // Get current image src var curSrc = $('#colorswap'[i]).attr('src'); </code></pre> <p>It doesn't seem to be putting the desired: colorswap1, colorswap2</p>
javascript jquery
[3, 5]
5,520,186
5,520,187
clear all ASP label fields
<p>I am trying to clear all the fields in my .aspx page using javascript (<em>Should be cross-browser</em>). The below code is working fine for <code>TextBox</code> fields but not for <code>Label</code> fields.</p> <pre><code>var elements = document.getElementsByTagName("input"); for (var i = 0; i &lt; elements.length...
javascript asp.net
[3, 9]
4,487,402
4,487,403
Using variables between if/else in Android
<p>I am developing a small app while learning Android.</p> <p>The app is basically making a series of simple math calculations. A button is calling a function where the calculations take place. Everything was working fine, until I inserted an if/else construct.</p> <p>Inside this construct, I am using variables creat...
java android
[1, 4]
4,462,691
4,462,692
Fancybox page anchors
<p>Is it possible to use page anchors (http://mysite.com/page.php#jump_to) in Fancybox and if so how?</p> <p>I have tried like you normally do with a normal HTML page, where it works, but it doesn't work in Fancybox.</p>
php javascript
[2, 3]
2,536,660
2,536,661
store id and transfer to another php page
<p>I have a little question. On my site i use for few jquery functions , they get some data and transfer by GET method to php helper. This is not work when i want to use the data in another php page. For example i have jquery that store id of the anchor:</p> <pre><code>$("#rightContent .users_list li a").live('click',...
php javascript jquery
[2, 3, 5]
4,878,947
4,878,948
How to download/print specific portion of a page using php
<p>I have an HTML page as follows</p> <pre><code>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. &lt;table&gt; &lt;...
php javascript
[2, 3]
5,795,072
5,795,073
JQuery and C# ASP.NET Form and File Validation
<p>I am confused about the best way to intertwine jquery/javascript with C#. I am supposed to put a javascript confirm popup into a file upload form. However the confirm only pops up if certain criteria is not met.</p> <p>There are 4 elements on the form that are of importance. </p> <ul> <li>clientId_txt - An inp...
c# asp.net javascript jquery
[0, 9, 3, 5]
944,629
944,630
triggering the same function, from 2 different click events, with and without parameters
<p>I have a function <code>myFunc</code> that can be triggered 2 different ways: by clicking div1 or div2. </p> <ul> <li>If the click came from div2, I'd like to pass some parameters to the function at the time of the call. </li> <li>Also, in both cases, I need a reference to the item that was clicked: <code>$(this)</...
javascript jquery
[3, 5]
4,932,312
4,932,313
ASP.NET - How to postback a page after a file download?
<p>Here my situation :</p> <p>The user click on a LinkButton, and the page does a PostBack. But I also need to prompt a file download to the user at the same time.</p> <p>In order to do that, I did this on the LinkButton</p> <pre> lnkPrint.Attributes.Add("onclick", "window.open('Download.ashx?type=x')"); </pre> <p>...
c# javascript asp.net
[0, 3, 9]
1,631,367
1,631,368
Is modern C++ replacing C#? Is Microsoft pushing developers to adopt C++?
<p>I hear about modern C++ popularity and some talks about migrating back to C++ from C# or other C-like languages.</p> <p>I know about C++11 features but I would like to hear your experiences, especially from developers who migrated from C# to C++. </p> <p>More importantly, does Microsoft push developers to use C++?...
c# c++
[0, 6]
5,406,527
5,406,528
Setting TextBox focus in BLL ASP.NET
<p>I'm working on an application where the validation (ranges) checks are controlled in the business logic layer. The code looks similar to this:</p> <pre><code>public string ValidateRange(int value, int lowRange, int highRange, string fieldDesc, System.Web.UI.WebControls.TextBox txtBox) { string msg = ""; ...
c# asp.net
[0, 9]
1,005,940
1,005,941
need to creat variable variable in Javascript--not an array
<p>I'm needing to call a plugin that uses a var to work it's self. but I can't get the var cause that can change so... this is what I was trying to do.</p> <pre><code>var selection = $(".view-your-rescues .cms_textarea,.post-a-rescue .cms_textarea,.edit-account-details .cms_textarea"); if(selection.length &gt; 0 ) {...
javascript jquery
[3, 5]
206,008
206,009
converting javascript in csharp--function as a argument
<p>In bing map AJAX api v7 there is a method for eventhandling in Events object:</p> <pre><code>addHandler(target:object, eventName:string, handler:function); </code></pre> <p>which is used like this:</p> <pre><code>Microsoft.Maps.Events.addHandler(pin2, 'mousedown', mouseDownHandler); </code></pre> <p>how can i wr...
c# javascript
[0, 3]
2,123,883
2,123,884
I want to change the string from user define special character using javascript
<p>I want to change this string <strong>colormanagemnet</strong> from user define specail character like this <strong>c!o@l#o$r$m%a^n&amp;a*g?e(m)e@n!t</strong> using javascript or jquery if you guys have any idea about this please share me</p> <pre><code>&lt;script type="text/javascript"&gt; var sc = "!@#$%^&amp;*()?...
javascript jquery
[3, 5]
5,385,220
5,385,221
Querying String Values in Pure JavaScript AND Opening a Dialog Box
<p>OK, I found this code on another thread </p> <p><a href="http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values">How can I get query string values?</a>, and it's been very helpful in location a string value in a URL. Now I need to take that string value, and use it to open a dialog box.</p> <...
javascript jquery
[3, 5]
2,309,525
2,309,526
remove class from all other list items
<p>I've gotten help from others on this, but their replies were a little bit too broad to help me... I'm a newb when it comes to javascript so I can't quite wrap my head around their answers (and everything I've tried in the last 3 days hasn't worked.) The working site is here: <a href="http://www.studioimbrue.com/beta...
javascript jquery
[3, 5]
5,728,152
5,728,153
Sorting Jquery Tab Panel
<p>I have a tab panel. </p> <p>It can add tabs dynamically by clicking the <code>add tab</code> button. </p> <p>A typical use case scenario will be this: </p> <ul> <li>I have multiple tabs open Tab-1, Tab2, Tab-3, and Tab-4 in the panel </li> <li>and remove some of them Tab-2 and Tab-3 from the panel by closing the ...
javascript jquery
[3, 5]
570,090
570,091
jQuery append (or appendTo) with Animation
<p>I have a UL-LI e.g.</p> <pre><code>&lt;ul&gt; &lt;li id="1"&gt;item-1&lt;/li&gt; &lt;li id="2"&gt;item-2&lt;/li&gt; &lt;li id="3"&gt;item-3&lt;/li&gt; &lt;li id="4"&gt;item-4&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>I would like to move one of the items to another position in the list. e.g. item-2 t...
javascript jquery
[3, 5]
389,150
389,151
Implement a search bar
<p>I want to implement a search bar, which the user can write something and it will search for in the page.</p> <p>I read about it in the android developer and found it:</p> <p><a href="http://developer.android.com/guide/topics/search/search-dialog.html" rel="nofollow">http://developer.android.com/guide/topics/search...
java android
[1, 4]
742,600
742,601
Getting the clicked element using $(this)
<p>hey I have this silly issue and I hope you could help me to solve it. I have some "a" elements and I just want to add an active class when clicked.</p> <p>I tried this :</p> <pre><code>&lt;a href="javascript:mifunction()"&gt;&lt;/a&gt; js: function mifunction(){ $(this).addClass('active'); } </code></pre> <p>bu...
javascript jquery
[3, 5]
3,418,471
3,418,472
Whats the easiest way to reactive a submit() action that was cancelled with 'return false'
<p>I have some image buttons that have jQuery event handlers attached to them.</p> <p>I want to make an AJAX call in the click() event to determine if the action should actually be allowed. Because I am doing an async ajax call I have to return 'false' to immediately cancel the event and wait for the response.</p> <p...
javascript jquery
[3, 5]
46,378
46,379
What's the equivalent of .get in javascript?
<pre><code>d = {'hello':'abc'} d.get('hello','default_val'); </code></pre> <p>Above is python. How to do this in javascript? I want to be able to set a default value if no key found.</p>
javascript python
[3, 7]
3,652,042
3,652,043
How to get inner HTML of element inside a list item, within a delegate?
<p>I have this bit of HTML :</p> <pre><code>&lt;li eventId="123"&gt; &lt;img src="image.jpeg"/&gt; &lt;h3 id="eventName"&gt;Event Name&lt;/h3&gt; &lt;p id="eventDescription"&gt;&lt;/p&gt; &lt;/li&gt; </code></pre> <p>I want to be able to pull out the <code>&lt;h3&gt;</code> and <code>&lt;p&gt;</code> via ...
javascript jquery
[3, 5]
3,702,398
3,702,399
Drag from the ListView and Drop on to the Button
<p>I would like to know if its possible to drag an item from the ListView and drop onto the Button. After dropping onto the button the text on the button will be changed.</p> <p>Is it possible to drop an item onto the Button?</p>
java android
[1, 4]
2,380,657
2,380,658
How to use 'contains' in an if statement?
<p>I have HTML that looks like this:</p> <pre><code>&lt;div class="item-list"&gt; &lt;h3&gt;Monday Sep 21&lt;/h3&gt; &lt;h3&gt;Tuesday Sep 22&lt;/h3&gt; &lt;h3&gt;Wednesday Sep 23&lt;/h3&gt; </code></pre> <p>If today's date is on the list, then that date should be red. If today is not on the list (hey, it's still...
javascript jquery
[3, 5]
3,630,774
3,630,775
Scrolling Tabs in a table
<p>I have a horizontal tab menu. These tabs are all li elements. I show always 5 of them at once. To the left and right I have buttons which scrolls these tabs to either side. I am just not sure how to achieve that. Can I put the next 5 tabs in a different div which will be shown on click? That wouldnt be the best solu...
javascript jquery
[3, 5]
5,333,360
5,333,361
How to prohibit user from viewing a page before a specific time period?
<p>I want to build an online quiz test site. </p> <p>Suppose, exam will start at 10:00 am and a student login to give exam at 9:45 am. Whenever the student clicks 'Take Exam' button, he/she cannot not get access to the question paper because the exam time is 10:00 am and there are still 15 minutes before the exam star...
php javascript
[2, 3]
2,219,360
2,219,361
How to submit multiple jquery posts to a page one after another if database updates successfully?
<p>I am trying to send multiple $.post to a single page. I need each to post to a page that updates a database then post the next one until they are done. This is my code so far: </p> <pre><code>$(document).ready(function(){ $("#action").change(function(){ var selectVal = $('#action :selected').val(); if(selectVal == ...
php jquery
[2, 5]
5,736,944
5,736,945
Use Javascript to get the Sentence of a Clicked Word
<p>This is a problem I'm running into and I'm not quite sure how to approach it.</p> <p>Say I have a paragraph:</p> <pre><code>"This is a test paragraph. I love cats. Please apply here" </code></pre> <p>And I want a user to be able to click any one of the words in a sentence, and then return the entire sentence that...
javascript jquery
[3, 5]
4,639,549
4,639,550
Including Java classes in PHP script
<p>I want to include Java class to my PHP script, can some one help me with the syntax and the path.</p> <p>Thanks for the help.</p>
java php
[1, 2]
601,995
601,996
C++ -vector<string> in C#
<p>I have a code in C++ as basically a class const and a dest</p> <pre><code> Abc(vector&lt;std::string&gt;&amp; names); virtual ~Abc(); </code></pre> <p>I need to know the equilivalent in C#</p> <p>Thanks</p>
c# c++
[0, 6]
6,017,873
6,017,874
Jquery Css Selector Add Value
<p>How can i reset a display:none and add some value here is the code</p> <pre><code>onclick="$('reason{$test-&gt;id}').css('display:block'); $('#reasonid{$test-&gt;id}').val(this.value);" </code></pre>
javascript jquery
[3, 5]
5,556,710
5,556,711
How to perform a $_POST for this example below?
<p>I have a multiple row of buttons in my javascript code which goes from A-Z:</p> <pre><code>&lt;?php $a = range("A","Z"); ?&gt; &lt;table id="answerSection"&gt; &lt;tr&gt; &lt;?php $i = 1; foreach($a as $key =&gt; $val){ if($i%7 == 1) echo"&lt;tr&gt;&lt;td&gt;"; echo"&lt;input type=...
javascript jquery
[3, 5]
875,339
875,340
Is there a way to log this?
<p>I'm trying to figure out what "this" refers to. </p> <p>Is there a way in js to console.log this?</p> <pre><code>console.log $(this).next </code></pre>
javascript jquery
[3, 5]
5,822,589
5,822,590
Error using DLL from other project - ConfigurationManager
<p>I have 2 projects, 1 is a REST service the other is ASP.net website. They each run independently. But I want to re-use global functions form the REST service in my ASP.net project. The issue is that the Global class is static and us setting vars using the ConfigurationManager.AppSettings["Property"];</p> <p>What...
c# asp.net
[0, 9]
270,489
270,490
Why I got an error in the system when I use MIN in the SQL Query?
<p>I am developing a web application that sends the quizzes to all users via emails. If there is more than one quiz in the database that not be sent to the users before, the system should select the minimum quiz id not the maximum one. </p> <pre><code> string quizid = ""; // Open DB connection. conn.Open(); strin...
c# asp.net
[0, 9]
3,516,984
3,516,985
Android, is there an OnRelease functions?
<p>Say I want a dialog to <code>.show()</code> when the user Touches a certain element and <code>.hide()</code> once he releases it.</p> <p>I found how to make the <code>OnTouchListener</code>. But is there any sort of <code>OnReleaseListener</code>?</p> <p>Thanks!</p>
java android
[1, 4]
2,858,652
2,858,653
Difference between jquery $('#my_id') and document.getElementById('my_id')?
<p>I tought $('#my_id1') was the same thing as document.getElementById('my_id1'). But it is parently not. What is the difference?</p> <pre><code>(function( $ ) { $.fn.simple_hide_function = function() { var $t = this; $t.hide(); }; })( jQuery ); $(window).load(function () { var $div1 = $('#my_id1'); var $div2...
javascript jquery
[3, 5]
669,052
669,053
EditText is growing as text entered
<p>I have an edittext that is 80% of the screen across and a button that should take the remaining 20%, but when text is entered into the box or removed the edittext grows and shrinks.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/andr...
java android
[1, 4]
3,781,822
3,781,823
jQuery $.submit and files not working in IE and FF
<pre><code>&lt;?php if (!empty($_FILES)){ echo "&lt;pre&gt;"; echo $_FILES['file']['type']; echo "&lt;/pre&gt;"; return; } ?&gt; &lt;script type="text/javascript"&gt; function autoUpLoad(){ $("#txtHint").html("&lt;center&gt;&lt;img src='include/images/loader.gif' /&gt...
php jquery
[2, 5]
5,262,124
5,262,125
PHP Server responded "Forbidden" when trying to upload file from android
<p>I try to run code from this site <a href="http://reecon.wordpress.com/2010/04/25/uploading-files-to-http-server-using-post-android-sdk/" rel="nofollow">http://reecon.wordpress.com/2010/04/25/uploading-files-to-http-server-using-post-android-sdk/</a> but I have a problem, When I try to send file to server I get “Forb...
php android
[2, 4]
5,146,601
5,146,602
getting 503 error while logging in
<p>I am making an app using foursquare. Am unable to know what ip should i give in the statement</p> <pre><code>if (FoursquaredSettings.USE_DEBUG_SERVER) { return new Foursquare(Foursquare.createHttpApi("10.0.2.2:8080", version, false)); } else { return new Foursquare(Foursquare.createHttpApi(version, false));...
java android
[1, 4]
4,668,733
4,668,734
Get id of element and post in sql query?
<p>Hey, I am trying to get the id of an element and then post that id in a sql query like this:</p> <p>jQuery gets id of checkbox:</p> <pre><code>$(document).ready(function() { $(":checkbox").change(function(){ var id = $(this).attr('id'); $.post("index.php", { id: this.id, checked: this.chec...
php jquery
[2, 5]
3,411,391
3,411,392
Disable a button (in a data list) after a single click by user
<p>I want to disable the button that is contained in a data list row. Is it possible to disable the button after it has been clicked once by the user? If so, can someone please suggest how I can achieve that.</p> <pre><code>&lt;asp:DataList ID="DataList1" runat="server" DataKeyField="Qno" OnItemCommand="DataList1_OnIt...
c# javascript asp.net
[0, 3, 9]
4,373,612
4,373,613
CustomValidator message doesnt show up
<p>I've a CustomValidator and I defined every possible parameter of it:</p> <pre><code>&lt;asp:CustomValidator ID="custom" runat="server" Text="*" ErrorMessage="This email address is already registered" ControlToValidate="txtEmail" OnServerValidate="isExist" Display="None" ValidationGroup="valRegister"&gt;&lt;/asp:Cus...
c# asp.net
[0, 9]