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
5,419,500
5,419,501
Intent.getIntExtra() behaviour changes on a virtual device and on a real device
<p>I have the below code and on my computer via Eclipse virtual device it works fine. But when installed on a real life phone it always reverts to the else statement. This activity does not always get passed a value and if it is not I want a random record to appear. Thank you for any help or advice and time taken to re...
java android
[1, 4]
1,045,262
1,045,263
jquery, how to use trigger?
<p>i have this situation:</p> <pre><code>if(isset($_POST["sm"]){ print "&lt;br&gt;&lt;div id=\"redirect\"&gt;success&lt;/div&gt;"; } </code></pre> <p>in javascript i have:</p> <pre><code>$('#redirect').delay(2000).fadeOut('slow'); </code></pre> <p>what happens is that if the form is submitted that div shows up for ...
php jquery
[2, 5]
4,928,363
4,928,364
"document.formName" is undefined?
<p>I've got an ASP.NET site running locally on my XP system using IIS Express. There is a live version of the site running on a Windows server. </p> <p>In the web pages, often the Javascript will reference a form on the page using the style <code>document.formName</code>, where <code>formName</code> is the name of the...
javascript asp.net
[3, 9]
3,764,658
3,764,659
How to use the client side(JS) variable in c#?
<p>I have the following JS code.</p> <pre><code>var thisItem = document.thisItem; var e-mail = thisItem.getProperty("email");// which gets the e-mail of the User </code></pre> <p>And I have the following C# code.</p> <pre><code>public static void Main() { string username = "username"; string email = ""; //...
c# javascript
[0, 3]
171,771
171,772
Open clicked thumbnail in a new tab
<p>I have the below code on one page:</p> <pre><code>&lt;div id="prodoneid" class="prodcls"&gt; &lt;a href="javascript:void(changeIt('big.png', 'pagewrapid')());"&gt; &lt;img src="images/zara/thumbnails/1.png" alt="ZARA"/&gt; &lt;/a&gt; &lt;/div&gt; </code></pre> <p>By the below code I am opening the ...
javascript jquery
[3, 5]
2,924,835
2,924,836
Background Process without UI - android
<p>I have an application Android and I need update the data without UI (Background Process) I haven't idea about it</p> <p>Help me</p>
java android
[1, 4]
821,990
821,991
How do i get middle tab selected on click on a linkbutton in asp.net
<p>I am working in an application in which there is a linkbutton inbox, when user clicks on it "default.aspx" page opens with 1st tab selected but i required that in case of inbox clicked middle tab must be selected and shows opened.when user not clicks on inbox "default.aspx" 's page 1st tab must be selected.Click eve...
c# asp.net
[0, 9]
2,671,181
2,671,182
ASP.NET Multiple Field Validation
<p>In ASP.NET 2, I've used Field Validators, and RequiredField validators, but I'm unsure of how to handle a case like this. <br> I have two check boxes on a page, and I need to be sure that at least one of them is set. So, if you look at in binary, it can be 01, 10 or 11, but it can not be 00. My question is, what t...
c# asp.net
[0, 9]
5,454,237
5,454,238
Put GridView in Edit Mode Programmatically with ASP MERMERSHIP
<p>I need Put GridView in Edit Mode Programmatically when editing ROLES in ASP MERMERSHIP. Could you provide me some examples? I am not able to write the appropriate EVENTS to display the right EDIT TEMPLATE.</p> <p>Thanks</p>
c# asp.net
[0, 9]
4,786,857
4,786,858
jQuery to prepend URL in img src attribute
<p>I just need a jQuery snippet to do the prepend in img src , i.e</p> <pre><code>&lt;img src='/img/picture1.jpg' /&gt; </code></pre> <p>The code snippet jQuery is to prepend this url</p> <pre><code>http://cdn.something.com/ </code></pre> <p>so after the snippet jQuery, it becomes like </p> <pre><code>&lt;img src...
javascript jquery
[3, 5]
2,007,806
2,007,807
How to get innerhtml value in mozilla
<p>I have below html code </p> <pre><code>&lt;div id="divTest"&gt; Hello &lt;input type="text" id="txtID" value="" /&gt; &lt;input type="button" onclick="getForm();" value="Click" /&gt; &lt;/div&gt; </code></pre> <p>And I have below javascript function to get innerHtml value</p> <pre><code> &lt;script la...
javascript jquery
[3, 5]
2,908,996
2,908,997
How to translate java "?" operator in C#?
<p>I would like to know the translation of this java code in C#</p> <pre><code>n = (length &gt; 0) ? Math.min(length, buffer.length) : buffer.length;//Java code </code></pre> <p>Can it be equivalent to this in C# ?</p> <pre><code>if(length &gt;0) { n = Math.min(length, buffer.length); } else { n = buffer.lengt...
c# java
[0, 1]
381,760
381,761
problem with jquery move image
<p>how can get x,y when mousedown in image and then mouse move in the image and then mouseup get x,y</p> <p>(2 x,y 1-x,y when mouse down 2-x,y when mouse up) all the event in the one image. and language jquery</p> <p>this my code by this not working(image stick to mouse and only mouse_d called)</p> <p>var mx1; var m...
javascript jquery
[3, 5]
4,448,426
4,448,427
Correct Namespace For GetHtmlPage
<p>Can anyone tell me the namespace for GetHtmlPage? I have:</p> <pre><code>using System.Net; using System.IO; </code></pre> <p>as per the instructions found here: <a href="http://www.mikesdotnetting.com/Article/49/How-to-read-a-remote-web-page-with-ASP.NET-2.0" rel="nofollow">http://www.mikesdotnetting.com/Article/...
c# asp.net
[0, 9]
2,720,362
2,720,363
FIPS compliant algortihm to store passwords in a database?
<p>I am looking for a FIPS -compliant hashalgortihm to store passwords in the database. I did use the following code but still i get the error "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms."</p> <pre><code> SHA1CryptoServiceProvider Testsha1 = new SHA1CryptoSer...
c# asp.net
[0, 9]
2,411,818
2,411,819
variable name is not replaced with value inside head tag
<p>My asp.net site has a navigation that uses an .active css tag to change the color of the navigation color on active pages. </p> <p>This is in my site.master header </p> <pre><code>.active { background-color: #c62020; border-right: 1px solid; margin-left: -1px; } &lt;/style&gt; </code></pre> <p>This works...
c# asp.net
[0, 9]
5,891,214
5,891,215
IE blocks pdf file save popup
<p>I have created savepdf.aspx which writes pdf file contents to response as attchment by following code</p> <pre><code> Response.Clear(); Response.AppendHeader("Content-Disposition", "attachment; filename=Sample.pdf"); Response.ContentType = "application/pdf"; Response.BinaryWrite(transc...
c# asp.net
[0, 9]
2,141,970
2,141,971
jQuery .keyup() triggering infinitely
<p>I'm trying to get immediate feedback from an input box as to the letter that has been typed into it. The input has a maxlength of 1 character and I want jQuery to be alerted to this value the moment the user lifts their key having entered their character.</p> <p>The following detects the value immediately but then ...
javascript jquery
[3, 5]
4,582,258
4,582,259
how can i get one value to another on user click?
<p>i have two text box when i press a button text of textbox one can automatically display on textbox2. i used V S 2010 I need this code in c#</p>
c# asp.net
[0, 9]
1,525,193
1,525,194
What is significance of javascript _property
<p>I look into the jQuery source v.1.8.1 and search the jQuery.fx.speeds and its value is </p> <pre><code>jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; </code></pre> <p>Why did the jQuery developers use "_defaults" instead of "defaults"??</p> <pre><code>jQuery.fx.speeds = { slow: 60...
javascript jquery
[3, 5]
2,791,044
2,791,045
what is a good idea for manage and check pages permission?
<p>i have built a crm with asp.net.I want to set and check </p> <ul> <li>some permission for some pages,</li> <li>some user controls,</li> <li>some panel ,</li> <li>some records in database .</li> </ul> <p>please get me a good idea for manage and check this permission easily.</p>
c# asp.net
[0, 9]
2,266,732
2,266,733
Parsing an XML getting through HttpPOST in android
<p>During the execution of a httpPOST i store the response as a String and the response i am getting is like this:</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;string xmlns="http://localhost:4471/"&gt;101~Success&lt;/string&gt; </code></pre> <p>i just want to get 101~Success after parsing so ...
java android
[1, 4]
2,649,855
2,649,856
jQuery - Calendar plugin, pre selected dates on multiple select
<p>Im using a calendar plugin for jQuery, im using the 'selecting multiple dates' demo which is here <a href="http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiple.html" rel="nofollow">http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerMultiple.html</a> </p> <p>Im using the de...
javascript jquery
[3, 5]
4,526,448
4,526,449
Disable browser buttons and url address bar in all major browsers?
<p>I don't know if this is possible but is it possible to disable a url address bar in the browser when a user is on a certain page? Also is the user able to disable browser buttons if a user is on a certain page?</p> <p>But the twist is that it needs to work on all browsers, Chrome, Safari, IE, Opera and Firefox. It ...
php javascript
[2, 3]
5,474,775
5,474,776
PHP And JS Code Not Executed
<p>i Have This PHP and JS Code on my web page.</p> <pre><code>&lt;?php include 'connect1.php'; $query = "SELECT URL FROM remontee_nlf ORDER BY URL ASC"; $result = mysql_query($query) or die (mysql_error());; $counter = 0; // write the values from the database into the javascript array echo "&lt;script type='text/j...
php javascript
[2, 3]
4,033,049
4,033,050
Reason behind deprecating the Thread's stop(), destroy(), resume() methods
<p>I read that the Thread class stop(),destroy(),resume() methods been depricated. As a reason it says:</p> <p>"Because stopping a thread in this manner is unsafe and can leave your application and the VM in an unpredictable state"</p> <p>Honestly I didn't understand the reason perfectly from the text. Can someone ex...
java android
[1, 4]
4,774,263
4,774,264
javascript attributes store this
<p>Is something like the following possible?</p> <pre><code>var obj = { data:'some data', init:function(){ console.log(this.data); console.log(obj.data); } } obj.init(); </code></pre> <p>Here, <code>console.log(this.data)</code> and <code>console.log(obj.data)</code> both return the same v...
javascript jquery
[3, 5]
4,493,557
4,493,558
Preloading web assets: load less then the full size of the file
<p>You (me, we, everyone etc) no doubt aware of methods to load and preload assets on a site. But I was wondering if it's at all possible, either server or client side, to partially load an assets.</p> <p>Let's say I have 10 images on my site, all 500kb.</p> <p>But these images are not immediately viewable until a us...
php javascript asp.net
[2, 3, 9]
2,203,563
2,203,564
Is there a good Python library that can parse C++?
<p>Google didn't turn up anything that seemed relevant.</p> <p>I have a bunch of existing, working C++ code, and I'd like to use python to crawl through it and figure out relationships between classes, etc.</p> <p>EDIT: Just wanted to point out: I don't think I need or want to parse every bit of C++; I just need some...
c++ python
[6, 7]
3,256,423
3,256,424
How to differentiate between click and drag/drop event?
<p>I have a problem with element which is both draggable and also has a click event.</p> <pre><code>$('.drag').mousedown(function() { //... }); $('.class').click(function() { //... )}; &lt;div class="drag class"&gt;&lt;/div&gt; </code></pre> <p>When I drag and drop the element, the click event gets fired, t...
javascript jquery
[3, 5]
4,213,597
4,213,598
Jquery/JS scoping
<p>This may be pretty simple but it's stumping me. I'm trying to return a variable in javascript to another variable outside of the function's scope. For some reason, the assignment isn't occurring. Here's my code:</p> <pre><code>var time = Math.round(((new Date()).getTime())/1000); // first call to get data var powe...
javascript jquery
[3, 5]
1,514,104
1,514,105
Select element(s) without specific element
<p>Hi this is my problem:</p> <pre><code>&lt;ul&gt; &lt;li&gt;&lt;span class="show"&gt;*&lt;/span&gt;Show&lt;/li&gt; &lt;li&gt;&lt;span class="show"&gt;*&lt;/span&gt;Show&lt;/li&gt; &lt;li&gt;&lt;span class="show"&gt;*&lt;/span&gt;Show&lt;/li&gt; &lt;li&gt;&lt;span class="show"&gt;*&lt;/span&gt;Show&lt;/li...
javascript jquery
[3, 5]
4,556,174
4,556,175
How to check/uncheck checkboxes by clicking a hyperlink?
<p>I have 11 checkboxes with individual ids inside a modal popup.I want to have a hyperlink called SelectAll,by clicking on which every checkbox got checked.I want this to be done by javascript/jquery.</p> <p>Please show me how to call the function</p>
javascript jquery
[3, 5]
4,693,956
4,693,957
Jquery get text value of option on change
<p>I have code like this:</p> <pre><code>&lt;select name="caffe" id="caffe"&gt; &lt;option value="5"&gt;Red&lt;/option&gt; &lt;option value="6"&gt;nmfxnsdnx&lt;/option&gt; &lt;/select&gt; &lt;div id="gll_select"&gt; &lt;script&gt; var caffe = $("#caffe").val(); var cff_name = $("#caffe...
javascript jquery
[3, 5]
4,152,799
4,152,800
ASP.NET - Internal messaging system
<p>I want to implement a messaging system in my Web application similar to the one Chase and Facebook have on their websites. Should I develop this on my own, or should I find a 3rd party control or other solution? Would google provide some sort of API to make this easy? I'm leaning towards developing this on my own...
c# asp.net
[0, 9]
193,327
193,328
Falling through a switch case?
<p>I was in the process of writing a switch case when I read on the PHP site: </p> <p><code>Thus, it is important not to forget break statements (even though you may want to avoid supplying them on purpose under certain circumstances).</code></p> <p>A switch case without break statements was perfect for what I wanted...
php javascript
[2, 3]
669,102
669,103
how to call javascript/jQuery when javascript is disabled in mozilla/ie?
<p>how to call javascript/jQuery when javascript is disabled in mozilla/ie ?</p>
javascript jquery
[3, 5]
1,819,407
1,819,408
How to prevent jQuery functions from not running if a preceding function fails?
<p>I'm having an issue with jQuery functions not running if a preceding function failed for example:</p> <pre><code>jQuery(function($) { // this function failed to run because the dependency file wasn't loaded }); jQuery(function($) { // fails to run unless all preceding function succeed }); jQuery(functio...
javascript jquery
[3, 5]
6,005,080
6,005,081
Communicate from one page to another? JavaScript, PHP?
<p>I'm building a prototype where on one page A I have a controller. Imagine a TV remote. On another page B, independent of form A -- it can be a different screen/computer -- with some elements X, Y, and Z that are going to be animated by the remote on page A.</p> <p>My first idea would be:</p> <ul> <li>Remote on pag...
php javascript
[2, 3]
5,781,269
5,781,270
jQuery iframe upload. Handle network errors
<p>This code works, except now I need to handle network errors.</p> <p>For example if the network is turned off while a file is uploading. I need to handle errors like these.</p> <p>How can I proceed?</p> <pre><code>var name = 'iframeUpload'; var cur = $(this); var iframe = $('&lt;iframe name="' + name + '" id="' + ...
javascript jquery
[3, 5]
2,466,492
2,466,493
Changing div class within set
<p>I have the following html and I want to change the divs around onclick. For example: </p> <p>Initial</p> <pre><code>&lt;div class="box1"&gt;Story 1&lt;/div&gt; &lt;div class="box2"&gt;Story 2&lt;/div&gt; &lt;div class="box2"&gt;Story 3&lt;/div&gt; &lt;div class="box2"&gt;Story 4&lt;/div&gt; </code></pre> <p...
javascript jquery
[3, 5]
4,765,288
4,765,289
jQuery: write variable between 2 quotation mark
<p>I want to create a loop for input so that the variable img get number 1 to 5 like this: </p> <pre><code>img1, img2 ... img5. </code></pre> <p>How to write <code>$i</code> after img?</p> <pre><code>for ($i=1;$i&lt;=5;$i++) { function(data) { $('input[name="img1"]').val(data) }); } </code></pre> <p><strong>Not...
javascript jquery
[3, 5]
2,314,957
2,314,958
How do I run a function only when a div gets loaded?
<p>I want to run a function only when a div gets loaded.</p> <p>When I load the page, a number of files are loaded. At the end of the list, PHP echoes a div. When this one is displayed, jQuery should run a function.</p> <p>I can do this with a click-event, but I want it to work automatically, without pushing a button...
php javascript jquery
[2, 3, 5]
3,495,920
3,495,921
Call C#.net method in Javascript
<p>I Have Method in Code behind(C#) and Want to call this method inside the javascript.</p> <p>My Code in C#</p> <pre><code> private void StatusSet() { List&lt;StatusHandler&gt; iListStatus = new List&lt;StatusHandler&gt;(); iListStatus.Add(new StatusHandler('A', "Active")); ...
javascript asp.net
[3, 9]
5,700,951
5,700,952
Is there any benefit to defining a utility function directly on the jQuery object?
<p>Are there any specific benefits derived from defining a utility function directly on the jQuery object:</p> <p>For instance, given the following two constructs:</p> <pre><code>$.someUtility = function(){ //do some something with jQuery } var someUtility = function(){ //do some something with jQuery } </cod...
javascript jquery
[3, 5]
107,571
107,572
Onblur, what is the next control which will gain focus?
<p>I am firing some code onblur() of a textbox. But I want to do something different if the user clicked on the cancel button to cause that onblur(). Is there a way within the onblur() event handler function to know what the control is that is about to receive focus and react acordingly?</p> <p>-Joseph</p>
javascript jquery
[3, 5]
4,141,126
4,141,127
grid view control in asp.net
<p>I have one grid view control in my asp.net web application. For example i have data grid as 10 rows and 8 columns in fixed size. I want When the data comes to grid view more than 10 rows means the scroll bar will appear to display and not the size of the data grid exceed. How can I do . I use the following source ...
c# asp.net
[0, 9]
5,337,883
5,337,884
How to disable a row in gridview?
<p>In have to disable a row in which chechbox is checked.I have tried it in RowDataBound event by using following code but it shows error <code>Object reference not set to an instance of an object</code>.</p> <pre><code> CheckBox cbAttachClrReq = (CheckBox)gvEntity.FindControl("chkAdd"); if (cbAttachClrReq.Checked...
c# asp.net
[0, 9]
1,486,615
1,486,616
Need To Blink Text in GridView using Jquery
<p>I need to blink some text in GridView Using Jquery its working outside GridView but i implemented the same inside the GridView its not working can any 1 please point me to my issue here is the link of my sample application if any 1 want to see the source code : <a href="http://www.mediafire.com/file/oxk90bjsmfqa03f/...
jquery asp.net
[5, 9]
212,212
212,213
selectall() property in C# for textbox control
<p>I know, there is a property for textbox control in windows form, called selectall().</p> <p>I am trying to achieve the same in my web app, for a textbox, once it recieves the focus(), i am trying to select all the text in the textbox.</p> <p>I know, i can write some jquery for this, but, is there any other easier ...
c# asp.net
[0, 9]
4,328,611
4,328,612
How to disable scrolling for ListView on Android?
<p>I have the following question: I have a difficult layout that contain ListView. I need disable scrolling ability for ListView, because it's container (root Layout) have had ScrollView already, and I don't need a scrolls for ListView. I disable scrolls by android:scrollbars="none", but abilitity for scrolling would s...
java android
[1, 4]
1,473,270
1,473,271
Using jQuery how to select the first next element(s) that matches a certain selector?
<p>How to select a node after <code>$(this)</code> that matches a certain selector?</p> <p>eg:</p> <pre><code>&lt;textarea id="foo"&gt;&lt;/textarea&gt; &lt;a href="#"&gt;someLink&lt;/a&gt; &lt;a href="#"&gt;someOtherLink&lt;/a&gt; &lt;textarea id="bar"&gt;&lt;/textarea&gt; </code></pre> <p>With out directly selecti...
javascript jquery
[3, 5]
1,560,309
1,560,310
how to refresh my record count from database - asp.net?
<p>i have in my asp.net web-page <code>label</code> that contain result of count record query.</p> <p>i need to see refresh this query and see the correct record count.</p> <p>how to see it ? i need any timer ? how to do it without Flickers ?</p> <p>can i get any sample C# asp.net code ?</p> <p>thanks in advance<...
c# asp.net
[0, 9]
4,936,572
4,936,573
How to set buttons with dynamic ID's clickable jquery
<p>I have form that goes like this:</p> <pre><code>&lt;?php foreach($userID as id):?&gt; &lt;input type="button" id="ok_&lt;?php echo id?&gt;" value="ok" /&gt; &lt;input type="button" id="cancel_&lt;?php echo id?&gt;" value="cancel" /&gt; &lt;?php endforeach;?&gt; &lt;script&gt; $(document).ready(function(){ //how...
php javascript jquery
[2, 3, 5]
985,023
985,024
inject UTC time into the page
<p>I'm using several literals to inject the user's time onto the the page. The values in the HTML are the UTC times.</p> <pre><code>var TheDay = parseInt($('#UserDayToday').html(), 10); var TheMonth = parseInt($('#UserMonthToday').html(), 10); var TheYear = parseInt($('#UserYearToday').html(), 10); var TheHours = pars...
c# javascript asp.net
[0, 3, 9]
4,997,062
4,997,063
Render dropdown selected value in gridview
<pre><code>&lt;asp:TemplateField HeaderText="Division"&gt; &lt;ItemTemplate&gt; &lt;asp:DropDownList ID="Division" runat="server"&gt; &lt;asp:ListItem Text="Select" Value="Select"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="Computer" Value="Computer"&gt;&lt;/asp:ListItem&gt; &...
c# asp.net
[0, 9]
2,120,085
2,120,086
Combining document.load + blur
<p>I have the following javascript to determine whether a copyright is properly formatted:</p> <pre><code> var copyright = $('#copyright') var copyright_text = copyright[0].value if (copyright_text.length &gt; 0) { var containsYear = /\d{4}/.test(copyright_text); if (containsYear == false) ...
javascript jquery
[3, 5]
998,734
998,735
Jquery dynamic dropdown event not firing
<p>Hi i am trying to create dropdownlists dynamically and populating the contents via an ajax call, this sort of works in the sense that the drop down is created and populated as required but its 'change' event does not fire. I am posting the code below, if anyone can spot something obvious, can you please let me know ...
javascript jquery
[3, 5]
383,996
383,997
Using jQuery with ASP.NET to Submit a Form
<p>I've used jQuery dozens of times with PHP with great success. I'm working on an ASP.NET application and would like to use jQuery in the same manner. </p> <p>Basically, I've got a masterpage that has the form and a webform that has all the form fields and data. A user can submit the form multiple ways - selection...
c# jquery asp.net
[0, 5, 9]
3,306,765
3,306,766
Loading youtube videos by its URL with the help of a JS/Jquery function
<p>I am trying to load youtube videos using JS function. The intention is to have the user simply copy and paste the youtube video URL into an input field and then have my JS code takes care of the loading part. Unfortunately I am not sure why js code is not loading anyvideo? <a href="http://jsfiddle.net/bullseye2346/f...
javascript jquery
[3, 5]
5,905,825
5,905,826
modular use of a page on multiple domains
<p>I am looking for the best way to do this.. basically i have multiple domains hosted on the same server. Each domain will have a page that is the same across them all. I want it to be modular in the sense that if i change it in one place it will be changed on all of them. What is the best way to do this? My site is b...
php javascript
[2, 3]
4,541,591
4,541,592
setting the height of the parent according to the highest child element, jquery
<p>I have a layout, which basically contains a</p> <pre><code>&lt;div class="line" id="#"&gt; &lt;div class="summary"&gt; Some Text &lt;/div&gt; &lt;div class="summary"&gt; Some &lt;/div&gt; &lt;div class="summary"&gt; Some long text &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I want, using jQuery, to expand the heigh...
javascript jquery
[3, 5]
5,020,110
5,020,111
How to apply static class in php
<p>I am java and php programmer. In java i can use static class/method so that anyone can use the same one time created class during run-time.</p> <p>But for php how to do it since it is script based and only run while we refreshing the page?</p> <p>My main objective is, I want to use syncronized class/method so that...
java php
[1, 2]
3,314,003
3,314,004
UpdatePanel initial call
<p>I am using an UpdatePaenl in an asp.net page. It has a button to trigger it. I'm able to show "Loading" when the button is pressed. Here's my issue: I need it to show "Loading" when the page is first called, not just when a button is pressed.</p> <p>I would imagine that JavaScript would be used to trigger the Upd...
asp.net javascript
[9, 3]
3,130,572
3,130,573
javascript comparing strings (for date purposes)
<p>Ive only ever done absolute comparisons before, so Im a bit stuck as to how to deal with this...</p> <p>I have two strings returned from PHP (format is DATE_ATOM i.e 2012-01-20)</p> <p>What I need to do is compare one string (date) against another - however, I need to return true on the following three conditions<...
php javascript
[2, 3]
1,517,228
1,517,229
Looping a json encode filtered by type
<p>I create a json encode in PHP like this:</p> <pre><code>$get = mysql_query("SELECT * FROM $table") or die(mysql_error()); $data = array(); while($row = mysql_fetch_assoc($get)){ $data[$row['id']][0] = $row['g']; $data[$row['id']][1] = $row['w']; $data[$row['id']][2] = $ro...
php javascript
[2, 3]
2,059,099
2,059,100
Jquery post multiple vars to php
<p>I want to post multiple vars from jquery to php</p> <pre><code>&lt;script&gt; //vote script function vote(type){ $.post('vote.php', '{user_id: &lt;?php echo $fb_userid;?&gt;, page_name: &lt;?php echo $get_image;?&gt;, type: type}', function(data){ $('#voteNumber').html(data); }); }//end function &lt;/sc...
php javascript jquery
[2, 3, 5]
2,527,177
2,527,178
When and how can I use a JQuery function ? - easy one
<p>I want to know that when we have a function with parameters that </p> <p>works like a VB procedures</p> <p>When and how can I use this function ?</p> <p>How can we call this ?</p> <pre><code>&lt;script type="text/javascript"&gt; function place(div, image_x, image_y ) { $("#"+div).css("position", "absolute"...
javascript jquery
[3, 5]
2,793,683
2,793,684
how would i upgrade this code to work with jquery 1.6.2
<p>how would i upgrade this code to work with jquery 1.6.2 as it only seems to work if i use Version 1.2.6.</p> <pre><code>&lt;script type="text/javascript" charset="utf-8"&gt; window.onload = function () { var container = $('div.sliderGallery'); var ul = $('ul', container)...
javascript jquery
[3, 5]
2,936,376
2,936,377
If span exists add class to link
<p>I have a list of links that I retrieve by AJAX. I parse the links and append them to a div. However sometimes there is a 'span' just after the 'a' that I need to take into consideration.</p> <p>The code looks like this:</p> <pre><code>&lt;ul&gt; &lt;li&gt;&lt;a href="/link1" class="list-link"&gt;Link1 &lt;/a&gt...
javascript jquery
[3, 5]
2,834,336
2,834,337
Difference between contentResolver and ContentObserver
<p>I am developing an Android application that receives MMS and I read a lot of code. And there is contentResolver and ContentObserver, but I do not get what is the difference between them</p> <p>Like this statement:</p> <p><code>contentResolver.registerContentObserver(Uri.parse("content://mms-sms"), true, mmsObserv...
java android
[1, 4]
5,653,746
5,653,747
How can I replace a class with another using jQuery?
<p>What jquery can I use to change the class that's used in the following from indent_1 to indent_2 or indent_4 to indent_2? I know about remove class but how can I do that when the classes are names that vary?</p> <pre><code>&lt;div class="rep_td0 indent_1" id="title_1"&gt;Menu two&lt;/div&gt; or &lt;div class="rep...
javascript jquery
[3, 5]
3,025,141
3,025,142
How can alter text in a loop in a DIV
<p>I have text inside a DIV tag. Is it possible to change the text content with five different text contents in cycle that never ends? Sounds simple, but I'm trying to find the easiest approach with jquery or related.</p> <p>Many thanks, Erik</p>
javascript jquery
[3, 5]
4,666,673
4,666,674
How to use activity to request data from service?
<p>Now, my program have an activity and a service. The service runs in the background and sometimes vibrates to ask users give some selection. I meet a problem here. I know broadcast could pass data from service to activity. But if the activity is not working, then it cannot receive the broadcast information, so if use...
java android
[1, 4]
1,424,444
1,424,445
JQuery apply bind to all children
<p>I have:</p> <pre><code>$(document).ready(function(){ $("#eventsContent").children().each(function(){ $(this).bind("mouseenter", function(){ $(this).css("background","#F5F5F5"); }); }); }); </code></pre> <p>I have tried this a couple different ways, but this is the jist of what i've done. </p> <p>I have...
javascript jquery
[3, 5]
1,287,389
1,287,390
JQuery Check if input is empty and show status of it
<p>I have an input which I need to check whether it is empty or not:</p> <pre><code>&lt;input id="myinput" name="myinput" type="text" value="hello" /&gt; </code></pre> <p>The input above could change any time, so I need to check it on <code>onchange</code>?</p> <p>If my input is not empty then I need to add the clas...
javascript jquery
[3, 5]
5,010,626
5,010,627
jquery.extend(true, [], obj) not creating a deep copy
<p><a href="http://jsfiddle.net/s2bLv/7/" rel="nofollow">jsFiddle here</a>.</p> <p>If deep copying worked, the output would be "Curious George" and not "Ender's Game". How can I make a deep copy? An answer to <a href="http://stackoverflow.com/questions/122102/most-efficient-way-to-clone-an-object">this question</a> in...
javascript jquery
[3, 5]
3,543,417
3,543,418
How to compare two values without if else statement
<p>How can I compare two values <strong>without if/else statement</strong>?</p> <p>e.g</p> <p><code>var One = $('#one').height();</code><br /> <code>var Two = $('#two').height();</code></p> <p>How to check which value is higher <strong>without if/else statement</strong>?</p> <p>There is no must to avoid <code>if/el...
javascript jquery
[3, 5]
1,657,007
1,657,008
Wrap all non-child HTML into a DOM-element
<p>I am working on a little hyphenation engine for a website, and I got to get my head around this. I am matching all <code>p.hyphenatable</code> and send the content to a PHP-script to have it hyphenated like this:</p> <pre><code>jQuery(".hyphenatable").each(function() { var hyphenatableObject = jQuery(this); ...
javascript jquery
[3, 5]
498,796
498,797
Converting string array to Name/Value object in javascript
<p>I currently am dealing with a Web Service that is returning an array of strings to the client. From here I would like to take this array of strings and convert it into an object that gives each string a name so to reference it later.</p> <p>So start with this:</p> <pre><code>var result = ["test", "hello", "goodby...
javascript jquery
[3, 5]
4,476,242
4,476,243
how to insert rows into gridview
<p>Sir, I want to have an insert link functionality to insert rows into gridview As we have auto generate edit and delete in gridview in asp.net,. how to do it?can u also provide me the links.</p>
c# asp.net
[0, 9]
672,563
672,564
Displaying a list of images based on a folder
<p>I am so rusty and looking for assistance. I have loaded a few image files into a folder on my web server (So, uploaded them). I now want to simply display them, one underneath each other on as aspx page. So, I want to iterate through all image files in a folder, and display them on a page.</p> <p>The easiest way wo...
c# asp.net
[0, 9]
1,829,498
1,829,499
get text, and split it after a given string
<p>is there any javascript method to get text, and split it after a certain value? </p> <p>Like for instance, having: </p> <pre><code>&lt;p&gt;here is some text &lt;!-- read more --&gt; and here is some more&lt;/p&gt; </code></pre> <p>get this:</p> <pre><code>&lt;p&gt;here is some text&lt;/p&gt; &lt;p&gt;and here i...
javascript jquery
[3, 5]
3,431,159
3,431,160
attaching a Client control ID and value to the Request object...possible?
<p>I have a Grid view in which the columns are Databound Item templates. I need to attach the client Id of a control(Hyperlink) and its value to the request object while posting it back to the server(since Viewstate is turned off). Using the Client Id, I can write code to retrieve the value of the hyperlink 'text' fi...
c# javascript asp.net
[0, 3, 9]
5,880,274
5,880,275
JQuery with SMARTY php
<p>This might seem a very noob question but I haven't found the answer yet. I have a header.tpl file which contains xhtml code. I want to and some java script to it using jquery. But my problem is that it simple doesn't happen what I tell it to do. Because the page hoster comiples php with SMARTY I had to make a small...
php jquery
[2, 5]
2,568,403
2,568,404
select box option value not getting perfect while generating selectbox dynamically by using jquery
<pre><code>&lt;?php $res = mysql_query($qry) or die(mysql_error()); while($data = mysql_fetch_row($res)) { echo "&lt;option value=".$data[0]."&gt;" .$data[0]. "&lt;/option&gt;";&lt;br&gt; } ?&gt; </code></pre> <p>In this case, supposing <code>data[0]</code> has sample data value then inside value only sample is stori...
php jquery
[2, 5]
1,327,951
1,327,952
How to make a sliding thingamajig between photos?
<p>See the effect in the photos in the article here:</p> <p><a href="http://www.popsci.com/science/article/2012-11/and-after-images-show-hurricane-sandys-devastation" rel="nofollow">http://www.popsci.com/science/article/2012-11/and-after-images-show-hurricane-sandys-devastation</a></p> <p>Does anyone have any idea ho...
javascript jquery
[3, 5]
5,112,648
5,112,649
if users press the browser's back button to reach the prior page..then page should display a message like "web page expired" in asp.net
<p>if users press the browser's back button to reach the prior page..then page should display a message like "web page expired" in asp.net</p> <p>can i use javascript for this???</p> <p>for example..</p> <p>there are 4 pages in web sites. 1,2 and 3 can be back. but when the 4th page run then 4th page can not be back...
javascript asp.net
[3, 9]
4,873,312
4,873,313
Javascript .toFixed() more precise rounding alternative?
<p>For rounding decimals (prices), I've been using .toFixed(2) for quite some time now. But I just recently discovered that Javascript can't "precisely" round decimals. I was a bit shocked that even 10.005 couldn't be rounded correctly to 10.01. It just got rounded down to 10.00. And other times it did round correctly....
javascript jquery
[3, 5]
4,393,265
4,393,266
Problem in displaying all images inside the folder using javascript
<p><strong>Hi,</strong></p> <p>For my project I m using jquery bulit in photo slide show,jquery code is taking images from array and displaying the images..The problem is I have a lot of images which I don't want to put it in Array(because it need manual effort) instead of that I want to read each image from the folde...
javascript jquery
[3, 5]
300,513
300,514
Reverse jquery resize shift functionality
<p>When you resize a div using jquery resize plugin, if you hold the shift key the aspect ratio is kept.</p> <p>Well it is possible to {aspectRatio: true} to option list and if i hold the shift key to disable the aspect ratio ?</p> <p>Thanks.</p>
javascript jquery
[3, 5]
452,594
452,595
How to load jQuery if it's not already loaded?
<p>I'm working on a weather widget, so in order to optimize it i want to check if jQuery has been loaded in the page, if Not, the widget will load it from my website. Because not all the websites use jQuery. how to do that?</p> <p>Example of how to put my widget:</p> <pre><code>&lt;html&gt; blah blah blah ..............
javascript jquery
[3, 5]
4,674,525
4,674,526
Sending data to web through command-line with javascript built-in
<p>Webkit and Selenium use a browser interface to interact with javascript elements and send data. Is there a way where I can fill in a ajax form and send data straight from a command-line ? If not, why is it not possible ? If so, how ? Thanks</p>
c# java javascript c++
[0, 1, 3, 6]
4,528,060
4,528,061
jquery - scope of function passed to $().grep
<p>It seems that "myFunction" in the following example loses its scope. </p> <pre><code>$().grep(myArray, myFunction) </code></pre> <p>By this, I mean that it no longer has access to the "this" of the scope it was defined in, and "this" becomes the window object. Can anyone explain why this is and if there's a handy ...
javascript jquery
[3, 5]
268,440
268,441
why BroadcastReceiver don't catch the Action?
<p>Hi I am working on BroadCastReciver. There are two way to define BroadCastReciver.First one is using Java code and Second one is define in AndroidManifest.xml using . In my code second one is don't work properly.please tell where am i goes wrong.</p> <pre><code>public class HotelReceiver extends BroadcastReceiver {...
java android
[1, 4]
4,498,866
4,498,867
Is it possible to create a jQuery function that plays around with the name of the selector?
<p>I am trying to make a counter for "Number of characters left" in a form:</p> <pre><code>&lt;input type="text" id='username_input'&gt; &lt;input type="text" id='password_input'&gt; </code></pre> <p>Is it possible to make a function whose parameter will be part of the selector? So you can understand my question bet...
javascript jquery
[3, 5]
2,305,835
2,305,836
How to make sure at least one check box is selected
<p>I'm trying to make sure at-least one check-box is selected using custom validator and javascript but but it does not show the error message at all. It blocks the code to go forward but fails to show the error message. If I select one checkbox then the code move on to the next level. What am missing here? thanks.<...
c# javascript asp.net
[0, 3, 9]
2,588,843
2,588,844
How can we simulate calls and SMS in Android?
<p>Can we simulate calls and SMS in android programmtically? Like in Windows mobile we can simulate calls and SMS.</p>
java android
[1, 4]
4,243,445
4,243,446
Populate .data() with $.getJSON()
<p>I am trying to populate <code>$('div').data()</code> through JSON. It works fine with <code>JQuery.parseJSON</code> but not with <code>$.getJSON</code>.</p> <pre><code>// works as expected $('div').data('dat', { xmin: '-10', xmax: 40 }); $('div').data('dat', jQuery.parseJSON('{"bbx" : {"xmin" : "-10", "xmax" : "40"...
javascript jquery
[3, 5]
5,526,998
5,526,999
HOw can i do that partial match in jquery
<p>I am trying this</p> <pre><code> $("ul.nav-tabs a:contains('profile')").parent().addClass("active") </code></pre> <p>It don't work if i have <code>Profile</code> in there.</p> <p>Is there any way to make that <code>case insensitive</code></p>
javascript jquery
[3, 5]