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
4,349,599
4,349,600
$.ajax if condition
<p>I failed to write a condition inside of ajax by using the following syntax. </p> <pre><code> var num = 1; $.ajax({ type: "POST", //condition starts if (num === 1){ url: url1, data: data1, }else{ url: url2, data: data2, } ...
javascript jquery
[3, 5]
2,232,303
2,232,304
Javascript/jQuery: How to increment a number and highlight text when selected
<p>I've searched and search, but cannot find what I need. I know very little about Javascript so I need a bit of help with this.</p> <p>I have a number, say numValue, that I want to increase or decrease based on items being selected in different areas. Plus I want those items to highlight and stay highlights until cli...
javascript jquery
[3, 5]
2,511,213
2,511,214
asp.net gridview textbox value
<p>How to get gridview itemtemplate textbox value in javascript?</p>
javascript asp.net
[3, 9]
521,508
521,509
One function to rule multiple buttons, and then some
<p>I have 7 buttons. They are distributed on top of a background image and interacting with it. They are placed absolutely. I have created a jQuery function to animate one of the buttons height. The button expands upwards. Check it out here: <a href="http://hdpano.no/bf/newindex.html" rel="nofollow">http://hdpano.no/bf...
javascript jquery
[3, 5]
1,544,140
1,544,141
Textbox onchange event
<p>So I have a text box, where I add an onchange event of markAsException.</p> <p>My javascript is - </p> <pre><code>function markAsException(recordID) { //alert("Exception"); //mark exception column document.getElementById("ctl00_cpMain_lblScrollException_" + recordID).innerText = "Exception"; docum...
c# javascript
[0, 3]
1,343,341
1,343,342
How to find a DropDownList in a GridView ItemTemplate without RowDataBound?
<p>I have a DropDownList outside of a GridView and I have a DropDownList inside an ItemTemplate of a GridView. The DropDownList that is outside has a SelectedIndex_Changed event and when that fires, it should populate the DropDownList inside the GridView. The problem is that in the method that I use to populate the i...
c# asp.net
[0, 9]
3,503,968
3,503,969
java.lang.NoClassDefFoundError on android
<p>i am doing an application-email sending without user interaction. so that i got coding from the following <a href="http://stackoverflow.com/questions/2020088/sending-email-in-android-using-javamail-api-without-using-the-default-built-in-a/2033124#2033124">link</a>. here i got <strong>java.lang.NoClassDefFoundError</...
java android
[1, 4]
3,539,398
3,539,399
Why 'insert "AssignmentOperator Expression" to complete assignment' syntax error occurs?
<pre><code>public Object execute() throws Exception { JSONArray result = new JSONArray(); DBHelper dbh = new DBHelper(mContext); SQLiteDatabase db = dbh.getReadableDatabase(); try{ Cursor cursor_products = db.rawQuery(dbh.GET_ALL_PRODUCTS,null); //Cursor cursor_products = db.qu...
java android
[1, 4]
3,345,310
3,345,311
How would I add a delay to this JQuery event?
<p>This is an event that appends some html:</p> <pre><code> $("#feed").live("mouseover", function(){ $("#main").append('&lt;div class="help_div" id="feed_help"&gt;&lt;p&gt;Your feed shows you information on the users you follow, such as songs added, voting, commenting, following, and the showing of songs betw...
javascript jquery
[3, 5]
2,603,725
2,603,726
When One of 2 select boxes are changed, alert with the value for each select box
<p>Given the following: </p> <pre><code>&lt;div class="filters" id="filters"&gt; &lt;select id="state" name="state" tabindex="1" &gt; &lt;option value=""&gt;Filter by State&lt;/option&gt; &lt;option value="AL" &gt;Alabama&lt;/option&gt; &lt;option value="AK" &gt;Alaska&lt;/option&gt; &lt;option value="AZ" &gt;Arizona&...
javascript jquery
[3, 5]
4,157,861
4,157,862
How do I make new elements draggable with jquery?
<p>I'm loading new elements with a form. After the elements are loaded I need to make each one draggable. According to .on doc <em>"Delegated events have the advantage that they can process events from descendant elements that are added to the document at a later time."</em></p> <p>I've tried oh-so-many variants of ...
javascript jquery
[3, 5]
5,055,910
5,055,911
ASP.NET parent page update with JavaScript?
<p>here is my problem: I have a ASP.NET appl. In the appl, there is a page (page A) that brings up a second page (page B) Page b is a simple form that fills a dataGrid that is located in Page A. I have tryed many approaches (IDisposable, creating methods for it...) but it does not give me the correct functioning. I hav...
asp.net javascript
[9, 3]
5,651,604
5,651,605
jQuery JavaScript Encoding HTML
<p>How on earth do you encode HTML with jQuery/JavaScript?</p> <p>Havn't found any working solution after hours of Googling and surfing this site.</p> <p>This:</p> <pre><code>jQuery('&lt;div/&gt;').text(value).html(); </code></pre> <p>does not work with jQuery!</p>
javascript jquery
[3, 5]
1,924,314
1,924,315
SelectedIndexChanged event not firing with OnChange method in JavaScript
<p>Please help me with a problem I'm having with a <code>DropDownList</code>. I'm using the JavaScript "onchange" method to get the DropDownList's selected value. I can get the value, but the <code>OnSelectedIndexChanged</code> event not firing. Hopefully someone can help me. My JavaScript function for getting selected...
javascript asp.net
[3, 9]
2,485,053
2,485,054
Multiple click events for the same element?
<p>Is it possible to have multiple click events for the same element? I have tried to simply have it like so:</p> <pre><code>$('#templates').click(function(e) { do something.. }); $('#templates').click(function(e) { do something else also.. }); </code></pre> <p>Yet only the se...
javascript jquery
[3, 5]
4,665,667
4,665,668
In Android, how do I reference an instantiated Activity object from another Activity?
<p>Suppose I have two Activity classes in my Android app. Inside Activity B, I know that Activity A exists and is instantiated. What's the <em>proper way</em> to access Activity object A from Activity object B?</p>
java android
[1, 4]
2,712,948
2,712,949
bridge language between PHP and Objective-C
<p>i want to show php page in iphone application. I have also used webview to display page but not able to know how to apply slide effect on page please help me...</p> <p>i am working with one application in which i m working with php listing page and then i want to show detail page but how to show slide transition e...
php iphone
[2, 8]
1,845,329
1,845,330
Why isn't this.value or $(this).val() responding in JavaScript / jQuery?
<p>I have the following <code>function</code>, which successfully increases the <code>value</code> of <code>input type="text"</code></p> <pre><code>function deleteLine(arrayNumber) { $("#line" + arrayNumber + "_quantity").val(parseInt($("#line" + arrayNumber + "_quantity").val()) + 1); } </code></pre> <p>I'm just...
javascript jquery
[3, 5]
3,076,534
3,076,535
how to hide div with Class/id with jQuery
<p>I have a function openbag(); for opening div. this div is also open on click and addClass "active". but i am open this div from server side, call the function openbag();. but the problem is this div is open every time when refresh the other page. I have removed "active" class and check if class has not but this is a...
jquery asp.net
[5, 9]
2,630,846
2,630,847
Android AutoCompleteTextView, how to link suggestions to xml?
<p>I am trying to use the suggestions of my AutoCompleteTextView can be click to view my xml layouts.</p> <p>I have done the xml part.</p> <pre><code>AutoCompleteTextView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/autoCompleteTextView1" android:layout_gravity="center"...
java android
[1, 4]
14,887
14,888
Get elements value using jquery
<p>I have an anchor, as follows:</p> <pre><code>&lt;a href="#" class="fpa2" value="7"&gt; &lt;div class="pl2"&gt; &lt;div class="pl3"&gt;Hero&lt;/div&gt; &lt;/div&gt; &lt;/a&gt; </code></pre> <p>Using <strong><em>jQuery</em></strong>, how do i get a variable with the value <code>7</code> from the value...
javascript jquery
[3, 5]
1,999,008
1,999,009
Storing `CheckBoxList` items in **Session** and retieveing back to `CheckBoxList`
<p>I am storing all the items in the <code>CheckBoxList</code> in the <strong>Session</strong> and retrieving the same and adding to another or same <code>CheckBoxList</code>.</p> <p>Here is the code where I store the <code>CheckBoxList</code> items in the Session on button1_click :</p> <pre><code>Session.Add("AllIte...
c# asp.net
[0, 9]
681,423
681,424
taking off the http or https off a javascript string
<p>I have the following strings</p> <pre><code>http://site.com https://site.com http://www.site.com </code></pre> <p>how do i get rid of the http:// or https:// in javascript or jquery</p>
javascript jquery
[3, 5]
3,763,791
3,763,792
Need to save a high score for an Android game
<p>It's quite simple, all I need to do is save a high score (an integer) for the game. I'm assuming the easiest way to do this would be to store it in a text file but I really have no idea how to go about doing this.</p>
java android
[1, 4]
274,383
274,384
Why is jQuery returning each character of the contents of my span element when I loop it?
<p>Ok, I have bunch of span with an endtime class. I want to get each of the contents independently from the others.</p> <pre><code>&lt;span class='endtime'&gt; 2011-03-29 00:01:03 &lt;/span&gt; &lt;span class='endtime'&gt; 2011-03-31 19:20:11 &lt;/span&gt; &lt;span class='endtime'&gt; 2011-03-28 19:00:12 &lt;/s...
javascript jquery
[3, 5]
4,446,869
4,446,870
JavaScript 'beforeunload' event not working in ie
<p>I need to open a pop-out window, then after close pop-out window (refresh a parent page)</p> <p>jquery 'beforeunload' event not working in internet explorer 8,9.</p> <p>my code is:</p> <pre><code> /* * events * add tallyman */ $("div.main form div.tallymanlist").click(function() { if(gencargo.show_con...
javascript jquery
[3, 5]
3,920,452
3,920,453
Re Using C++ graphics code in java
<p>I am having some code already written C++ using graphics.</p> <p>Is there any way to re use that code in java?</p> <p>Thanks in advance..</p>
java c++
[1, 6]
2,973,983
2,973,984
Why does everyone like jQuery more than prototype/script.aculo.us or MooTools or whatever?
<p>It seems that jQuery has taken the throne for JavaScript frameworks and I was wondering exactly why. Is there a technical reason for this or is it just that they have evangelists? I have been really happy with using <a href="http://en.wikipedia.org/wiki/Prototype_JavaScript_Framework">Prototype</a> myself. Should...
javascript jquery
[3, 5]
32,214
32,215
how to display hide and show select box?
<p>I google a lot for my requirement.So i am posting this question. my requirement is when a user select a value from dropdown based on that value a div to be displayed. But in default all the divs with values to be displayed.</p> <p>here is my code:</p> <pre><code>&lt;select name="lab_1" id="title" &gt; &lt...
javascript jquery
[3, 5]
3,732,038
3,732,039
Text being updated in real time
<p>I need some text to be updated in real time depending on choices from dropdown boxes.</p> <p>Here's an example: <a href="http://www.thatsoftwareguy.com/swguy_demo_1.3.7/index.php?main_page=product_info&amp;cPath=65&amp;products_id=183" rel="nofollow">http://www.thatsoftwareguy.com/swguy_demo_1.3.7/index.php?main_pa...
php javascript
[2, 3]
1,601,615
1,601,616
JQuery - object.id is undefined when it shouldn't be
<p>I'm working with JQuery and i'm running into this strange (or perhaps stupid) error.</p> <p>In my HTML I have:</p> <pre><code>&lt;input type="password" name="repeatPassword" id="id_repeatPassword" /&gt; </code></pre> <p>And then in my javascript code i have:</p> <pre><code>validateRepeatPassword($('#id_repeatPas...
javascript jquery
[3, 5]
3,178,793
3,178,794
IN Thread-Safe How to write Map and other thread read
<p>How to write in Thread-Safe Map and other thread read it thread</p>
java android
[1, 4]
542,178
542,179
How do I ensure that all clients can correctly parse a database DateTime string?
<p>I got a Windows application, used on hundreds of computers. It gets dates from my Sql Server as string and converts this string to datetime format to calculate some date time difference. Sometimes on some system, we get error while converting string to Date. "String was not recognized as a valid DateTime".</p> <p...
c# asp.net
[0, 9]
856,266
856,267
JQuery Killing Function
<p>I'm new to JQuery, so I'm a little confused here. I have a button that, onclick, runs this function. When the JQuery is commented out, the alert goes off when the button is clicked. But with the JQuery, nothing is alerted when the button is clicked. What am I doing incorrectly?</p> <pre><code>&lt;script type="text/...
php javascript jquery
[2, 3, 5]
4,079,717
4,079,718
Extracting Android .apk and reading contents of XML file in res/layout
<p>I am trying to reverse engineer an existing android app and understand how a particular UI is constructed. I've found that I can rename the apk to zip and view some of the compiled source. The res/layout directory is populated with all the xml files that define the UI, but while they do have the xml extension, they...
java android
[1, 4]
3,189,866
3,189,867
Adding div before selected div
<p>I have a bunch of divs one after the other.</p> <pre><code>&lt;div class="betweenable"&gt;some content&lt;/div&gt; &lt;div class="betweenable"&gt;other content&lt;/div&gt; &lt;div class="betweenable"&gt;yet another&lt;/div&gt; </code></pre> <p>When I click the last div, I want to insert the text <code>new content<...
javascript jquery
[3, 5]
864,030
864,031
Jquery or javascript auto click
<p>How can i auto click on the link on page load? i have been trying for ages but id doesn`t work.</p> <pre><code>&lt;link rel="stylesheet" type="text/css" href="leightbox.css" /&gt; &lt;script type="text/javascript" src="prototype.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="leightbox.js"&gt;&lt;/scr...
javascript jquery
[3, 5]
4,711,204
4,711,205
JS slideToggle close other open divs
<p>I have about 20 buttons on a page. I have set them up with jquery to slide toggle to show and hide a div. It works well but only if the same button is used to close the div before selecting a new div. I want that if a button is clicked it will slide up open divs, before it slides down its own div. Right now if ...
javascript jquery
[3, 5]
612,264
612,265
Comparing generic lists and filter mismatching values
<p>I would like to compare to generic lists, and filter the mismatching values. I'm currently using a foreach loop, but I would like to know if there is a way to solve this using a lambda expression? In the example below i would like a resulting list that only contains the "4".</p> <pre><code>List&lt;string&gt; foo = ...
c# asp.net
[0, 9]
2,889,559
2,889,560
how to generate a identified filename from url?
<p>Now I have to download a file whose url has known. I need to save it to SD card when download action finished. The problem is I should know whether the file is existed before downloading. So I plan to save the file with a identified filename which is generated from url. So when I get the url I can calculate his corr...
java android
[1, 4]
3,664,659
3,664,660
Python and executing php files?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2931061/start-local-php-script-w-local-python-script">Start local PHP script w/ local Python script</a> </p> </blockquote> <p>How do you execute a php file and then view the output of it?</p> <pre><code>os.syst...
php python
[2, 7]
5,204,343
5,204,344
Asp:Image with Link
<p>I would like to place an image in my application. when I click on it I want to move to another page. In general my asp:image to work as link Is that possible ??</p>
c# asp.net
[0, 9]
1,405,825
1,405,826
Filtering elements out of a jQuery selector
<p>I have a page that selects all the elements in a form and serializes them like this:</p> <pre><code>var filter = 'form :not([name^=ww],[id$=IDF] *,.tools *)'; var serialized = $(filter).serialize(); </code></pre> <p>This works, unless the form gets around 600+ elements. Then the user gets s javascript error sayin...
javascript jquery
[3, 5]
2,232,066
2,232,067
Is it possible to read data from a local port using Javascript or ASP.NET?
<p><strong>I written the following to broadcast a data in a Windows Application using C#</strong> </p> <pre><code> UdpClient server = new UdpClient("127.0.0.1", 9050); string welcome = "Hello, are you there?"; data = Encoding.ASCII.GetBytes(welcome); server.Send(data, data.Length);...
javascript asp.net
[3, 9]
4,379,364
4,379,365
How do I add a function to a specific element type in jQuery?
<p>I can do this</p> <pre><code>jQuery.fn.validate = function(options) { var defaults = { validateOPtions1 : '', validateOPtions2 : '' }; var settings = $.extend({}, defaults, options); return this.each(function() { // you validation code goes here }); }; </code></pre> <p...
javascript jquery
[3, 5]
5,589,798
5,589,799
Best practices for declaring functions inside jquery ready function
<p>I haven't found a good reference for declaring my own functions inside the jquery.ready(function(){});</p> <p>I want to declare them so they are inside the same scope of the ready closure. I don't want to clutter the global js namespace so I don't want them declared outside of the ready closure because they will b...
javascript jquery
[3, 5]
4,930,520
4,930,521
word processor in c# or c++
<p>I learned C Sharp for one purpose, to write a word processor that includes my needs. For example that you could play with the spaces between words, and the spaces between the lines, raise one word higher from the row, and many other similar things. When I start working on it in c# - winForms I see the possibilities ...
c# c++
[0, 6]
2,962,852
2,962,853
check if /en/ or /es/ in document.location
<p>i need to get the language that the user is using based on the document.location</p> <p>urls are of the type:</p> <pre><code>domain.com/en/blabla.html domain.com/es/blabla.html domain.com/it/blabla.html </code></pre> <p>so i was trying like this:</p> <pre><code>function getLan(){ var idioma = document.locatio...
javascript jquery
[3, 5]
4,810,569
4,810,570
Add TextView on top of Button?
<p>I'm building a contacts app which displays big contact photos. I need to add a label with the contacts name of each contact on top of the button (near the bottom) however I don't know how to get two views on top of each other. I cannot simply use settext since I need to add a semi-transparent background to the label...
java android
[1, 4]
3,576,670
3,576,671
Java query to website user database
<p>I am trying to figure out the method on connecting a java program to my website. I have a program that allows users to download jars to run as scripts in this program. For some of the jars, I want them to have a login that queries my website. So a user tries to run the script and has to enter details that correspond...
java php
[1, 2]
1,505,672
1,505,673
popup window from right on the page load through jquery
<p>i searched on internet for j Query or java script code that do some work for me like when the the page completely loads a popup window come out from the right side for some time and then disappears after some specific time but i couldn't succeed. i need yours help and favor in this regard.(send me any link of docume...
javascript jquery
[3, 5]
5,738,403
5,738,404
Download file from web to iPhone (C#)
<p>I have a website wich allows users to upload / downloads files (pdf, jpg, txt, etc.). It works nice as it is, but my problem is that users accesing the web on an iPhone (or iPad) can't dowload or access the file. I've tried to use "Respone.Redirect" to the file, but it doesn't work. I've use c# to make my website...
c# iphone
[0, 8]
352,213
352,214
input:empty detects empty fields when there are none
<p>Using the below I am checking every input field is not empty</p> <pre><code> if ( $("input:empty").length &gt; 0 ) { $(":text[value=]").css('background', 'rgb(255,220,200)'); $(":text[value!=]").css('background', 'rgb(255,255,255)'); alert('One or more fields are not completed') e.preventDefault(); ...
javascript jquery
[3, 5]
1,362,686
1,362,687
How do I make a div element editable (like a textarea when I click it)?
<p>This is my code:</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;meta name="viewport" content="width=device-width, user-scalable=no"&gt; &lt;/head&gt; &lt;body&gt; &lt;style ty...
javascript jquery
[3, 5]
408,764
408,765
Why is this not a valid, chained function?
<pre><code>$("#infoBox").hide(, function(){ alert('hidden!'); }); </code></pre> <p>Just a small question, but my code breaks when I try to do this -</p>
javascript jquery
[3, 5]
5,599,034
5,599,035
javaScript, jQuery - how to convert a timestamp to a date format like Jan 2, or Jan 26?
<p>Given a string like:</p> <pre><code>Sun Feb 06 2011 12:49:55 GMT-0800 (PST) </code></pre> <p>How can you convert that to:</p> <pre><code>Feb 6 </code></pre> <p>And / Or</p> <pre><code>Sun Jan 26 2011 12:49:55 GMT-0800 (PST) to: Jan 26 </code></pre> <p>Any ideas?</p>
javascript jquery
[3, 5]
1,707,625
1,707,626
How to call method from separate package : Android
<p>I am trying to get a method from the file Duality.java to be run in Min.Java when a button is clicked. Below are the two files and what I am currently trying to do, which is not working. How do I get the method duality() to run when the button is clicked within Min.java?</p> <p>Duality.java</p> <pre><code>package ...
java android
[1, 4]
3,665,207
3,665,208
How to show the Birthdate in mm/dd/yyyy format if year is separated from it?
<p>I have a modalpopup inside it I have checkboxes,when I check the checkboxes and save the changes there is a dynamically created table with dynamically generated labels.I have a checkbox Birthdate inside the modal popup which shows the mm/dd only.And another checkbox below it that will show the year only, and will b...
c# asp.net
[0, 9]
2,284,459
2,284,460
Can't set tag/attribute value using c# codebehind on aspx page
<p>I have a custom .ascx control and would like to set one of it's properties using code. In the .aspx I have this:</p> <pre><code>&lt;uc1:CustomContent ID="bunchOfContent" runat="server" contentPayload='&lt;%# getRegionID() %&gt;' /&gt; </code></pre> <p>In the codebehind I have:</p> <pre><code> public partial c...
c# asp.net
[0, 9]
2,494,432
2,494,433
Should I learn C++ and Java simultaneously?
<p>I'd love to start writing Android apps. That's apparently all in Java. Programming jobs on Craigslist are at least 100 Java to 1 C++. I want to learn Java.</p> <p>Unfortunately, the CS program I'm considering teaches C++ rather than Java, so C++ is what I'm learning. (I'm sure learning C++ will teach me to code...
java c++
[1, 6]
4,871,081
4,871,082
Count occurrences of array objects
<p>I'm looking to create an array of counts based on the occurrences of the same object within a different array. So far, my code looks like this:</p> <pre><code>var dates = []; $.each(items, function (i, item) { dates.push(item.date); }); </code></pre> <p>which returns:</p> <pre><code>['2013/03', '2013/03', '20...
javascript jquery
[3, 5]
2,730,800
2,730,801
jQuery determine if selected element's CSS has certain property via identifying attribute
<p>I have a UL list inside that UL list is a handful of LI's that all have "rel" attributes as identifying tokens as the ID/Class tags have been used for other reasons. Anyway this is what I am attempting currently</p> <pre><code>if($('#column1').find('li:[rel='+theElements[i]+']').css({'opacity':0})){hideit = true;}e...
javascript jquery
[3, 5]
4,914,258
4,914,259
Copy clipboard image into webpage using Jquery
<p>I want to implement copy clipboard image into webpage.</p> <p>Ex. User click the printscreen button, opens a web page, clicks CTRL+V and the image is upload to the web page. Can it possible using jquery/javascript or PHP.</p> <p>Is it possible in firefox?</p> <p>Thanks in advance.</p>
php javascript jquery
[2, 3, 5]
4,864,846
4,864,847
formatting money with jquery
<p>I wrote this little snippet that should format money but its failing on the period for some reason. It keeps adding them every time ...any idea why and is there a better way of doing this</p> <pre><code>$(".dollar").blur(function() { var curval = $(this).val(); if ($(this).val().indexOf("$") != 0) { ...
javascript jquery
[3, 5]
3,078,595
3,078,596
Initialize value inside function only once
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/840397/static-variables-in-c">Static variables in C#</a> </p> </blockquote> <p>If you have a large function and in the middle somewhere you have a value that should be declared only the first time its encounter....
c# c++
[0, 6]
5,433,990
5,433,991
skip take methods with javascript arrays
<p>Are there methods by which I can skip a particular number of objects and take a certain number of objects from an array in javascript?</p> <p>Basically the pattern I'm looking for is this.</p> <p>Say I have an array of 8 objects.</p> <p><strong>First loop:</strong></p> <p>Return objects at index 0 to 3 from the ...
javascript jquery
[3, 5]
3,983,511
3,983,512
Passing html data from a div to php
<p>I am able to get the total text data from a contentEditable div, but I would like to pass the data just as it is in the div with the HTML elements in tact to a PHP file. At the moment only the text is being returned by log stripped of html tags, </p> <hr> <p>First I dynamically add this to the div </p> <pre><code...
javascript jquery
[3, 5]
2,874,754
2,874,755
Javascript: Equality Comparison between two Object/ Array
<p>Let us guess two objects with same property:</p> <pre><code>var x = {a : 'some'}, y = {a: 'some'}; </code></pre> <p>output:</p> <p><code>x == y;</code> and <code>x === y;</code> both give false</p> <p>Similarly for two array,</p> <pre><code>var p = [1, 2, 3], q = [1,2,3]; </code></pre> <p><code>p =...
javascript jquery
[3, 5]
2,319,994
2,319,995
Jump to Java after 2yrs php experience
<p>I have 2yrs experience in php now I to want learn java should I go for some java(core, advanced) coaching or should I proceed further with learning joomla, cakephp, etc. Will there be any help in learning java along with php as I have done only BCA and not MCA. Also I have not even touched java before. Any suggestio...
java php
[1, 2]
4,303,452
4,303,453
Set literal text with inline code in aspx file
<p>In an ASP.NET project, I have a literal. In order to set the text property, I used the following code:</p> <pre><code>&lt;asp:Literal ID="ltUserName" runat="server" Text="&lt;%= session.UserName %&gt;" /&gt; </code></pre> <p>But instead of value of <code>session.UserName</code>, literal shows <code>&lt;%= session....
c# asp.net
[0, 9]
1,734,670
1,734,671
Trying to execute PHP from JavaScript, not working?
<p>I am using the following code: <code>&lt;a href="#" onclick="&lt;?php var_dump($_SERVER)?&gt;"&gt;$_SERVER Variable&lt;/a&gt;</code>. is this even possible? if not then how would I do this? I amn using $_SERVER for very specific - experimental purposes.</p> <p>Thanks in advance!</p>
php javascript
[2, 3]
5,775,689
5,775,690
Trying to add Javascript to PHP file
<p>I am trying to add javascript to a php file and everytime I add the javascript and save, it just displays the javascript and not the rest of the page content.</p> <p>The code looks like this:</p> <pre><code>&lt;section class="portlet grid_6 leading"&gt; &lt;header&gt; ...
php javascript
[2, 3]
991,283
991,284
Control .fadeOut() with jQuery
<p>I have the following jquery code:</p> <pre><code>&lt;script type="text/javascript"&gt; $(function(){ $('.gallery-slider li:gt(0)').hide(); setInterval(function(){ $('.gallery-slider li:first-child').fadeOut("slow") .next('.gallery-slider li').fadeIn(1000) .end().appendTo('.gallery-sl...
javascript jquery
[3, 5]
5,745,301
5,745,302
equal of php in asp.net
<p>what is the equivalent code in asp.net language???</p> <pre><code>&lt;?php $ch = curl_init("http://irnafiarco.com/queue"); $request["queue"] = file_get_contents("/path_to_my_xml_file/my_xml_file.xml"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFI...
php asp.net
[2, 9]
1,042,172
1,042,173
How to ignore click() if an element has a certain class in jQuery?
<p>I know this should be easy stuff, but for some reason the click event is still firing for the element that has a "selected" class.</p> <p>Can anyone spot the problem with this line?</p> <pre><code>h.find("li a").not("li a.selected").click(function () { </code></pre>
javascript jquery
[3, 5]
2,447,782
2,447,783
Jquery simple if statement confusion
<p>I got a confirmation alert to confirm a user action.</p> <p>on click "ok", it should do the following code:</p> <pre><code>function disableSubmitButton() { jQuery("#submitButton").attr("disabled", "true"); jQuery("#rent_space").submit(); } </code></pre> <p>on "cancel", the following.</p> <pre><code>if (!...
javascript jquery
[3, 5]
5,675,254
5,675,255
How to select a div and display another div with more description about that div?
<p>Hi im new on jquery and nowhere in javascript but anyway im trying to create this carousel where you can click any item from the list and show more infos about that item on the left div.</p> <p>Here is the preview: <img src="http://i.stack.imgur.com/3YSfv.png" alt="web part screenshot"></p> <p>I've already created...
javascript jquery
[3, 5]
4,164,099
4,164,100
Visual Studio 2010 working directory
<p>I'm developing a C# asp.net web application. I'm basically done with it, but I have this little problem. I want to save xml files to the "Users" folder within my project, but if I don't psychically hard code the path "C:......\Users" in my project it wants to save the file in this "C:\Program Files (x86)\Common File...
c# asp.net
[0, 9]
5,906,310
5,906,311
jQuery find - can I use a callback?
<p>So I'm trying to figure out if I can call a function inside of find() as below but I'm not getting anything returned to the console. Is this possible with find() or do I need to find an alternative? </p> <pre><code>$(".tdInner1").find(".block", function () { if( $(this).next().hasClass("continuation") ) { ...
javascript jquery
[3, 5]
3,757,567
3,757,568
Triggering javascript setTimeOut events prematurely
<p>I'm using setTimeOut to control an automatic slideshow.</p> <p>(You can see it here: <a href="http://thingist.com/labs/ipad.shtml" rel="nofollow">http://thingist.com/labs/ipad.shtml</a> -- basically something pretty to look at while I'm working. Images are coming from reddit's API)</p> <p>The code looks approxima...
javascript jquery
[3, 5]
170,930
170,931
Android Search Dialog soft keyboard stays open for too long
<p>I'm trying to use Android's built-in <a href="http://developer.android.com/guide/topics/search/search-dialog.html" rel="nofollow">Search Dialog</a>, and it's working fine except when I try to use it with a <a href="http://developer.android.com/reference/android/app/ProgressDialog.html" rel="nofollow">ProgressDialog<...
java android
[1, 4]
286,120
286,121
saving Image using sql query method
<p>I am using following code: Note that i HAVE TO SEND SQL Query so using this procedure.</p> <p><code>currentReceipt.image</code> is a <code>byte[]</code></p> <pre><code> String updateQuery = "INSERT INTO MAReceipts(userId, transactionId, transactionType, receiptIndex, referenceNo, image, smallThumb, comments,...
java android
[1, 4]
4,313,674
4,313,675
jQuery register click event twice
<p>I've written the following plugin <a href="http://jsfiddle.net/ilpet/yjGLF/" rel="nofollow">http://jsfiddle.net/ilpet/yjGLF/</a></p> <p>The click event on '.selectUI span' registers twice but only in case of the first select box.</p> <p>Can anyone please help me? Kinda' stuck on this.</p>
javascript jquery
[3, 5]
3,874,162
3,874,163
loading javascript file after jquery.ready
<p>I want to load a javascript file at the end of jquery.ready so that the code in my ready handler doesn't have to wait to execute until this large javascript file is loaded.</p> <p>My jquery.ready code doesn't rely on this javascript file at all. </p> <p>Would this be a good way to do that?</p> <pre><code>$(functi...
javascript jquery
[3, 5]
3,258,595
3,258,596
parentsUntil() in jQuery uses reversed order?
<p>I have this html structure : </p> <pre><code>&lt;body&gt; &lt;a&gt; &lt;b&gt; &lt;c&gt; &lt;d&gt; &lt;/d&gt; &lt;/c&gt; &lt;/b&gt; &lt;/a&gt; &lt;/body&gt; </code></pre> <p>I use the <code>&lt;d&gt;</code> element as the first node to start with.</p> <p>Question :</p> <pre...
javascript jquery
[3, 5]
4,821,186
4,821,187
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]
1,700,219
1,700,220
Jquery submit and post to post a form unable to return data
<p>i have problem with jquery submit and post. I would like to submit a form and post it to my php for a check, and return the php result back to the form. However, I have problem with the returning of data, it basically ignores the result.</p> <p>This is my html form:</p> <pre><code>&lt;form id="form" method="post"&...
php javascript jquery
[2, 3, 5]
4,247,408
4,247,409
Monitor the progress of an input stream / httpclient.exectute
<p>I'm trying to get the progress of an Apache HTTP Client Execute method. Is it possible to either</p> <ol> <li>Get the mount of input stream that has been read by the execute method or </li> <li>Monitor the execute process using some internal method either by percent or amount of data sent?</li> </ol> <p>The code b...
java android
[1, 4]
4,485,684
4,485,685
communication between PHP and Javascript
<p>I want to send some data to Javascript from PHP.(these two file is different file in same folder) For example, If I calculate some value in PHP side, I want to send the data to javascript and I use the data. How can I do this??</p>
php javascript
[2, 3]
2,851,250
2,851,251
Why can't a submit button send to PHP and jQuery at the same time?
<p>I have this code.</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form action = "" method = "POST" id = "form"&gt; &lt;img src = "circle.gif" id="loading" style="display:none; "/&gt; &lt;input...
php jquery
[2, 5]
5,671,474
5,671,475
"Build" JS variable
<p>I'm having problem for a long time and I would like to solve it now. In php, if you want to retreive variable $var123, you could do it this way</p> <pre><code>$varname = "var123"; $var = $$varname; </code></pre> <p>How could I do the same in js and/or jquery?</p>
php javascript jquery
[2, 3, 5]
747,799
747,800
jQuery/JS - How to compare two date/time stamps?
<p>I have two date/time stamps:</p> <pre><code>d1 = 2011-03-02T15:30:18-08:00 d2 = 2011-03-02T15:36:05-08:00 </code></pre> <p>I want to be above to compare the two:</p> <pre><code>if (new Date(d1) &lt; new Date(d2)) {alert('newer')} </code></pre> <p>But that does not appear to be working correctly. Is there a way ...
javascript jquery
[3, 5]
4,189,109
4,189,110
CharSequence ArrayList to charSequence casting
<p>There is problem of class casting. Please tell me how to cast this. I want to this <code>ArrayList&lt;CharSequence&gt;</code> in my <code>CharSequence[]</code> named <code>Contacts</code>.</p> <p><code>java.lang.ClassCastException</code> (in Android):</p> <pre><code>CharSequence[] Contacts; List&lt;CharSequence&gt...
java android
[1, 4]
3,580,255
3,580,256
onclick in jquery
<p>I am trying to use jQuery with PHP, like this:</p> <pre><code>&lt;th bgcolor="#FFCC00" align="center"&gt; &lt;a href="" title="Sort" name="fname" id="fname" &gt;First Name&lt;/a&gt;&amp;nbsp; &lt;?php if($_REQUEST['o']=="fn"){ ?&gt;&lt;img border="0" id="b1" /&gt;&lt;?php } ?&gt; &lt;/th&gt; </code></pre> ...
php jquery
[2, 5]
5,624,120
5,624,121
Problem in assigning js value to php variable
<p>How can i assign a javascript value to a php variable,</p> <p>This is what i want to do:</p> <pre><code>&lt;?php $pag = echo "&lt;script language ='javascript'&gt;var pn = document.getElementById('t').value; document.write(pn); &lt;/script&gt;"; ?&gt; </code></pre> <p>But getti...
php javascript
[2, 3]
1,039,091
1,039,092
ASP.NET C# Graphics Path shape
<p>I'm having a problem generating a certain path for a slightly modified round-corner rectangle. Here is the code I am using for generating the round rectangle:</p> <pre><code> public static System.Drawing.Drawing2D.GraphicsPath RoundedRectangle(Rectangle r, int d) { System.Drawing.Drawing2D.GraphicsP...
c# asp.net
[0, 9]
4,506,819
4,506,820
Is there access to the iPhone accelerometer using Javascript?
<p>I'm starting to try and do some web based game programming for my iPhone, and other web enabled phones that my friends have, and was having a hard time finding information on accessing the accelerometer using Javascript in the browser. </p> <p>With the latest release, I know I've got access to location information ...
javascript iphone
[3, 8]
2,101,442
2,101,443
Where to store the data for jquery?
<p>I have gallery and a custom css drop-down menu to choose a category. If the user does not have javascript enabled, he should be able to click the a anchor without any problems. Otherwise, jquery &amp; ajax are used. My problem is, how do I know the category selected? Storing it as an attribute isn't an option, becau...
javascript jquery
[3, 5]
1,475,678
1,475,679
loading "child page" inside "parent page" through javascript and functionality of "child page" throws ERROR
<p>i have a masterpage. Its content place holder i.e page "parent page", contains a button "Call Batch". On click "Call Batch", the "child page" is loaded in div of "parent page" using javascript without refresh! Now this "Child Page" contains a label and a button. On click of button the text of label shoud change. I w...
c# javascript asp.net
[0, 3, 9]
2,665,560
2,665,561
Toggle effect not working
<p>hello friends i want to use toggle on <code>&lt;li&gt;</code> when one <code>&lt;li&gt;</code> is open i want rest <code>&lt;li&gt;</code> get close i have tried this <a href="http://jsfiddle.net/MbTRD/1/" rel="nofollow">http://jsfiddle.net/MbTRD/1/</a> but its not working as i want</p> <pre><code> $(function () {...
javascript jquery
[3, 5]