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,562,734
3,562,735
cursor movement through eye
<p>I was thinking whether it could be possible to track cursor movement through eye. Depending on which part of screen , the eye looks the curson will move. Can this be achieved? Thansks everyone for replying!.I am just looking for some new idea that can be implemented and which have not been implemented.Any ideas/sug...
c# java
[0, 1]
4,354,087
4,354,088
jQuery - How to check for available javascript on a page?
<p>On a html page that uses $.getScript to dynamically load .js files.</p> <p>Later at some point if I wish to check whether a particular .js file is loaded. How to do this?</p> <p>Can I check using filename.js? or do I have to check for an object/function/variable in that file?</p> <p>Thanks for the answers folks...
javascript jquery
[3, 5]
17,667
17,668
How Do I Add jQuery To Head With JavaScript?
<p>I am trying to include jQuery to an HTML page conditionally. It only needs to be added if it doesn't exist yet.</p> <p>I am using the following code near the top of my body tag to inject a script tag that includes the jQuery library in the head.</p> <pre><code>&lt;script type="text/javascript"&gt; if (typeof ...
javascript jquery
[3, 5]
2,093,223
2,093,224
asp.net masterpage jQuery function
<p>I'm creating a new web project and i trying to get jQuery working with masterpages</p> <p>I want to have a link that if it is pressed will do an expansion of a div.</p> <p>Problem: jQuery isn't fired and the page do a postback</p> <p><img src="http://i.stack.imgur.com/e2OoY.png" alt="enter image description here"...
jquery asp.net
[5, 9]
4,935,967
4,935,968
Mouseleave only when mouseenter ends
<p>with the follow code:</p> <pre><code>$('someelement').hover( function() { console.log('mouseenter begin'); setTimeout(function() { console.log('mouseenter ends'); }, 2000); }, function() { console.log('mouseleave begin'); setTimeout(function() { ...
javascript jquery
[3, 5]
3,552,088
3,552,089
how to read javascript array in php
<p>I'm trying post a javascript array using jquery $.post method to php and use array values in mysql query.</p> <pre><code>$.post("test.php", { 'celvalues[]': celValues }}); </code></pre> <p>where values for array celvalues is assigned. So how to read this array in php?</p>
php jquery
[2, 5]
79,566
79,567
How to direct call webservice in android?
<p>I have to write a simple application that calls a web-service from android. So please give me a sample code to call it. And please it will be better if the code does not use any special libraries which I have to download and include in project. Also that code should not use the word "Soap" because I have searched a ...
java android
[1, 4]
1,530,821
1,530,822
Error: uncaught exception: [Exception... "An invalid or illegal string was specified"
<p>This two errors I get in the Firefox error console:</p> <pre><code>Error: Incorrect document format Source file: Row 1, column 45 Source code: &lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; Error: uncaught exception:...
javascript jquery
[3, 5]
5,609,307
5,609,308
Script to enable/disable input elements?
<p>I'm wondering if it's possible for a script to enable/disable all input elements on the page with some sort of toggle button.</p> <p>I googled it but didn't find anything too useful except for this:</p> <p><a href="http://www.codetoad.com/javascript/enable_disable_form_element.asp" rel="nofollow">http://www.codeto...
javascript jquery
[3, 5]
3,614,911
3,614,912
jQueryUI accordion not working
<p>With jQuery UI, I am using the accordion and it looks pretty cool. Default the 1st tab or whatever its called is open, I want it so that they are all closed and only open when clicked. Any way of doing this?</p> <p>Also, can you make the area the opens only big enough for what is actually in it? What I think is hap...
javascript jquery
[3, 5]
5,973,462
5,973,463
why my code that write by me is upper,when keyup
<pre><code>$('#a').keyup( function(event){ alert(event.keyValue) } ) </code></pre> <p>but error,coz 'keyValue' is not undefined,</p> <p>how do i get the keyValue when the event keyup???</p> <p>i use jquery.</p> <p>thanks</p> <hr> <p>i do this:</p> <pre><code>$('#a').keyup( function(event){ alert(Stri...
javascript jquery
[3, 5]
894,114
894,115
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]
540,514
540,515
insert html content inside a class in jquery
<p>I am using jquery to insert html content like,</p> <pre><code>$.get("_html/saveme.html", function(data){ $(".saveWin .modalCSS").html(data); //Error here }); </code></pre> <p>In Firefox it is giving me error as,</p> <pre><code>Node cannot be inserted at the specified point in the hierarchy </code></pre> <p>I...
javascript jquery
[3, 5]
4,876,690
4,876,691
removing one property of an object
<p>I have an object that looks like this. </p> <pre><code>{ par1: 'par1value', par2: 'par2value', par3: 'par3value' }; </code></pre> <p>I want to remove the property called <code>par1</code> and save it separately so it looks like this </p> <pre><code>var par1 = 'par1value'; { par2: 'par2value', par3: 'par3value' }...
javascript jquery
[3, 5]
1,444,559
1,444,560
How remove function from this code after first usage this field?
<pre><code>$(document).ready(function(){ $('#id_laufzeit_bis').datepicker().on('changeDate', recalculate_deadline); $('#id_kuendigungsfrist').change(recalculate_deadline); $('#id_kuendigungsfrist_type').change(recalculate_deadline); $('#id_kuendigung_moeglichbis').change(check_reminder_date); $('#i...
javascript jquery
[3, 5]
4,705,901
4,705,902
How to force function execution after input with javascript
<p>I am making a small calculator (just for javascript learning) and I have two input fields for fraction calculation 1.Field: numerator 2.Field: denominator</p> <p>And a button "Calculate fraction"</p> <p>which executes the function myFraction(numerator,denominator) when user clicks on it.</p> <p>Is it possible do...
javascript jquery
[3, 5]
5,758,284
5,758,285
only input check boxes that are checked in the first td in a tr
<p>How do I get the the number of matches/length of: only input check boxes that are checked in the first td in a tr?</p> <p>this works:</p> <pre><code>$('#myTable').find('tr td input[type=checkbox]:checked').parents('tr').length; </code></pre> <p>this wont work</p> <pre><code>$('#myTable').find('tr td:eq(0) input...
javascript jquery
[3, 5]
2,580,701
2,580,702
script reference causes conflict
<p>I have code 1 which executes with this in the head:</p> <pre><code>&lt;link class="jsbin" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" /&gt; &lt;script class="jsbin" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/sc...
javascript jquery
[3, 5]
1,718,985
1,718,986
Microsoft JScript runtime error: Could not complete the operation due to error c00ce514
<p>I wrote a file download code but i get this error when i start it in my projects. Only this code works perfectly fine. But in complex project this error occurred. Can you help about it ? Here is download code</p> <pre><code>string fileUrl = @filePath + "\\" + _DownloadableProductFileName; string newFile...
c# asp.net
[0, 9]
659,801
659,802
Move div rather than Remove()
<pre><code> $(settings.widgetSelector, $(settings.columns)).each(function () { var thisWidgetSettings = iNettuts.getWidgetSettings(this.id); if (thisWidgetSettings.removable) { $('&lt;a href="#" class="remove"&gt;CLOSE&lt;/a&gt;').mousedown(function (e) { /* STOP event...
javascript jquery
[3, 5]
4,184,915
4,184,916
select specific elements in parent div
<p>im trying to get an article from a div, and the problem is it gets everything when i use <code>$('#article').html()</code> is there a way for just getting a spesific html inside the parent div without other elements?</p> <pre><code>&lt;div id="article"&gt; This is an article blabla &lt;br/&gt; &lt;b&gt;something bo...
javascript jquery
[3, 5]
5,449,153
5,449,154
Where is the best place to store user related data in asp.net?
<p>When a customer logs in to my site, I need to know their account id and their menu id. This lets me know what data they can see on a page and what menu they get. I don't want to have to read this data over and over. Should I store this in a session variable or customize the membership user and membership provider...
c# asp.net
[0, 9]
4,150,271
4,150,272
Fix jquery page change flash before slide
<p>Here's the link: <a href="http://www.sandbox.brightboxstudios.com/swings/test4.html" rel="nofollow">http://www.sandbox.brightboxstudios.com/swings/test4.html</a></p> <p>The issue is when clicking a link, it seems to flash the next pages content for a split second before sliding to it..</p> <p>This started happenin...
javascript jquery
[3, 5]
678,604
678,605
On button Click in the Grid I can't get in to the function
<p>Using CSharp, I'm not getting into the (GridView1_RowDeleting) function on the button click.. I don't know whats the problem is but wasted alot of time on it.</p> <p>Default.aspx</p> <pre><code>asp:GridView ID="GridView1" runat="server" OnRowDeleting="GridView1_RowDeleting" AllowPaging="True"&gt; &lt;Colum...
c# asp.net
[0, 9]
10,017
10,018
GridView DataKeyName for a DropDownList Select Statement
<p>When the user selects a row to edit I have a dropdownlist as one of the controls. In order for me to populate that ddl I need one of the datakeyname values (there are three). I was guessing that I could retrieve this value when the OnEditing event fired and pass it to the select statement for the ddl. Just not su...
c# asp.net
[0, 9]
1,592,830
1,592,831
Is there an Cocoa or Objective C api for Java?
<p>I'm a Java programmer and i wanted to get into writing so apps for the Iphone. I started to research and found myself looking at xmlvm..that all good, but then xmlvm has a HelloWorld.java with some UIWindow classes that i can't find and can't compile. Short of it is where is the api for Java so i can compile xmlvm's...
java iphone
[1, 8]
4,007,849
4,007,850
javascript not working after php include
<p>I am trying to apply javascript twice to a simple html textarea. I have onfocus and autogrow (which is actually jquery). It seems i can only get one or the other to work but never both at once. </p> <p>My script has an: </p> <pre><code>&lt;?php include 'header.php'; ?&gt; </code></pre> <p>This seems to be the ...
php jquery
[2, 5]
3,858,475
3,858,476
How I would call a C# function from javascript?
<p>I'm trying to figure out how I would call a C# function from a javascript confirm box. i.e. If user selects 'OK' a function is called, and if user selects 'Cancel' another function is called. All the code is located in the back page, and looks as follows:</p> <pre><code>Response.Write(@" &lt;script language='j...
c# javascript asp.net
[0, 3, 9]
5,269,317
5,269,318
Elegant way to combine ASP.NET validation with JQuery
<p>How can I best combine JQuery with ASP.NET client side validation model?</p> <p>I've generally avoided implementing ASP.NET validation model because it always seems overkill for what I was doing. For the site I'm working on now I'm just collecting non critical user data and only need somewhat basic validation. I do...
asp.net jquery
[9, 5]
5,291,628
5,291,629
jquery for hide repeating clicking image values
<p>I am doing a project in bus seat selection.I am in middle of the project. Now i showing the bus seating arrangement to the customer.When the user click the unselected seat it shows the seat in colored(ie., selected) and also show the selected seat values to the user.This works fine. when the user deselect the se...
php jquery
[2, 5]
3,187,895
3,187,896
Possible to write i-phone app in python
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/43315/can-i-write-native-iphone-apps-using-python">Can I write native iPhone apps using Python</a> </p> </blockquote> <p>I just googled whether it is possible to write an i-phone app in Python and got very confu...
iphone python
[8, 7]
4,833,762
4,833,763
LINQ Except query with an XElement
<p>I have a data set that I receive from a service. The data comes in XML format. We are given an XElement object with all the data. The structure of the XML document is very simple. Looks like this:</p> <pre><code>&lt;root&gt; &lt;dataPoint&gt; &lt;id&gt;1&lt;/id&gt; &lt;param1&gt;somedata&lt;/param1&gt; &...
c# asp.net
[0, 9]
1,960,232
1,960,233
Explanation needed on boolean methods return
<p>I've been looking through some code from a decompiled APK file and ran across this syntax for returning a boolean condition that I haven't seen before. Anyone have an explanation on how this works?</p> <pre><code>public static boolean is2G(NetworkType paramNetworkType) { if ((EDGE.equals(paramNetworkType)) || ...
java android
[1, 4]
3,149,881
3,149,882
How do you find all divs by class and delete them all?
<p>I have many divs with a specific class and I want to delete all those divs. How do you do this using jQuery or javascript? But, how do you delete <b>all divs</b> with a specific class? Thanks!</p> <p>code:</p> <pre><code>&lt;div&gt; &lt;div class='testa'&gt;test a&lt;/div&gt; &lt;div class='testb'&gt;test b...
javascript jquery
[3, 5]
5,845,259
5,845,260
Javascript/Jquery call function every 5 minutes for an 8 hour period
<p>I need to call a function every 5 minutes for an 8 hour period. The catch is it must be the on the same day. For example if the user logs onto the system at 11:59pm on 3/29 and it's now 12:01am on 3/30 the function should no longer be called.</p> <p>I know how to call it ever 5 minutes and have the jquery ajax ca...
javascript jquery
[3, 5]
1,101,460
1,101,461
Child repeater's item count
<p>I am trying to get the child repeater's item count but for some reason it keeps coming up as zero. Here is my code: Parent repeater is rptDays. Child repeater is rptEditInfo.</p> <pre><code>protected void rptDays_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item...
c# asp.net
[0, 9]
3,098,957
3,098,958
What does Jquery.Recup mean?
<p>well i'm confuse about the line witch says "$.Recup ..." I don't know why it is named the same as the plugin name and what it's for. </p> <pre><code>(function ($) { $.fn.Recup = function () { var parametros = { }; var tsic = true; $.Recup = function (opciones) { var...
javascript jquery
[3, 5]
1,504,966
1,504,967
Is there really no way to programmatically click a link using PHP?
<p>I have been trying for a while now trying to figure out how to programmatically click a link using PHP and/or javascript. I have it setup so if the user clicks a link it will refresh a table. You don't really need to know why I want to do this b/c then it will go down a whole long road of confusion. Just know that t...
php javascript
[2, 3]
1,486,482
1,486,483
Asp.net Permanent redirection Body,Path,QueryString,Method
<p>in My Scenario. </p> <p>I want to redirect all request to another domain that includes Path,QueryStrings,Method,Content </p> <p>Example Some user send request to my domain. </p> <pre><code>POST www.mydomain.com/service?id=5 HEADER { token:securityToken UserAgent: Chrome Accept: application/json } BODY { Content ...
c# asp.net
[0, 9]
38,334
38,335
Visual Studio Asp.net error
<p>Recently, I've created a new web application in Visual Studio 2010. </p> <p>Now, when I run application, I'm getting error message related with <code>System.EnterpriseServices.Wrapper.dll</code></p> <p><img src="http://i.stack.imgur.com/kuk9P.png" alt="enter image description here"></p> <p>Any suggestions?</p>
c# asp.net
[0, 9]
1,243,407
1,243,408
lightbox dynamic image retrieval
<p>I am constructing a lighbox gallery, currently experimenting with FancyBox (http://fancybox.net) and ColorBox (http://colorpowered.com/colorbox).</p> <p>By default you have to include a link to the large version of the image so that the Lightbox can display it. However, I am wanting to have the image link URLs poin...
php jquery
[2, 5]
4,111,260
4,111,261
multiplication error
<p>If I multiply 12 x 25.4 i get 304.7 whereas I expect 304.8. I see that using odd numbers x 25.4 I get the correct answers but using even numbers always seem to be off by 0.1. I am writing a scientific app that is heavily based on formulas so any insight would be helpful. </p> <pre><code>if (((m1_sqs1_spinner.getS...
java android
[1, 4]
3,581,954
3,581,955
re-fetch request in php and javascript
<p>here it goes;</p> <pre><code>echo "&lt;a href='#' class='thumb'&gt;&lt;img class='thumb-img' value = ".$row-&gt;aid." onclick='getVote(".$row-&gt;aid.", \"".$row-&gt;atitle."\")' src='images/roadies/th".$row-&gt;aid.".jpg' /&gt; &lt;/a&gt;"; </code></pre> <p>the above function sends the "$row->aid" value to a java...
php javascript
[2, 3]
3,802,050
3,802,051
What do you call it when you pass a parameter to the next parameter
<p>I notice a lot of code where people do something like:</p> <pre><code>myClass.someMethod(something here, $1); </code></pre> <p>The $1 is picking up a value from "something here"?</p> <p>What is this known as? I can't seem to find it anywhere? But this step, process is used in cases with regex quite a bit..</p>
c# javascript
[0, 3]
2,110,272
2,110,273
Disable and Enable Arrowkeys by javascript
<p>I have a scenario where first I need to disable keyboard arrow keys and after some processing again Enable it,for this I write this jquery function</p> <pre><code>function DisableArrowKeys() { var ar = new Array(37, 38, 39, 40); $(document).keydown(function(e) { var key = e.which; ...
javascript jquery
[3, 5]
3,047,343
3,047,344
How to post a HttpWebRequest(include of custom headers) in a new browser window
<p>How can i open a httpwebrequest in new window and at the same time have to pass the custom headers with the request in c#.net?</p> <p>This is my sample code,</p> <pre><code>HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create(url); WebReq.AddHeader("name","value"); HttpWebResponse WebResp = (HttpWebResponse)W...
c# asp.net
[0, 9]
4,349,367
4,349,368
convert time_t to ticks
<p>I have a function that convert ticks to time_t format</p> <pre><code> long ticks = DateTime.Now.Ticks; long tt = GetTimeTSecondsFrom(ticks); long GetTimeTSecondsFrom(long ticks) { DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); return (long) (new DateTime(ticks) ...
c# asp.net
[0, 9]
2,455,795
2,455,796
error with jquery offset
<p>I'm trying to get a div to appear underneath another div so that I can slide the top div down to reveal the appended second.</p> <p>I'm pretty far off, but I keep getting an error that jquery's <code>[offset][1]</code> (which I'd like to use to get the position of the top div) is returning undefined. </p> <p>Maybe...
javascript jquery
[3, 5]
937,833
937,834
jQuery hide and show element and remember using cookie
<p>I have the following fiddle here: <a href="http://jsfiddle.net/9jN8L/" rel="nofollow">http://jsfiddle.net/9jN8L/</a></p> <p>The idea is that sidebar will be shown and if the user clicks the link then it will hide and a cookie will be created and remember that they have hidden it. Should they click it again it will ...
javascript jquery
[3, 5]
2,924,353
2,924,354
Setting active class for navigation using javascript
<p>I am using PHP to echo my list of navigation options, this is being done due to different privileges for each user. The list is divided into groups which has a few more list items, one a user clicks on the heading of the group expands, listing the sub-menu. I have been able to set the active class for the menu which...
php javascript jquery
[2, 3, 5]
5,138,107
5,138,108
DataReader is reading only even rows
<p>I was Binding Data from DB in Grid view.But in the datasource 'CountryList' only even rows is added from data reader. whats wrong with this code?</p> <pre><code>using (cmd) { cmd.CommandType = CommandType.StoredProcedure; cn.Open(); using (SqlDataReader dr = cmd.ExecuteReader()) { if (dr.Has...
c# asp.net
[0, 9]
4,002,520
4,002,521
how to avoid button click event from firing when page refresh occurs in asp.net?
<p>I want the code to avoid button click event from firing when page refresh occurs, i can not give response.redirect as i have some labels to be displayed after the button click event occurs. Is there any chance that i can find out weather the page is page refresh from code behind in .cs ?</p> <p>Thanks in advance</p...
c# asp.net
[0, 9]
3,976,406
3,976,407
Loop through all IDs that begin with XXX
<p>Would anyone know how to loop through all ID's that being with name_</p> <p>So, for example, within the markup I may have 50 id's that all start with "name_", the full ID would be like name_2, name_55, name_25, etc.</p> <p>I'd like to loop through all of these getting the number.</p> <p>Not really sure where to b...
javascript jquery
[3, 5]
2,890,130
2,890,131
Time Counter using php and jquery
<pre><code>function next_second(){ var target = '1350840000'; var now = &lt;?php echo time();?&gt;; alert(now); } $(function() { setInterval(next_second, 1000); }); </code></pre> <p>the above alert function always returns same value. Am i doing something wrong?</p>
php jquery
[2, 5]
5,721,977
5,721,978
Value Of Control Assigned With Javascript
<p>Why when I assign new value of HiddenField control with javascript, the value of HiddenField control in this case remains the same state (5) when I call it with "&lt;%= this.HiddenField.Value %>" ? But when I call it with "console.log(document.getElementById('&lt;%= this.HiddenField.ClientID %>').value);" this retur...
c# javascript asp.net
[0, 3, 9]
3,213,408
3,213,409
jQuery event binding with accessibility in mind - click and keypress
<p>Just a quick question, I seem to do this a lot:</p> <pre><code>$saveBtn.bind("click keypress", function(e) { if (e.type != "keypress" || e.keyCode == 13) { // Do something... return false; } }); </code></pre> <p>Is there a quicker way to bind an 'action' listener to a button? I want to...
javascript jquery
[3, 5]
1,533,578
1,533,579
Emptying keyboard buffer in javascript
<p>If I have an element that responses on </p> <pre><code>$('#div').keydown(function(event) { .... </code></pre> <p>and if user presses a key like a crazy rabbit on heat thousand times within a really short period, browser responses on most of those calls. </p> <p>Can I somehow prevent that by flushing keyboard buff...
javascript jquery
[3, 5]
3,696,656
3,696,657
How to ensure that a function is executed completely, before navigating to another page?
<p>I'm removing certain records using a webservice. The jquery ajax request is written in the onclick of a hyperlink. When im executing the script, line by line using firebug, it's getting removed otherwise it's not. Does any one meet any situation like this before? Please help</p> <p>Code sample:</p> <pre><code> $("...
javascript jquery asp.net
[3, 5, 9]
2,495,024
2,495,025
Stop your code injecting javascript twice?
<p>I have a method that does something, and it puts a javascript method into the page that it uses. I need to make sure that it only puts the javascript method in once regardless of how many times it is called.</p> <p>What's the best way to do this? Can I search the section of page that has rendered so far and see if ...
asp.net javascript
[9, 3]
2,067,882
2,067,883
Get div id using javascript
<p>Here's some HTML:</p> <pre><code>&lt;div class="results"&gt; &lt;div id="1"&gt;something&lt;/div&gt; &lt;div id="2"&gt;something else&lt;/div&gt; &lt;div id="3"&gt;blah blah blah&lt;/div&gt; &lt;div id="4"&gt;etc&lt;/div&gt; &lt;/div&gt; </code></pre> <p>Now if I can call this using jQuery:</p> <pre><code...
javascript jquery
[3, 5]
2,834,226
2,834,227
asp.net error: Parser Error
<p>I'm suddenly getting below message in browser when debugging application out of Visual Studio 2008 target .net fw 3.5</p> <p>Research online lead me to confirm the following: The "Inherits" in markup page matches code-behind namespace class reference: "USFBugTracker.UpdateContracts". I also checked that the target...
c# asp.net
[0, 9]
2,800,762
2,800,763
Difference between $('selector')[0] ,$('selector').eq(index) in jquery.
<p>What is the difference between <code>$('#div1 a')[0]</code> and <code>$('#div1 a').eq(0)</code> for the following markup</p> <pre><code>&lt;div id="div1"&gt; &lt;a href="#"&gt;click&lt;/a&gt; &lt;/div&gt;. </code></pre> <p>Please Help.</p>
javascript jquery
[3, 5]
2,469,272
2,469,273
Jquery convert object to string and slice
<p>Via ajax-based script i get object:</p> <p>for example:</p> <pre><code>item.TYP_PCON_START </code></pre> <p>which value is, for example 201212... When i try to slice him, i get oject error...</p> <p>How could i slice this object so, that for example i get 2012, or better set two last numbers on furst place and a...
javascript jquery
[3, 5]
1,732,209
1,732,210
Joining functions together - cleaner code
<p>Is there a way to shorten my code. I need to add about 15 more functions which all do the same thing.</p> <pre><code>$(document).ready(function() { $('.map-highligh').maphilight({ }); //north roll over $('#hilightlink').mouseover(function(e) { $('#north').mouseover(); }).mouseout(funct...
javascript jquery
[3, 5]
3,530,656
3,530,657
Jquery onchange alternative that works with auto fill form plugins
<p>How can I get the JavaScript onChange to work with a <a href="http://autofillforms.mozdev.org/drupal/content/main-page" rel="nofollow">autofill</a> form extension. The problem is that when you click the button to autofill the form it doesn't call the onChange. Is thre a work around for this?</p> <p>Example HTML:</p...
javascript jquery
[3, 5]
3,033,603
3,033,604
jQuery, how to preload images and be notified when images are loaded?
<p>i am still new to all the Javascript stuffs and i have to be honest that i have not yet experimented anything concerning my question.</p> <p>I would like to know if there is a way or a plugin with jQuery to preloaded multiples images and call a function when the images are loaded?</p>
javascript jquery
[3, 5]
2,784,136
2,784,137
how to Put add in our android application
<p>I have created an application for admob, but I am getting an error. I found an example from Google and I have tried it, but there is a problem when I'm launching the application .</p> <p>I'm using Android 2.2 API 8. I am able to launch the application, but this block is causing an error.</p> <pre><code>android:con...
java android
[1, 4]
317,992
317,993
Jquery slider javascript help required, thumbnails not in correct order
<p>I am using wow slider and there is some issue, which causes the bullets, which onhover show thumbs of images and point to that image in sequence onClick. Howeverver at no. 13 and afterwards images are not in sync (as shown on bullet hover/onMouseover), but click on bullet in slideshow points to correct image.</p> <...
javascript jquery
[3, 5]
228,356
228,357
How can I set a table cell's background color to red when none of the radio buttons in it are selected?
<p>I am new to JavaScript in general and jQuery in particular and need some help.</p> <p>I need to write a script to validate that a radio button is selected. If none of the radio buttons are selected I want the table cell they are in to be highlighted in red to alert the user about it.</p> <pre><code>&lt;table&gt; ...
javascript jquery
[3, 5]
2,138,811
2,138,812
How can I simplify this Javascript function?
<p>I'm trying to scale this but I'm a little green when it comes to creating JS functions. I managed to get this far on my own, but alas...</p> <p>When a span gets a value of whatever (in this case, a city name), I want the select box to automatically match it. And I want to scale this by getting rid of all these else...
javascript jquery
[3, 5]
118,302
118,303
Insert element into div with jQuery, append not working
<p>I have the following code:</p> <pre><code>$('input[id$="txtTecnicas"]').bind('keypress', function (e) { //if user presses enter if (e.keyCode == 13) { //cancel asp.net postback e.preventDefault(); //if value of textbox is not empty ...
jquery asp.net
[5, 9]
5,212,242
5,212,243
Microsoft JScript runtime error: Sys.ArgumentNullException: Value cannot be null
<p>Hi anyone who have encountered a "System.Threading.ThreadAbortException" where a redirect has been used.</p> <p>After some searches, i am ment to understand the redirect.end is what causes this. The sugestion is to specify the "bool endresponce" i.e. responce.redirect("mypage.aspx",false).</p> <p>Any help will be ...
javascript asp.net
[3, 9]
2,084,750
2,084,751
Getting hours occupied in a day
<p>Say I have a variable <code>DayHours</code> and a <code>DateTime</code> called <code>CurrentDay</code>.</p> <p>I have events with a start date, an end date, and hours. They all fall within <code>CurrentDay</code> If it is the last day of the event and the end date == <code>CurrentDay</code>, then I need the remaind...
c# asp.net
[0, 9]
2,873,153
2,873,154
C# Javascript Beautifier
<p>I am wondering if anyone knows of an open source c# library for beautifying javascript. I would like to make use of such a library within my asp net website to make debugging messy javascript easier.</p> <p>There are currently many online websites for this (ie. <a href="http://jsbeautifier.org/" rel="nofollow">http...
c# javascript
[0, 3]
5,823,002
5,823,003
Calling Function in a forloop
<p>I am trying to call a function inside the FOR LOOP. Since the format is same except for names of the data passed.</p> <pre><code>renderCharts(data1, axis1, 'mainchart1'); </code></pre> <p>What i am doing</p> <pre><code>var data1 = [12, 45, 30, 80]; var axis1 = ['15 Jan', '22 Jan', '29 Jan', '5 Feb']; var data2 =...
javascript jquery
[3, 5]
569,418
569,419
How to remove row on click on confirm message true?
<p>I have a asp gridview. On row databound I add onclick event to view item details. I have also delete button. The problem is <strong>When I click item delete, it deletes item but also redirect to item preview page.</strong> It should not do a postback and redirect</p> <p>here is my code</p> <pre><code> protected vo...
c# javascript jquery asp.net
[0, 3, 5, 9]
3,239,858
3,239,859
same session value exists among different users
<p>I am developing and intranet web application. In Global.asax file's session_start event I get the domain identity using user.idenity and put it into session value. Now I have a master page where I am accession that session value to show the user name.</p> <p>I am using windows authentication and identity impersonat...
c# asp.net
[0, 9]
4,398,355
4,398,356
Set html from 1 div to another using jQuery
<p>I have 1 div and 1 text input field, the div is visible and the input is hidden. The input one gets its value from a range slider, I want to use jQuery somehow to take the value from this input area and populate the div on the fly, I've tried the following with no luck, can anybody see where i may be going wrong?</p...
javascript jquery
[3, 5]
5,091,843
5,091,844
text is not allowed between starting and closing tags of an element <table>
<p>I have an error when playing with a table saying:<br></p> <pre><code>"text is not allowed between starting and closing tags of an element table" </code></pre> <p>Table is like this....</p> <pre><code>&lt;table id="Content2" class="createAccountTable" cellpadding="0" cellspacing="0" style="width: 240px;"&gt; ...
javascript asp.net
[3, 9]
6,018,074
6,018,075
JQUERY Sorting an Array of Objects
<p>I have an array that is holding a number of objects.</p> <p>Array: </p> <pre><code> var activeMembers=[]; </code></pre> <p>The DIV objects in the above array look like as follows - each was added one at a time:</p> <pre><code> &lt;div id="mary" class="chatmember 1011"&gt;&lt;/div&gt; &lt;div id="steven" class=...
javascript jquery
[3, 5]
4,136,161
4,136,162
Running js file only once
<p>I have a small intro with fadein's etc.. But i would only like this to run once. I dont want to run the intro every time the user returns to the home page. Is there a way to run a js file once?</p>
javascript jquery
[3, 5]
1,898,019
1,898,020
Can someone figure out what this JavaScript code is doing?
<p>I'm trying to figure out how a website works, and I've come to some packed JavaScript that won't seem to unpack with JSBeautifier.org. Can someone understand what it's doing?</p> <pre><code>eval(function (p, a, c, k, e, r) { e = String; if (!''.replace(/^/, String)) { while (c--) r[c] = k[c] || c; k = [function (e)...
javascript jquery
[3, 5]
1,056,208
1,056,209
Javascript for running code-behind code when a button is clicked
<p>i have a popup that is getting displayed when Save button is clicked. The popup has 2 buttons. Yes and No. No should cancel the popup and yes should take you to function in the code-behind say, btnSave_Click(object sender, Eventargs e). How is it possible. Could someone help me, i am new to Javascript.</p> <p>Below...
c# javascript asp.net
[0, 3, 9]
2,805,210
2,805,211
Changing an element's ID with jQuery
<p>I need to change an element's ID using jQuery. </p> <p>Apparently these don't work:</p> <pre><code>jQuery(this).prev("li").attr("id")="newid" jQuery(this).prev("li")="newid" </code></pre> <p>I found out that I can make it happen with the following code:</p> <pre><code>jQuery(this).prev("li")show(function() { ...
javascript jquery
[3, 5]
5,354,765
5,354,766
HtmlTextWriter to String - Am I overlooking something?
<p>Perhaps I'm going about this all wrong (and please tell me if I am), but I'm hitting my head against a wall with something that seems like a really simple concept.</p> <p>This Render override is coming from a User Control.</p> <pre><code>protected override void Render(HtmlTextWriter writer) { string htmlAboutT...
c# asp.net
[0, 9]
570,552
570,553
Set focus on first item of the suggestions list displayed in autocomplete
<p>I need to customize <code>autocomplete</code> widget so that the first item of the suggestions list is selected by default, so that as soon as user hits <code>enter</code> the first item of the suggestions list is selected in the autocomplete.</p> <p>How can I do that ?</p> <hr> <p>I am <strong>not using jquery's...
javascript jquery
[3, 5]
3,872,251
3,872,252
Empty Http Call but no error
<p>I'm trying to call a webservice with my application, but I get no error, the URL is the good one and return something (via the browser), but I get no content.</p> <pre><code>try { HttpClient httpclient = new DefaultHttpClient(); HttpGet httpget = new HttpGet(url); HttpResponse response = httpclient.exec...
java android
[1, 4]
2,896,813
2,896,814
testing user entry on keyup and regex
<p>In my case the requirement is like - </p> <p>The first name should allow alphabets, some chars like comma, dash and ascent chars.</p> <p>The code works fine when we try to paste the ascent chars or use "abctajpu" add on in firefox. But as soon as user types in ALT+0192 or any ALT key with num pad. </p> <p>The key...
javascript jquery
[3, 5]
2,914,055
2,914,056
JQuery selector for inline style property
<p>I would like to use a jquery to select the following span:</p> <pre><code>&lt;span id="RequiredFieldValidator1" class="validationerror" style="color: Red; display: none;"&gt;*&lt;/span&gt; </code></pre> <p>But not select the following span which differs from the original in that the style attribute has a display p...
asp.net jquery
[9, 5]
3,160,137
3,160,138
What does BatteryStatus isCharging gives back?
<p>If you run this code, what does <code>isCharging</code> give back when it's charging and when it's full?</p> <pre><code>public void onReceive(Context context, Intent intent) { IntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED); Intent batteryStatus = context.registerReceiver(null, ifilt...
java android
[1, 4]
1,195,030
1,195,031
why my code that write by me is upper,when keyup
<pre><code>$('#a').keyup( function(event){ alert(event.keyValue) } ) </code></pre> <p>but error,coz 'keyValue' is not undefined,</p> <p>how do i get the keyValue when the event keyup???</p> <p>i use jquery.</p> <p>thanks</p> <hr> <p>i do this:</p> <pre><code>$('#a').keyup( function(event){ alert(Stri...
javascript jquery
[3, 5]
1,008,925
1,008,926
Finding out which CSS property is being animated by jQuery
<p>I see that <code>$element.is(':animated')</code> tells me if $element is being animated but is it possible to see which css properties are being animated.</p>
javascript jquery
[3, 5]
764,003
764,004
Don't want spaces in the text, but this regex is passing not sure why
<p>I am using the following regex</p> <pre><code>/[a-zA-Z0-9]+/i.test(value) </code></pre> <p>If I enter a space in the word, it passes.</p> <p>I don't see where spaces are aloud in the regex, why is it passing?</p>
asp.net javascript
[9, 3]
2,779,468
2,779,469
If statement not accepting variable value
<p>I have this code:</p> <pre><code>meJi = 33; $.ajax({ type: "POST", url: mega, data: string, beforeSend: function() { $('#loading').html("&lt;img src='images/loading.gif'/&gt;").fadeIn('fast'); }, complete: function() { $('#loading').fadeOut('fast'); }, success: function(msg) { loading_hide(); f = (m...
javascript jquery
[3, 5]
1,175,789
1,175,790
Java to php, Byte, Type, Array
<p>Here is a small Java Code Snippet.</p> <pre><code>ConfigData[] cd = new ConfigData[1]; cd[0] = new ConfigData(); byte[] tmpbyte ={1,(byte)0x01}; cd[0].settmpdata(tmpbyte); </code></pre> <p>"ConfigData" is my custom Type (int, Byte Array). </p> <p>In my last thread i found the tip how to Build / work with a "ByteA...
java php
[1, 2]
5,645,958
5,645,959
Jquery animation looping
<p>I am trying to make this animation loop</p> <pre><code> $(".jquery_bounce").ready(function(){ $("img", this).animate({ marginLeft : '20px' } , { duration: 200, complete:function() { $(this).animate({ marginLeft : '0px' } , { duration...
javascript jquery
[3, 5]
5,362,729
5,362,730
DateTime Variable
<p>I want to pass a null value for a DateTime variable in C#. The value should be stored in the database as null.</p> <p>I've tried using Datetime.Minvalue, but that stores a default value. It has to be a null in database. How do I do that?</p>
c# asp.net
[0, 9]
2,773,504
2,773,505
Android best practices
<p>I was wondering if there are any lists of best practices for Android/Java. I know there are in .Net like using String.Concat instead of blah &amp; blah.</p> <p>Are there any that you have found, others might not know about?</p>
java android
[1, 4]
246,593
246,594
Is Minus Zero some sort of JavaScript performance trick?
<p>Looking in the jQuery core I found the following code convention:</p> <pre><code>nth: function(elem, i, match){ return match[3] - 0 === i; }, </code></pre> <p>And I was really curious about the snippet <code>match[3] - 0</code></p> <p>Hunting around for '-0' on google isn't too productive, and a search for 'm...
javascript jquery
[3, 5]
719,073
719,074
Increment counter unavailable outside of loop
<p>I am looping through json return values with jQuery's $.each() and adding the classes returned to their corresponding <code>&lt;div&gt;</code>'s; however the counter appears to be inaccessible for further processing outside of the immediate loop. I have tried using return's &amp; external function calls to no avail....
javascript jquery
[3, 5]