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,635,473
2,635,474
How do i draw the scribling using canvas in android?
<p>I want to draw the scribling using <code>canvas</code> in android like free hand drawing....</p> <p>Here is my code.....</p> <pre><code> x = motionEvent.getX(); y = motionEvent.getY(); switch (motionEvent.getAction()) { case MotionE...
c# java javascript android
[0, 1, 3, 4]
1,176,094
1,176,095
How to query database from javascript (or JQuery) click?
<p>I have a summary view of a database table. When clicking on a row in the table, I'd like to have a popup showing the full data plus some controls for manipulating that item. I've attached a click handler to the item, which then grabs the primary key from one of the table cells in the row. How can I now pass this pr...
javascript jquery asp.net
[3, 5, 9]
2,528,054
2,528,055
Having trouble with a dynamic fade in/fade out hover transition (jsfiddle included)
<p><a href="http://jsfiddle.net/XztsH/1/" rel="nofollow">http://jsfiddle.net/XztsH/1/</a></p> <p>The hover class seems to be pushed down a 20 pixel and I'm not quite sure why.</p> <p>Maybe it's late and my brain is dead...</p>
javascript jquery
[3, 5]
3,188,611
3,188,612
How to compare a session's value? asp.net
<p>I cannot find the way of how to compare a session's value.</p> <p>Query for the database:</p> <pre><code> conexion.Open(); SqlCommand comando = new SqlCommand("SELECT id_cliente,alias,area FROM tbleuser WHERE usuario=@username AND pass=@thepassword",conexion); comando.Parameters.AddWithValue("@user...
c# asp.net
[0, 9]
3,476,780
3,476,781
jQuery autocomplete special character (Norwegian) problems
<p>I'm using jQuery's autocomplete function on my Norwegian site. When typing in the Norwegian characters æ, ø and å, the autocomplete function suggests words with the respective character, but not words starting with the respective character. It seems like I've to manage to character encode Norwegian characters in the...
php javascript jquery
[2, 3, 5]
3,767,170
3,767,171
Two dimensional grid
<p>is it possible with basic ASP.net controls or Telerik's RadControls to get a two dimensional grid ? I can't find informations so far ... thanks in advance for your help!</p>
c# asp.net
[0, 9]
3,931,238
3,931,239
Using setOnItemClickListener, is undefined for the type TextView?
<p>I have a ListView with Checkboxes, (TextView+Checkboxes) and I did the setOnLongClickListener for the items itself:</p> <pre><code>view = inflator.inflate(R.layout.rowbuttonlayout, null); final ViewHolder viewHolder = new ViewHolder(); viewHolder.text = (TextView) view.findViewById(R.id.label); ...
java android
[1, 4]
3,831,126
3,831,127
How to read single question from text file containing several question and options as well as information?
<p>I have a Text file which contains data (4 to 5 paragraph) and then contain 100 question along with each containing four option (a,b,c,d). Later it contain answer for above question (1.a,2.b and so on). My problem is I want to read each time a single question and options to display. Here when the user selects the ...
java android
[1, 4]
2,925,871
2,925,872
adding a combo box at run time - JQUERY
<p>i have added html elements at run time using append Code:</p> <pre><code>function addFormField() { $("#inputss").append("&lt;strong&gt;asif&lt;/strong&gt;"); } </code></pre> <p>but how can i add a select element at run time that looks like this..</p> <p>PHP Code:</p> <pre><code>&lt;select name="pre_re...
php jquery
[2, 5]
2,224,620
2,224,621
update a hidden field value based on country
<p>Here is the situation. A hidden field needs to be updated based on country selection (Denmark (DK), Germany (DE), Netherland (ML). -If none of these countries is selected, set the hidden field to Regular -If any of these is selected, set it to Double -There is another checkbox called "Please contact me". If this is...
javascript jquery
[3, 5]
5,238,735
5,238,736
Confirmation message on user input in php
<p>I have a doubt in the following code. I have a single function for both Insert and Update. Based on the row count each function will be executed. I want to provide a Confirmation box before performing the operation. On cancel message it should not perform the function. How can I do this?<br> Following is the code:</...
php javascript
[2, 3]
3,037,997
3,037,998
UPDATE STATEMENT in asp.net using c#
<p><P>i am using asp.net with C# as code behind <Pre><code> OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Documents and Settings\CJP\My Documents\Visual Studio 2005\WebSites\NewElligibleSoft\elligiblity.mdb;Persist Security Info=False"); cn.Open(); string...
c# asp.net
[0, 9]
4,466,440
4,466,441
Uploading docx corrupts file
<p>I am using the code below to upload a file. The files upload without error, but when I open a file with a .docx extension M$ says that the file is corrupted. It is able to repair the file and then open, however. I'd like to fix this so the document opens correctly.</p> <pre><code>string strExtension = Path.GetEx...
c# asp.net
[0, 9]
3,022,729
3,022,730
Equivalent of set= and getActionCommand in Android Java?
<p>I've just started learning Android development and as a little project, I'm building a calculator. The way it works is that when a number button is pressed, the number is appended to the EditText. I don't want to write this code for each of the buttons, because it's tedious and blatantly inefficient but i'm not sure...
java android
[1, 4]
926,717
926,718
Javascript and Php (MVC)
<p>i'm creating my own MVC Framework. I have a basic form in my view </p> <pre><code>&lt;form action="?" method="post" &gt; &lt;input type="hidden" name="envoie" value="envoie" /&gt; &lt;?php dico('INSCRIPTION_NOM'); ?&gt;&lt;input id="name" type="text" name="name" /&gt;&lt;br /&gt; &lt;?php dico('INSCRIPT...
php javascript jquery
[2, 3, 5]
5,105,708
5,105,709
Change button background on touch
<p>i want to change the green background of a button when this is touched without using OnTouchListener. i have this situation: i put some butons in a layer, then the layer in another layer, and the last layer in onother layer. when i touch the button the background is changing(i m using OnTouchListener right now) but ...
java android
[1, 4]
4,075,169
4,075,170
Separate web links from paragraph into a JS array
<p>I checked all answers above to see if mine was answered , please don't tag this as duplicate</p> <p>In the application that i am building there is a div </p> <pre><code>&lt;div class="paragraphlink"&gt; &lt;/div&gt; </code></pre> <p>I am allowing users enter any text like this</p> <blockquote> <p>Räikkönen was...
javascript jquery
[3, 5]
1,764,706
1,764,707
Android Spinner can't add to xml file
<p>I am trying to add spinner to one of my fragment, when i add spinner to xml. file, even i haven't create any events in my fragment, it's crash every time i try to open that fragment. and my Fragment is binding with simple adapter to get information, the error show "Spinner is not a view that can be bound by this Sim...
java android
[1, 4]
2,184,428
2,184,429
Selecting a form that doesn't have two or more names
<p>I'm selecting a form that doesn't have the name "someform", like this:</p> <pre><code> $("form[name!=someform]").bind("keyup", function(e){ [some code] }); </code></pre> <p>What if I want to select a form that doesn't have multiple names, like "someform1" or "someform2"?</p> <p>How do I do that?<...
javascript jquery
[3, 5]
426,303
426,304
How to dynamically return all functions in scope?
<p>I have the code below, as you can see I'm manually specifying the properties I want to return, I don't care about having private/public functions here, so I'd like a quick &amp; dynamic way to just return all functions in the scope. Is this possible? I've tried a few things but having trouble, it has to be done insi...
javascript jquery
[3, 5]
4,348,204
4,348,205
echofon's website like Logo's Hover Effect
<h1>What I Want</h1> <p>First, Go here -> <a href="http://www.echofon.com/twitter/windows/" rel="nofollow">http://www.echofon.com/twitter/windows/</a> and then, hover your mouse over the Echofon logo on the top bar ( top-left corner ). I want to achieve the same thing.</p> <h1>What I am doing</h1> <p>I have two imag...
javascript jquery
[3, 5]
5,957,877
5,957,878
Contact us section
<p>I am having problems with my asp.net application i can run the program with no errors when i fill in the boxes on the contact us section i then get a error saying.</p> <blockquote> <p>SMTPException was unhanded by user code</p> </blockquote> <p>Here is my code</p> <pre><code>using System; using System.Collectio...
c# asp.net
[0, 9]
959,517
959,518
setting back the cursor/carat at the end of the appended string in div
<p>So to reproduce the issue, here's a fiddle to play around with: <a href="http://jsfiddle.net/QRgE9/1/" rel="nofollow">http://jsfiddle.net/QRgE9/1/</a></p> <p>Type in the following string into the box: Hello @An</p> <p>And then make a selection from the dropdown. </p> <p>You can see that after you've made the sele...
javascript jquery
[3, 5]
780,351
780,352
Really cool JS tools: does anybody know what this is?
<p>Very cool JS components: <a href="http://www.msnbc.msn.com/id/40664031/ns/us_news-crime_and_courts/" rel="nofollow">http://www.msnbc.msn.com/id/40664031/ns/us_news-crime_and_courts/</a></p> <p>Check out the icons next to the vertical scrollbar in your browser, and the expanding 'sharing' toolbar at the bottom.</p> ...
javascript jquery
[3, 5]
1,311,562
1,311,563
JQuery issue while deploying on tomcat and weblogic
<p>i am trying to run a jQuery on tomcat server and weblogic server but its not working </p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;script src="/WEB-INF/js/jquery-1.7.1.js" language="javascript" type="text/javascript"&gt;&lt;/script&gt; &lt;script language="javascript" type="text/javascript"&gt; ...
java javascript jquery
[1, 3, 5]
17,199
17,200
How to pass two value in to HyperLinkColumn on asp.net 1.1?
<p>Here is the code:</p> <pre><code>&lt;asp:DataGrid id="dataGrid1" runat="server" OnItemDataBound="dataGrid1_ItemDataBound"&gt; &lt;Columns&gt; &lt;asp:HyperLinkColumn DataNavigateUrlFields="Valid,CouponCode" DataTextField="Valid" HeaderText="Enable / Disable" DataNavigateUrl...
c# asp.net
[0, 9]
2,896,844
2,896,845
add/edit text to video which is linked to database
<p>I am creating a website to allow users to upload their videos. The problem I'm facing is that I do not know how to allow the user to add or edit the text to the video they have uploaded. Any pointers?</p>
c# asp.net
[0, 9]
1,815,554
1,815,555
Different styles of flow of program?
<p>I am a computer science student therefore I do not know that much. </p> <p>I was recently talking with a friend who just got a job as a (java) software developer. He told me that in his job there is a guy who is really experienced in C++, but unfortunately every time he writes code in java, he is using the try-catc...
java c++
[1, 6]
2,207,612
2,207,613
Difference between loadUrl and loadData with javascript
<p>I try to load in an Android webview a html page with an ajax post request.</p> <p>When I load the webview with loadUrl, the javascript works fine, but when I try to load with loadData (I need it) I get an error : "<code>NETWORK_ERR: XMLHttpRequest Exception 101</code>". This error sounds like a access control origi...
javascript android
[3, 4]
3,113,495
3,113,496
How to register click event only once?
<p>I am trying to register click event once to my element in my project.</p> <p>I have simplfy my codes and basically my structure looks like the following:</p> <pre><code>function objectParent(){ } objectParent.prototype.click=function()( $('#create').click(function(){ var var1=new objectchild(); ...
javascript jquery
[3, 5]
5,307,249
5,307,250
jQuery: How to calculate the maximal attribute value of all matched elements?
<p>Consider the following HTML:</p> <pre><code>&lt;div class="a" x="6"&gt;&lt;/div&gt; &lt;div class="a" x="9"&gt;&lt;/div&gt; &lt;div class="a" x="2"&gt;&lt;/div&gt; ... &lt;div class="a" x="8"&gt;&lt;/div&gt; </code></pre> <p>How would you find the maximal <code>x</code> value of all <code>.a</code> elements ?</p> ...
javascript jquery
[3, 5]
6,028,429
6,028,430
Move div element to the middle of the screen in animation
<p>How do you animate a div element to the middle of the screen from the left side</p> <p>I get this invalid obect or prperty i can't seem to reference the jQuery(document) object through jQuery anymore </p> <pre><code>form.each(function () { jQuery(this).animate({ marginLeft: jQuery(document).width / 2 }, 750);...
javascript jquery
[3, 5]
5,981,786
5,981,787
Can I run separate asp.net c# page load events using JQuery multipage/same file data-role=page?
<p>So,</p> <p>I'm using a c# code-behind in my mobile web site.</p> <p>I need to run different <code>Page_Loads</code> based on which page is being displayed using Jquery Mobile <code>data-role="page"</code> attribute.</p> <p>Ex: I have </p> <pre><code>&lt;div data-role="page" id="page1"&gt; &lt;div data-role="co...
c# jquery
[0, 5]
1,878,190
1,878,191
Java/Android retrieving and saving values
<p>I am making a game where I will have a large list (100-200) of monsters with their associated stats (name, health, attack, defense, type, etc). I set it up to have a monster class that contains all the stats as variables and will do the necessary methods such as attacking or gaining xp. When the player is playing ...
java android
[1, 4]
869,795
869,796
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]
2,939,347
2,939,348
JS/jQuery: Get depth of element?
<p>What's the easiest way to get the depth of an element in pure JavaScript or jQuery? By "depth" I mean how many elements deep is it nested, or how many ancestors does it have.</p>
javascript jquery
[3, 5]
2,004,103
2,004,104
PHP rendering JS useless
<p>Ok, so, I'm not at all familiar with PHP dev, however, here I find myself. I have a page I created in HTML/CSS and JS that works great with several JS plugins. However, when I turn it into a php page, the JS is conflicting and rendered useless.</p> <p>It is because the PHP is aggregating it into one large js file. ...
php javascript
[2, 3]
2,697,724
2,697,725
Need help on performing asynchronous operations
<p>I have a folder structure:</p> <ul> <li>Parent <ul> <li>1st Child</li> <li>2nd Child</li> <li>3rd Child</li> <li>...</li> </ul></li> </ul> <p>There could be any number of child folders.</p> <p>On deleting parent it should delete all its subcategories and each subcategory is asscoiated to different entities (e.g. ...
c# asp.net
[0, 9]
3,066,767
3,066,768
variable scope clarification
<p>I have a snippet of javascript code, that I have found in the "<strong>Secrets of the JavaScript Ninja</strong>" (a John Resig book). I have a problem to understand the behaviour of a variable. The following is the code (simplified with respect to the original one):</p> <pre><code>(function() { var results; ...
javascript jquery
[3, 5]
5,217,058
5,217,059
jQuery find/replace without changing original text
<p>Is there a way in jQuery to find a string of text in jQuery and not replace it with something else but wrap that text with an element so when the script is finished it spits out the original text with the string of text wrapped.</p> <p>Example:</p> <p>Original Text</p> <pre><code>"Hello world to all people" </cod...
javascript jquery
[3, 5]
4,079,476
4,079,477
design patterns for persisting state on android app
<p>For android I am trying persist state if onDestroy() is called. I'm wondering what are common design patterns used to do such a thing so that the actual app functionality is decoupled from the persistence functionality? For example, I have a for loop that iterates through all of the players in the game. This upda...
java android
[1, 4]
590,474
590,475
ASP.net best way to change links
<p>Given:</p> <pre><code>&lt;div class="subMenu"&gt; &lt;a href="products.aspx" class="subLink"&gt;Products&lt;/a&gt; &lt;a href="productCats.aspx" class="subLink"&gt;Categories&lt;/a&gt; &lt;a href="example.aspx" class="subLink"&gt;Another&lt;/a&gt; &lt;/div&gt; </code></pre> <p>In my code behind, how would I p...
c# asp.net
[0, 9]
4,825,454
4,825,455
use of "response" in fetching tweets from search API
<p>I am new to jquery and javascript. here i have a code which fetches tweets using twitter;s search api. Can yo please tell me why are we passing the argument "response" to the function after .done()? How is this working ? </p> <pre><code> $('#input').submit(function(e){ e.preventDefault(); e.stopPr...
javascript jquery
[3, 5]
5,424,242
5,424,243
Is it Possible to read CSV file using Javascript or Jquery?
<p>How do I read a CSV file uploaded through file input using Javascript or jQuery? Is it possible to get the number of rows in the uploaded file?</p>
javascript jquery
[3, 5]
6,008,390
6,008,391
Jquery animate scroll in diagonal
<p>How can I put a diagonal scroll in my page via JQuery ? </p> <p>Example, I hid the scroll bar and if my user click in some link, my page has to scroll in diagonal until some part of my page (is possible?)</p> <p>this is my jquery code, but I know that just gone to the bottom of my page.</p> <pre><code>.animate({ ...
javascript jquery
[3, 5]
2,258,959
2,258,960
problems with create an object on post back
<p>i have an issue with creating an object in ASP.net</p> <p>My Page Load function is:</p> <pre><code>public partial class hangMen : System.Web.UI.Page { abc ltr; Words word = null; static Label [] lbl = null; static Button[] btn = null; Game game; protected void Page_Load(object sender, EventArgs e) { if (...
c# asp.net
[0, 9]
2,352,153
2,352,154
Listbox scrolling to the selected item in ASP.net
<p>I wanto to make my ListBox control scroll to the selected item.</p> <p>Here is my code:</p> <pre><code>protected void Button2_Click(object sender, EventArgs e) { ListBox1.SelectionMode = ListSelectionMode.Multiple; ListBox1.SelectedIndex = -1; for (int i = 0; i &lt; ListBox1.Items.Count; i++) { ...
c# asp.net
[0, 9]
2,068,880
2,068,881
How to provide elements/tags dynamically inside the find() in jquery
<p>I have created several div with id's such as window1, window2 and so on. Now all I want to is find the <p> tag from these above created divs. I am doing this inside the for loop but it is not working for me. Here is what I am doing</p> <pre><code> for(connectWindow=1;connectWindow&lt;=xmlLength;connectWindow...
javascript jquery
[3, 5]
2,695,476
2,695,477
What's a easy way to truncate an array with Jquery?
<p>Linq has a convenient operator method called Take() to return a given number of elements in anything that implements IEnumerable. Is there anything similar in jQuery for working with arrays?</p>
javascript jquery
[3, 5]
1,099,604
1,099,605
issue with handling json data from server
<p>i have an problem with handling data come from server , please see the code bellow :</p> <p>php</p> <pre><code>echo json_encode(array("toshow"=&gt;"&lt;span class='text'&gt;&lt;img src='greencheck.png'/&gt;")); </code></pre> <p>javascript </p> <pre><code>$('#data').ajaxForm({ dataType: 'json', ...
php javascript jquery
[2, 3, 5]
3,503,868
3,503,869
JS syntax breaks the page
<p>I have the following code in my external JS file:</p> <pre><code>var myDiv = $(".myDiv"); if (myDiv.css('left') == 'auto') { var pos = myDiv.position(); myDiv.css({ "left:" + pos.left + "px", "top:" + pos.top + "px" }); } </code></pre> <p>It appears that the following line breaks my page:</p> <pre><c...
javascript jquery
[3, 5]
4,712,815
4,712,816
What does $([]) mean in jQuery?
<pre><code>var username = $("#username"), password = $("#password"), allFields = $([]).add(username).add(password); </code></pre> <p>What is allFields? What is $([])? </p> <p>Being a newbie to Javascript/jQuery, I've never seen this $([]) notation before and I'm interested in its asso...
javascript jquery
[3, 5]
401,829
401,830
Call URL before closing of Browser Window
<p>I want to call an URL in the unload-Function of a Webpage but in the unload-function the get request is not working. My code looks like this:</p> <pre><code>$(window).unload( function () { jQuery.get("someurl") } ); </code></pre> <p>We want to be informed about the closing of the window for some logging of use...
javascript jquery
[3, 5]
5,119,914
5,119,915
determine url is true or false
<p>I use ASP.NET with javascript ,</p> <p>I have a question in my code </p> <p>I need to determine url exists or not</p> <pre><code>url="http://www.404.com" If url == exists then { } else if url == not then { } </code></pre>
javascript asp.net
[3, 9]
1,884,823
1,884,824
How to Submit only after Jquery finished updating the field
<p>I have a form where a user inputs a word, when pressing the button I want it to translate the word (using the jquery script) into the same field. Only after completed to populate the field, it should continue and submit the translated word.</p> <p>everything is working except that it will submit as soon as it tran...
javascript jquery
[3, 5]
4,746,755
4,746,756
Downloading images from a server iPhone SDK
<p>I have created a program which allows me to upload images to my server. They are given a random file name when uploaded. I want to be able to download all the images from a folder on the server so I can display them in my application. The only example I have seen requires that I know the file name of the images whic...
php iphone
[2, 8]
3,750,718
3,750,719
Get real height of div plus css generated content (if possible)
<p>I'm trying to use javascript to give three ULs nested inside divs a negative top position equal to their height. I've got it working, sort of (thanks to help from here!) but instead of calculating the height of each nested UL and calculating the top position accordingly, each UL is being assigned a negative top posi...
javascript jquery
[3, 5]
5,216,712
5,216,713
Radiobuttonlist - Access Click/change using jquery and reading values (rbList values are bound using binding)
<p>I am trying to access the value of the radio button option selected by the user. The radio buttons in the radio button list are generated by binding using datasource</p> <pre><code>radioButtonList.DataSource = data; radioButtonList.DataBind(); </code></pre> <p>Now I want to check the value of the selected radio b...
c# jquery asp.net
[0, 5, 9]
408,327
408,328
How can I create a progress bar with percentage?
<p>I want to create a progress bar with jquery or javascript that finds the percentage while loading the javascript. All the images are loaded in the javascript, they use the jquery append tag and so I want to load all these images with a screen that is shown with a loading bar based on percentage of how much of the da...
javascript jquery
[3, 5]
172,329
172,330
making files in the folder donwloadable using php or javascript
<p>I am trying to making files to be downloadable after clicking the link of the listed file. I am not getting idea how to make it possible. I have completed to list file using following scripts. Now I have to provide listed file to be downloadable after clicking the file name. Plz help...</p> <pre><code>$dir = 'd:/te...
php javascript
[2, 3]
5,236,560
5,236,561
Check if domain is available for purchase - C#
<p>Is there any way that I check if a certain domain is available for purchase? If there is any library out there that will do this?</p> <p>THanks</p>
c# asp.net
[0, 9]
1,676,674
1,676,675
jQuery pseudo selector with variable as selector
<p>I've set a variable equal to a frequently-referenced selector:</p> <pre><code>var allSteps = $("#makeIntoSlideshowUL &gt; li"); </code></pre> <p>Additionally, I'm using a custom-defined search function that makes contains (which I'm using to search) case-insensitive</p> <pre><code>jQuery.expr[':'].Contains = func...
javascript jquery
[3, 5]
1,860,786
1,860,787
passing file path to http handler as posted file in the format of context.request..files
<p>I need to send a file to http handler in the form of context.request.files[index].Actually this is happen when we choose file from file upload controler.but my task is to do same thing with out file uploader controler.Here i am getting file path dynamically.i did not find till now how i can set(convert) this file pa...
c# asp.net
[0, 9]
793,458
793,459
What is the default behavior for items added to System.Web.Caching.Cache?
<p>What are the default expiration parameters associated with items added to the ASP.NET cache?</p> <p>Do items added expire after an absolute period of time, and if so, what is the default expiration time? Or do they use a sliding-window?</p> <p>I can't seem to find any references to default behavior of items added ...
c# asp.net
[0, 9]
2,446,422
2,446,423
jquery to add one cell without refreshing the page
<p>I want to add one cell in a section each time I click the add button. The page is updated without refreshing. The html code is:</p> <pre><code>&lt;section&gt; &lt;p class="cell"&gt;content&lt;/p&gt; &lt;/section&gt; &lt;button type="button" id="addCell"&gt;add&lt;/button&gt; </code></pre> <p>How should I impleme...
javascript jquery
[3, 5]
2,406,948
2,406,949
Returning a json object without square brackets
<p>I have a function which returns an object of form: <code>[{"key":"name","value":"ali","key":"age","value":"56"}]</code> when called as given below. How can I have it return same kind of object but without the square brackets?</p> <pre><code>setProperties('{"name":"ali","age":"56"}'); function setProperties(str) { ...
javascript jquery
[3, 5]
553,900
553,901
Showing timer countdown
<p>In my game I have set the timer to 30000ms (30 secs). When the timer ends the game ends. I want to show the user the timer to give them some idea of how long they have left. How would I do this, I have tried to do it like this:</p> <pre><code>setTimeout(function() { $("#message").html('Thank you...
javascript jquery
[3, 5]
1,668,163
1,668,164
How do I fire an ASP.NET custom validator from JavaScript?
<p>I want to code a function in javascript that every time I call it in the webform it fires up an specific validator in that same webform.</p>
asp.net javascript
[9, 3]
2,515,704
2,515,705
javascript on window close event
<p>I am currently detecting if a user of my site closes the window/tab or changes the url.</p> <p>I am using the follwoing code, which works perfectly:</p> <pre><code>var validNavigation = false; function endSession() { // Browser or broswer tab is closed // Do sth here ... alert("bye"); } function wireUpEve...
javascript jquery
[3, 5]
4,152,568
4,152,569
Jquery focus(in|out) run in weird order
<p>The problem is that when there is a focus on one <code>#input1</code>, and i try to focus it on <code>#input2</code> by running</p> <pre><code>$('#input2').focus(); </code></pre> <p>first runs the <code>focusin</code> event of <code>#input2</code> then the <code>focusout</code> of the <code>#input1</code></p> <p>...
javascript jquery
[3, 5]
1,178,334
1,178,335
Jquery - Truncate Text by Line (not by character count)
<p>I need a Jquery script to truncate a text paragraph by line (not by character count).</p> <p>I would like to achieve an evenly truncated text-block. It should have a "more" and "less" link to expand and shorten the text paragraph. My text paragraph is wrapped in a div with a class, like this:</p> <pre><code>&lt;di...
javascript jquery
[3, 5]
205,287
205,288
Call class function in BroadcastReceiver onReceive function
<p><br/>I have a service with a <code>BroadcastReceiver</code>.<br/>How can I call a function in the service class from the <code>onReceive</code> function of the <code>BroadcastReceiver</code>?<br/>And if I can't, what can I do?<br/>Here is some code :</p> <pre><code>public class MyService extends Service { priva...
java android
[1, 4]
3,963,538
3,963,539
Delete a table row with javascript / jquery
<p>This is not working. Firebug is not throwing any error though. </p> <p>HTML: </p> <pre><code>&lt;table&gt; &lt;tr&gt;&lt;td&gt;BookA&lt;/td&gt;&lt;td&gt;&lt;a href="javascript:deleteRow($(this));" class="red"&gt;Delete&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;BookB&lt;/td&gt;&lt;td&gt;&l...
javascript jquery
[3, 5]
3,434,834
3,434,835
ASP.net - building online basketball manager how to keep game logic running
<p>my question is this, how can i simulate a text base basketball game in a web application.</p> <p>The game logic class is ready and in use in my WPF application, however I want to transfer it to a web base application. But I have no idea how to keep the game thread a live + updating the UI every second.(only text u...
c# asp.net
[0, 9]
2,655,917
2,655,918
Toggle DIV with JQuery
<p>I have a FAQ area on my page that has all of the questions in a list and when a user clicks on a title, a DIV with the answer will expand into view. However, I'm having trouble when it comes to closing the answer DIV layer. One of two things happen...</p> <p>This one will simply open and close each DIV layer indivi...
javascript jquery
[3, 5]
4,894,447
4,894,448
If URL contains anything, then fire a Javascript function
<p>Basically, if the URL/<code>window.location</code> contains absolutely any variable whatsoever (past domain.com/, of course), I'd like javascript to execute something. </p> <p>Currently, I have the following jQuery code which only executes when <code>window.location</code> contains the exact wording "#hash", but as...
javascript jquery
[3, 5]
1,681,246
1,681,247
jQuery plugin: ":hover" doesnt work in IE8
<p>I've written a jQuery plugin which makes an element pulse. It's working great in Chrome and Internet Explorer 9. In Internet Explorer 8, it's not working after the setTimeout call.</p> <p>I've created a jsFiddle to demonstrate the problem: <a href="http://jsfiddle.net/Guykp/" rel="nofollow">http://jsfiddle.net/Guyk...
javascript jquery
[3, 5]
2,935,396
2,935,397
Dynamically loaded User control ID and javascript
<p>I have a host page that dynamically loads multiple instances of the same user control by assigning different IDs.</p> <p>After the UC loads, I will need to use JS to get a reference to a textbox. For this, I need the User control Client ID. I do have access to the UC Client ID on the server side and can set a hidde...
asp.net javascript
[9, 3]
3,063,930
3,063,931
how to get back to the most recent created fragment in android?
<p>Hi i have created two activities? first activity launches a layout with a fragment. when user clicks on that fragment it launches a new activity which creates a layout with a fragment. Now to go back to the first activity ( i mean the layout created by the first activity) the only way is pressing back button on andr...
java android
[1, 4]
2,744,016
2,744,017
Android logical operation &&?
<p>This one has been giving me fits for over an hour... I could swear the code is right. Am I missing something?</p> <pre><code>if((fType != "EXACT") &amp;&amp; (dateTime &gt; System.currentTimeMillis())){ myIntent = new Intent(getBaseContext(), MyScheduledReceiver1.class); } else { my...
java android
[1, 4]
3,091,654
3,091,655
How to check if someone is a user?
<p>I'm designing a website (ASP.NET, c#), in which you can see the controls, but you can only use them after you've logged in (for example, you can see a list of games, but you can only place a bet after you've logged in, so if you try to place a bet when you are not logged in, the site should redirect you to the login...
c# asp.net
[0, 9]
2,447,081
2,447,082
Calling Method in Android
<p>I am trying to call a method I have written. It compiles except for one line...</p> <pre><code>public class http extends Activity { httpMethod(); //will not compile public void httpMethod(){ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://site/api/");...
java android
[1, 4]
4,422,177
4,422,178
How to overwrite (NOT append) a text file in ASP.NET using C#
<p>I have included a text file in my website with multiple lines. I have put a textbox (Multimode=true) and a button in the page. On Page_Load the content from the textFile should be displayed in the textbox. Then the user can edit the textbox. On button click the current content of TextBox should be overwritten in tha...
c# asp.net
[0, 9]
3,673,677
3,673,678
How to store <TR> id value in array, when I toggle?
<p>I am toggling <code>'tr.subCategory1'</code>and its siblings <code>.RegText</code>. at the same time I am trying to store its ids in the array like this <code>list_Visible_Ids[$(this).attr('id')] = $(this).css('display') != 'none' ? 1 : null;</code> (When I collapsed I need store <code>'null'</code> in array at its ...
javascript jquery
[3, 5]
895,943
895,944
stripping file.html out of the link
<p>So, I am writing a script that is suppose to illuminate different sections of the nav. each nav link is set up to be /directory/subdir/. It worked until I realized there needs to be more to this. if you are in a directory that is not the index file it doesn't work since it was directly matching HREF attribute. Now, ...
javascript jquery
[3, 5]
1,267,295
1,267,296
Unexpected token in jQuery
<p><a href="http://www.jamesperrett.co.uk/" rel="nofollow">This site</a> was working fine but suddenly errors have appeared.</p> <p>Unexpected token ( - what does this mean? Looks correct to me, and has been working fine for many months.</p> <pre><code>&lt;script&gt; function (){ &lt;--"Uncaught SyntaxError:...
javascript jquery
[3, 5]
2,831,451
2,831,452
Performance Tips try/catch blocks
<p>In ASP.NET I would like your opinion regarding what is the best way for Handling Exceptions.</p> <ul> <li>Would you suggest to use try/catch blocks?</li> <li>Better to use try/catch blocks on every single piece of code/component? Or in wich situations?</li> </ul> <p>I am new in dev, I really appreciate your help t...
c# asp.net
[0, 9]
5,437,241
5,437,242
Make Session expire
<p>I am using <code>authentication mode=forms</code> in web.config file. Because it is a secure application so I want to expire my session in 5 minutes. Right now I am doing it in programming in codebehind.<br/><br/> Is there any other easy way to do it?</p>
c# asp.net
[0, 9]
379,844
379,845
quick jQuery question
<p>Should be a really quick one for you pro's:</p> <p>I'm learning to use JS, in particular a plugin called (embarassingly) 'Easy Image'.</p> <p><a href="http://cssglobe.com/post/3783/jquery-plugin-easy-image-or-content-slider" rel="nofollow">http://cssglobe.com/post/3783/jquery-plugin-easy-image-or-content-slider</a...
javascript jquery
[3, 5]
5,783,372
5,783,373
JQuery Bubble Popup: innerhtml hidden div
<p>I'm using the JQuery Bubble Popup library, trying to show a hidden div in the innerHtml variable. Right now I have this:</p> <pre><code>&lt;div class="button"&gt; Show stuff &lt;/div&gt; &lt;div class="information"&gt; foo &lt;/div&gt; &lt;div class="button"&gt; Show stuff &lt;/div&gt; &lt;div class="information"&...
javascript jquery
[3, 5]
2,854,382
2,854,383
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]
3,497,682
3,497,683
How to track user response to confirm box, generated at runtime from c# code?
<p>I am trying to get user confirmation from c# code behind file, to confirm if user wants to overwrite the existing file on server of cancel the operation but so far no luck.</p> <p>this is my code :</p> <pre><code>if (File.Exists(filePath)) { string alertMsg = @"confirm('A File already exists with the same name....
c# asp.net
[0, 9]
4,985,458
4,985,459
apply methods of most objects jquery
<p>e.g.</p> <pre><code>var $magicLine = $("#magic-line"); var $magicLine2 = $("#magic-line2"); </code></pre> <p>how do I apply the methods to two objects? I now use:</p> <pre><code>$magicLine.width($(".current_page_item").width() $magicLine2.width($(".current_page_item").width() </code></pre> <p>if i use this metho...
javascript jquery
[3, 5]
1,113,610
1,113,611
What is significance of putting "$" sign before a parameter in Java / Android?
<p>What is the difference or significance of putting $ sign before any variable or parameter..</p> <p>e.g. </p> <p>Suppose here is my class...</p> <pre><code> public class Vector3 { public Vector3(float x, float y, float z){ //... //... my ctor code //... } } </code></pre>...
java android
[1, 4]
4,368,585
4,368,586
How to put a textbox text in my jQuery function in ASP.NET?
<pre><code>&lt;script type="text/javascript"&gt; var progress_key = '&lt;?= $uuid ?&gt;'; $(document).ready(function() { $(".pb3").progressBar({ max: 2000, textFormat: 'fraction', callback: function(data) { if (data.running_value == data.value) { } }} ); $(".pb4").progressBar({ max: 2000, textFormat:...
jquery asp.net
[5, 9]
6,033,883
6,033,884
What is the most efficient way to include many javascript functions (with PHP in them) in a PHP page?
<p>In one of my sites, I need to use PHP 'foreach' to keep including some Javascript code. In this code contains PHP $variables that change within the foreach loop. </p> <pre><code>foreach ($a as $b) { include("javascript.php"); } </code></pre> <p>javascript.php contains codes like this: </p> <pre><co...
php javascript
[2, 3]
5,367,222
5,367,223
Setting var to sum of two textbox values is 0, how come?
<p>I am experiencing something odd, please see below. Why is alert 1 outputting 0 but alert 2 outputting the correct sum? They are set to the same thing...</p> <pre><code>var sumTotal = parseFloat($('#tb1').val()) + parseFloat($('#tb2').val()); //tb1.val() == 3, tb2.val() == 5; 1) alert(sumTotal); //Outputs 0; 2)...
javascript jquery
[3, 5]
5,801,772
5,801,773
threads in android no output
<p>I've created an android app where the user inputs a string and a number, where the number will be calculated to its factorial. Everything's working fine but when i enclose my code inside the thread there's no output.</p> <p>here's my source code:</p> <pre><code>package com.inputandfactorial; import android.app.Ac...
java android
[1, 4]
3,626,793
3,626,794
Custom Section in Web.config
<p>how to create and use a custom section in web.config ?</p>
c# asp.net
[0, 9]
4,049,857
4,049,858
Calling a jQuery method named in variable
<p>I have a JavaScript variable which contains the name of a jQuery method: <br></p> <pre><code>var method = 'attr("src")'; </code></pre> <p>How can I make it work like:</p> <pre><code>console.log($('img').method) </code></pre> <p>I tried</p> <pre><code>console.log($('img')[method]()) </code></pre> <p>but it give...
javascript jquery
[3, 5]