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
640,264
640,265
Why is it adding %20 to the spaces in my javascript variables
<pre><code>function openFile(file, object) { var extension = file.substr( (file.lastIndexOf('.') +1) ); var fileName = file.substr((file.lastIndexOf('/') +1), (file.length - (file.lastIndexOf('/') +1))-4); object.append('&lt;img class="theimage" src="" alt="icon"/&gt;'); object.append('&lt;span class...
javascript jquery
[3, 5]
5,070,697
5,070,698
JQuery Custom Radio Buttons code (code not working)
<p>usual but I need to have different custom radio button images per button.</p> <p>So Radio1 would have different images to Radio2.</p> <p>Trying it out on the code below but it won't work so I must be doing something wrong?</p> <p>Here's the code:</p> <pre><code>&lt;label for="radio1"&gt; &lt;img src="radio1_...
javascript jquery
[3, 5]
106,811
106,812
find number of nodes between two elements with jquery?
<p>I'm having a little trouble figuring out a fast way to accomplish a (seemingly) simple task. Say I have the following html:</p> <pre><code>&lt;ul&gt; &lt;li&gt;One&lt;/li&gt; &lt;li&gt;Two&lt;/li&gt; &lt;li id='parent'&gt; &lt;ul&gt; &lt;li&gt;Three&lt;/li&gt; &lt;li&gt; &lt;ul&gt; ...
javascript jquery
[3, 5]
6,030,118
6,030,119
catch cmd output and include it on list java
<p>i try to do some cmd command in java, my script:</p> <pre><code>public void test(){ try{ Runtime rt=Runtime.getRuntime(); Process p = rt.exec("cmd /c "+"adb devices"); BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream())); while((line=input.readLine())!=null){ System.out.print...
java android
[1, 4]
3,568,028
3,568,029
How can I programmatically simulate activity so the phone doesn't go to sleep due to inactivity?
<p>First, I know about <a href="http://stackoverflow.com/a/3723649/1287251">WakeLock</a> and <a href="http://stackoverflow.com/a/6553807/1287251">setKeepScreenOn</a>. My needs are just a bit different, and I'm not even sure if it's possible.</p> <p>I'm generating touch events in one thread by calling <code>MotionEvent...
java android
[1, 4]
3,276,801
3,276,802
Jquery mouse event alternative
<p>Alright so the code below works fine if I click outside the #nav div. I was asking if it is possible to just move the mouse away from the #nav div to make it disappear. I don't want to 'click' to hide the div. <a href="http://jsfiddle.net/sKpwV" rel="nofollow">Example</a></p> <pre><code> $(document).mouseup(functio...
javascript jquery
[3, 5]
2,414,252
2,414,253
How to check class name in JavaScript or jQuery, and reload to another URL
<p>I have this code.</p> <pre><code>&lt;div class="1st-class"&gt;&lt;/div&gt; </code></pre> <p>and I have a button, when I click it, the div will be like this.</p> <pre><code>&lt;div class="1st-class goto"&gt;&lt;/div&gt; </code></pre> <p>Now, how can I check the div if the class name has <code>goto</code>?</p>
javascript jquery
[3, 5]
4,110,517
4,110,518
Java or Android
<p>I am using eclipse, and I have just tried making an android project instead of a java project. Things that I do in java don't work in android. Are they different programming languages?</p>
java android
[1, 4]
1,812,311
1,812,312
Disable access to pages after logout (Session.Abandon) in C#/ASP.NET
<p>I'm interested in disallowing the following after logout:</p> <p>-- no back button</p> <p>-- no direct access to pages via URL - for example: if the user logs out then they should not be allowed to see a cached page using some URL (e.g., replacing the URL with a valid URL in the site <a href="http://mysite.com/Got...
c# asp.net
[0, 9]
4,370,203
4,370,204
Loading a page but not into a container div using jQuery
<p>I have a drop down that I select a file type from, I then want it to fire at a page that generates a file depending on what was selected and forces a download of it using <code>header</code> in php. Here's the jQuery. </p> <pre><code>$('#exportdropdown').change(function(){ var searchinput = $('#searchinput').val();...
php jquery
[2, 5]
5,655,364
5,655,365
What is a reverse reference to the DOM object?
<p>In this link: <a href="http://css-tricks.com/snippets/jquery/jquery-plugin-template/" rel="nofollow">http://css-tricks.com/snippets/jquery/jquery-plugin-template/</a> it has a line of code that says</p> <pre><code>// Add a reverse reference to the DOM object base.$el.data("yourPluginName", base); </code></pre> <p>...
javascript jquery
[3, 5]
159,575
159,576
how to delete specific number of rows using jquery provided by argument
<p>i have a sample code. This will delete entire row if nor args provided. If provided it will delete the given rows.</p> <pre><code>function deleteTableRows(tableID) { rowsToDel = document.getElementById('getrows').value; if(document.getElementById(tableID) !== undefined) { var...
javascript jquery
[3, 5]
3,327,973
3,327,974
How do I convert line breaks to \n
<p>I have a return string from a db.</p> <p>The return string must be formatted in javascript.</p> <pre><code>&lt;?php $db = "this is a line this is a new line"; ?&gt; </code></pre> <p>How would I convert the above to:</p> <pre><code>&lt;?php $db = "this is a line \n this is a new line"; ?&gt; </code...
php javascript
[2, 3]
1,711,560
1,711,561
Android PreferenceActivity without XML
<p>Is there a way to create Holo-styled (non-deprecated) PreferenceActivity and it's headers/fragments in pure Java, not XML? Is it possible to add and remove headers programmatically?</p>
java android
[1, 4]
2,487,868
2,487,869
JQuery Order list by field and add to divider div
<p>I am trying to get listing organized by a field called letter.</p> <p>So the fields are:</p> <p>id, name, letter.</p> <p>for example:</p> <h2>id name letter</h2> <p>1 list1 a 2 list2 a 3 list3 b</p> <p>To list1 and list2 are added after id="a" and list3 is added after id="b"</p> <p>Here is a j...
javascript jquery
[3, 5]
3,522,919
3,522,920
Jquery conflict
<p>I have been trying and trying to fix jquery issues. i have in my header lots of jquery. I use it for slider and other things that are built into this premade theme. I am unable to add anything that uses jquery because of conflict. i need some help. The board is www.cgwhat.com. The forgot password is jquery and the ...
jquery javascript
[5, 3]
2,173,066
2,173,067
how to clone an element with specific number of times
<p>what's the syntax to clone an element with assigned times like 5 times? For example, in the html I have this element</p> <pre><code>&lt;div name="test"&gt; this is a test &lt;/div&gt; </code></pre> <p>and I have this clone button which will copy the element once very time I hit it. Then the problem is how...
javascript jquery
[3, 5]
5,213,736
5,213,737
How can I view an object with an alert()
<p>I tried to do a debug but I am having problems. Now I try with <code>alert()</code>. For example I want to see the value of:</p> <pre><code>var product = { ProductName: $('!Answer_Response[0]').val(), UnitPrice: $('#Price').val(), Stock: $('#Stock').val() }; </code>...
javascript jquery
[3, 5]
4,796,200
4,796,201
jQuery: Use of undefined constant data assumed 'data'
<p>I am trying to use jQuery to make a synchronous AJAX post to a server, and get a JSON response back.</p> <p>I want to set a javascript variable msg upon successful return</p> <p>This is what my code looks like:</p> <pre><code>$(document).ready(function(){ $('#test').click(function(){ alert('called!'); ...
php jquery
[2, 5]
2,841,425
2,841,426
Is it bad to add jQuery multiple times on a page?
<p>I am in a situation where I have multiple ASCX files that are being added to an aspx page. Some of these files include the jQuery library. Depending on which ones are added the jQuery library may be included more than once.</p> <p>I cannot add jQuery at the masterpage or some other level, it must be from the ASCX...
jquery asp.net
[5, 9]
811,270
811,271
What does classname.class refer to in Android?
<p>For example, when we create an intent, we use </p> <pre><code>Intent i = new Intent(MainActivity.this,LoginActivity.class); </code></pre> <p>What does <code>.class</code> refer to? Is it the name of the class as a string? Or is it the class itself? Why can't I just pass<code>LoginActivity</code> instead of <code>L...
java android
[1, 4]
2,903,013
2,903,014
path to subfolder for a text file
<pre><code>StreamReader content1 = File.OpenText("../DATA/heading.txt"); </code></pre> <p>I have a txt file in a subfolder called DATA, I am trying to access this file from code but the code goes to the .net runtime directitory and not the application directory, thanks for the help</p>
c# asp.net
[0, 9]
567,712
567,713
What's the best way to facilitate "Load More" pagination with jQuery?
<p>I'm displaying a list of search results on a page. At the very bottom I would like to place a "Load More" link which appends more results to existing ones on the page and changes the "Load more" link's parameters to next page, so that if user clicks it next page will be appended to the page. It would also be nice to...
javascript jquery
[3, 5]
3,100,376
3,100,377
Is it possible to apply an onclick() event to a div tag?
<p>To make sure that an event handler is written properly, I generally have Visual Studio generate the event for me. However, I can't find a way to do this with a div and I've tried typing it out myself to no avail. Is this even possible without writing any javascript? (I saw similar questions, but couldn't seem to f...
c# asp.net
[0, 9]
5,736,194
5,736,195
Have a problem with my jQuery Tabs
<p>I have a jQuery based tabs which i got from some blog.So now when you click on the Tab,the respective content is loaded.</p> <p>The content in each tab is quite huge and that is why i want to float the tabs on the right side of the screen.So how do i do that.</p> <p>Here is the tabs which I'm talking about. <a hre...
php jquery
[2, 5]
3,438,165
3,438,166
how to create a DLL for all language
<p>how to create a file DLL, so all language dev can used it i think, if use C++ to created , then language .Net can used it. however, how about JAVA ??? and a few other language</p>
c# java c++
[0, 1, 6]
3,315,739
3,315,740
Dynamically removing elements from different div
<p>I have the following code:</p> <pre><code>&lt;div id='a'&gt; &lt;/div&gt; .... .... &lt;div id='b'&gt; &lt;/div&gt; </code></pre> <p>combined the script:</p> <pre><code>$.ajax({ type:'POST', url:'grouplist.php', async:false, dataType:'json', cache:false, success:function(result) { ...
javascript jquery
[3, 5]
1,788,924
1,788,925
how to call function from another page in java?
<p>i have defined all my java files in packages... i have one function which i have defined on some page and i just want to use it on another page... how would i do that...</p>
java android
[1, 4]
180,085
180,086
How to keep append any element while reloading
<p>I wanted to know how I could keep an element that I have appended in jQuery alive ? I have a form, when the value of a is changing, an element append. But when there are errors it reload the page and print the errors. But the element appended disappear after reloading the page of course..</p> <pre><code>&lt;form m...
javascript jquery
[3, 5]
1,302,613
1,302,614
JQuery right click contextmenu
<p>Hi I'm new to JQuery and I just want to have a rightclick contextmenu. I googled it and found sample code</p> <p>This is the code I'm using.</p> <pre><code> $(document).ready(function(){ $('#rightclickarea').bind('contextmenu',function(e){ var $cmenu = $(this).next(); $('&lt;div class="overlay"&gt;&l...
javascript jquery
[3, 5]
4,037,380
4,037,381
Guides to help learn C++ specifically from a C# background
<p>Is there a guide/reference anyone would recommend to pick up C++ <em>specifically</em> if you have strong experience of C#?</p> <p>There are C++ guides, but a lot start with the absolute basics and I feel I've covered a lot with my C# learnings.</p> <p>But the absolute basics may be a good thing and I may be barki...
c# c++
[0, 6]
2,107,293
2,107,294
Error when remove row using javascript?
<p>I have a sample code:</p> <pre><code>&lt;input type="checkbox" id="input_modem_1" onclick="add_delete_row(this, 1,'test1' )" name="modem_id[]" value="1" /&gt; test 1 &lt;input type="checkbox" id="input_modem_2" onclick="add_delete_row(this, 2,'test2' )" name="modem_id[]" value="2" /&gt; test 2 &lt;table id="modem_l...
javascript jquery
[3, 5]
2,650,312
2,650,313
How to bring focus to a window in jquery?
<p>I am trying to bring focus to window using jquery. The window is popup initiated through a button click on the parent page. I have some ajax calls going on in the child window, so data is being updated. My issue is that if the user clicks on the parent window and hides the child behind it, i would like to bring t...
javascript jquery
[3, 5]
5,004,500
5,004,501
JS hover link call function, but only once?
<p>I have a simple html page, with many links.</p> <p>When a link is hovered over, it calls a function <code>dothis()</code> that changes the contents of a div on the page, but I only want it to run the function once for each link no matter how many times it is hovered over. </p> <p>For example, if the user hovers o...
javascript jquery
[3, 5]
3,144,837
3,144,838
single quote in php from java string
<p>I have a java (android) application that uses php to talk to the MS database. The problem is one part in my app. I have a string that is a sql statement, and that string will not insert into the database with the single quotes</p> <pre><code>String sql = "select * from table where col = 'testing' AND Col2 = 'Tester...
java php
[1, 2]
2,116,434
2,116,435
JS/jQuery - Advice on Creating a Variable that can be used in multiple functions
<p>I'd like to create a a series of variable like follows that have settings per each:</p> <pre><code>var panel_myfeed = new Array(); panel_myfeed[0]="/myfeed"; panel_myfeed[1]="#view-panel-myfeed"; panel_myfeed[2]="XXXXXXXX"; var panel_OtherPanel = new Array(); panel_OtherPanel[0]="/otherurl"; panel_OtherPanel[1]="#...
javascript jquery
[3, 5]
612,129
612,130
Changing parent page's title from user control
<p>Am a newbie to asp.net I've an asp.net page which uses a user control. On Page_Load event of this control,I want to change the title of parent aspx page. Need help on this please.</p>
c# asp.net
[0, 9]
1,991,943
1,991,944
setInterval update ajax column unless mouseover
<p>I have a column in my web design, which is periodically refreshed by a JS function "refreshColumn()" and updated by AJAX.</p> <pre><code>setInterval('refreshColumn()',60000); function refreshColumn() { ..make call with AJAX and load response to element... document.getElementById('myColumn').innerHTML = xmlhttp.res...
javascript jquery
[3, 5]
5,521,766
5,521,767
Class Design : Threading inside class or outside
<p>I have a class <code>Session</code> which tracks a bunch of counters and gets persisted to a database. My question is mostly a class design question, and not specific to Android but I'm working on Android, which is only relevant because I want to ensure writing to the database does not happen on <em>the</em> main th...
java android
[1, 4]
245,951
245,952
How to Retrieve Particular ID Elements within a Web Page using jQuery
<p>Hoping someone can assist as I am unsure how to approach but for the web page that I am on (i.e. in my web app), using jQuery, I would like to be able to add to an array in order of appearance through the web page, all elements where the id matches the string "_AB_Q_"</p> <p>For example, scattered through the web p...
javascript jquery
[3, 5]
472,895
472,896
returning a variable from the callback of a function
<p>I am using the following functions:</p> <pre><code>function loop_perms(permissions) { .... call check_perm here.... } function check_perm(perm) { var result; FB.api( { method: 'users.hasAppPermission', ext_perm: perm }, function(response) { resul...
javascript jquery
[3, 5]
5,444,085
5,444,086
How to return the ID of this span under a LI nodeObject using javascript or Jquery
<p>So I have </p> <pre><code>&lt;li&gt; &lt;span id="foobar"&gt; abc &lt;/span&gt; &lt;/li&gt; </code></pre> <p>I now have <code>li</code> as an nodeObject. I could get <code>"LI"</code> by using <code>li.nodeName</code>.</p> <p>Now how could I get <code>"foobar"</code> out of <code>li</code> which is an ID of a spa...
javascript jquery
[3, 5]
2,839,275
2,839,276
How do I associate an ID with a content of a div?
<p>For example I have a HTML table...</p> <pre><code>name | grade | action bob | 1.0 | [button class="button" id='1'] jack | 2.0 | [button class="button" id='2'] john | 3.0 | [button class="button" id='3'] </code></pre> <p>When I click the button,</p> <p>to get the id...</p> <pre><code>$(function(){ $('....
javascript jquery
[3, 5]
4,355,462
4,355,463
Buttons in treeView
<p>I am making an application where I want to display buttons next to each expanded leaf node. I looked for tree list view and datagrid in tree view but nothing helped. It would be great if anyone could suggest something I am coding with c# and using asp.net.</p> <p>I am looking for something like this: </p> <ul> <li...
c# asp.net
[0, 9]
5,095,899
5,095,900
jQuery reset setInterval timer
<p>My Jquery:</p> <pre><code>function myTimer() { var sec = 15 var timer = setInterval(function() { $('#timer').text(sec--); if (sec == -1) { clearInterval(timer); alert('done'); } } , 1000); } $("#knap").click(function() { myTimer(); }); $("#reset").click(function() { /...
javascript jquery
[3, 5]
2,063,510
2,063,511
How to convert a number generated by php into a jQuery counter?
<p>I have built a simple php visitor counter to count the # of visitors to a site.</p> <pre><code>$count_my_page = (text file); $hits = file($count_my_page); $hits[0] ++; $fp = fopen($count_my_page , "w"); fputs($fp , "$hits[0]"); fclose($fp); echo $hits[0]; </code></pre> <p>Instead of boring number showing up, I am ...
php jquery
[2, 5]
3,388,871
3,388,872
Process Jquery fuction only once
<p>HTML&amp;PHP</p> <p>I list ticket info;</p> <pre class="lang-php prettyprint-override"><code> &lt;table&gt; &lt;?php while($values = mysql_fetch_array($ticketInfo)){ echo '&lt;tr&gt;'; echo '&lt;td id="ticketPrice"&gt;'. $values['ticket_price'] .'&lt;/td&gt;'; echo '&lt;td id="myBonus"&gt;'...
javascript jquery
[3, 5]
638,665
638,666
Data persistence and updates in ASP.NET Web Forms
<p>I'm currently working on a web app/game using C# and ASP.NET(3.5). However, I'm running into a problem of variables used in the main page being reset to null whenever I click a button on the web form. I'm wondering if there was a way to allow to variables to persist for the life cycle of the entire application, as w...
c# asp.net
[0, 9]
5,097,721
5,097,722
ASP.NET production server PDB files
<p>When developing I understand why PDB files are build. But when I deploy my website for the production server the PDB files does still exists. I dont's understand why.</p> <p>Should I delete them in production environment or leave them</p>
c# asp.net
[0, 9]
722,482
722,483
show toast when connectivity changes
<p>I built an app that streams audio using a webview. Now I added a check if there's connectivity (or not). Using toast I show a message with "true" or "false", but I'd like show a toast only when the connectivity changes. What should I do?</p> <pre><code>protected void onCreate(Bundle savedInstanceState) { su...
java android
[1, 4]
2,603,265
2,603,266
jQuery: Why can't I access the event object in my scroll event?
<p>I want to access the original event object but the object returns undefined..</p> <pre><code>$(window).scroll(function(event) { alert(event.pageX); }); </code></pre> <p>I'm just trying this out if it will work. The example is as basic as possible so I can work out other events too.</p>
javascript jquery
[3, 5]
3,196,745
3,196,746
How to access the android default api using jquery mobile framework
<p>I develop one android application using jquery mobile framework. now i need to share text via message, Gmail, Facebook, twitter and email. I dont know how to access the default android api in jquery. can anybody help me?</p> <p>Thanks in advance... Shanmuganathan</p>
jquery android
[5, 4]
2,836,604
2,836,605
scrollTo across multiple pages
<p>I have jQuery <code>scrollTo</code> working on a single page of a website, by calling each elements' <code>id</code> which activates the scroll.</p> <p>What I would like to do is include elements on another page, which when the the link in the menu is clicked, loads the new page and scrolls to the correct element.<...
javascript jquery
[3, 5]
54,186
54,187
Trouble with using layout-large with 160dpi large screen emulator (Android)
<p>I'm having trouble getting a 160dpi, 480x800 emulator to display the contents of my main.xml in a layout-large folder. It seems to still be using the main.xml in my regular layout folder. Are there any common reasons it wouldn't be reading this file correctly?</p> <p>To put it into context, I have a .png called "ba...
java android
[1, 4]
946,770
946,771
passing an array of jquery get requests into $.when()
<p>I have the following parameters:</p> <pre><code>a = [{param:'a'}, {param:'b'}, {param:'c'}] </code></pre> <p>I'd like to make a get request for each parameter, like this:</p> <pre><code>a.map(function(ai){return $.get('myapi/get?ai='+ai.param)}) </code></pre> <p>How do I do something once all the get requests ha...
javascript jquery
[3, 5]
5,942,024
5,942,025
Should I use Java applets or JavaScript/PHP to make my site more interactive?
<p>I have a website that is about electronics. I want to make some functional calculators such as calculation for analog filters which will have to show lots of plots and stuff like that. <a href="http://sim.okawa-denshi.jp/en/OPtazyuLowkeisan.htm" rel="nofollow">This is a sample of what I am looking for</a> and obviou...
java javascript
[1, 3]
181,068
181,069
jquery load to hide content
<p>There is javascript on my webpage, but I need to hide it from my users (I don't want them to be able to see it because it contains some answers to the game.)</p> <p>So I tried using Jquery .load in order to hide the content (I load the content from an external js file with that call). But it failed to load. So I tr...
javascript jquery
[3, 5]
1,653,749
1,653,750
ASP.NET Session State Security Problem
<p>I have a website in which people's 'logged in' state is confirmed by their session cookie (and a value within the session which they get after they log in). The cookie is set to httpOnly &amp; require SSL.</p> <p>Let's say somebody has 2 Firefox windows open, window (A) has my application and they are logged in, an...
c# asp.net
[0, 9]
4,211,031
4,211,032
Javascript/JQuery event arguments. I don't understand what this 'e' argument is or does
<p>JQuery:</p> <pre><code>this.saveButton.click(function (e) { scope.saveForm(); }); </code></pre> <p>This is a very simple line of JQuery that binds the .click() event to the saveButton object and calls a saveForm function when the event is fired.</p> <p>When this event is called, what is 'e'? I don't think it...
javascript jquery
[3, 5]
2,082,322
2,082,323
Bind an action when a button is clicked in jQuery doesn't work
<p>i have a strange problem, i'm binding an action to a button using the jQuery function (click), when i click the button nothing happens, how that come!, here's the code i'm using: ` </p> <pre><code>&lt;script &gt; $( '#admin' ).live( 'pageinit',function(event){ $('#AddButton').click(function(){ ...
javascript jquery
[3, 5]
4,593,557
4,593,558
__EVENTTARGET not populating after button click + C#/ASP.NET
<p>I have an asp button that produces this html: </p> <pre><code>&lt;input type="submit" name="ctl00$m$g_a2ba5666_c8e9_4bd7_a44a_f9407dbe2199$ctl00$btnAddWebPart" value="Add Report" id="ctl00_m_g_a2ba5666_c8e9_4bd7_a44a_f9407dbe2199_ctl00_btnAddWebPart" /&gt; </code></pre> <p>When the button is submitted and the page...
c# asp.net
[0, 9]
4,400,978
4,400,979
Non Blocking Serial IO call in Java
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/4293448/non-blocking-io-for-android">Non blocking IO for Android</a><br> <a href="http://stackoverflow.com/questions/3693758/android-unbuffered-io">Android: Unbuffered IO</a> </p> </blockquote> <p>Can anyone t...
java android
[1, 4]
3,625,078
3,625,079
Performance Comparison between setting Resources as Content versus Embedded
<p>Does anyone know what are the performance costs of setting the resource to be as content and not embedded resource in asp.net app. </p> <p>Has anyone ever noticed this issue in his app?</p>
c# asp.net
[0, 9]
1,801,323
1,801,324
how to deploy the asp.net project on server
<p>i create one website. the excel file has name and mail id information. the mail id fetch by excel file when i give excel file name after send mail automatically to this mail id without design the subject, from,to ,cc,bcc,content. how to i create this project. now i export the excel file to ms-access.then i fetch nam...
php asp.net
[2, 9]
937,973
937,974
copy contents of div to clipboard
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/400212/how-to-copy-to-clipboard-in-javascript">How to Copy to Clipboard in JavaScript?</a> </p> </blockquote> <p>Is there a way to copy the contents of a div into a clipboard using javascript/jquery without usin...
javascript jquery
[3, 5]
2,965,517
2,965,518
background image event handler
<p>If a HTML element (e.g. <code>div</code>) has a CSS background image is it possible to assign an event handler that is triggered when the user clicks on the background image, but not any other part of the element?</p> <p>If so, a JQuery example would be much appreciated.</p>
javascript jquery
[3, 5]
3,482,324
3,482,325
Javascript else condition not triggering
<p>I am trying to do a basic javascript/jquery animation. Basically, a div that is hidden under normal view, should come into view when clicking a button.</p> <p>The problem I have is in the condition (the <code>if else</code> statement).</p> <p>Here is the code that I am using.</p> <pre><code>$(document).ready(func...
javascript jquery
[3, 5]
1,605,029
1,605,030
Option Menu Button Code getting Stuck and Hanging
<p>I'm struggling to see why my code is not getting into the try statement after I hit the NearBy button on the options menu. It goes to a black screen but the IN NEAR CASE string doesn't display in the output of the logcat in Eclipse or in aLogCat on an Android phone? What am I doing wrong? </p> <pre><code>import a...
java android
[1, 4]
4,868,445
4,868,446
Why can't I set a nullable int to null in a ternary if statement?
<p>The C# code below:</p> <pre><code>int? i; i = (true ? null : 0); </code></pre> <p>gives me the error:</p> <blockquote> <p>Type of conditional expression cannot be determined because there is no implicit conversion between '&lt;null&gt;' and 'int'</p> </blockquote> <p>Shouldn't this be valid? What am i m...
c# asp.net
[0, 9]
2,067,141
2,067,142
creating global functions in android
<p>What i want to do is create a java file that has various functions and I would like to use it across the whole project. For example check Internet Connection. Then I would like to call that function on each activity. Does anyone know how to do that?</p>
java android
[1, 4]
1,029,620
1,029,621
Changing page width and height using RegisterStartupScript method in asp.net
<p>I want to change page width and height using RegisterStartupScpript method:</p> <p>I tried</p> <pre><code>ScriptManager.RegisterStartupScript(this, this.GetType(), "default2", "&lt;script height:350; width:200 type=text/javascript&gt; &lt;/script&gt;", true); </code></pre> <p>but it doesn't work. Can you help me?...
c# asp.net
[0, 9]
5,777,504
5,777,505
Using jQuery to "highlight" content under cursor
<p>I'm trying to write some jQuery code that will highlight the element the cursor is currently hovering over by adding a border around it. Here is the code I have so far:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;...
javascript jquery
[3, 5]
5,086,676
5,086,677
ASP.NET - How to check value of a textbox in a user control from a page?
<p>I have an aspx page that contains a user control. The user control has a textbox and the page has a submit button.</p> <p>How can I check if the textbox in the user control is not null and display an alert if it is - from the page?</p>
javascript asp.net
[3, 9]
308,032
308,033
Why does everyone like jQuery more than prototype/script.aculo.us or MooTools or whatever?
<p>It seems that jQuery has taken the throne for JavaScript frameworks and I was wondering exactly why. Is there a technical reason for this or is it just that they have evangelists? I have been really happy with using <a href="http://en.wikipedia.org/wiki/Prototype_JavaScript_Framework" rel="nofollow">Prototype</a> ...
javascript jquery
[3, 5]
5,197,488
5,197,489
How do I add an additional window.onload event in Javascript
<p>In my asp.net User Control I'm adding some script to the window.onload event like so:</p> <pre><code>if (!Page.ClientScript.IsStartupScriptRegistered(this.GetType(), onloadScriptName)) Page.ClientScript.RegisterStartupScript(this.GetType(), onloadScriptName, "window.onload = function() {myFunction();};", tru...
c# asp.net javascript
[0, 9, 3]
3,879,527
3,879,528
Detecting if a plugin has been applied
<p>I have an app that loads conversations. Each time a conversation is loaded I need to destroy and re init the file uploader.</p> <p>Per: <a href="https://github.com/blueimp/jQuery-File-Upload/wiki/API" rel="nofollow">https://github.com/blueimp/jQuery-File-Upload/wiki/API</a></p> <p>I'm trying:</p> <pre><code>// Fi...
javascript jquery
[3, 5]
2,484,506
2,484,507
How to change a picture on each refresh / reload : javascript,php
<p>I want to change banner image on every refresh with javascript or php.</p>
php javascript jquery
[2, 3, 5]
2,773,433
2,773,434
What’s the difference between Response.Write() andResponse.Output.Write()?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/111417/whats-the-difference-between-response-write-and-response-output-write">What’s the difference between Response.Write() and Response.Output.Write()?</a> </p> </blockquote> <p>how it is different from respon...
c# asp.net
[0, 9]
2,701,996
2,701,997
Access web control from class file in asp.net 4
<p>I am doing a simple page (Default.aspx), where is a DropDownList (id <strong>colors</strong>) control. It is easy to populate it with items in PageLoad method. </p> <pre><code>protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { colors.Items.Add("red"); } } etc. .... ...
c# asp.net
[0, 9]
4,564,893
4,564,894
Comparing multiple field values ​​together
<p>How can I compare multiple input field values and if there is a match alert 'There are similar values' using jQuery?</p> <pre><code>&lt;input value="111"&gt; //similar &lt;input value="222"&gt; &lt;input value="111"&gt; //similar &lt;input value="333"&gt; </code></pre> <p>This html code above should alert 'There a...
javascript jquery
[3, 5]
2,346,986
2,346,987
When should I define an hash code function for my types?
<p>Is there any other reason for implementing an hash code function for my types other than allowing for good use of hash tables? </p> <p>Let's say I am designing some types that I intend to use internally. I know that types are "internal" to the system, and I also know I will never use those types in hash tables. In ...
c# java
[0, 1]
4,985,770
4,985,771
When to delete generated file using asp.net
<p>I have a template excel file to generate excel files from it.</p> <p>My code is as follows (This part is to create a new excel file from the template):</p> <pre><code>string currentFN = PropertyFinalResult[0].Fecha; string fixCurrentFN = currentFN.Replace('/', '_'); string currentTime = DateTime.N...
c# asp.net
[0, 9]
5,004,571
5,004,572
jquery automatically scrolling table rows but with table header fixed?
<p>I know there are code sample/plugins out there to make the header fixed and the table scrollable. But I want to achieve is <strong>automatically</strong> scrolling table data rows once it's loaded, but keep the header fixed.</p> <p>Is there a plugin/jquery code to do just that?</p> <p>thanks</p>
javascript jquery
[3, 5]
483,327
483,328
Controlling the submit behaviour of an ImageButton in ASP.NET
<p>I have a image button in a page which can be triggered on mouse click, by default it gets triggered on enter press also which i want to disable. how to make the submit behaviour of the <code>aspx:image</code> button false</p>
c# asp.net
[0, 9]
2,036,072
2,036,073
c# DataTable Adding Data from Table
<p>I have a datatable being populated however one of the fields is a drop down list which is derived from a database connection. When I click add it always add the same data despite my selection and then removes the first item in the list.</p> <p>ASPX Code</p> <pre><code>&lt;asp:TableCell&gt;&lt;asp:DropDownList runa...
c# asp.net
[0, 9]
2,900,240
2,900,241
pass eventdata to event handler in javascript
<p>I have two div :</p> <pre><code>&lt;div id="div1"&gt;&lt;/div&gt; &lt;div id="div2"&gt;&lt;/div&gt; </code></pre> <p>and i have the following jquery for div1:</p> <pre><code> $('#div1').click(function(e) { alert(e.pageX + ' ' + e.pageY); }); </code></pre> <p>. Now, i want to trigger click eventhandler of div1 to...
javascript jquery
[3, 5]
1,111,147
1,111,148
Trying to pass dynamic values to a parameter in an SQL Data Source control
<p>I have some values that are being passed to a ASP.NET page using C# but I need those values to be set as parameters for an SQL datasource. I am just getting started with C# and ASP.NET so any help will be appreciated.</p> <p>The data source code I have is as follows:</p> <pre><code>&lt;asp:SqlDataSource ID="SqlDat...
c# asp.net
[0, 9]
2,264,857
2,264,858
While loading page in mozilla, First DIV code is not loaded
<p>While loading page in mozilla, First DIV code is not loaded tried to load html using inside</p> <pre><code>&lt;div id="mainContent"&gt;&lt;/div&gt; </code></pre> <p>with below call</p> <pre><code>if (destinationURL != null) { $.get(destinationURL, function(data) { $("#mainContent").attr("innerHT...
javascript jquery
[3, 5]
2,680,140
2,680,141
NameValueCollection returns Length Property instead of Name Value
<p>Could someone shed some light on this my NameValueCollection returns the Length property instead of Name and Value could some show me what im doing wrong here. I can't set the DataTextField or DataValueField for the dropdownlist it just gives me length.</p> <pre><code> public NameValueCollection GetDisplayForumG...
c# asp.net
[0, 9]
2,256,798
2,256,799
Mobile Browser - Back Button
<p>I have a doubt. Please make me clear. I know we could not disable the mobile browser back button. But,</p> <p>Is it possible to change the events of <strong>mobile browsers</strong> back button ? [Mobile Browser :iPhone - Safari, Android - Chrome , W7 - IE , Opera Mobile,</p> <p>Regards, Girija</p>
iphone android
[8, 4]
453,727
453,728
What's the best way of storing application data in Android?
<p>Suppose you were writing an app that stored a large, ordered data structure that remains static through the life of the application. What's the best way of including that kind of data in your Android app?</p> <p>(In my particular case, I'm working on a Unicode character map, and I need a place to stick data about t...
java android
[1, 4]
4,109,882
4,109,883
How to change a value of a container?
<p>I have following piece of code:</p> <pre><code>if (json.result=='OK') { message="Your correction has been added successfully"; $("#ShoppingCartView.custom_terms_n_conditions/24").empty(); $("#ShoppingCartView.custom_terms_n_conditions/24").html('123'); } alert(message); </cod...
javascript jquery
[3, 5]
1,659,353
1,659,354
jQuery animate - get future position of element
<p>I'm having trouble getting the position of an element because my animation is long and $(this).position().top is calculated too early.</p> <p>How can I get a future position value of an element before it animates to that position? </p>
javascript jquery
[3, 5]
1,092,991
1,092,992
What is the most efficient way of creating an HTML element and appending attributes to it and then wrapping it inside of another element?
<p>I found <a href="http://stackoverflow.com/a/5674985/538786">this answer</a>, which is great. But what If I also have to wrap another element around that element? This is how I'm doing it now:</p> <p>$<code>('#screenshots').append($('&lt;a href="' + link + '" title="' + title + '"&gt;&lt;img src="' + el + '" alt="" ...
javascript jquery
[3, 5]
2,498,042
2,498,043
Ignore headphones on Android 2.2.2
<p>Is there a way in Android 2.2.2 to override the headphone port?</p> <p>For example, a service that was able to tell the phone that headphones have been removed. The <code>BroadcastReceiver</code> doesn't look like it'd be able to tell the phone anything, just listen for when things change.</p> <p>I want to do this...
java android
[1, 4]
453,392
453,393
Using C# or C++ how can you change a computer monitor's color and brightness settings?
<p>How to change computers colour settings and screen brightness?</p> <p>I'm creating an application and part of it I want to be able to click a button to change the screen brightness of your monitor. I also want to be able to change the colour settings so I can flick from colour to black and white/grey scale.</p> <...
c# c++
[0, 6]
2,675,175
2,675,176
jquery ajax wont return text and or fire alert on error
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1327024/jquery-return-the-value-of-a-ajax-call-to-caller-function">Jquery: Return the value of a ajax call to caller function?</a> </p> </blockquote> <p>In the code below ,</p> <p>I'm trying to put my ajax call...
javascript jquery
[3, 5]
5,191,542
5,191,543
validate if all YES/NO radio button groups are checked and validate if all are YES
<p>I'd like to have a form with 3 questions each having a pair of YES/NO radio buttons. Upon form submission, first I need to validate if all questions are answered with <code>"yes"</code> or <code>"no"</code> then I need to validate if the answer of all 3 questions are <code>YES</code>. If <code>YES</code> on all then...
php jquery
[2, 5]
5,876,789
5,876,790
jquery to find all exact td matches
<pre><code>$('#servertable td:eq(' + server + ')') </code></pre> <p>this finds only 1 (first I think) match, how to find all matches. btw. td:contains will not work for me.</p>
javascript jquery
[3, 5]
1,042,720
1,042,721
How do I prevent JQuery animate calls from getting queued up?
<p><strong>Background</strong></p> <p>I am working on a project that relies heavily on JQuery .animate(), it occasionally receives external updates via Socket.io that call animate(). When the window is open, everything runs fine and animate calls can run asynchronously.</p> <p><strong>Problem</strong></p> <p>However...
javascript jquery
[3, 5]