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,881,566
2,881,567
How to enable a function only on clicking a particular condition
<p>Hi there i have 3 buttons called 1.ADD , 2.EDIT , 3.DELETE.....and a map with id=comp_map... and I am using Open Street Maps....</p> <pre><code>function addComp() { $("#comp_map").click(function() { if (event.type !== 'mousemove') { var containerPoint = comp_map.mouseEventToContainer...
javascript jquery
[3, 5]
3,332,741
3,332,742
What is this syntax? ; (function ($, undefined)
<pre><code>; (function ($, undefined) { // all the variables and functions of the js document })(jQuery); </code></pre> <p>I've seen this twice now in the jquery/javascript files for a zoom script. I don't understand what this is exactly. I can't seem to google it, I don't remember coming across this on tizag or...
javascript jquery
[3, 5]
4,596,771
4,596,772
.attr selector wont work in a each loop?
<p>Here's the code:</p> <pre><code> $.ajax({ url: 'AEWService.asmx/previewAsset', type: "GET", contentType: "application/json; charset=utf-8", data: json, success: function (json) { var prevObj = jQuery.parseJSON(json.d); setInterval(function () { var pI...
javascript jquery
[3, 5]
581,188
581,189
how to use alert in php and js combined
<p>have a need to alert through php,<br> I have the code below. Problem is that it works as long as I dont use header redirect. But as soon as I use it..I loose alert.</p> <pre><code>echo "I will do some functions here in php"; if($value == 1){ alert('ok working'); } header(location: 'someOtherpagethanthis.p...
php javascript
[2, 3]
1,747,776
1,747,777
Best Practice: Initialize class fields in constructor or at declaration?
<p>I've been programming in C# and Java recently and I am curious what people would consider the best practice concerning when you should initialize your classes fields?</p> <p>Should you do it at declaration?:</p> <pre><code>public class Die { private int topFace = 1; private Random myRand = new Random(); ...
c# java
[0, 1]
4,739,155
4,739,156
Specifying a new source for the image tag at runtime in Javascript , jQuery
<p>Is it possible to change the src of a image at runtime using jQuery. I have created a fiddle. I am trying to load the image specified in the variable $newsrc when the button is clicked. I am not sure as to what should be specified an argument function changeImage(). I do not want to use anonymous function. </p> <p...
javascript jquery
[3, 5]
5,026,916
5,026,917
Loading jquery after inserting the jquery tag
<p>I insert the jquery tag</p> <pre><code> var newScript = document.createElement("script"); newScript.id = "grazit_jq"; newScript.type = "text/javascript" newScript.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"; script.parentNode.appendChild(new...
javascript jquery
[3, 5]
5,799,312
5,799,313
Why do I see confirmation box twice when I write Javascript only once in my document
<pre><code>$("a.sure").click(function () { var choice = confirm("Are you Sure"); }); </code></pre> <p>I see confirm twice when I write this and click. When I track from Firebug then the confirm dialogue box only appears once.</p>
javascript jquery
[3, 5]
3,747,369
3,747,370
paging of datacontrol in jquery dialog
<p>I'm using Jquery dialogs in my Asp.net web application for all my messages. Now I've tried to fill a listview with customers inside a dialog and its working, but I want to allow the user to use paging in the listview for choosing his customer out of the list. When I press the button to move up 1 page, it ain't worki...
c# asp.net jquery
[0, 9, 5]
116,983
116,984
I want the user to be able to download a page
<p>I am using the code,</p> <pre><code> string loadFile = HttpContext.Current.Request.Url.AbsoluteUri; // this.Response.ClearContent(); // this.Response.ClearHeaders(); this.Response.AppendHeader("content-disposition", "attachment; filename " + filename); this.Response.ContentType ="application/html...
c# asp.net
[0, 9]
1,773,000
1,773,001
hide a label after some time automatically after a buttonclick
<p>I am Working in ASP.NET and C#.</p> <p>In my Application i have a registration form in which there is a label which shows the <strong>success</strong> and <strong>failure</strong> of the registration.The text for that label is from codebehind based on the condition.Now what i need is to hide the label after sometim...
javascript asp.net
[3, 9]
3,574,664
3,574,665
why do I get htmlfile: Unknown runtime error JScript error
<p>I get this error thrown in line:</p> <pre><code>displayElement.innerHTML = executor.get_responseData(); </code></pre> <p>I try to update the inner html of a div, with the data received from java. executor.get_responseData(); works well. how should I debug from here?</p> <p>Edit: I use this functions for updating...
javascript asp.net
[3, 9]
2,845,969
2,845,970
Jquery plugin hovercard not work in dynamically generated content
<p>Jquery plugin Hovercard works well in simple HTML code but does not work when i used it in javascript code (dynamically creating html code through javascript). Maybe this is also a general problem, how can jquery plugin work in js code generated content? </p>
javascript jquery
[3, 5]
4,337,882
4,337,883
More efficient way of searching window.location.href for a string?
<p>Is there a more efficient way of searching the window.location.href?</p> <p>window.location.href: <code>http://www.example.com/6CATA/folder/file.html</code></p> <p>The current code I have is:</p> <pre><code>var searchWinHref = window.location.href; if(searchWinHref.indexOf("/6CATA/") &gt; -1) { alert('6CATA is ...
javascript jquery
[3, 5]
5,286,321
5,286,322
Whats a good argument for/against using inline javascript within the html body tag?
<p>One of my co-workers is thinking that it is simpler to just include the document.ready() calls (MULTIPLE) for jquery anywhere in an html document, rather than trying to have them all in the head, foot or in an external js file. Can you give me your thoughts about this?</p> <p>The document.ready stuff is loaded by m...
javascript jquery
[3, 5]
6,005,745
6,005,746
waiting until two values have changed in jquery
<p>I have two form fields and would like to post those values using jquery only when both have a value. I have tried this but there must be a better way. I think this way could lead to errors</p> <pre><code>$('#RFID').change(function(e){ if($(this).val() != '' &amp;&amp; $('#STATION_ID').val() != ''){ ...
javascript jquery
[3, 5]
3,773,198
3,773,199
Send a message later
<p>If you have ever been to a sms messaging site, you probably have seen that users can decide they want to schedule the sending of their sms message at a later time. So a user logs on to the site (a real life example is at <a href="http://www.smslive247.com" rel="nofollow">http://www.smslive247.com</a> or <a href="htt...
php asp.net
[2, 9]
4,670,794
4,670,795
How can I close a tab of browser after getting confirmation from user?
<p>I want to close a tab after getting confirmation from user. It can be done as follow-</p> <pre><code>window.onbeforeunload = function() { return "Are you sure?"; } </code></pre> <p>But the problem with this code is that it shows some message that I am not expecting. I want to do this task using javascript's...
javascript jquery
[3, 5]
2,508,567
2,508,568
JQuery change class by given id's
<p>I have a number of tables, for example:</p> <pre><code>&lt;table class="onion" id="12"&gt; </code></pre> <p>When a div named "Mark_Pre_Val" gets clicked i want tables with the id's 4, 6, 12 &amp; 21 to change their class to "onionClick", and if one of them is already "onionClick" then don't change the class.</p> ...
javascript jquery
[3, 5]
4,421,403
4,421,404
How can i delete the first word from a line with javascript or jquery?
<pre><code>Mon 25-Jul-2011 </code></pre> <p>I want to delete the first word "Mon" with javascript jQuery. How can i do this ?</p>
javascript jquery
[3, 5]
3,409,039
3,409,040
Shilft + Enter without inserting new line
<p>I want to send a textarea's data when user presses <kbd>shift</kbd> + <kbd>enter</kbd>, but without inserting a new line.</p> <p>This doesn't work:</p> <pre><code> $( 'form textarea' ).keydown(function (event) { if (event.keyCode == 13 &amp;&amp; event.shiftKey) { send_data(); ev...
javascript jquery
[3, 5]
4,120,909
4,120,910
Can I use ASP.NET 2.0 to create a picture scroller?
<p>I am trying to create a picture scroller. In it, I would have a large picture and several thumbnails at the bottom. If a user haover or clicks the thumbnail, it then is displayed in te large box. My plan was to create this in ASP.NET but now I'm drawling a blank on how to implement this? I know ASP.NET and some Java...
asp.net javascript
[9, 3]
5,119,156
5,119,157
Can I make jQuery point to an XML document rather than the DOM?
<p>I'm trying to retrofit a page to read from XML rather than the DOM, and I'd rather not use $(xml).find('blah') for every single call, and I was wondering if there was a way to point jQuery at xml, rather than the DOM.</p> <p>For instance, I'd like to be able to navigate my xhtml with the jQuery method as such: $('b...
javascript jquery
[3, 5]
5,002,288
5,002,289
jquery files conflicts how to detect?
<p>Q:i have a general problem ,when i wanna to do some thing and i find the jquery file which can do exactly what i wanna to do . after a while i need another case and i find that another jquery file serve me and fix my problem .after i add set of jquery files i find conflicts among those files and some features does n...
javascript jquery
[3, 5]
1,879,871
1,879,872
gallery that shows various number of items
<p>I am looking for an example or jquery script, but I am getting nothing probably because I don't know what to call it. </p> <p>I am trying to create an item gallery that has the option to display various amount of items. Similar concept to a gmail account....I can select to view 20, 50 or 100 messages, but I was w...
php javascript jquery
[2, 3, 5]
3,174,233
3,174,234
call javascript function in a jquery chain
<pre><code>function jsFunc() { alert('i am js!'); } $('#node').slideDown().call(jsFunc()); </code></pre> <p>Of course, the function isn't called 'call'. Any help?</p> <p>** solution (thx Reigel) **</p> <p><a href="http://jsfiddle.net/gx2mJ/1/" rel="nofollow">http://jsfiddle.net/gx2mJ/1/</a></p> <p>OR</p> <p>htm...
javascript jquery
[3, 5]
2,103,582
2,103,583
Starting service from intent in another service gets a run time error
<p>I'm getting an error when trying to start a service with an intent from another service in an Android 2.3.3 project. The error is: Unable to start service with Intent{ act=(class name) cmp=(class name)/.(android name) }: java.lang.IllegalArgumentException:provider==null</p> <p>Method Call:</p> <pre><code>private v...
java android
[1, 4]
632,026
632,027
How to get this work Div addClass
<p>I try to make this work but not luck yet, why the DIV does not highlight(Flashing) when the figures updated in stats.php? </p> <p>In stats.php</p> <pre><code>&lt;div id="student_today"&gt;&lt;b&gt;$&lt;?php print getTodayStats($collageid); ?&gt;&lt;/b&gt;&lt;/div&gt; Month: &lt;div id="student_month"&gt;&lt;b&gt;$...
php javascript
[2, 3]
3,336,883
3,336,884
Passing textbox as an instance in jQuery
<pre><code>var ctrl = $("&lt;input /&gt;").decimalControl(AllowedDecimalValues).ControlContainer(); $.fn.decimalControl = function (Decimalvalues) { var settings = { 'maxLength': '25', 'defaultvalue': '00.00', 'name': 'decimalcontrol', 'type': 'number' }; settings.MaxDecVal =...
javascript jquery
[3, 5]
3,305,874
3,305,875
Sending HTML in an e-mail message's body
<p>I'm trying to send an e-mail containing HTML, but the HTML shows up literally. How can I send an HTML link? Here's my current code:</p> <pre><code>Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("text/html"); emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new Strin...
java android
[1, 4]
1,605,210
1,605,211
How to compile Java from C#?
<p>I'm trying to use the following C# code to compile Java using javac:</p> <pre><code>Process p = new Process(); p.StartInfo.FileName = "javac"; Directory.CreateDirectory(Application.StartupPath + @"/TempJava"); p.StartInfo.Arguments = "-d "Application.StartupPath + @"/TempJava" + files; p.Start(); </code></pre> <p>...
c# java
[0, 1]
1,336,236
1,336,237
How to execute code everytime url changes
<p>I'm making an ajax site. How would I go about executing some javascript every time the url changes. Say when "/#page/aboutus/" changes to "/#page/news/".</p> <p>I want users to be able to bookmark ajax-pages.</p>
javascript jquery
[3, 5]
2,539,650
2,539,651
Process elements with a certain class "whenever they are added to page"
<p>I want to process elements with a certain class whenever they are added to the page during the initial page load or after ajax updates to the page. How can I run a method whenever such element(with that particular class) is added to the page ?</p> <hr> <p>Using jQuery for Javascript.</p> <h1>Edit:</h1> <p>HTML:<...
javascript jquery
[3, 5]
5,810,562
5,810,563
post a link from jquery to call a ASHX asp.net
<p>I have this function:</p> <pre><code>function exportdata(ID) { $.ajax({ type: "POST", url: "export.ashx?ID=" + ID, data: "{}", /*contentType: "application/json; charset=utf-8",*/ dataType: "json" }); } </code></pre> <p>It works fine but when I open the...
jquery asp.net
[5, 9]
5,794,565
5,794,566
Javascript + Differentiate user clicks and clicks sent from function
<p>I have an Accordion function like this:</p> <pre><code>$("#notaccordion").addClass("ui-accordion ui-widget ui-helper-reset") .find("h3") .addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom") .prepend('&lt;span class="ui-icon ui-icon-triangle-1-e"/&gt;') .clic...
javascript jquery
[3, 5]
1,138,177
1,138,178
ArrayList<SensorEvent>.add(...) begins overwriting values
<p>I am writing an app that needs to keep the values that come from the accelerometer. I am doing this by using an ArrayList and then when onAccelerationChanged(...) gets called I simply add those values to the list. The problem is that after so many values (never consistent) get pushed into the list it starts overwrit...
java android
[1, 4]
1,043,236
1,043,237
Does Java System Class shared between processes?
<p>I have a question regarding the Java language: in android</p> <p>i tried changing a System.property X inside process A, then activating process B</p> <p>(i thought maybe it's initializing all the System.properties again) </p> <p>(process B didn't see the changed System.property X as expected), </p> <p>then i res...
java android
[1, 4]
3,731,457
3,731,458
Write to file when cache expires
<p>How to write to a file the content of cache when Cache expires.</p>
c# asp.net
[0, 9]
505,345
505,346
Loop Through Multivalue Array
<p>First of all sorry if I have the terminology wrong, if so could you please correct me?</p> <p>I am trying to loop through the following javascript array.</p> <pre><code> var pieData2 = [ { label: 'wow', value: 30, color:"#F38630" }, ...
javascript jquery
[3, 5]
4,576,527
4,576,528
call a function every X minute
<p>I have a background service running and inside this I wanted to call a function every X minute. What is the simplest solution to do this in Android?</p>
java android
[1, 4]
3,631,726
3,631,727
Changing the value of String.xml
<p>This Might be a stupid question but please forgive me as I am only a learner.</p> <p>Is it possible to change the value of player in a method from class if so, please tell me how.</p> <p><strong>This is part of my R.java</strong></p> <pre><code> public static final class string { public static final int pl...
java android
[1, 4]
5,036,424
5,036,425
select specific text on page and remove it
<p>Is is possible to select specific text string on the page directly without a id, class, etc...</p> <p>I have this text string "ERROR: AffiliateID invalid" that I would like to remove from the page.</p> <p>Is it possible?</p>
javascript jquery
[3, 5]
2,851,238
2,851,239
jquery multipart form submission prevention
<p>jquery form submission prevention using <code>e.preventDefault()</code> is not working in multipart form submission ( when im using ajax to submit ). Is there any way to solve it ?</p> <p>Code </p> <pre><code>$('.imgChange').submit( function(e){ load('do_upload.php',$(this).serialize()); e.preventDefault(); </cod...
javascript jquery
[3, 5]
54,598
54,599
How can a javascript variable that I just displayed immediately error out as undefined?
<p>I have some simple javascript code that looks like this:</p> <pre><code>var divLink = $(this).attr("href"); alert(divLink); if ($(divlink).is(":visible")) $(divLink).hide("blind", { direction: "vertical" }, 1000); </code></pre> <p>It throws this error on line 3:</p> <pre><code>Uncaught ReferenceError: divlink is ...
javascript jquery
[3, 5]
209,725
209,726
Android - can't access strings with R.string
<p>I am have trouble accessing a string I stored in strings.xml and don't know why.</p> <p><strong>res/values/strings.xml</strong></p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;string name="FileBrowser"&gt;FileBrowser&lt;/string&gt; &lt;string name="menu_settings"&gt;Se...
java android
[1, 4]
4,843,336
4,843,337
.prev(selector) not working
<p>Here's the problem (<a href="http://jsfiddle.net/vWafe/1/" rel="nofollow">live copy </a>):</p> <p>CSS:</p> <pre><code>div { border: 1px solid black; } </code></pre> <p>HTML:</p> <pre><code>&lt;div&gt;.&lt;/div&gt;&lt;br&gt; &lt;div&gt;.&lt;/div&gt;&lt;br&gt; &lt;div class="test"&gt;Should have a blue border&...
javascript jquery
[3, 5]
3,260,715
3,260,716
Using jQuery to fade in a new image
<p>Below is the image element that is acting as the background. The position is absolute and it also has a low z-index so it stays behind the rest of the content.</p> <pre><code>&lt;img src="day-sky.jpg" id="background" /&gt; </code></pre> <p>The secs below just refers to seconds in a minute. This is just for test ...
javascript jquery
[3, 5]
543,636
543,637
Asp.net Empty Web Application or MCV 2/3 : Differences,which one is better
<p>I'm developing a administration site for a database.</p> <p>After I'll finish my code I would like to public the site on a domain .</p> <p>I'm working on a empty web application, and want to make a page design for the site after I finish the coding part. But I need to know: </p> <pre><code>What differences are be...
c# asp.net
[0, 9]
2,738,791
2,738,792
is it possible to run simple python games on android os
<p>I started learning programming recently using python and have always had a keen interest in the android os and hope to do more with it when I get more experienced.</p> <p>I have SL4A and python installed on my tablet. I have spent a lot of time trying to figure out how run simple games written in python on my tabl...
android python
[4, 7]
2,787,223
2,787,224
Selection does not contain a main type. Eclipse error
<p>I've made an AVD (android virtual device). But when i try to run my application, this shows up:</p> <p>Your project contains error(s), please fix them before running your application.</p> <p>The error log shows the following: NUMBER 1: res\drawable-mdpi\testbackg.png:0: error: Resource entry testbackg is already d...
java android
[1, 4]
51,858
51,859
Automated WebForm Generation
<p>I have a bunch of C# functions with string, int and bool arguments that serve as data entry interfaces. I'd like to be able to create a webform for each method; a textbox for each string/int and a checkbox for each bool. </p> <p>Is there a way to automate this process?</p>
c# asp.net
[0, 9]
4,395,530
4,395,531
reading content of .aspx using javascript
<p>i am using javascript to read the content of .aspx page. but i am not able to read it. i am using javascript as:</p> <pre><code>function edit(headtext,totext, bodytext, footertext){ alert('lll'); //var xmlDoc=new ActiveXObject("MSXML.DOMDocument"); xmlDoc.async="false"; xmlDoc.loa...
javascript asp.net
[3, 9]
2,751,850
2,751,851
When element is not on screen anymore?
<p>In my website, there is a floating cloud(element) that scrolls rightwards, and I wanna be able to tell when it's not visible anymore on screen.</p> <p>How can I do it?</p> <pre><code>setInterval(function(){ if(!jQuery('.sa_cloud_l').is(':visible')){ alert('not visible anymore'); }else{ ...
javascript jquery
[3, 5]
4,418,696
4,418,697
Getting object values from a LinkedHashMap
<p>So for my local data structure I have the following</p> <pre><code>DataStructure ds = new DataStructure(); //Examples to put in the Data Structure "ds" ds.menu_item.put("Pizza", new DescItems("A Pizza",2.50,4)); ds.menu_item.put("Hot Dog", new DescItems("A yummy hot dog",3.50, 3)); ds.menu_item.put...
java android
[1, 4]
4,290,724
4,290,725
jquery date input plugin
<p>I would like to know if there is a date input plugin for jquery that work like this <a href="http://www.jqwidgets.com/jquery-widgets-demo/" rel="nofollow">plugin</a> epecifically the datetimeinput. This input check that the values are correct and only let the user to input the numbers not the <code>/</code> charact...
javascript jquery
[3, 5]
1,378,692
1,378,693
how to zooming in when moving cursor to an image in asp.net 3.5
<p>I have a set of image buttons in an asp.net page. When I move the cursor to any part of the image the image should be zoomed in and when the cursor leaves the image it should zoomed out. I am new to asp.net 3.5 so I ask for a hint/ what to search for, too.</p>
c# asp.net
[0, 9]
2,651,374
2,651,375
Export to pdf AND generate a pdf file in asp.net
<p>I have to create PDF files in 2 ways:</p> <ul> <li><p>The first way is just to convert the html to PDF. It can be done in server-side or client-side (javascript?). In this case, I'd like to convert the html with all css styles. This is just to user save the page.</p></li> <li><p>The second ways is generate a PDF re...
c# asp.net
[0, 9]
1,864,793
1,864,794
jQuery click(function() not working but plain Javascript working just fine
<p>THIS IS THE FULL SCRIPT</p> <p><a href="http://goo.gl/HoCxk" rel="nofollow">http://goo.gl/HoCxk</a></p> <p>I have a problem with this function:</p> <pre><code> $('.message').click(function(){ alert("it works"); var clicked_msg=$(this); $('#current_message').html(clicked_msg.attr("id")); }); </code>...
javascript jquery
[3, 5]
5,989,145
5,989,146
How to place scrollview inside the relative layout
<p>But am using many layouts like absolute layout and 6 relative layout.For each relative layout i need to use scrollview separately both horizontal and vertical when am adding many buttons inside the layout.</p>
java android
[1, 4]
5,738,623
5,738,624
ASP.Net: Users are logged out when deploying a new file to the server
<p>Everytime I upload a file to my ASP.NET site, all users are logged out (aka, I guess their session become invalidated). </p> <p>Is there any way to "hotswap" the code in ASP.NET so that this doesn't happen? Compile before deploying etc. </p> <p>My deployment method is pretty simple through a SVN update. </p> <p>T...
c# asp.net
[0, 9]
5,914,424
5,914,425
Is it possible to redirect a domain that's referenced in code before it gets there?
<p>In code, we're referencing "athirdpartydomain.com"</p> <pre><code>Page.Response.Redirect("www.athirdpartydomain.com"); </code></pre> <p>However, the owners of "athirdpartydomain.com" have decided to change their domain. This will involved a fairly considerable amount of work for us eventually, and they're letting...
c# asp.net
[0, 9]
4,140,308
4,140,309
Delay till ajax response like thread.sleep()
<p>I have button which post values of form to url but during post i want to capture that value into my database too. So on button click i made new thread of ajax and paused by while loop so user can not redirect due to post of form. </p> <p><strong>But problem is program not responding in while loop and not posting a...
javascript jquery
[3, 5]
1,862,144
1,862,145
JQuery: Update hover on mouse movement
<pre><code>$(document).ready(function() { $(".hoverimage").hover( function(e) { openQuicktip(this,e); }, function() { closeQuicktip(this); } ); $("area").hover( function(e) { openQuicktip(this,e); }, function() { closeQuicktip(this); } ); }); function openQuicktip(elem,e) { ar x = e.pageX; ...
javascript jquery
[3, 5]
1,660,606
1,660,607
How do I chain multiple selectors with filters in jQuery?
<p>I'm trying to select multiple elements which do not have the attribute 'disabled' but I'm not sure if there's an easier way to type this:</p> <pre><code>$('input:not(:disabled), select:not(:disabled), textarea:not(:disabled)') </code></pre> <p>It seems a little wasteful to be typing multiple 'not(:disabled)'.</p>
javascript jquery
[3, 5]
2,410,750
2,410,751
How to remove all inner div's based on class
<p>In below markup i want to remove all div's with class as "select"</p> <pre><code>&lt;ul class="container"&gt; &lt;li&gt;10&lt;/li&gt; &lt;li&gt;10&lt;/li&gt; &lt;li&gt;10&lt;div class="select"&gt;&lt;/div&gt;&lt;/li&gt; &lt;li&gt;10&lt;/li&gt; &lt;li&gt;10&lt;div class="select"&gt;&lt;/div&gt;&lt;/li...
javascript jquery
[3, 5]
1,615,857
1,615,858
Convert String to Integer/Float/Double
<p>I am trying to convert a string to <code>Integer/Float/Double</code> but I got a <code>NumberFormatException</code>.</p> <p>My String is <code>37,78584</code>, Now I am converting this to any of them I got <code>NumberFormatException</code>.</p> <p>How can I convert this <code>string</code> to any of them.</p> <p...
java android
[1, 4]
2,149,556
2,149,557
Access form element through javascript - what's the correct way?
<p>I am developing an asp.net application and i want to make it compatible with all 3 major browsers (Internet Explorer, Firefox, Chrome) at least.</p> <p>In some pages i need to access the form elements through javascript. What is the correct way to do this so that it works on all browsers? </p> <p>I have been doing...
javascript asp.net
[3, 9]
2,565,878
2,565,879
Find element ID by its style
<p>I need to find an <code>a</code>-tag's <code>ID</code> by its style.</p> <p>My element have the class <code>.sort</code>.</p> <p>The element's style is programmatically added earlier in one of two get functions, and I have to find it in a third get function. </p>
javascript jquery
[3, 5]
766,243
766,244
loading default values of combobox?
<p>i am trying to develop a website in php and i am dynamically loading a page in using its id with the help of js and that loaded page has a combo box and i want as the page load in the first option of combo box should be displayed in text box on same page. i tried onload option but it is not working as page is not ...
php javascript
[2, 3]
2,464,629
2,464,630
Javascript - How do i stop the execution
<p>Here is my link with embedded js</p> <pre><code>&lt;a style="padding: 5px;" onclick="confirm_message(); $('contact_693_').show(); $('errors_693_').hide(); this.hide(); $('dont_693_').show();; return false;" id="the_link_693_" href="#" class="add_someone_else"&gt;Check it out&lt;/a&gt; </code></pre> <p>And here is ...
javascript jquery
[3, 5]
250,389
250,390
Div auto adjust according to screen resolution
<p>i have design similar to below given link. when i open this link and minimize or maximize the browser then it div box adjust their position accordingly. i am finding the same kind of jQuery or JavaScript. I tried to download it but it is not working in IE 7 and i also want to know name of this kind of jQuery</p> <...
javascript jquery
[3, 5]
1,342,561
1,342,562
How to move the rows of the table in java script based on the data
<p>I am new to javascript/jquery. I apologize if my question is very basic. I have a table in java script with headers like</p> <pre><code>Element price gain xyz 10 20 abc 29 10 </code></pre> <p>the value of the gain is coming from the back and it is keep on changing the value. Now my question is when e...
javascript jquery
[3, 5]
1,733,316
1,733,317
JavaScript form validation not working
<p>I have a very simple form with a very simple JavaScript validator. </p> <p>I want an alert to popup if the first nae isnt filled out only it doesnt seem to be alerting and still submits. </p> <p>I've uploaded a fiddle here <a href="http://jsfiddle.net/nvgMq/" rel="nofollow">http://jsfiddle.net/nvgMq/</a> </p>
javascript asp.net
[3, 9]
4,077,661
4,077,662
playin sound inside CountdownTimer doesnt stop
<p>i have this code for downtime counter :</p> <pre><code>CountDownTimer CountdownTimer = new CountDownTimer(30000, 1000) { public void onTick(long millisUntilFinished) { txttime.setText( millisUntilFinished / 1000); play_sound(); } public void onFinish(){ timeout_stage(); //...
java android
[1, 4]
5,246,917
5,246,918
php java bridge error in Java.inc: Cannot redeclare java_last_exception_get()
<p>5.2, Tomcat 5.5, jdk 1.5. php was working fine, I installed JavaBridge.war. And now, when I use "require_once(JavaBridge/java/Java.inc)" I am getting error like </p> <p>Fatal error: Cannot redeclare java_last_exception_get() in C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\JavaBridge\java\Java.inc ...
java php
[1, 2]
3,522,590
3,522,591
Showing one text box value in another text box while user type the value to the text box
<p>Is there a way to get the value from one text box and add it to another using jQuery dynamically when user is typing the value to the text box? can someone please explain the method if there is any such thing?</p> <p>regrds, Rangana</p>
javascript jquery
[3, 5]
5,581,700
5,581,701
Get `this` from outside a function
<p>How, or is it even possible, to get the <code>this</code> value from a function? I've made this snippet which saves <code>defaultValue</code> on the function, but I would like to read this from outside the function, directly on the <code>dom</code> element. Is that possible??</p> <p><strong>I've made this, in jQuer...
javascript jquery
[3, 5]
629,540
629,541
jQuery UI Button on checkbox will not work if quickly clicked multiple times
<p>I have a page setup with some checkboxes, that UI.button applied to them. They each have a onclick event, that calls a function that will display a tab (if checked) or remove a tab (if unchecked).</p> <p>The problem is, if you click them quickly, you can end up with a tab displaying, and the checkbox showing as unc...
php javascript jquery
[2, 3, 5]
1,459,685
1,459,686
how to get to page1 when i refresh my gridview?
<p>i have gridview in my webform.</p> <p>in my search i got to page 4 for example, now i need to refresh the gridview</p> <p>and go to page 1.</p> <p>how to to it ?</p> <p>thanks in advance</p>
c# asp.net
[0, 9]
5,101,783
5,101,784
Sorttable ul li get order
<p>My html is like this</p> <pre><code>&lt;ul&gt; &lt;li&gt;...&lt;/li&gt; &lt;li&gt; &lt;ul&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>This is just a example, a <code>ul</code> can contain many <code>li</code> but the max depth is <code>ul li ul...
javascript jquery
[3, 5]
4,862,719
4,862,720
how to attach/extend methods to dom element
<p>Having this html:</p> <pre><code>&lt;div id='hi1'&gt; aaa &lt;/div&gt; </code></pre> <p>When doing:</p> <pre><code>$('#hi1').sayHi(); </code></pre> <p>I would like to get an alert saying 'hi'</p> <p>anybody knows how this is done ?</p>
javascript jquery
[3, 5]
4,953,117
4,953,118
Close button to Facebox Jquery box closes master page, not popup
<p>I am using the Facebox jquery box to load a little form with a Submit Button and a Cancel Button.</p> <p>When I click Submit it closes the Main page that loaded the Facebox window instead of the Facebox window! It leaves the AddNote.aspx site open (which is loaded by Facebox) and closes my Main.aspx. </p> <p>Here...
c# javascript jquery asp.net
[0, 3, 5, 9]
3,150,970
3,150,971
loading div on submit button to prevent double submit
<p>Background : my code uses master page which has frames inside and all the other navigation happens using frame and master page is used for menu purpose. On submit button click (on all screen) , want to disable page for any further user interference. For that master page has a div and on individual page following cod...
jquery asp.net
[5, 9]
3,341,035
3,341,036
Find the coordinates of square at client side
<p>I have an image on my page which I can fetch via $('#myimage'); Now I want to find the coordinates of square which I will draw on image. These end points of square should be exactly such that radius of square should be 20px(the center of the square will be center of image). How can I get do the same with JavaScript...
javascript jquery asp.net
[3, 5, 9]
6,030,686
6,030,687
.click function in jquery always have to get a nameless function?
<p>Hallo all. I have a little problem.</p> <p>I have a function. Let’s call it :</p> <pre><code>function rowClick () { } </code></pre> <p>Anyway, the question is:</p> <p>How can I bind this function to a click event without it being called?</p> <p>What I mean is, if I do this:</p> <pre><code>$("#holder").click (...
javascript jquery
[3, 5]
3,208,522
3,208,523
Tags function in jQuery not working even after adding jQuery library
<p>I am trying to add tabs to my website to navigate b/w two sub-menus. Essentially when you click 'Highlight' or 'News' a new set of elements appear in that section.</p> <p>I added the jquery library:</p> <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min....
javascript jquery
[3, 5]
3,038,901
3,038,902
How to check current tag element in javascript?
<p>I've a GridView with three rows like this</p> <pre><code>&lt;tr&gt; &lt;th&gt;SlNo&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;2&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>I've the following code to traverse through the rows</p> <pre><code>var GridViewRow=GridVi...
javascript asp.net
[3, 9]
5,838,448
5,838,449
Understanding the Google specification for crawlable ajax
<p>Im using dotnet c#, and jQuery plus webservices for ajax calls. My paginations works like twitter and facebook paginations. In the onload event, a ajax call fill a content area with 10 rows, and a click or a roll the page down event call the same ajax call, with a page parameter, that brings more 10 rows, and so on....
c# asp.net
[0, 9]
126,432
126,433
What type of data storage should I use in Android?
<p>I want to download 90+ items from an RSS Feed and I want to display it using a Listview and a custom arrayadapter. What form of data storage should I use to store these deals? I could just pass an array of objects filled with strings and ints(the strings are long btw) but I don't know whether this is a proper design...
java android
[1, 4]
2,809,840
2,809,841
Hide jQuery message div on page load (on asp.net 4.0 page)
<p>jQuery noob here: </p> <p>I have the following message div that shows a message on button click and fades after several seconds. This works fine. However, I would like the message div to hide on page load and display on button click. </p> <p>So far, I've tried adding the hideDiv class to the message div, but then...
jquery asp.net
[5, 9]
3,467,415
3,467,416
Javascript widget inspired by iPhone UITableView?
<p>Cocoa Touch's UITableView allows a user to scroll through large numbers of data rows with good performance because it recycles table rows. Rather than create a GUI element for every single data row, a limited number of table rows is created, and simply updated with the relevant data as the user scrolls, giving the i...
javascript iphone
[3, 8]
1,356,895
1,356,896
How to follow jQuery animated div across screen?
<p>I'm using <a href="https://github.com/MmmCurry/jquery.crSpline">jQuery.crSpline</a> to animate a graphic along a curved path. I'm pretty happy with the result.</p> <p>However, the full canvas size is intentionally pretty wide - definitely larger than most screens - so the graphic will run out of viewport space pret...
javascript jquery
[3, 5]
4,833,429
4,833,430
Detecting input from bar code reader(and rfid) from javascript
<p>I have a bar code reader and RFID reader that act as a HID device and I got output from them as keyboard output, and after the data is red, enter key is pressed. Is there any way to efferent reading of this data so that it would be written in some specific input field? I was thinking about detecting the speed of rea...
javascript jquery
[3, 5]
4,144,225
4,144,226
Write quotation mark in aspx merged code
<p>Why this code doesn't work?</p> <pre><code>OnClientClick='&lt;%# String.Format("return confirm('¿Está seguro que desea eliminar el registro {0}?);'", Eval("data")) %&gt;' </code></pre> <p>The error is: </p> <blockquote> <p>The server tag is not well formed.</p> </blockquote> <p>How can I write this to make it ...
c# asp.net
[0, 9]
245,031
245,032
How to implement internet radio using java
<p>How to implement internet radio using java? Is there any Java APIs for this?</p> <p>I want to make a internet radio using Android / java. But I am not getting any APIs how to connect or how to receive the channel information for streaming the audio.</p> <p>Please help me how to create that same and provide some co...
java android
[1, 4]
2,360,948
2,360,949
Remove all characters from string javascript
<pre><code>$('.hourfield').focusout(function() { var h; var m; var timeStr = ""; var time = ""; var newFormat = ""; timeStr = $(this).val(); //Here I would like to remove all characters which isn't numbers timeStr = timeStr.replace("/[^0-9\.]+/g",""); if(timeStr &gt; 0) { ...
javascript jquery
[3, 5]
4,933,133
4,933,134
How to call c# server side method through javascript
<p>I need to call a c# server method through the javascript. I have a gridview in which i have a column with dropdown list. When i change the dropdown's value i need to call a server side method through javascript and change the value of another text box in the gridview.</p> <p>I am able to do this on the selected ind...
asp.net javascript
[9, 3]
51,576
51,577
check image has been loaded using jquery
<p>Problem- At run time I am changing/replacing src attribute of some images using jquery. These images are by default hidden. I want to display these images when these images are download and ready to display because it is also possible that some images can not be downloaded. </p> <pre><code> &lt;img id="pic_...
javascript jquery
[3, 5]
145,694
145,695
jquery (js) string replace problem
<p>i want to highlight all digits in string, i try to cover matched digits with tag but cann't! Here is my code</p> <pre><code>regexp = /[1-9]/g; //$("#task").val() it's my input title = $("#task").val().replace(regexp,'&lt;span class="int"&gt;$1&lt;/span&gt;'); </code></pre> <p><strong>$1</strong> - i found in goog...
javascript jquery
[3, 5]
5,921,942
5,921,943
random selection from array
<p>I have this block of code below which is to control questions which are to be displayed from the array. I am having problem with the the 3rd line of code, an i am not entirely sure what the problem is.</p> <p>rnd1, rnd2 are both double. Eclipse is telling me that rnd2 should be an int. however i was advised that th...
java android
[1, 4]