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
1,577,105
1,577,106
Javascript DoEvents equivalent?
<p>Here is my shortened code snippet:</p> <pre><code>$(document).ready(function() { $.get("/Handlers/SearchData.ashx", function(data) { json = $.evalJSON(data); }); //do some other stuff //use json data alert(json == null); }); </code></pre> <p>Alert says true because evalJson is not done processing JSON data yet...
asp.net javascript jquery
[9, 3, 5]
4,897,567
4,897,568
How to check if a form has no input fields and if so set the focus to an anchor element
<p>Is there any way to check if a specific form has any input fields in it? Or if it has no input fields?</p> <p><strong>Update:</strong></p> <p>Also how do I return the focus to a button on page load if the condition is met? The below doesn't seem to work</p> <pre><code>var numInputs = $("#forgotPassword").find("in...
javascript jquery
[3, 5]
843,996
843,997
How to check on inserting new values if they already exists?
<p>I have a gridview and sqldatasource to bind data to gridview.</p> <ul> <li>I have 3 columns in database : Name,Age,Birthday.</li> <li>I have 3 textboxes and a button for adding new row with values from textboxes in the data table , gridview.</li> </ul> <p>When I click the button for adding a new row with those inf...
c# asp.net
[0, 9]
4,179,803
4,179,804
playing video in asp.net
<p>here i am working on a project in which a user can upload many videos and can view so now i want to develop something which played video file also on low bandwidth internet connection and i never did such as work before so i don't have any idea about so please suggest me some user tips and techniques.</p>
c# asp.net
[0, 9]
481,966
481,967
How to catch application error outside global.asax?
<p>How to catch application error outside global.asax ? I want to catch unhandled exception outside global.asax </p>
c# asp.net
[0, 9]
1,454,989
1,454,990
Convert string to date in a specific format without time
<p>I have a doubt that when I am converting a String to date then It will return it as:</p> <p><strong>Sun Apr 30 00:00:00 GMT+05:30 2017</strong></p> <p>but I want the format to be as:</p> <p><strong>2017-04-30</strong></p> <pre><code>Date last_date_date = new SimpleDateFormat("yyyy-MM-dd").parse("2017-04-30"); </...
java android
[1, 4]
5,242,516
5,242,517
Send POST array
<p>i wish to send some data as array from my iphone app to server</p> <p>When i was posting single variables before i was sending the post as an NSString </p> <pre><code>NSString *post =[[NSString alloc] initWithFormat:@"userName=%@&amp;accountID=%@&amp;", username,ac...
php iphone
[2, 8]
5,449,180
5,449,181
How to make two inputfields that show the same data?
<p>So I have one input field that needs to pop up in another place when the user changes a tab and presses a button, but I figured tossing the div around would be too much hassle, so is it instead possible to make two input fields but have them display the same input entered by the user?</p> <p>Or is there an easier w...
javascript jquery
[3, 5]
2,958,709
2,958,710
separate each value with comma from multiple select
<p>I have a <code>&lt;select multiple='multiple'</code> and I need to show the selected value in a div or some other part of the page.</p> <p>I did this but the string is all smushed together. How can I separate each value with a comma?</p> <p>I made a <a href="http://jsfiddle.net/2C523/12/" rel="nofollow"><strong>li...
javascript jquery
[3, 5]
3,232,438
3,232,439
Free website heatmap generator script
<p>I know there are commercial offerings that allow developers to drop a javascript file on their website and track / visually see via a heatmap where a users cusor rests and clicks but are there any open source or code samples in asp.net &amp; javascript?</p> <p>Like this..</p> <p><img src="http://i.stack.imgur.com/...
javascript asp.net
[3, 9]
1,405,192
1,405,193
jquery scroll mouse wheel if input has hidden text with text-indent
<p>I have </p> <pre><code>&lt;input type="text" readonly="readonly" style="width: 50px" value="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus viverra ullamcorper tellus, in varius erat mollis in. Suspendisse condimentum turpis sit amet tortor bibendum cursus lobortis enim posuere." /&gt; </code></p...
javascript jquery
[3, 5]
4,913,168
4,913,169
Accessing a Class that is NOT declared in App_Code in ASP.NET
<p>I sometimes define Business Logic classes to "help" my ASPX code-behind classes. It makes the most sense to me to include them both in the code-behind file since they work together. However, I'd occasionally like to access the Business Logic classes from higher level classes defined in App_Code but they aren't aut...
c# asp.net
[0, 9]
2,894,275
2,894,276
external JS does not work
<p>I have the following code:</p> <pre><code>&lt;script language="javascript" type="text/javascript"&gt; $.fn.dataTableExt.oPagination.input = { "fnInit": function (oSettings, nPaging, fnCallbackDraw) { .... }, "fnUpdate": function (oSettings, fnCallbackDraw) { .... } }; &lt;/...
javascript jquery
[3, 5]
312,933
312,934
jQuery help for checking if the asyc behavior is accomplished
<p>I have a function which has a jQuery.post being done, with POST parameters passed to it.</p> <pre><code>function executeFunction(){ jQuery.post("../somefile.php", {executeFunction:true}); } </code></pre> <p>If I'm not wrong, this is async behavior. </p> <p>Elsewhere in the code, I have:</p> <pre><code>execu...
javascript jquery
[3, 5]
393,819
393,820
Launching activities within a tab in Android
<p>Here's the deal. I have an application with three tabs. Through various interactions with the items in the tabs I end up launching other activities. The client has reviewed this and would like the activities launched "within" the tabs, so the tabs remain visible and if the user clicks the tab it goes back to the ori...
java android
[1, 4]
3,197,997
3,197,998
jQuery on submit only fires once
<p>I've got a form that is loaded dynamically, with a textarea that I must check for spam before submitting. So I wrote something like this:</p> <pre><code>$(document).ready(function(){ $('form').live('submit',function(){ if ( $('form textarea').val().match(/https?:\/\/|www\.|\.com/) ) { return...
javascript jquery
[3, 5]
4,841,637
4,841,638
ASP.NET/UserControls: How do I sepparate the "controller" from the "view"?
<p>Is it possible to sepparate the ascx ("view") and the ascx.cs ("controller") pars of a user control. Id like to move the controller part to App_Code to be resued while the view part is changed between projects?</p>
c# asp.net
[0, 9]
1,706,287
1,706,288
getting id passed through a href link in click function
<p>I've got a fairly straight forward question. Why can't I use <code>$('a.view').attr('id')</code> (Ref //1 in code) in my click function? I tried it and it failed to work but <code>this.id</code> works. I guess I primarily want to know the difference in the context of the code below:</p> <p><strong>displayRecord.php...
javascript jquery
[3, 5]
3,378,320
3,378,321
jQuery loop on carousel not working
<p>Adding a loop option does not make my carosel loop!</p> <pre><code>`jQuery('#third-carousel').jcarousel({ vertical: true, loop: true });` </code></pre> <p>Using: /jquery/jquery-1.3.2.min.js</p> <p>Carosel script:http://sorgalla.com/projects/jcarousel/lib/jquery.jcarousel.min.js</p> <p>Can yo...
javascript jquery
[3, 5]
4,578,696
4,578,697
why javascript not work on masterpage
<p>work on asp.net vs 05 C#.Master page header contain the bellow code</p> <pre><code>&lt;script type="text/javascript" language="javascript" src="JScript.js"&gt;&lt;/script&gt; </code></pre> <p>from my one page i call the javascript method </p> <pre><code> &lt;asp:TextBox ID="txtLength" runat="server" &gt;0&lt;/asp...
asp.net javascript
[9, 3]
411,718
411,719
monitoring user's activities using jquery
<p>I am building an examination app, in which i need users to stay on the app and answer some questions. I need to monitor when they fail to do so, like opening a new tab or browser to search for answers. Also when they minimize the app window etc. So is there any way to do this in jquery. Please don't down vote this q...
php jquery
[2, 5]
2,469,985
2,469,986
compare values of cells in different rows in table using jquery
<p>I have a dynamically generated table with php that has same rows. Need to get value from cell 1 in row 1 and value from cell 1 in row 2 and compare them. If they are the same remove entire row or hide... Do that for the whole table... Any help is appreciated.. Thanks!!</p> <p>Haave this so far:</p> <pre><code>var ...
php jquery
[2, 5]
4,761,601
4,761,602
Accessing controls inside a dynamically generated control
<p>I'm creating instances of various controls at runtime in the Page_Load method of another control. The dynamically generated controls are then added to a Placeholder.</p> <p>From inside the dynamically generated controls (in their own Page_Load method) I am trying to set the values of various Literals, but they are ...
c# asp.net
[0, 9]
1,633,532
1,633,533
How to use the ajax() function in JQuery?
<p>In my javascript file I have the following:</p> <pre><code>&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $.ajax({ type: 'post', url: 'script.php', data: '', success: function(output)...
javascript jquery
[3, 5]
3,252,757
3,252,758
How to code iphone web app with PHP/MySQl web server
<p>basically i have a site which made by php and mysql</p> <p>i wanna to develop a iphone webapp (non-native app) to interact with my new mobile site (php+mysql)</p> <p>im not sure how iphone webapp work, can it include the whole site directly?? </p> <p>im quite worry about the connection with mysql database too</p>...
php iphone
[2, 8]
1,972,909
1,972,910
Increment a double value
<p>I'm using this part of code in my system.</p> <pre><code>double countA = 0.00; double countB = 0.00; if (myrow.grade == "A") { countA += 1.00; } else if (myrow.grade == "B") { countB += 1.00; } countALabel.Text = Convert.ToString(countA); countBLabel.Text = Convert.ToString(countB); </code></pre> <...
c# asp.net
[0, 9]
2,025,756
2,025,757
make the drop down menu show from another buttons click
<p>If I click on my <code>a href</code> button how do I make the drop down menu show? </p> <pre><code>&lt;a href="#" onclick"makeIDCarsMenuShow()" &gt;my button&lt;/a&gt; &lt;select name="cars" id="cars"&gt; &lt;option value="volvo"&gt;Volvo&lt;/option&gt; &lt;option value="saab"&gt;Saab&lt;/option&gt; &lt;option va...
javascript jquery
[3, 5]
4,826,575
4,826,576
JavaScript get PHP Variable in URL
<p>How are you? I need some help with javascript</p> <p>I have this code of WHMCS (<a href="http://docs.whmcs.com/Data_Feeds" rel="nofollow">http://docs.whmcs.com/Data_Feeds</a>): {literal}{/literal}</p> <p>{literal} => Run JavaScript in WHMCS Templetes files {/literal} => Finish JavaScript </p> <p>I need to change...
php javascript
[2, 3]
3,511,709
3,511,710
Asynchronous javascript issue
<p>I am trying to create a function which takes values from various html elements of the page to create a string and pass on to a variable. now this works great for all browsers except IE 8 and 9. IE tends to skip the part of fetching the values and goes straight to the variable and finds nothing.. </p> <p>is there a ...
javascript jquery
[3, 5]
4,239,083
4,239,084
Uri.parse() - MediaPath is null
<p>I want to parse a uri string like this:</p> <pre><code>String fileName = playList.get(playListIndex); // fileName = "video1" String uri = String.format("android.resource://%s/R.raw.%s",getPackageName(), fileName); // uri = "android.resource://com.example.fooApp/R.raw.video1" mediaPath = Uri.parse(uri); 02-19 08:41...
java android
[1, 4]
558,015
558,016
Add rows to a table inside a repeater in client side with jquery
<p>I have a repeater which contains a table. I am giving the user the ability to add a new row in the repeater by adding a new row to the table.</p> <p>Can anyone give me ideas? As I am very new to jQuery, can someone give sample code?</p>
c# asp.net jquery
[0, 9, 5]
4,673,434
4,673,435
Get ID from URL with jQuery
<p>I've got a url like this:</p> <pre><code>http://www.site.com/234234234 </code></pre> <p>I need to grab the Id after <code>/</code>, so in this case <code>234234234</code></p> <p>How can i do this easily?</p>
javascript jquery
[3, 5]
5,494,838
5,494,839
How to open and close a popup window after it's completely loaded (in a loop)?
<p>i have something like this for my own little bookmarklet:</p> <pre><code>jQuery('#fire').click(function() { for (counter=0; counter&lt;links; counter++) { var currentLink = jQuery('body').find('.imageWrap:eq('+counter+')').attr("href"); var newWindow = window.open(currentLink); /* and here close the popup whe...
javascript jquery
[3, 5]
3,121,432
3,121,433
a code in javascript or php that captures the time a client uses a computer and what he has been used it for
<p>i was developing a web application which gets what a client is using the computer for and how much he has used the computer. could you please help me generate this code in php or java script.</p>
php javascript
[2, 3]
1,859,766
1,859,767
Help with jQuery validation
<p>I'm having a problem coding for a form validation. I'll post the code below. Basically i want the form to submit if cboAction is on another selection.</p> <p>cboAction has three values, <strong>[Select]</strong>, <strong>Insert</strong> and <strong>Search</strong>. So if Insert is selected in the combobox then the ...
javascript jquery
[3, 5]
1,316,777
1,316,778
Android in Eclipse autocompletes arg0, arg1,
<p>Come on, I know this is simple, but I can't find an answer. When I autocomplete in Android in Eclipse, the methods get param names like arg0, arg1, etc. Presumably, this would be better if I had source or something for Android located somewhere, but there are 14,000 git repositories for it and I don't know which t...
java android
[1, 4]
2,057,809
2,057,810
set javascript array from DataTable in code behind
<p>Im trying to set an array in <code>Javascript</code>, and then give it values from the <code>DataTable</code> in the code behind like that :</p> <pre><code>for (var i = 0; i &lt; '&lt;%=dt_questionVideo.Rows.Count - 1 %&gt;'; i++) { videoQarray[i] = '&lt;%=Convert.ToInt32(dt_questionVideo.Rows['+i+'][0]) %...
c# javascript asp.net
[0, 3, 9]
1,659,335
1,659,336
select random value NOT in array
<p>How would I select a random value (0 to 30) that is not in this array?</p> <pre><code>var list = new Array(1,3,4,7,8,9); </code></pre>
javascript jquery
[3, 5]
5,700,081
5,700,082
Use JQuery to set css file body background url
<p>I'm trying to change my body's background dynamically in a jQuery window resize event. The below is a simplified example that attempts to set the body background url property when the page loads, but its not the right syntax. Any ideas?</p> <p>test.css:</p> <pre><code>body { margin: 0px auto; font-family:...
javascript jquery
[3, 5]
4,938,642
4,938,643
Commenting parts of a blog post or document with jquery
<p>I am interested in making an addon to an existing site where there is a system where users can post information, sort of like a blog post, and then regular comments like you see on any page are shown below the content of the post.</p> <p>However I have been considering using something like this <a href="http://www....
javascript jquery
[3, 5]
5,198,512
5,198,513
jQuery reset count on key press after partial postback
<p>I have a <code>TextBox</code> inside an asp.net <code>UpdatePanel</code> that records the number of key presses with some jquery</p> <pre><code>$(document).on("keypress", "#TextBox",function() { $("#KeyPressCount").val(i += 1); }); </code></pre> <p>I do a partial postback after a button click inside the Upda...
jquery asp.net
[5, 9]
2,049,676
2,049,677
Replace image url in ASP.NET image button using JQuery?
<p>I am working in asp.net and mysql. Will shows the details of rooms in page with images that getting for mysql database,. In the Main Image will change when i click the small size image buttons. </p> <p>I want to replace the Image1 ImageUrl "~/GetRoomImage.aspx?id=1" to "~/GetRoomImage.aspx?id=2" or "~/GetRoomImage....
jquery asp.net
[5, 9]
5,677,555
5,677,556
writing JavaScript with PHP
<p>I am trying to right some some JavaScript to define a variable using PHP. The variable has a little jQuery in it which should get rendered by the client. I say "should" but really mean I want it to. What should I do to make o2 the same as o1 (i.e. covert the jQuery)?</p> <p>Thank you!</p> <pre><code>&lt;!DOCTYPE...
php javascript
[2, 3]
1,214,413
1,214,414
How to make something load first before another in javascript and jquery
<p>I have a div with text in it and a background image. When I load the page the text always appear 1st(assume i have low speed internet connection). How can i make the background image load before text? Can You please give me solution in both jquery and javascript</p>
javascript jquery
[3, 5]
4,440,150
4,440,151
How can I interact java program using python
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/9333637/how-to-execute-java-program-using-python-considering-inputs-and-outputs-both">How to execute java program using python considering inputs and outputs both </a> </p> </blockquote> <p>I want my python vari...
java python
[1, 7]
1,203,388
1,203,389
Need help regarding submitting values through a form with select Box?
<p>I have a empty select box on a form. </p> <p><code>&lt;select id='essentialDocs[]' &gt;&lt;/select&gt;</code></p> <p>through some script i add options to it. Basically it adds URL's. So at runtime html will look like </p> <pre> <code>&lt;select id='essentialDocs[]' &gt; &lt;option value='http://www.google.com' ti...
php javascript
[2, 3]
5,614,762
5,614,763
Getting the first table cell value in a column with jQuery
<p>I have a table with some values. The first row and first column contain values of such called vertical and horizontal sizes respectfully. What I need to do is to click on a table cell and get the horizontal and vertical values for that clicked table cell. What it basically means - get the value of first table cell i...
javascript jquery
[3, 5]
207,207
207,208
How to use .append on a jQuery .load() function
<p>I'm trying to append the data being called rather than replacing it but I'm not sure why .append isn't working.</p> <pre><code> $('.incoming3').load('t3.html #test3').append; </code></pre>
javascript jquery
[3, 5]
31,014
31,015
Asp.Net Page Load
<p>i have a weird problem ! i have ASP.NET website and i have a page with page_load which never get executedno matter what i do ,i deleted the page_load and doubled clicked the aspx page it generated page_load again i inserted my code inside and made breakpoint but it never get hit ! </p> <p>All other Methods gets hit...
c# asp.net
[0, 9]
460,481
460,482
Javascript storing data
<p>Hi I am a beginner web developer and am trying to build the interface of a simple e-commerce site as a personal project.The site has <strong>multiple pages with checkboxes</strong>.</p> <p>When someone checks an element </p> <ul> <li>it retrives the price of the element and </li> <li>stores it in a variable.</li> ...
javascript jquery
[3, 5]
5,637,955
5,637,956
Android: Repeat a dispatchKeyEvent while while a button is selected, focused, or pressed
<p>My layout contains a button and an editText view. While the button is held down I want to have a keyboard key pressed over and over again until the button is released. Here is the basic concept:</p> <pre><code>while(button is held down){ dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent....
java android
[1, 4]
621,254
621,255
setInterval and clearInterval not working with if()
<p>I am trying to do an AJAX refresh every 7 seconds on some data coming into an AJAX results <code>div</code>. </p> <p>I need to control when it happens as I have lots of events like text editing and draggable stuff done through jQueryUI. I set up a function with a condition and an <code>if</code> statement to either...
javascript jquery
[3, 5]
680,853
680,854
On JavaScript + asp.net
<p>In my asp.net page i have java script calendar,on which i want the selected date &amp; then that date has to passed to the code behind's method. How should it be done???</p>
asp.net javascript
[9, 3]
3,701,364
3,701,365
casting php arrays to c# hashtables
<p>I have some multi-dimensonial php arrays being passed down to my c# app. To pull values out on the c# side, i have to do something like:</p> <pre><code>String example = (string)((Hashtable)((Hashtable)example_info["FirstLevel"])["SecondLevel"])["example_value"]; </code></pre> <p>How would I go about removing the ...
c# php
[0, 2]
1,486,995
1,486,996
Changing the datatype of column in datatable changes the cell text
<p>Ok, I start off by importing an excel file and then save the data into Data table and then putting it into Gridview. I wanted to copy the column header name into a row cell and it was giving error that Input string was not is a correct format. I tried changing the column data type and it works. But the data copied i...
c# asp.net
[0, 9]
2,959,801
2,959,802
Check all fields together?
<p>There are three field. i want check each a of field if have value, show class <code>.koko</code>. if on all field not have value, hide class <code>.koko</code>.</p> <p>How is it?</p> <p>in the this code, each field is check separate but i want check all fields together:</p> <pre><code>&lt;input type="text" name="...
javascript jquery
[3, 5]
574,359
574,360
How to populate listview adapter from outside Activity in a TabActivity
<p>I have the following problem.</p> <p>I am in a tabActivity with 2 tabs. Every tab will launch the same activity, but there is a onTabChangeListener. In this tabchange listener i need to set up the listview adapter that is different for each activity. So i will have two different lists, and i want to change their ad...
java android
[1, 4]
4,557,838
4,557,839
More efficient way script the heights of DIVs
<p>Im using this script to find the height of a DIV. I am using it on more than one DIV. Is there a more efficient way to write this code?</p> <pre><code>$(document).ready(function() { $(".block00").height($(".subheader").height()); $(".block01").height($(".subheader").height()); $(".block02").height($("...
javascript jquery
[3, 5]
5,714,313
5,714,314
Execute ajax call right after all fields are filled
<p>So I need to check all the fields first:</p> <pre><code>&lt;script type="text/javascript"&gt; &lt;!-- $(document).ready(function(){ $("#loginform").submit(function(){ </code></pre> <p>LIKE:</p> <pre><code> //CHECK INPUT $('#loginform :input:not(:button)').each(function(n,element){ ...
javascript jquery
[3, 5]
5,380,644
5,380,645
Is this a proper Android Game Loop?
<p>I grabbed this from the book I'm learning from.</p> <pre><code>public void run() { // this is the method that gets called when the thread is started. // first we get the current time before the loop starts long startTime = System.currentTimeMillis(); // start the animation loop while (running)...
java android
[1, 4]
5,253,193
5,253,194
Develop an android and iPhone application with shared database
<p>I have a great idea for smartphone application, And I want to develop an application suited for both android and iPhone. In addition I need to use spatial database for geo indexing that will be shared for both applications. I am new to this app world and I have some questions.</p> <ul> <li>Is there away to develop ...
android iphone
[4, 8]
3,384,167
3,384,168
$(this).attr() not working
<p>I'm testing a script that will allow my classmates to upload a picture and I'm using this code:</p> <pre><code>var SomeVar = this.class //or similar like this.attr('class') $('body').attr('style', 'background-image:' + SomeVar) </code></pre> <p>However, when I'm testing this code:</p> <pre><code>function Prueba()...
javascript jquery
[3, 5]
2,144,224
2,144,225
Strip away all HTML tags and formatting (RegEx)
<p>I have RSS feed that I want to modify on fly, all I need is the text (and linefeeds) so everything else must be removed ( All images, styles, links )</p> <p>How can I do this easily with ASP.NET c#</p>
c# asp.net
[0, 9]
2,583,363
2,583,364
alternate row in classes exculde display none in jquery
<p>I have a list of <code>li</code> in a <code>ul</code> to apply css class, I am using following code.</p> <pre><code>$('#' + firstContainer + ' li:nth-child(even)').addClass('AltRow'); $('#' + firstContainer + ' li:nth-child(odd)').removeClass('AltRow'); $('#' + secondContainer + ' li:nth-child(even)').addClass('Alt...
javascript jquery
[3, 5]
6,011,305
6,011,306
Long running thread + lifecycle
<p>I have a long-running thread which I start on app startup:</p> <pre><code>public class MyHelper extends Thread { private AtomicBoolean mRun; public void run() { while (mRun.get()) { ... } } } public class App extends Application { private MyHelper mHelper; public vo...
java android
[1, 4]
5,470,892
5,470,893
Does ready() execute asynchronously?
<p>This is a common idiom:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script&gt; (function($) { $(document).ready(function(){ // some jQuery/JavaScript in here } })(jQuery); &lt;/script&gt; &lt;/head&gt; .... </code></pre> <p>So we using a JavaScript immediate function which exe...
javascript jquery
[3, 5]
2,581,865
2,581,866
why there is no power operator in java / c ++?
<p>While there is such operator - ** in Python , i was wondering why java and c++ havent got one too.</p> <p>It is easy to make one for classes you define in C++ with operator overloading ( and i believe such thing is possible also in java) , but when talking about primitive types such as int, double and so on , yo...
java c++ python
[1, 6, 7]
1,508,917
1,508,918
Pass array in jQuery ajax
<p>My imaginery code:</p> <pre><code>$(document).ready(function() { $("#sub").click(function() { info['moto'] = $("#moto").val(); info['motox'] = $("#motox").val(); $.ajax({ type: "POST", url: "index.php", data: "arr="+info, success: functio...
php jquery
[2, 5]
3,590,628
3,590,629
how to write php variable inside a javascript code
<p>this is the path i'm using in an img src attribute which i'm using in a php program</p> <pre><code>'user/hangout_images/".$imag_addr." ' </code></pre> <p>can anybody tell how to insert the path given above into the path given in the following javascript code?</p> <pre><code>$(document).ready(function() { $('#im...
php javascript
[2, 3]
90,865
90,866
How to show only part of map on screen
<p>I'm developer of game Space STG II for Android phones... and I want to add to this game new option. To do this I need to know how to do movable screen. I want to do a battle like in Heroes Might &amp; Magic, but in mobile phone screen is small... I don't know how developers show only a part on screen of all things o...
java android
[1, 4]
773,852
773,853
jQuery and Object Oriented Javascript - How do I do it properly?
<p>I'm quite experienced with jQuery but I'm just getting into object oriented Javascript and want to make sure I'm doing it right.</p> <p>Here's an example of what I'm doing so far... I'd appreciate tips/advice on how I can improve my approach:</p> <pre> // create a class for collapsable fieldsets window.Collapsable...
javascript jquery
[3, 5]
5,538,081
5,538,082
Multiview Vrs Multiple aspx pages - which one is better..?? (regarding speed..)
<p>Hii.. I am using a Multiview for a application. Each aspx page contains Multiview.</p> <p>A single multiview contains atleast 5 to 6 views. (so less no. of aspx pages). When user clicks any button such as say "Edit View" (where user can edit his entries), a diffrent view is displayed. So user feels that he is redir...
c# asp.net
[0, 9]
5,464,004
5,464,005
SPLIT with \n Delimiter
<p>I need to split string with delimiter of <code>\n</code> when I use this code:</p> <pre><code>String delimiter = "\n"; String[] temp; temp = description2[position].split(delimiter); for (int i = 0; i &lt; temp.length; i++) { holder.weeklyparty_text3.setSingleLine(false); holder.weeklyparty_text3.setText(tem...
java android
[1, 4]
1,734,719
1,734,720
Are there any general listeners defined in Android or Java
<p>Sometimes I want a simple generic Listener without defining my own class. Is there a predefined "something happened and here is a string or object or whatever" in Java or Android?</p>
java android
[1, 4]
1,274,767
1,274,768
How to dynamically create and add textbox to a placeholder using AJAX?
<p>I'm trying to create text box dynamically. so I cal it through the AJAX function. </p> <p>This is my code:</p> <p><strong>Ajax function</strong></p> <pre><code>function ChangedAdults(noofAdults) { alert(noofAdults.value); $.ajax({ type: 'POST', dataType: 'json', url: "/FlightBook...
c# asp.net
[0, 9]
714,858
714,859
Remove parent but keep children using jQuery
<p>I would like to remove the parent and keep the children in my HTML using jQuery. This works:</p> <pre><code>$('#my_span').children().insertBefore('#my_span').end().end().remove(); </code></pre> <p>However, it removes the text and comment node types - how can I amend this so that I keep the text?</p> <p>Happy to d...
javascript jquery
[3, 5]
753,537
753,538
Facebook login notification
<p>I want to run my application which greets user as soon as user login to facebook. So i need some way to find whether user is logged on to facebbok. As soon as logged on i want something to send notification to my app or to start my app. I there any way?</p>
php javascript c++
[2, 3, 6]
4,632,599
4,632,600
Adding Input Field to form
<p>I was trying to use this:</p> <p><a href="http://jsfiddle.net/jaredwilli/tZPg4/4/" rel="nofollow">Fiddle</a></p> <p>But it seems that the jQuery version he is using is quite outdated.</p> <p>However, the only necessary update I see in his code is to change <code>.live()</code> to <code>.on()</code>. But the remov...
javascript jquery
[3, 5]
5,311,199
5,311,200
loosing session variable on popup
<p>I am loosing the data stored in the session variable when I try to open the popup from the hyperlink. Below is my code</p> <pre><code> &lt;asp:HyperLink ID="HyperLink1" runat="server" Target="_blank" NavigateUrl='&lt;%#"~/Viewer/DetailsViewer.aspx?ID=" + Eval("Id") + "&amp;QueryID=" + Request.QueryString["QueryID...
c# asp.net
[0, 9]
4,079,802
4,079,803
android-java error
<p>i am trying a develop a application..following is a snippet </p> <pre><code>class metro_nodes { public String station; public GeoPoint point; } public class mainscreen extends MapActivity { /** Called when the activity is first created. */ MapController controller; double latitude,longitude; LocationManager loc; ...
java android
[1, 4]
5,081,706
5,081,707
search for element within an array
<p>My <code>data[l][m]</code> contains <code>1,2,3,4,5</code> I'm trying to search for a particular number, say '2' in it. Is there a better way to do this?</p> <pre><code>for (var n = 0; n &lt; data[l][m].length; n++) { if(data[l][m][n] == num){ // num is equal to '2' number = data[l][0]; document...
javascript jquery
[3, 5]
714,652
714,653
How to trigger onclick event after received return value from popup which using add attribute a javascript?
<p>How to trigger onclick event after received return value from popup aspx which using add attribute a javascript?</p> <p>After adding .Attributes.Add("onClick", "return popWin('" + NewBatchNo_TextBox.Text + "');");</p> <p>Original onclick event do not fire?</p> <p>if this method can not work, any other method to g...
c# asp.net
[0, 9]
5,634,101
5,634,102
Rate button in my main.xml
<p>I want to add one button to my main.xml for redirecting the user to rate my app. i am programming my activity with a switch method cause i have a lot of buttons doing differents things, but i don't know how to make a button to rate my app.</p> <p>If someone can give me an example.</p> <p>thank you.</p>
java android
[1, 4]
2,548,362
2,548,363
Get information from website for Android
<p>I want to make an application that compare pizza prices. To do that I have to go to the actual site and enter and search. How can I display the prices WITHOUT the user seeing the actions of going to the website and entering a search. Would I use a WebView and a WebViewClient?</p>
java android
[1, 4]
5,545,284
5,545,285
how to make PHP server sends data to an Android device
<p>I want the Android device to send data to a PHP server. After receiving, the PHP server sends other data to Android. The first part can be done by using JSON. However, I don't know how to make the PHP server sends data to Android. Sorry, I am new to PHP! </p>
php android
[2, 4]
2,690,734
2,690,735
Will Java catch up with C#?
<p>Today I posted a question asking about which language C# or Java would be better for me to study. I had some great answers. One thing that came up was that perhaps Java is now rather behind C# with new features. I saw some web links and most pointed out what C# had and what java did not have. </p> <p>So my question...
java c#
[1, 0]
3,583,976
3,583,977
How do I hide the ScrollView scrollbar faster than the default?
<p>How do I change the delay before the scrollbar on a ScrollView is hidden? I want it to hide instantly after scrolling. I tried android:scrollbarDefaultDelayBeforeFade="0" but it still sticks around and i have to either wait for it to disappear or click twice to click a button inside the ScrollView.</p>
java android
[1, 4]
4,032,359
4,032,360
Android login authentication to remote MySQL database
<p>Here's my java code:</p> <pre><code>btnLogin.setOnClickListener(new View.OnClickListener() { @Override $public void onClick(View v) { ArrayList&lt;NameValuePair&gt; postParameters = new ArrayList&lt;NameValuePair&gt;(); postParameters.add(new BasicNameValuePair("username", txtUsername.getText().to...
java android
[1, 4]
3,664,361
3,664,362
Java String to JS
<p>so I have a Java Applet and I want to pass a string within the Java Applet to Javascript, how do you do this? Is it even possible? I tried searching google but it only showed examples of passing a JS string to Java, not Java to JS, the String is in a method </p> <pre><code>public String calc(String ans2) </code></...
java javascript
[1, 3]
1,347,854
1,347,855
how to cache a dataset when database table being update
<p>I need to use caching in my project. The problem is that, When page is firstly load ı cached a dataset. Then after after I update or insert a new record in table. my dataset returns from the cached records. The question is that, How can i update cache values when the table is being changed in database </p>
c# asp.net
[0, 9]
410,772
410,773
Remove table row that contains a table
<p>I have html that displays a table similar to:</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;th&gt;col1&lt;/th&gt; &lt;th&gt;col2&lt;/ht&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;0001&lt;/td&gt; &lt;td&gt;Test&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="2" id="detailsTable"&gt; &lt;table&g...
javascript jquery
[3, 5]
829,226
829,227
how to fire TextChanged after all validations are successful
<p>Is there any way to fire the <code>TextChanged</code> event of a text box after all validation has succeeded. I have a text box which has 2 validators, but as I set my <code>autopostback=true</code> for the text box it is firing the event.</p> <p>What I would like to have it fire the event after all validation is s...
c# asp.net
[0, 9]
2,040
2,041
access php array in jquery
<p>I have 4 divs and on mouseover of each, I want the <code>src</code> of an <code>img</code> to change.<br> I have to get the images from <strong>PHP</strong>.<br> How can I use the array that I get in <strong>PHP</strong> over in my jQquery script?<br> And I know with just 4, I could just set up the array in javascri...
php jquery
[2, 5]
4,804,168
4,804,169
casting PyCFunctionWithKeywords in PyMethodDef
<p>Recently I've been wrapping a lot of C++ code in python, and I find this block (taken directly from the <a href="http://docs.python.org/extending/extending.html#a-simple-example%5d" rel="nofollow">python documentation</a>) a bit troubling: </p> <pre><code>static PyMethodDef keywdarg_methods[] = { /* The cast of the...
c++ python
[6, 7]
5,254,920
5,254,921
Get item from entity framework by ID
<p>Simple question. I have entity Customer in my edmx model. I need to get the customer with Id = 20 in c#. How do I do that?</p>
c# asp.net
[0, 9]
5,104,307
5,104,308
Select all text on focus using jQuery
<p>I have a little jQuery function that is meant to automatically select text in an asp.net text box when it gets focus. However, the text in the text box gets selected, but immediately then deselects.</p> <p>The code works if i bind to the focus event with .focus(function()) but I am adding the text boxes to the page...
jquery asp.net
[5, 9]
1,402,832
1,402,833
Android color picker - updating color array
<p>I'm trying to create a color picker for Android that looks like a minimalistic version of Gimp's. So, it has a hue slider and a rectangle with saturation/value variants of a color chosen in hue slider.</p> <p>Question: what is the best way to create the rectangle?</p> <p>Right now, I'm creating an 200x200 array of...
java android
[1, 4]
5,744,538
5,744,539
Run custom Javascript whenever a client-side ASP.NET validator is triggered?
<p>Is there a way to run some custom Javascript whenever a client-side ASP.NET validator (RequiredFieldValidator, RangeValidator, etc) is triggered? </p> <p>Basically, I have a complicated layout that requires I run a custom script whenever a DOM element is shown or hidden. I'm looking for a way to automatically run t...
asp.net javascript
[9, 3]
4,724,047
4,724,048
After iScroll initialization in mobile web app ... textbox is not editable
<p>I am making mobile web app in Html, css, javascript, jquery . I am initializing iScroll on page .<br> iScroll is working fine .<br> Page contains textbox . It becomes not editable after iScroll intialization. even z-index isn't useful here. </p>
javascript jquery
[3, 5]
2,759,041
2,759,042
My pagination for my Slides.js slider won't link to each slide when clicked
<p>I get the error:</p> <p>TypeError: $(this).children("span").attr("id") is undefined</p> <p>when I try and click on my pagination bullet on my slider that I'm using <code>Slides.js</code> for.</p> <p>Any help would be appreciated! Thanks.</p>
javascript jquery
[3, 5]