Unnamed: 0
int64
302
6.03M
Id
int64
303
6.03M
Title
stringlengths
12
149
input
stringlengths
25
3.08k
output
stringclasses
181 values
Tag_Number
stringclasses
181 values
1,291,437
1,291,438
Javascript resize big image only works after F5
<p>I use this javascript to resize, to a max of 800px, a big (5Mb) image on a page:</p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function () { $('.detailImg').each(function () { var maxWidth = 800; // Max width for the image var maxHeight = 800; // Max height for t...
javascript jquery
[3, 5]
2,036,004
2,036,005
Add validation method to "jquery validation plugin"
<p>Hello im using jquery validation plugin to validate my form. I want to add one more rule to the validation, but cant get it to work. <strong>Input value should be less or equal previous element value.</strong></p> <p>It is possible to do it ?</p> <p>Here is the code -</p> <pre><code>&lt;input type='text' value='&...
javascript jquery
[3, 5]
4,946,730
4,946,731
How do I assign javascript variable to php variable?
<p>i have a javascript variable which have some value that variable value assign to php variable how i do this thing</p> <pre><code>&lt;script type="text/javascript"&gt; var view = true; var bcount=10; var wcount=10; var tcount=10; &lt;/javascript&gt; &lt;?php $whitelistcount=???? ?&gt; </code></pre> <p>in this code ...
php javascript
[2, 3]
2,292,412
2,292,413
Jquery clone a table with specific row class
<p>Hey how can I clone the table named teamselectiontable with just the table rows that have the class "chosen", and modify another table and replace its contents with the table rows found. But keeping the class names of "row" in the appended table.</p> <pre><code>&lt;table id="teamselectiontable"&gt; &lt;tr class=...
javascript jquery
[3, 5]
1,480,726
1,480,727
Hide li elements if href is empty
<p>I have:</p> <pre><code>&lt;ul class="webServicesURLS"&gt; &lt;li&gt;&lt;asp:HyperLink ID="restURL" runat="server" Text="REST" /&gt;&lt;/li&gt; &lt;li&gt;&lt;asp:HyperLink ID="bboxURL" runat="server" Text="BBox" /&gt;&lt;/li&gt; &lt;li&gt;&lt;asp:HyperLink ID="esbURL" runat="serve...
c# jquery asp.net
[0, 5, 9]
4,735,364
4,735,365
How to check if value from a cell in a column is !=NULL?
<p>I'm trying on gridview updated to check if a cell from a certain column is != NULL ( to check if the user wrote something into the cell)</p> <p>My problem is I don't know how to get the "x column" value from cell.</p>
c# asp.net
[0, 9]
4,514,288
4,514,289
How to verify that the mouse over an element?
<p>Do you know how to check whether the mouse is over an element?</p> <p>Somethnig like this?</p> <pre><code>setTimeout(function() { if($(this).mouseover()) { // this not work return false; } else { $(this).hide(); } }, 1000); </code></pre> <p>Thanks.</p>
javascript jquery
[3, 5]
1,993,290
1,993,291
jQuery hasClass check on altered DOM
<p>I'm having trouble with the jQuery function 'hasClass'. It returns false while it should return true. The hasClass function is looking for an class which was added by javascript. So maybe the hasClass function can't find classes in altered HTML? If so, how can I fix it the best way?</p> <pre><code>$(".slides").mous...
javascript jquery
[3, 5]
2,035,708
2,035,709
Best approach optional settings jQuery plugin
<p>Take a <em>very</em> simple jQuery plugin boilerplate:</p> <pre><code>var _defaults = { foo: false }; function Plugin( settings ) { this.opts = $.extend( {}, _defaults, settings ); } </code></pre> <p>I have a <code>doSomething</code> method that can only run successfully if the option <code>foo</code> is set ...
javascript jquery
[3, 5]
4,355,297
4,355,298
Jquery Error: $("[data-weight]") is null
<p>Stripped a ton of stuff to make it more readable, it throws an error on the line:</p> <pre><code>$('[data-weight]').each(function() { </code></pre> <p>Saying that it is null</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt; &lt;html xm...
javascript jquery
[3, 5]
1,603,989
1,603,990
How can I load an apk dependency from the android market?
<p>I'm using google moderator as a simple way to collect feedback for my application. There's a google moderator app on the market that provides a better interface than the website for mobile users. </p> <p>Getting to the point: Is there a way to get it to install along with your application or a reasonable way to ide...
java android
[1, 4]
1,452,890
1,452,891
usage of jquery .live() to work with both present and future DOM
<p>I've my jQuery code as</p> <pre><code>$('#tarea').click(function() { // Do stuffs }); </code></pre> <p>This works fine for the button #tarea loaded along with this script. If the button #tarea had been loaded using ajax in future, than the above code doesn't work.</p> <p>Now I changed the code to</p> <pre><...
javascript jquery
[3, 5]
471,487
471,488
jQuery/Javascript: get full height of element?
<p>hey guys, my blog has a content div with an id of #content. When i Select it e.g. with Firebug it outlines the full height of the div. With all it's padding &amp; margin at the top and the bottom. </p> <p>jquery height() returns only the inner height of the element it self. </p> <p>how can i query the FULL height ...
javascript jquery
[3, 5]
4,843,912
4,843,913
Alert message box is not displaying when a checkbox is checked
<p>I want to know whether at least on checkbox was checked, so I'm using the following code.</p> <pre><code>function CheckIfAtLeastOneBoxIsCheckedBeforeSavingForm() { var n = $('input[id*="ckHMreq"]:checked').length; alert(n); } </code></pre> <p>When no checkbox is checked, the alert message box displays 0. Howev...
jquery asp.net
[5, 9]
3,832,905
3,832,906
Is this a good asp.net website architecture choice?
<p>I am currently working on an asp.net website and I am using web forms. I have some experience building asp.net websites before using the server controls(grid view,charts,etc) and I feel they are slow. I tried some jquery suites that have all the controls(grid,chart,tree,etc), at least the ones I need, and I like the...
jquery asp.net
[5, 9]
1,049,071
1,049,072
Running .vbs script file in asp.net using process class
<p>I need to run a vbscript file in my asp.net application. This vbscript file generate a pdf and store it in specified location. I used process class and give the command it is working fine but when i host the application in IIS 7.0 it is not working rather it does not give any error too. I am using admin user.</p> <...
c# asp.net
[0, 9]
1,467,293
1,467,294
JQuery tbody question - ASP.NET
<p>I have a aspx page that looks something like this:</p> <pre><code>&lt;table runat="server" id="tblTEst"&gt; &lt;tr id="trHeader" runat="server"&gt; &lt;/tr&gt; &lt;tr id="trRow1" runat="server"&gt; &lt;/tr&gt; &lt;tr id="trRow2" runat="server"&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>When I w...
asp.net jquery
[9, 5]
5,963,615
5,963,616
php header("location: test.php") not working. But java script redirect working
<blockquote> <p><strong>php header("location: test.php")</strong></p> </blockquote> <p>not working. But java script redirect working .</p> <p>I tried with header() doesn't redirects?</p> <blockquote> <p><strong>header("location: test.php");</strong></p> </blockquote> <p>but i tried with java script its working<...
php javascript
[2, 3]
875,698
875,699
Android getWindow to set the background of my activity according to Listpreference
<p>I've basically created a ListPreference where user would be able to choose from a list of options. After they have chosen one of the available option,the app will return to the main activity and the background image will change accordingly,however,it seems my app would't be able to detect the change in preference an...
java android
[1, 4]
3,722,550
3,722,551
Looping through data in Javascript, combining new id's with old
<p>Many times I'm having to loop through data and add the new to the old, but I can never seem to get it right.. Here's what I have now, basically trying to concatinate together the previous number from the new number, ultimately building a comma delimited string of numbers:</p> <pre><code> function showIte...
javascript jquery
[3, 5]
208,446
208,447
Calling a private function of one object from the other in Javascript
<pre><code>var STICKIES = (function () { /* some code here*/ createSticky = function createSticky(data) { $('#color-picker'+data.id).ColorPicker({ color: '#0000ff', onShow: function (colpkr) { $(colpkr).fadeIn(500); return false; }, onHide: function (c...
javascript jquery
[3, 5]
5,169,469
5,169,470
js typing text to screen
<p>hey guys i have a problem with a function which runs just fine on my localhost by when i upload it to the server it doesn't work, could some one please point me to the solution:</p> <pre><code>var text = "some text"; var textArray = text.split(""); var looptimer; function letterloop(){ if (textArray.length &gt;...
javascript jquery
[3, 5]
5,081,097
5,081,098
Possible to append html before and after template?
<p>Is it possible to append html before and after a <a href="http://api.jquery.com/jquery.tmpl/" rel="nofollow">JQuery.tmpl</a>?</p> <p>I would like to insert a nested table in</p> <pre><code>&lt;table id="accTable"&gt; &lt;tr class="row" id="12345"&gt; &lt;/tr&gt; &lt;!-- New row to be inserted here --&gt; &lt...
javascript jquery
[3, 5]
473,451
473,452
visual studio desktop application for iphone/Android apps
<p>i want to develop one desktop application using c# sql lite, this application i want to submit this app to Apple store in case of iphone/ likewise for Android. please let me know if it is feasible to do, if so please let me know the steps that need to be incorporated in order to achieve this.</p>
iphone android
[8, 4]
4,464,934
4,464,935
RedirectUrl info lost after doing postback in client-side code
<p>My login page works like this: when you enter it, javascript reads some info from you, writes it into some input and does submit so that the read data can be read and processed on server.</p> <pre><code>&lt;script language="javaScript" type="text/javascript"&gt; function getUserInfo() { var use...
asp.net javascript
[9, 3]
5,417,054
5,417,055
Element floats according to scroll
<p>I would like to know how can make make an ELEMENT float according to scroll . For example , when I scroll down , the element that is <code>position:fixed</code> and <code>left:0</code> will slowly come down into viewable top left area.</p> <p>Can this be done using jQuery?</p>
javascript jquery
[3, 5]
3,543,029
3,543,030
Access DataItem object on RepeaterItemCommand
<p>how I can to access my Repeater DataItem when a fire button command? I can see that DataItem return null.</p> <p>There is some possibility?</p>
c# asp.net
[0, 9]
5,925,917
5,925,918
How to change output HTML tag <b></b> to <strong></strong>?
<p>How to replace <code>&lt;b&gt;&lt;/b&gt;</code> tag with <code>&lt;strong&gt;&lt;/strong&gt;</code> tag to a specific div?</p> <p>ex: </p> <pre><code>&lt;div id="aaa"&gt;hello&lt;b&gt;wow&lt;/b&gt;!&lt;/div&gt; </code></pre> <p>using javascript to replace with</p> <pre><code>&lt;div id="aaa"&gt;hello&lt;strong&g...
c# javascript asp.net
[0, 3, 9]
3,672,380
3,672,381
Why won't my image display?
<p>Do y'all see anything wrong with my code below? I want my image to appear immediately after page opens but it only opens after the report is run. If this looks complete then could javascript help? Please let me know. Thanks.</p> <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectionRep...
asp.net javascript
[9, 3]
1,057,471
1,057,472
Check File in the server is change or not
<p>I am trying to make an app that connect to the server. The app is used by some devices. If one of the devices upload something to the server, I would like other devices receive the notification about the server has something new. My question is, how to check the server is change or not? How often we must check the s...
java android
[1, 4]
2,055,424
2,055,425
What's Android Equivalent of iOS's Post Notification and Delegate function?
<p>I find the Post notification and delegate function are very useful in iOS. Once I finish a task I can notify other piece of code to do something, I am sending out notices for others to do the work.</p> <p>Post Notification is when you sending notice right away, whereas delegate is sometime down the line, it will s...
iphone android
[8, 4]
3,185,852
3,185,853
add new div dynamically but click event is not working on new divs
<p>Im trying to make a button so that when I click on it it creates a new button after it then when I click on the next/new button it will create a button after itself but the click event only works on the first button, can you help?</p> <p>Here is my fiddle = <a href="http://jsfiddle.net/hyeFB/" rel="nofollow">http:...
javascript jquery
[3, 5]
5,272,918
5,272,919
What is an action message
<p>This is a really oblivious question. I am trying to figure out what an "action message" is? I assume it has something to do with javascript or java, but can't find anything about it on google.</p>
java javascript
[1, 3]
4,199,939
4,199,940
Is it possible to use a custom java class in an android app?
<p>I know Android apps are based off of Java, I was just wondering is it possible to use a custom Java class in an Android app. The class uses the following java libraries.: </p> <p><code>import java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*;</code></p> <p>If not what are the equival...
java android
[1, 4]
2,995,729
2,995,730
How to implement Windows service kind of infrastructure in ASP.NET
<p>I have limitations to host Windows Services in my web hosting provider. But i need run small task frequently.</p> <p>Do we have any other framework/api which provides similar infrastructure like "Windows Services" from ASP.NET?</p>
c# asp.net
[0, 9]
3,326,262
3,326,263
How to check element triggered by onBlur has certain class with jQuery
<p>HTML</p> <pre><code> &lt;input type="text" id="trainingFee" name ="training Fee" class="number error" value="" onblur="callMe()"&gt; </code></pre> <p>jQuery</p> <pre><code> function callMe(){ if($this.id).hasClass('error')){ alert("has error class"); } </code></pre> <p>}</p> <p>but t...
javascript jquery
[3, 5]
71,745
71,746
Implication of Static Methods
<p>What is the implication when i used 70% of methods of my web application as Static Methods? I am facing the System out of memory exception in my application. Is the static method cresting the problem or some thing else.</p>
c# asp.net
[0, 9]
3,872,985
3,872,986
Process Involved in PHP Screen Scraping
<p>Can anyone tell me the process involved n PHP Screen Scraping of aspx page using POST Request? I want to download the data from a website and save it to Database.</p>
php asp.net
[2, 9]
4,339,347
4,339,348
Accessing key of an array on HTML check boxes
<p>I have a tree with checkboxes and their id has key for item and value as their value.</p> <pre><code>&lt;input type="checkbox" name="list_code[4]" id="list_code[4]" value="AG12345678" checked="checked"&gt; </code></pre> <p>When users select a tree element I can access those by</p> <pre><code>$('input[name^="list_...
javascript jquery
[3, 5]
5,410,253
5,410,254
What's the best JQuery book?
<p>I am a good javascript/asp.net developer, but i am just starting to learn JQuery, Whats the best book to learn JQuery? Books i like their style: Complete reference How to program</p>
javascript jquery asp.net
[3, 5, 9]
440,250
440,251
javascript method not compiling in IE but works fine when running debug
<p>I made this javascript method that I altered from an existing script that I found online that should rotate showing an indefinite number of <code>'.testimonial'</code> divs. The script works fine in chrome and firefox, but doesn't compile in internet explorer, unless you use f12 to start the debugging of the script....
javascript jquery
[3, 5]
4,189,533
4,189,534
How do i check after .hover has started in jQuery that the mouse is still hovering?
<p>I have li boxes that make this jQuery call when an end user hovers on them with his cursor:</p> <pre><code>$('.boxgrid.slidedown').hover(function(){ $(".cover", this).stop().animate({top:'-150px'},{queue:false,duration:300}); }, function() { $(".cover", this).stop().animate({top:'4px'},...
javascript jquery
[3, 5]
1,243,304
1,243,305
Dynamically adding divs through jquery
<p>I am adding elements like <code>div</code> dynamically in the page using jquery.The <code>div</code> CSS is <code>position : absolute</code> .Now my problem is when i add more than 1 div element at the same time than it all overlaps each other. Is there any way so that without changing my element's <code>position ...
javascript jquery
[3, 5]
1,617,990
1,617,991
JQUERY outline textfield to show error
<p>I have a <code>textfield</code> and at the moment i disable the submit button when the <code>textfield</code> does not <code>hold three charactes</code>. What i want to do now is also outline the <code>textfield</code> <strong>bold red</strong> and still have the <code>submit</code> button disabled, however i cannot...
javascript jquery
[3, 5]
511,505
511,506
Convert Javascript Array to PHP
<p>I have a PHP script with curl's an external site which returns a javascript array that looks like this:</p> <p>array[0]='some stuff'</p> <p>array[1]='some more stuff'</p> <p>I would like to take this and convert it into a PHP array so I can reference it later down in the script for echoing. Is this the way to go ...
php javascript
[2, 3]
1,709,382
1,709,383
Bootstrap modal close button does not cause postback
<p>I have a boostrap modal, and here is the button to close it:</p> <pre><code> &lt;div class="modal-footer"&gt; &lt;asp:Button ID="btnClose" CssClass="btn" runat="server" Text="Close" data-dismiss="modal" aria-hidden="true" /&gt; &lt;/div&gt; </code></pre> <p>The Button and modal form are nested in an update panel...
c# javascript asp.net
[0, 3, 9]
1,008,569
1,008,570
Class variable in javascript class
<p>The solution to this <a href="http://stackoverflow.com/questions/84716/is-there-a-better-way-to-create-an-object-oriented-class-with-jquery" rel="nofollow" title="question">question</a> suggested the use of John Resig's class implementation. This solution covers all my needs except:</p> <p>How to declare a public g...
javascript jquery
[3, 5]
5,077,136
5,077,137
How do I assign a function to a global variable?
<p>I'm trying to pass the name of a javascript function to a global variable. I have a generic "CallMyWebService" function built around $.ajax(). The function's url, verb, contenttype, etc. are set based on the value of global variables. Immediately before the service function is called, the globals are set and after t...
javascript jquery
[3, 5]
4,181,489
4,181,490
How can I load a PHP file every 5 seconds with JavaScript
<p>I want a php program to be executed every 5 seconds using JavaScript. How can I do that?</p> <p>I tried using: </p> <pre><code>&lt;script type="text/javascript"&gt; setInterval( function (){ $.load('update.php'); }, 5000 ); &lt;/script&gt; </code></pre> <p>But it doesn'...
php javascript jquery
[2, 3, 5]
1,587,696
1,587,697
jquery, c# and server side data validation
<p>Ive been using jquery to post data and was wondering how best to perform serverside validation on the data. I check the values clientside but know its good practice to also check serverside. Ive seached online but cant really find any examples.</p> <p>Thanks in advance</p>
c# asp.net jquery
[0, 9, 5]
5,538,167
5,538,168
How do I detect my page control values are changed and what values are changed
<p>i have asked a similar question earlier, but this time i need a method that will detect any change made on any control of the page with old and new values in a combined string to maintain history of that particular change. Say if a user made in 4 fields of a page the method will be able to detect the change and crea...
c# asp.net
[0, 9]
1,549,152
1,549,153
Create PriorityQueue from Comparator and Collection
<p>I have a Collection (a Set to be specific) and want to create a PriorityQueue from it. I also want my custom comparator, but there's no such constructor.</p> <pre> PriorityQueue(Collection c) PriorityQueue(int initialCapacity, Comparator comparator) </pre> <p><a href="http://developer.android.com/reference/java/ut...
java android
[1, 4]
5,889,385
5,889,386
class cast exception while loading image from the url in android
<p>I'm using dynamic table layout, in that there is image, and textview. The data is coming from an XML document. What I want is that in table the layout at runtime, I have to get the parsed image and textview. I am getting the textview correctly but not the image. I used the method <code>LoadImageFromWebOperations</co...
java android
[1, 4]
4,367,940
4,367,941
Sound error is played when $(document).keydown is called using ALT + Some Key. [?]
<pre><code>$(document).keydown(function(e){ if(e.altKey &amp;&amp; e.keyCode == 77){ document.title = 'Something'; return false; } }); </code></pre> <p>The function is pretty simple, it's an event listener to get when the User press ALT M, then do something. But this code is playing a sound error...
javascript jquery
[3, 5]
133,288
133,289
Jquery AutoComplete with inherited object paramater
<p>I am using jquery-1.9.0 and jquery-ui-1.10.0</p> <pre><code>var opts = { source: availableTags }; var optsA = Object.create(opts, { select: { value: function (event, ui) {} } }); var optsB = Object.create(opts, { select: { v...
javascript jquery
[3, 5]
3,207,037
3,207,038
Invoking button click event on one page from another page ASP.NET
<p>I have two aspx pages i.e. default1.aspx and default2.aspx. Default1 contains some controls, tables etc. I am showing Default2.aspx into anthor window using hyperlink, setting its target to _blank. What I need is to call a button event which is placed inside Default1.aspx as soon as Default2 is closed (i.e. as soon ...
asp.net javascript
[9, 3]
5,592,472
5,592,473
Why not able to use an int in javascript?
<p>The following code throws a javascript syntax error : </p> <blockquote> <p>Uncaught SyntaxError: Unexpected identifier</p> </blockquote> <pre><code>var num1 = 1; int num2 = 2; int total1 = num1 + num2; console.log('total1 is '+total1); </code></pre> <p>Why is this error thrown ? Can I not use ints in javascript...
javascript jquery
[3, 5]
1,833,968
1,833,969
Efficient Use of the ASP.NET RegisterStartupScript method
<p>When I load data in my code-behind, I find that often I want to run several javascript functions based on my data. It it more efficient to use a StringBuilder to compile all of my function calls and issue RegisterStartupScript one time, or is performance the same if I issue RegisterStartupScript everytime I need it...
asp.net javascript
[9, 3]
2,616,506
2,616,507
increment variable according to numbers of clicks
<p>I have following code:</p> <p>javascript:</p> <pre><code>var counter = 0; var totalItems = 8; var restItems = $num-totalItems; if (restItems==22) { $('#next').click(function(e) { e.preventDefault(); counter++; updatestatus(); }); } function updatestatus() { totalI...
javascript jquery
[3, 5]
2,128,082
2,128,083
Selecting HttpHandler from custom HttpModule
<p>I have an HttpModule and I'd like to choose the HttpHandler for the current request, is that possible? Also <code>web.config</code> is not an option because the condition is not based on path or extension. My googling skills have failed me, no matter what keywords I use all the results are "IHttpHandler vs IHttpModu...
c# asp.net
[0, 9]
765,019
765,020
Calling FormsAuthentication.SignOut() method using jquery
<p>I am using <code>Asp.Net/C#</code> in my project.I am using <code>Forms Authentication</code>.Currently I call <code>FormsAuthentication.SignOut()</code> on click of Asp.Net button.It works well , but my requirement is that I need to log out a user from horizontal menu option </p> <blockquote> <p>Logout</p> </blo...
c# asp.net
[0, 9]
1,132,578
1,132,579
Sort order discrepancy in javascript key value objects
<p>I've set up a jsFiddle example of my problem: <a href="http://jsfiddle.net/3s6Qf/1/" rel="nofollow">Example</a></p> <p>Given this html:</p> <pre><code>&lt;select id="drop1" data-jsdrop-data="countries"&gt;&lt;/select&gt; &lt;select id="drop2" data-jsdrop-data="countries2"&gt;&lt;/select&gt;​ </code></pre> <p>And ...
javascript jquery
[3, 5]
2,533,947
2,533,948
jQuery(document).ready() does not fire
<p>Does anyone know why jQuery document ready might not fire on a website? I put exactly this script in footer and it simply doesn't fire (jQuery 1.8 is included in head section):</p> <pre><code>&lt;script type="text/javascript"&gt; jQuery(document).ready(function() { alert('test'); jQuery("#slideshow ifram...
javascript jquery
[3, 5]
2,415,202
2,415,203
Does the browser "cache" javascript code?
<p>I was fine tuning a page that is heavy on jquery and stumbled across this website:</p> <p><a href="http://www.componenthouse.com/extra/jquery-analysis.html" rel="nofollow">http://www.componenthouse.com/extra/jquery-analysis.html</a></p> <p>When I click on the "Run Test" button the first time, the numbers are way h...
javascript jquery
[3, 5]
1,904,568
1,904,569
Delete image from Folder/Database using RowCommand/RowDeleting events
<p>I am uploading images and display them in a <code>Gridview</code>.I save the images in a folder and the name in the database.Now I want if I uploaded 3 pictures and have to delete one which I select.So I have picture 1 2 3. When I select picture 2 than this will be deleted..How can I do that? This is my code to uplo...
c# asp.net
[0, 9]
577,524
577,525
jquery if mouseover
<p>I have a img with a hover function to reveal an element. Some of this new element overlaps the img so if I then hover over the new element, because the cursor is no longer over the img, the element hides itself and then instantly reappears because the cursor is over the img again. I need to somehow ignore the mouseo...
javascript jquery
[3, 5]
254,528
254,529
Change the position of div on page refresh using jquery
<p>I have 3 <code>div</code>'s, by default I'm showing <code>1 2 3</code>. On each refresh the div position has to change like:</p> <ul> <li>1-2-3</li> <li>2-3-1</li> <li>3-1-2</li> <li>...</li> </ul>
javascript jquery
[3, 5]
2,500,595
2,500,596
Call jquery from php
<p>I have a form with Name : input and a submit. When pressed, it posts to the same php file. My first check is basically <code>if(!$name) { call jquery to insert error class }</code>. I have the jquery set up in a function but I'm not sure how to call the function from the if statement.</p>
php jquery
[2, 5]
3,568,581
3,568,582
How to use jQuery to make a call to c# webservice to get return value
<p>I want to use jQuery to make a call to a c# web service called c.ashx which checks whether that username is valid and returns an error message as a string.</p> <p>What should I put for data: and content type: if the return value of the c# webservice is a string value?</p> <pre><code> jQuery.ajax({ type: "GET", u...
c# jquery
[0, 5]
2,929,503
2,929,504
Match method doesnt work in a user function
<p>I have this function:</p> <pre><code>function checkMobile(){ return $('#js-mobile').val().trim().match(/^09[0-9]{9}$/); } </code></pre> <p>And this in-line code:</p> <pre><code> $('#js-mobile').val().trim().match(/^09[0-9]{9}$/); </code></pre> <p>I dont know why this code doesnt work in my function but work ...
javascript jquery
[3, 5]
891,214
891,215
How to convert this milliseconds into time (hh:mm a)?
<p>I have milliseconds like "1325085788" i want to convert it on hh:mm a . i know this but return me time 01:34 PM instead of 08:53 PM.Whats problem ? </p> <p>My code is :: </p> <pre><code>String created_on = "1325085788"; String pattern = "hh:mm a"; SimpleDateFormat dateFormat = new SimpleDateFor...
java android
[1, 4]
5,285,057
5,285,058
python convert str to javascript literal string
<p>I want to use python to generate javascript code dynamiclly. </p> <pre><code>def convert(jsstring=''): return 'function dosomething () { return %s.toLowerCase(); }' % jsstring </code></pre> <p>The problem is <code>jsstring</code> is a python string.</p> <p>How can i convert it back to javascript string litera...
javascript python
[3, 7]
2,169,926
2,169,927
Styles missing in StreamWriter
<p>I see that when I use <code>StreamWriter</code> to write html to excel file, it is missing some styles like background color. Is it possible to get styles using <code>StreamWriter</code>? If Not, Can I use any other <code>StreamWriter</code>?</p> <pre><code>StringWriter _writer = new StringWriter(); HttpContext.Cur...
c# asp.net
[0, 9]
4,565,632
4,565,633
Organizing script files
<p>I usually have jQuery code that is page specific along with a handful of functions that many pages share. One approach is to make seperate files for organizing, but i'm thinking that putting all the script in one file and making comments in the file for readability would also work. Then when the site goes live I can...
javascript jquery
[3, 5]
5,966,641
5,966,642
[PHP/JavaScript]: Get PHP session value in other file's JavaScript function
<p>I have a PHP file and it holds a value in this session variable: $_SESSION['image_value'].</p> <p>I want this session value in a JavaScript function. Actually, I want to match a string in my JavaScript function with this session value.</p> <p>Anyway I can do this?</p>
php javascript
[2, 3]
4,632,179
4,632,180
get id of a hyperlink inside datalist using javascript
<p>i have a datalist and inside it there is a dropdown list and hyperlink which is loaded dynamically,means if there is one user then there will be one dropdown and one hyperlink and there are two users then there will be two dropdown and two hyperlink.My requirement is when an onchange event occurs in a dropdown i wa...
javascript jquery asp.net
[3, 5, 9]
4,982,668
4,982,669
How to select elements within a variable using jQuery?
<p>Hey, I'm trying to make a simple image browser for TinyMCE which I am using in my CMS. As part of this I need to detect whether the user has selected an existing image, so I can display the "edit" form instead of the "choose an image form".</p> <pre><code>var selected_html = ed.selection.getContent(); var $elem = $...
javascript jquery
[3, 5]
324,982
324,983
Android .setmesage with subscript or superscript text
<p>How does one display subscripts or superscripts in .setmessage?</p> <pre><code> show = new AlertDialog.Builder(mContext) .setTitle("Error") .setMessage( "Please enter a value for P&lt;sub&gt;&lt;small&gt;1&lt;/s...
java android
[1, 4]
2,632,509
2,632,510
Alternative to .change in jquery?
<p>I'm trying to fire an ajax event, and passing the value of select list options as arguments in the ajax call. Unfortunately, I'm firing the call on the .change event, and it is passing the values of the select option before the new option has been selected (i.e passing the previously selected options values). Is the...
javascript jquery
[3, 5]
3,148,097
3,148,098
JQuery: .index() returns -1
<p>Here's main part of html:</p> <pre><code> &lt;div id="table"&gt; &lt;div class="table_item"&gt;asd&lt;/div&gt; &lt;div class="table_item"&gt;asd&lt;/div&gt; &lt;div class="table_item"&gt;asd&lt;/div&gt; &lt;/div&gt; </code></pre> <p>And JS (JQuery): </p> <pre><code>$(document).ready( function()...
javascript jquery
[3, 5]
3,197,908
3,197,909
export data grid view into excel in asp dot net
<p>export data grid view to excel code is run and all data export into excel sheet but i want to only selected column in excel sheet how to solve this problem </p> <pre><code> protected void btnexcel_Click1(object sender, EventArgs e) { Response.Clear(); Response.Buffer = true; Response.AddHea...
c# asp.net
[0, 9]
1,310,085
1,310,086
Android layout folder configuration
<p>I currently have 2 layout folders: layout-sw480dp and layout-sw720dp, both containing main.xml</p> <p>I see that dev guide states the following:</p> <pre><code> - 320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc). - 480dp: a tweener tablet like the Streak (480x800 mdpi). - 600dp: a...
java android
[1, 4]
5,509,080
5,509,081
Processmaker getField javascript error
<p>I have a problem when creating a process maker dynaform in which in task 1, a form uploads a document, in form 2 i want a link to that document to be able to download it (this is for testing purposes for the company I work for).</p> <p>My problem is that following the documentation on the process maker website <a h...
php javascript
[2, 3]
2,417,488
2,417,489
How to give image path in js/Jquery if image file exist in a different drive?
<p>My application is working in locale. I want to display one image using jquery. Image is located in one virtual drive created in my locale machine.</p> <p>This is the path I given</p> <pre><code>var str='&lt;div&gt;'; str='&lt;img src="'+virtualDriveName+':/test_folder/data/images/'+file_name+'.jpeg" height="100" ...
javascript jquery
[3, 5]
5,281,567
5,281,568
Dynamic select box options cut off in IE
<p>In the select box options cutoff in IE browser. For rectifying this i used the following code.</p> <pre><code>(function($) { $.fn._ie_select=function() { return $(this).each(function() { var a = $(this), p = a.parent(); p.css('position','relative'); var o = a.position(), ...
php javascript jquery
[2, 3, 5]
3,585,712
3,585,713
Attach function to dynamically created DOM element
<p><strong>Goal:</strong></p> <p>Append a DOM element with functionality. (One global listener is not desire here.)</p> <p><strong>Problem:</strong></p> <p>I don't know how to reference the new element in this context. The problem area is the <code>.on</code> event listener and the references to <code>$(this)</code>...
javascript jquery
[3, 5]
792,603
792,604
jQuery: Selecting option elements by their value
<p>I'd like to remove a specific option from some select boxes (all with the same values) if their value is "1". The problem is, I'm having difficulty filtering elements down to that specific value.</p> <p>At the moment, the closest I've got is</p> <pre><code>$('.demoClass').find('option:contains(1)').remove(); </cod...
javascript jquery
[3, 5]
3,885,003
3,885,004
how to pass xml document as a string to a asp.net webservice
<p>Hi i have the xml document in my asp.net web application . I want to assign the xml document to a string and pass that string to a asp.net webservice. Can anyone able to help me to do this ? Thank you </p>
c# asp.net
[0, 9]
967,626
967,627
Delay slideDown()/slideUp() - jquery dropdown
<p>I am creating I am creating a drop down which I want to delay about 250 ms so that it's not triggered when someone quickly scrolls across the button.</p> <p>Here's my current code. I tried using the delay() method but it's not going well.</p> <pre><code>$(".deltaDrop").hover(function(){ $('.deltaDrop ul').stop...
javascript jquery
[3, 5]
1,056,690
1,056,691
How to change background color of editText?
<p>I need to change background color of <code>EditText</code> if it is empty. Below is my code but doesn't seem to be working.</p> <pre><code>public void onClick(View v) { // TODO Auto-generated method stub Change(); } public void Change() { if(("").equals(name)) { name.setBackgrou...
java android
[1, 4]
4,068,705
4,068,706
How can I hide or show a div based on if there is content in two textboxes using jQuery?
<p>I have 2 textboxes on a page and they both have the class "OrderEntry".</p> <p>I want it so if there is any text in either of of these textboxes, it will show the div with ID "OrderPanel". If the textboxes are cleared, backspaced or empty, it will hide the div "OrderPanel".</p> <p>So, the page loads, "OrderPanel"...
javascript jquery
[3, 5]
4,804,246
4,804,247
how to track http packets on android in java
<p>I wish to track all http packets going out and comming in to the device from a service is that possible ?</p> <p>Thanks Vishal</p>
java android
[1, 4]
3,770,931
3,770,932
Jquery addClass when checkbox is checked
<p>I want to add a class when the checkbox is checked on the div element it belongs..</p> <p>This is the link to my current code: [http://jsfiddle.net/WH6bz/2/]</p> <p>What seems to be the problem?</p>
javascript jquery
[3, 5]
2,439,581
2,439,582
Pass form variables on to second postback...asp.net
<p>Is it possible to postback to the server, perform a function, and then continue that postback on to an external place? (ie, to a payment system)</p> <p>(the scenario is clicking a button to place an order, mark it as sent, then send them off to the payment page (there are form variables that needs to be sent to the...
c# asp.net
[0, 9]
2,289,265
2,289,266
Calling ServerSide Method using Jquery in .Net1.1
<p>I am using .net1.1 and trying to call a server side method using Jquery on click of browser Close button.My code is not working.I am posting my code below.Will anybody Guide me where did i go wrong?</p> <pre><code>&lt;body MS_POSITIONING="GridLayout" onbeforeunload="javascript:return test()" &gt; Ceci est une page...
c# javascript jquery asp.net
[0, 3, 5, 9]
1,753,374
1,753,375
Java DataInputStream methods in C# BinaryReader
<ol> <li>what is the java DataInputStream readFully method equivalent in C# BinaryReader?</li> <li>What is the java DataInputStream mark and reset methods equivalent in C# BinaryReader or Stream?</li> </ol>
c# java
[0, 1]
2,579,946
2,579,947
page.ResolveUrl is not working in javascript
<p>in jquery code i used ResolveUrl("~/DynamicMenu.ashx") but when i am showing value of variable where i store the result then i am getting this "ResolveUrl("~/DynamicMenu.ashx")"</p> <p>here is bit of code</p> <pre><code> pageIndex = pageIndex + 1; var CountryCode = getCookie("SetCountry"); var urlToHan...
javascript jquery asp.net
[3, 5, 9]
1,040,799
1,040,800
Should I use byte or int?
<p>I recall having read somewhere that it is better (in terms of performance) to use Int32, even if you only require Byte. It applies (supposedly) only to cases where you do not care about the storage. Is this valid?</p> <p>For example, I need a variable that will hold a day of week. Do I</p> <pre><code>int dayOfWeek...
c# asp.net
[0, 9]
1,617,916
1,617,917
Filter more than one list 'by more than one item' & display results
<p>I am trying to create a list filter that covers more than 1 list and filters for 'multiple words'. Example: there will 4 lists containing similar &amp; different items and the user should be able to type word(s) and only the lists containing that word would be displayed.</p> <p>Originally I was thinking of separati...
javascript jquery
[3, 5]
5,674,283
5,674,284
The type is deprecated
<p>I am using an AbsoluteLayout for a Activity and have it defined in a xml file.</p> <p>I added this line of code because I am trying to add a list of buttons dynamically and I get the following warning.</p> <pre><code>private AbsoluteLayout layout = (AbsoluteLayout) findViewById(R.id.viewsaved); The type Absolute...
java android
[1, 4]