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
3,313,629
3,313,630
doesn't toggle the feedback div
<pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ $('#feedback').hide(''); $('a#1').click(function(){ $('#feedback').toggle(''); }); }); &lt;/script&gt; </code></pre> <p>It doesn't toggle the feedback div, but if you use show instead of toggle the script works.</p>
php javascript jquery
[2, 3, 5]
2,098,658
2,098,659
setText(String) is not available for the TextView
<p>I'm trying to simplify my code, but for some reasons the "setText" method is not available.</p> <p>Here is the code which is currently working for me:</p> <pre><code>TextView textView = (TextView)view.findViewById(R.id.testId); textView.setText("Test"); </code></pre> <p>I'm trying to simply it to this code:</p> ...
java android
[1, 4]
4,842,549
4,842,550
Event managment: Replace click event
<p>I have a button with a click event (from a 3. party library) which submits a form. I like to remove the click event, add my own function and call the original event after a validation.</p> <p>I thought i just add an <code>event.stopImmediatePropagation();</code> but that did not work. Maybe because of the order the...
javascript jquery
[3, 5]
5,252,179
5,252,180
how to add cancel button inside spinner
<p>I want to add cancel button inside of spinner how to add cancel button in spinner without </p> <p>using alert dialog please give me an example..</p> <p>spinner = (Spinner) findViewById(R.id.spinner);</p> <pre><code> ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(getApplicationContext(),R.l...
java android
[1, 4]
635,139
635,140
Calculate some data and draw corresponding image in ASP.NET
<p>I got a question with my ASP.NET page. On the page I have a form with some textboxes and a submit button. How can I do the following:</p> <ol> <li>Get data from the textboxes</li> <li>Calculate some values</li> <li>Draw and place an image after the form using these values.</li> </ol> <p>Third step - is the problem...
c# asp.net
[0, 9]
3,911,837
3,911,838
variable scope in jquery
<p>I'm trying to access the value of a variable that is set inside a <code>.click</code> function outside of the function but I'll get the error, can anyone please tell me what I'm doing wrong?</p> <pre><code>var id; var currentPosition; var slideWidth = 368; var slides; var numberOfSlides; $('#accordion_catering h3'...
javascript jquery
[3, 5]
684,654
684,655
How to get the class names using jquery?
<p>Hey, I'm wondering how I can get the class names dynamically using jquery for the script below.</p> <p>The HTML output looks like this:</p> <pre><code>&lt;div id="main-info-1" class="maini"&gt; &lt;p&gt;this is a paragraph.&lt;/p&gt; &lt;/div&gt; </code></pre> <p>So, I'm trying to get the class name dynamica...
javascript jquery
[3, 5]
3,417,486
3,417,487
Catch exception
<p>folks! I got Activity, in onCreate() i try to fetch data:</p> <pre><code>protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); ............... fillUI(); } public void getDetailedItem(){ FeedParser parser=new FeedParser(); try{ ...
java android
[1, 4]
5,199,647
5,199,648
Remove item after max reached w/jQuery
<p>OK, I am trying to clone table with 3 elements in it. After I make 3 clones I need to continue cloning but remove item <strong>.val3</strong>.</p> <pre><code>$('a').click(function(e) { var $table = $(this).prev(); $table.after($table.clone()); e.preventDefault(); var n = $(".val3").length; if ...
javascript jquery
[3, 5]
4,165,420
4,165,421
change event for combobox not getting fired in jquery
<p>i am working in php. I have written code for displaying combo box like this :</p> <pre><code>&lt;select name="country" id="idCountry" class="clsCountry" &gt; &lt;?php foreach($objCountries as $objCountry):?&gt; &lt;option value="&lt;?php echo $objCountry-&gt;getId()?&gt;" &gt;&lt;?php echo $objCountry-&gt;getNam...
php jquery
[2, 5]
2,143,140
2,143,141
How to upload image file that converted thumbnails with javascript & PHP?
<p>I have some code in which, before uploading the original images, it creates thumbnail images. What I want to do is, instead of uploading the client's original images, I'd like to upload the thumbnail images. The reason is that the originals image files are usually too big, and my system's OK with very small images s...
php javascript
[2, 3]
1,754,745
1,754,746
jquery : How to unbind dynamically created elements?
<p>I have buttons created dynamically. I know that bind/unbind is only applicable for elements not created dynamically. To add functionality I use <code>.live()</code> which works perfectly. My problem is Idk how to remove the functionality. Please help.</p>
javascript jquery
[3, 5]
5,900,124
5,900,125
store value of input type="hidden" into a php variable without javascript
<p>store value of input type="hidden" into a php variable.</p> <p>The value is set by javascript into a hidden variable[input].</p> <p>Now i need to save its value into a $myphpvariable.</p> <p>I cant set the value into session with javascript and cookies is not an option.</p>
php javascript
[2, 3]
5,842,163
5,842,164
what javascript object am I looking for? click a button-it stays bold till the next one is clicked?
<p>A very basic thing, I know. I have a collapsing div help box thing that is triggered when clicking links. Click the link, the help topic opens in the div.</p> <p>I want the text in the link to stay bold until I click another link. What function am i looking for? I'm using jquery. Thanks!</p>
javascript jquery
[3, 5]
4,535,387
4,535,388
jquery - button in ajax respone - no response to click
<p>jquery;</p> <p>Situation - just upgrading from pure javascript to jquery - prompted by browser inconsistencies.</p> <p>On load, a page displays, in a div, the result of an ajax request, which includes an OK button, <code>&lt;input name="srd_button_ok" type="button" value="OK"&gt;</code> at the bottom.</p> <p>Clic...
javascript jquery
[3, 5]
3,847,380
3,847,381
Clean php output into javascript
<p>Due to the nature of my project. I am pulling data from my db and outputting to javascript. Things were working just fine till I got to the main content. It has strings like (;, :, - ''). How do I ensure that these are displayed without crushing my script coz as for now nothing seems to work.</p>
php javascript
[2, 3]
3,416,614
3,416,615
Pass the anchor text of a Jquery generated link from another server into a Jquery var
<p>Not sure this is possible but maybe you can help.</p> <p>I have a list, where the content of the <code>&lt;li&gt;</code>'s is generated by Javascript, through a function called <code>showLink();</code> this <strong><em>function is on another server and it's not controlled by me</em></strong>.</p> <p>The <code>show...
javascript jquery
[3, 5]
1,685,933
1,685,934
Finding the textNode which the cursor is currently over
<p>Let's say I have the following...</p> <p><code>&lt;div id="text"&gt;Some text&lt;/div&gt;</code></p> <p>When my mouse goes over <code>Some</code>, <code>Some</code> will be returned and the same with <code>text</code>.</p> <p>Is this possible without putting each node into it's own element?</p>
javascript jquery
[3, 5]
3,056,574
3,056,575
jQuery calculation gives NaN
<p>Im trying to do a calculation, but i constantly get the error NaN; Could you help me out how to do the math for var testBottom?</p> <pre><code>jQuery(document).ready(function(){ var test = jQuery("#test"); var testTopOffset = test.offset(); var testTop = testTopOffset; var testHeight = test.height(); var testBottom...
javascript jquery
[3, 5]
3,087,199
3,087,200
can this code be re-written to use jquery chaining for setTimeout()
<p>Is it possible to use chaining when using setTimeout(). This example gives a div a red background, then I use setTimeout() to wait a second and make the background back to normal. can it be re-written or improved in any way</p> <pre><code>$(target).css('background', 'red'); setTimeout(function(){ $(target).css('...
javascript jquery
[3, 5]
2,288,327
2,288,328
Adding a jQuery Click handler
<p>I have following div in a page (I can not modify). </p> <pre><code> &lt;div id=":0.control"&gt;Click me&lt;/div&gt; </code></pre> <p>Now I want to add a jQuery Click handler </p> <pre><code>$("#:0.control").click(function () { alert('Clicked'); } ); </code></pre> <p>Above gives error. Any soluti...
javascript jquery
[3, 5]
2,040,119
2,040,120
How do I port php's openssl_sign to C#?
<p>I need to translate the following code to C# from php. What libraries / namespaces do I need to use?</p> <pre><code>function sign($method, $uuid, $data) { $merchant_private_key = openssl_get_privatekey(file_get_contents('merchant_private_key.pem')); $plaintext = $method . $uuid . serialize_data($data); ...
c# php
[0, 2]
5,739,982
5,739,983
Issue with Javascript (call asynchronously)
<p>I'm trying change text before I get feeds.<br> But the text changes after I got the feeds.<br> The question/answer it's only for Google Chrome (because it's an extension)<br> Sorry for my poor english ;-)</p> <pre> $("h1").click(function(){ $(this).text("Loading..."); // this happen after fids(); fids(); /...
javascript jquery
[3, 5]
1,195,608
1,195,609
Attempted GCF app for Android
<p>I am new to Android and am trying to create a very basic app that calculates and displays the GCF of two numbers entered by the user. Here is a copy of my GCF.java:</p> <pre><code>package com.example.GCF; import java.util.Arrays; import android.app.Activity; import android.os.Bundle; import android.view.View; imp...
java android
[1, 4]
3,673,646
3,673,647
Color not changing using Jquery
<p>I want the default "CSS class"to be black, and when using this select function for "selected" to have white text. I don't know where I'm going wrong</p> <pre><code>$(function() { $('a.link').click(function() { $('a.link').removeClass('selected'); $(this).addClass('selected'); $(this).css('co...
javascript jquery
[3, 5]
5,682,091
5,682,092
Formating a date in the text of a label inside a form view
<p>I want to know if there's a easier way to format a label that is inside a form view, the code I use is this one, it's inside the event form view databound:</p> <pre><code>protected void FormView2_DataBound(object sender, EventArgs e) { if (FormView2.CurrentMode == FormViewMode.Edit) { Label DAT_Labe...
c# asp.net
[0, 9]
5,818,567
5,818,568
Android java how to set authtoken to accounts?
<p>How to set authtoken to accounts for block access the 3rd party applications?</p>
java android
[1, 4]
798,778
798,779
multiple jquery galleries
<p>I'm trying to separate two jQuery galleries, so they don't interlink on my html page:</p> <p><a href="http://mashanova.com/myFAQ/faqGallery.html#" rel="nofollow">http://mashanova.com/myFAQ/faqGallery.html#</a></p> <p>here is the html:</p> ...
javascript jquery
[3, 5]
5,725,613
5,725,614
jQuery ajax post strange behaviour
<p>I have an ajax function to calculate and perform a certain validation.</p> <p>Code is shown below:</p> <pre><code>function collectFormData(fields) { var data = {}; for (var i = 0; i &lt; fields.length; i++) { var $item = $(fields[i]); data[$item.attr('name')] = $item.val(); } return...
javascript jquery
[3, 5]
4,385,540
4,385,541
Jquery datepicker write in other textbox
<p>I.ve a problem with jquery datepicker. Here is tehe code</p> <pre><code>&lt;asp:GridView ID="CompIncGridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="D_id" ClientIDMode="Static" &gt; &lt;Columns&gt; ...
jquery asp.net
[5, 9]
713,333
713,334
Combobox for dot net 2.0 web forms using c#
<p>Could you please help me in finding an answer on whether combobox is available in dot net 2.0.</p> <p>i have installed ajax toolkit for dot net 2.0 however combobox is not available in it moreover combobox which we need should have autocomplete feature where if user types something then combobox should display only...
c# asp.net
[0, 9]
1,451,532
1,451,533
If Page is typeof custom class
<p>I'm trying to work out whether my webforms <code>Page</code> is a certain type.</p> <p>I've got a number of base classes that inherit one another:</p> <pre><code>BasePage -&gt; System.Web.UI.Page CMSPage -&gt; BasePage Page -&gt; CMSPage </code></pre> <p>In a custom <code>UserControl</code>, I need to get the the...
c# asp.net
[0, 9]
4,706,080
4,706,081
Send email to user for password reset
<p>The flow is:</p> <ol> <li>user enters email address</li> <li>after submit, an email is sent to the user </li> <li>The email will include a link that will take the user to a reset password page.</li> </ol> <p>Now, how do I fetch user's ID based on the email address and encrypt it? Then what should link be? Like, w...
c# asp.net
[0, 9]
1,954,242
1,954,243
Parse data using JSOUP for android app
<p>I'm having issues parsing tags using JSOUP for android. I keep trying to go down further in the document the app doesn't work. Please help. I got "TR" to work which will parse all data within a TR, but I want to grab a single element and parse to the toast box.</p> <p>Thank you</p> <pre><code>import java.io.IOExce...
java android
[1, 4]
5,123,767
5,123,768
Logic of adding double values
<p>I was given the following question in an interview...</p> <pre><code>Compute the following sum: 1/2 + 1/4 + 1/8 + ... + 1/1048576 </code></pre> <p>I was told that this was a logic question and they weren't looking for the source code, however my answer was the following...</p> <pre><code> private static do...
c# java
[0, 1]
5,246,880
5,246,881
Disable click if class ="X", jQuery
<p>Im trying to build a tabbed content box, and im wondering if its possible that i can disable 1 link with a specific class, such as 'disabled' </p> <p>I read somewhere about a function called preventDefault, would this work?</p> <p><a href="http://jsfiddle.net/Ssr5W/" rel="nofollow">http://jsfiddle.net/Ssr5W/</a></...
javascript jquery
[3, 5]
2,018,645
2,018,646
Delay href click, but not with SetTimeout
<p>I am trying to track the outbound links via google analytics, and <a href="http://support.google.com/googleanalytics/bin/answer.py?hl=en&amp;answer=55527" rel="nofollow">Google suggests using this</a>: </p> <pre><code>&lt;script type="text/javascript"&gt; function recordOutboundLink(link, category, action) { ...
javascript jquery
[3, 5]
1,469,191
1,469,192
How do you hide/show forms in Android?
<p>I come from Windows .Net forms development.</p> <p>This is a pretty basic/fundamental question.</p> <p>I'm attempting to build an Android app that will have multiple screens/forms (like most do)</p> <p>My question is how do you achieve this in Android?</p> <p>For example, a listview loads with menu items. When ...
java android
[1, 4]
2,562,752
2,562,753
JQuery Pop up message
<p>I am trying to make a custom pop up message, that appears, displays to the user for 5 seconds and then fades out. This works fine BUT if the use triggers the event multiple times and the time out is already running the message quickly disappears. </p> <p>My function so far...</p> <pre><code>function showMessage(me...
javascript jquery
[3, 5]
1,735,953
1,735,954
how to view Listview edit template for user in ASP.NET
<p>I want the user to be able to switch between list view templates, according to button click event</p>
c# asp.net
[0, 9]
5,910,881
5,910,882
how to create universal UI design?
<p>I would like to learn from experienced developers Android, as you develop a UI for different screens? For example, now I have this problem:</p> <p>I have an element <code>(TextView)</code>, which should be placed as nearly aligned to the left, but not back to back, but with a slight indentation. Accordingly, the bi...
java android
[1, 4]
3,982,699
3,982,700
Applying drawable to an ImageView from another Activity Layout
<p>Using <a href="https://github.com/jasonpolites/gesture-imageview" rel="nofollow">this</a> library, I'm trying to retrieve the edited image and place it on another activity's ImageView...</p> <p><strong>Calling the function to set the edited drawable to the other ImageView:</strong></p> <pre><code>Log.d("eiDR",gIma...
java android
[1, 4]
5,965,528
5,965,529
Make long log data diplayed with PHP easy to read
<p>I have a long log file I am displaying with PHP. Its getting too long for me and I have to use CTRL+F to look at this thing in any way. What is a good way to display this data in a way easy to read? Best way would be using jquery. </p>
php javascript jquery
[2, 3, 5]
2,614,441
2,614,442
Convert C# row to PHP
<p>I want to convert a C# row to PHP, but it doesn't work (the result isn't the same):</p> <p>C#:</p> <p>PHP:</p> <p>Someone know how to do this?</p> <p>Thanks</p>
c# php
[0, 2]
1,851,287
1,851,288
jQuery hide and show label on user interaction
<p>I have the following jQuery code that hides and shows a label when user interacts with text box. Some scenarios:</p> <p>1.) User focus, label should be at 50% opacity<br> 2.) User types, label should be at 0% opacity<br> 3.) User removes all content but remains focused, label should be at 50% opacity<br> 4.) User r...
javascript jquery
[3, 5]
4,472,623
4,472,624
How much leeway do I have to leave myself to learn a new language?
<p>I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python? </p> <p>Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, ...
java python
[1, 7]
414,697
414,698
jQuery - Fade in objects selected by class
<p>I'm trying to select several elements at once and fade them in on window load. The obvious </p> <pre><code>$('.home').delay(200).fadeIn(400); </code></pre> <p>didn't work, and neither did</p> <pre><code>$('.home').each(function(){ $(this).delay(200).fadeIn(400); });​ </code></pre> <p>What's the best way to ...
javascript jquery
[3, 5]
1,064,165
1,064,166
why in firefox it is ok, but in ie8 it print 'undefined undefined'?
<pre><code>&lt;div&gt; &lt;span onmouseover="tip(event,this);"&gt;程序错误&lt;div class="content"&gt;good&lt;/div&gt;&lt;/span&gt;&lt;br&gt; &lt;span onmouseover="tip(event,this);"&gt;程序错误&lt;div class="content"&gt;good&lt;/div&gt;&lt;/span&gt;&lt;br&gt; &lt;span onmouseover="tip(event,this);"&gt;程序错误&lt;div...
javascript jquery
[3, 5]
3,491,767
3,491,768
How do you reference a custom object outside of the function it was created in with JavaScript?
<p>I'm currently using JavaScript and jQuery.</p> <p>I have an function which executes once the document is ready, and inside that I am creating objects which contain various attributes.</p> <p>Within the same function, I can access these new object's attributes no problem, however once I'm inside a different functio...
javascript jquery
[3, 5]
4,881,294
4,881,295
How to convert signs in url/text to hex characters? (converting = to %3D)
<p>With the script I'm making, jquery is getting vars from url parameter. The value that its getting is an url so if its something like </p> <p><code>http://localhost/index.html?url=http://www.example.com/index.php?something=some</code> </p> <p>it reads:</p> <pre><code>url = http://www.example.com/index.php?somethin...
javascript jquery
[3, 5]
2,560,919
2,560,920
JQuery : Click Everywhere But Some Element?
<p>I have a textbox and a div below it. I want to hide the div when the user clicks outside the textbox or div.</p> <p>Is there any other way other than document.click to handle that user has clicked outside. Because in some of the controls, event.stoppropagation is given, which on click wont trigger the document clic...
javascript jquery
[3, 5]
3,155,538
3,155,539
Multiple longclicklisteners
<p>I have 10 items that when long clicked, will bring up an item specific dialog. This is not a listview.</p> <p>Right now, I'm registering a long click listener on every item. Is it possible to capture the view of the long clicked item much like you can set android:onClick="buttonClick" and in code have public void b...
java android
[1, 4]
1,658,345
1,658,346
How to create web crawler in java?
<p>Hi i want to create a web crawler in java in which i want to retrive some data like title, description from the web page and store the datas in database</p>
java android
[1, 4]
1,884,427
1,884,428
Getting elements using Javascript
<p>I have a bunch of input elements that have a particular substring in their IDs. Using javascript, is there a way to get these elements as an array? I wouldn't know the full ID - only the substring.</p> <p>Is this any simpler if I use JQuery?</p>
javascript jquery
[3, 5]
4,676,737
4,676,738
JQuery using DateTimePicker addon dont work
<p>I need DateTimePicker on my site, I try <a href="http://trentrichardson.com/examples/timepicker/" rel="nofollow">this example</a></p> <p>and not working. My code <a href="http://pastebin.com/XEUUrtBj" rel="nofollow">is here</a></p> <p>js file is <strong>also included</strong> in my folder in localhost (/var/www). ...
javascript jquery
[3, 5]
375,780
375,781
How can I tell the owner of a selection?
<p>How can I tell who the parent node of a selection is?</p> <p>I'm getting a selection with:</p> <pre><code> var userSelection; if (window.getSelection) { userSelection = window.getSelection(); } else if (document.selection) { userSelection = document.selection...
javascript jquery
[3, 5]
807,071
807,072
Get ID from URL with jQuery
<p>I've got a url like this:</p> <pre><code>http://www.site.com/234234234 </code></pre> <p>I need to grab the Id after <code>/</code>, so in this case <code>234234234</code></p> <p>How can i do this easily?</p>
javascript jquery
[3, 5]
610,023
610,024
Using jquery to capture all hash clicks?
<p>Any way to use jquery to capture all/any hash tag (#xxxxx) clicks? Can't put them under one class.</p>
javascript jquery
[3, 5]
5,840,643
5,840,644
If on .focusout form contains no value, revert to original value?
<p>I'm trying to get my <code>&lt;input.../&gt;</code> fields to go blank on focus, and if on focus out they're still blank, revert them to their original values.</p> <p>I would've thought this would work, but apparently not:</p> <pre><code>$('input').focus( function() { var init_value = $(this).val(); $(this...
javascript jquery
[3, 5]
2,207,363
2,207,364
How to let Username column in the GridView to be opened in the Outlook?
<p>I developed a web-based training matrix that shows the training record for each employee in each division in my department in the company. The matrix will show many columns such as the employee name, username, job title... etc. what I want now is to make the username for each employee to be clickable which means whe...
c# asp.net
[0, 9]
5,295,194
5,295,195
Set value of input
<p>I'm trying to set the input value to 1 when checking the checkbox and empty when unchecking, Can't get it to work, please help.</p> <pre><code>&lt;td id="check-box"&gt;&lt;input type="checkbox" name="checkbox"&gt;&lt;/td&gt; &lt;td id="qty-box"&gt;&lt;input type="text" name="qtybox"&gt;&lt;/td&gt; &lt;script type=...
javascript jquery
[3, 5]
567,583
567,584
Locating text and performing operation based on its existence
<p>I'm trying to learn jQuery, but it's coming slowly as I really don't know any JavaScript. </p> <p>My site is in VB.NET and I'm putting jQuery code on both my actual <code>.ascx</code> <code>UserControl</code> and in a separate file (something like <code>myscripts.js</code>). This is because I'm using webforms as I ...
javascript jquery
[3, 5]
1,455,574
1,455,575
What to log when an exception is raised
<p>Until now I was logging the Error message and the stack trace of an exception. However, I don't think doing that is very helpful, if I don't log all the variables used inside the try block. If I can see all the variables used inside the try block, I think I will have a better idea on what caused the exception and ma...
c# asp.net
[0, 9]
2,254,687
2,254,688
jQuery - removing an alert stop code from working
<p>The code below works, but there is an issue with it.</p> <p>That issue is that unless the alert(this.href); - (about line 11) is in the code the following function does not work.</p> <pre><code>//There are pages which make up 2 chapters in this content //We shall attempt to grab all the links from these pages var ...
javascript jquery
[3, 5]
3,673,292
3,673,293
Javascript URL Location
<p>I want to check to see if part of my url location have this in it: ?TEST=NEWJERSEY</p> <p>How do i write that?</p>
javascript jquery
[3, 5]
2,837,090
2,837,091
jquery trigger change event on checkbox
<p>Is it possible to trigger change event on a checkbox using javascript/jquery?</p> <p>Something like this (I run triggerChange on click of a button):</p> <pre><code>&lt;label&gt;&lt;input type="checkbox" id="chk"/&gt;Label for chk&lt;/label&gt; &lt;script&gt; function triggerChange(){ $("#chk").trigger("change...
javascript jquery
[3, 5]
4,709,405
4,709,406
selecting 2nd and 3rd list items in a list with jquery
<p>I have a list.</p> <pre><code>&lt;ul id="navigation"&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt...
javascript jquery
[3, 5]
4,348,368
4,348,369
match the passwords
<p>I have a piece of code for the password match. I want to verify every character with password field while typing in confirm password field.</p> <pre><code> var npass = $('#password'); var rpass = $('#confirmpassword'); if( npass.val() != rpass.val() ) { Val.errors = true; Val.showerrors =...
javascript jquery
[3, 5]
2,322,309
2,322,310
Javascript to validate hours per week/weeks per year entered
<p>I have an HTML form that allows users to enter values for both "Number of hours per week" and "Number of weeks per year". We would like to include a check to ensure users don't enter values that exceed the possible maximum - this would check that "Number of hours per week" is not more than 168 and that "Number of we...
javascript jquery
[3, 5]
808,476
808,477
why the code in jquery doesn't work?
<p>the url is as this: <code>http://example.com/download/</code> </p> <pre><code>var pathname = window.location.pathname; if(pathname=='download/'){ $("#subnav-content div:first").hide(); $("#subnav-content div:second").show(); } </code></pre> <p>why the above code in jquery doesn't work? i want to when the url is <...
javascript jquery
[3, 5]
4,681,779
4,681,780
Show Previous and next week dates
<p>I have 2 buttons( Previous and next ) for week. In between the previous and next week button needs to show week ending date (Fridays) for that week. I want to display previous week date from Sun 11/18 to Mon 11/26 when we click the previous week button. Same as the next week button click event to show from Mon 11/26...
javascript jquery
[3, 5]
5,914,571
5,914,572
How to get selected index of a Html select in asp.net?
<p>I have code below:</p> <pre><code> &lt;select id="test"&gt; &lt;option value="a"&gt;aaa&lt;/option&gt; &lt;option value="b"&gt;bbb&lt;/option&gt; &lt;/select&gt; &lt;asp:Button ID="btnTest" runat="server" Text="Test it!" onclick="btnTest_Click" /&gt; I need to get selected index not selecte...
c# asp.net
[0, 9]
3,220,872
3,220,873
Is there an easy way to find the "javascript equivalent" of jQuery code?
<p>I am doing a presentation on jQuery for some co-workers and I would like to demonstrate how certain tasks in javascript can be made easier using jQuery.</p> <p>I have come up with a small jQuery function that does some element selection/animation and I was hoping to show them the javascript equivalent of this code....
javascript jquery
[3, 5]
3,442,136
3,442,137
Retrieve data from JS (non JSON format) by php
<p>Data is inside simple JS, NOT in JSON.</p> <p>I want to grab only 'filenamesBig[filenamesBig.length] ='s value that means all urls of 'filenamesBig[filenamesBig.length]'</p> <pre><code>filenames[filenames.length] = "http://usedcarpics.s3.amazonaws.com/780BONNYVILLECOLDLAKECHRYSLER/4350071_6.jpg"; filenamesBig[fil...
php javascript
[2, 3]
2,201,844
2,201,845
Show only 2 rows preview of div content
<p>How to show only two rows preview of div content?</p> <p>If I use like substring in C# would cause HTML tag error issue.</p> <p>so, I wonder if I could do this?</p>
javascript jquery
[3, 5]
1,772,328
1,772,329
using jquery in two usercontrol in the same page
<p>I have two user control in my page uc1 and uc2. I want to make sure that the js function inside these two user control fire when the document is ready.</p> <p>When I am using '$(document).ready({function(){//something});' in both the user control only the function of the first user control is loading. the function ...
jquery asp.net
[5, 9]
2,469,140
2,469,141
JQuery wrapInner trigers jQuery(document).ready twice
<p>I am using the <code>wrapInner</code> function but these triggers my <code>jQuery(document).ready</code> event once again.</p> <p>Is this the normal behaviour? How can this be avoided?</p> <p>Thanks</p> <p>Update:</p> <pre><code>miscellaneous : function(){ $('#nav .active a').bind('click',function(){...
javascript jquery
[3, 5]
3,046,051
3,046,052
Getting selected option data
<p>I am trying to fetch data from currently selected option. I came out with this. Could i somehow improve it or is this fine?</p> <p>Im specially not sure about the current option selector.</p> <pre><code>&lt;option data-id='one'&gt;&lt;/option&gt; .... $('select#first').change(function(){ var smth = $("option:se...
javascript jquery
[3, 5]
2,319,075
2,319,076
Pass to javascript variable attribute from html input id="attribute"
<p>Input</p> <pre><code>&lt;input type="text" value="" id="row1"&gt; &lt;input type="text" value="" id="row2"&gt; </code></pre> <p>Need to get last character from row and pass it to javascript variable. Here is row1 and row2, need to get variables 1 and 2</p> <p>I try to use this, but does not work</p> <pre><code>$...
javascript jquery
[3, 5]
3,335,063
3,335,064
RegisterStartupScript and order of execution
<p>I am using <code>ScriptManager.RegisterStartupScript</code> to register calls to a large number of JS functions.</p> <pre><code>ScriptManager.RegisterStartupScript(this, this.GetType(), "Script1", "SomeScript1", true); ScriptManager.RegisterStartupScript(this, this.GetType(), "Script2", "SomeScript1", true); Script...
asp.net javascript
[9, 3]
4,416,293
4,416,294
Need generic utility C# method for populating ASP.NET DropDownList
<p>I have a method like the following in a utility class. I would like to change the parameter dataSource to accept any type of data source, that is, DataSet, DataView, List&lt;T>, DataTable, and ArrayList.</p> <p>Is this possible? How would I change the method signature (and parameters and types) to allow me the fle...
c# asp.net
[0, 9]
2,764,734
2,764,735
Android resource files
<p>I have a <code>cheerapp.mp3</code> in my <code>/res/raw</code> folder</p> <p>so my code is</p> <pre><code>String filepath="/res/raw/cheerapp"; //or cheerapp.mp3 file = new File(filePath); FileInputStream in = null; try { in = new FileInputStream( file ); } catch (FileNotFoundException e) { // TODO Aut...
java android
[1, 4]
2,122,323
2,122,324
Syncronize count down time for all users
<p>I need to synchronize the count down time for all users.So it will display identical remaining time to all in asp.net.</p> <p>Waiting for your valuable thoughts </p> <p>Thanking You </p>
c# asp.net
[0, 9]
3,601,097
3,601,098
How do I programatically scroll down the page?
<p>When the page loads, I want to use Javascript/Jquery to automatically take the user to the 500px downwards. But it has to seem natural.</p> <p>How can that be done?</p>
javascript jquery
[3, 5]
4,724,584
4,724,585
Submitting a Javascript object to PHP
<p>Dear fellow developers,<br /> A newbie question from me, please.</p> <p>I have a large data set that I <strong>prefer</strong> to be submitted as an object instead of an array; e.g.</p> <pre><code>foo = bar = baz = {}; $.ajax({ url: "index", type: "post", data: { foo: foo, bar: bar, baz: baz }, dat...
javascript jquery
[3, 5]
1,183,365
1,183,366
call to js function from aspx source
<p>I wrote a Javascript function in the code-behind like this:</p> <pre><code>Page.ClientScript.RegisterClientScriptBlock( Page.ClientScript.GetType(), "MyScript", "&lt;script type='text/javascript'&gt;" + "var urls="+s + "function carousel(params) { ... }" + "&lt;/script&gt;"); </code>...
c# javascript asp.net
[0, 3, 9]
4,878,980
4,878,981
jQuery- Erroneous duplicate append to list
<p>Very much new to web development and I've come across an issue when trying to implement a multi dimensional array, when I append a new li to an ul with the code below it produces 2 li's.</p> <p>The parameters of the function are dest-the ul to append to and list-the multi dim array set as:</p> <pre><code>var webLi...
javascript jquery
[3, 5]
2,928,236
2,928,237
how to upload an image file without any postback in ASP.NET
<p>I am uploading a file using the <code>&lt;asp:FileUpload&gt;</code> and <code>&lt;asp:button&gt;</code> controls but I want to do it without a postback. On button click I execute the following code. </p> <pre><code>protected void btnUpload_Click(object sender, EventArgs e) { string strFileName = Path.GetFileNa...
c# asp.net
[0, 9]
1,429,410
1,429,411
jQuery methods, order of optional arguments
<p>I just played around a bit with the <a href="http://api.jquery.com/animate/" rel="nofollow">animate()</a> method.</p> <blockquote> <p>.animate( properties [, duration] [, easing] [, complete] )</p> </blockquote> <p>I know that I dont have to pass all the arguments to a function in javascript. But what I would li...
javascript jquery
[3, 5]
3,138,365
3,138,366
Why am I not able to install Android SDK?
<p>I installed android sdk. When I click the android sdk manager. Then the the following error message is displayed in an alert box </p> <blockquote> <p>Failed to fetch URL <a href="https://dl-ssl.google.com/android/repository/repository.xml" rel="nofollow">https://dl-ssl.google.com/android/repository/repository.x...
java android
[1, 4]
4,718,096
4,718,097
Only Allow Numbers to be Typed in Input Field
<p>I'd like to have the phone number field on <a href="http://myfrugaltech.com/dev/savoo/register/" rel="nofollow">this website</a> only accept numbers or digits. I do not have access to edit the HTML code, so can this be done with jQuery by targeting the field's ID? If so, how can it be done?</p> <p>I've already trie...
javascript jquery
[3, 5]
1,021,242
1,021,243
Faster string operations
<p>I realise that the users system is a factor in this but if I was working on extracting data from a string, which would be more efficient? PHP or JavaScript?</p> <p>lets say I have <code>ch_123456789abc_wakkawakka</code> (returned from a mysql query), would it be better to explode out the <code>123456789abc</code> p...
php javascript
[2, 3]
3,687,710
3,687,711
'slideDown' effect with jquery doesnt seem to work
<p>I want to use <code>slideDown</code> effect with jquery effect, however it doesnt appear to work. I think it is because the element on which I am trying to implement the effect is already visible on the screen. I think it may be required to be hidden before it can show up a slideDown effect but I am unsure as to how...
javascript jquery
[3, 5]
3,624,033
3,624,034
selecting multiple rows using shift key using jquery
<p>I tried doing selecting multiple rows using jquery but this code look like cranky.</p> <p>some more code added to above one.using shift + up arrow or down arrow using key board.</p> <pre><code>c </code></pre> <p>where am i going wrong?</p>
javascript jquery
[3, 5]
5,591,199
5,591,200
Why does the position method not return the expected values?
<p>Why does the <code>position</code> method not return <code>[left: 100, top: 10]</code> in this case:</p> <pre><code>&lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;head&gt; &lt;style&gt; #parent1 { width: 300px; height: 200px; border: solid 9px pink; } #child1 { position: relative; left: 100px; top:...
javascript jquery
[3, 5]
1,899,344
1,899,345
Get position of an item within a ListView?
<p>How would one find the position of a specific item within a ListView? (Populated by SimpleCursorAdapter).</p> <p>The reason I ask: The listview is set to singleChoice mode. When the user closes and reopens the app, I'd like the user's selection to be remembered. </p> <p>The way I've done it so far is when the user...
java android
[1, 4]
5,942,818
5,942,819
How to save 4 drop down list selections to a cookie, and set drops if cookie present
<p>So I am using jQuery and have setup the jquery cookie plugin.</p> <p>I have 4 drop down lists on my page, and I want to save the user's selections in a cookie, so when they come back to the page I automatically pre-select their previous selections.</p> <p>I added a class to all my drop downs "ddl-cookie", and I wa...
javascript jquery
[3, 5]
4,343,010
4,343,011
Jquery date picker - want display date in an input field
<p>Hava an jquery calendar:</p> <pre><code>$(function() { $("#datepicker").datepicker({ minDate: 'today', maxDate: "+90D", showOn: "button", buttonImage: "images/calendar.gif", buttonImageOnly: true, dateFormat: "D, dd MM, yy" }); }); </code></pre> <p>and </p> <pre><code>&lt;form me...
javascript jquery
[3, 5]
4,101,260
4,101,261
ASP.NET Response.End Problem
<p>i got a page users downloading files from there.And when a user click download link and finish downloading file , i am insertin' a new record for my File Download Counter event. (FileID,Date,blalbla..) </p> <p>But there is problem with my script ... after download starts and finish, its adding a new record but afte...
c# asp.net
[0, 9]
4,073,601
4,073,602
Getting text from <td> element using jQuery
<pre><code>if (document.getElementById("td1").innerHTML == "word"){ $("td:first").html("another word"); } </code></pre> <p>I just want to check if this have this text .</p>
javascript jquery
[3, 5]