Unnamed: 0
int64
302
6.03M
Id
int64
303
6.03M
Title
stringlengths
12
149
input
stringlengths
25
3.08k
output
stringclasses
181 values
Tag_Number
stringclasses
181 values
2,028,598
2,028,599
Set Selectbox value after refresh with Jquery / Javascript?
<p>I'm have a problem with this code not working when it probably should be:</p> <pre><code>&lt;script language = "javascript"&gt; $(document).ready(function() { $('#dept').change( function() { var datas = $(this).val(); $.cookie("deptdata", datas); var urlDept = 'catch.cfm?dept=' + datas; $.ajax({ type: 'post', url: urlDept, success: function(){ window.location.replace(''); var datasR = $.cookie("deptdata"); $("select#dept").val(datasR); } }); }); }); &lt;/script&gt; </code></pre> <p>I have these included:</p> <pre><code>&lt;script type="text/javascript" src="js/jquery-1.4.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery-ui-1.8.2.custom.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/cookie.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="a_scripts.js"&gt;&lt;/script&gt; </code></pre> <p>Form:</p> <pre><code>&lt;form&gt; &lt;select name="DeptCode" id = "dept"&gt; &lt;option value="NONE"&gt;Choose a Department &lt;cfoutput query="getDepartments"&gt; &lt;option value="#DeptCode#"&gt;#DeptName#&lt;/option&gt; &lt;/cfoutput&gt; &lt;/select&gt; &lt;/form&gt; &lt;cfoutput&gt;#session.deptcode#&lt;/cfoutput&gt; </code></pre> <p>What should be happening is: when a department is selected the page changes the session value via ajax (this works) to the one selected. However, I have to refresh the page for the query to work for another part of the page. So I wanted to cache the value of the select and reassign it to be selected after the page refreshes. (So it keeps the item selected).</p>
javascript jquery
[3, 5]
227,875
227,876
How to append the HTML results of a URL call to the DOM?
<p>I have a URL that resides on another domain, like this:</p> <pre><code>http://ads.adserver.com/ad?site=1233&amp;zone=45435 </code></pre> <p>When you type this URL in the browser, the result is HTML like this:</p> <pre><code>&lt;a href="http://www.google.com" target=""&gt;&lt;img src="htt://ads.adserver.com/i/image.gif" border="0"/&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://ads.adserver.com/redir/12313" target=""&gt;Test&lt;/a&gt; </code></pre> <p>The above renders as an image wrapped in a link with a second link below it.</p> <p>I tried to capture this URL in a script tag and append it to the DOM, but it does not render the HTML above.</p> <pre><code>var ad_script = document.createElement('script'); ad_script.type = 'text/javascript'; ad_script.src = 'http://ads.adserver.com/ad?site=1233&amp;zone=45435'; li.appendChild(ad_script); </code></pre> <p>Are there any other ways of invoking this URL and putting the result on the page? I can't use $.getScript() since I'm not invoking this in the global context. I need this HTML to appear exactly where I want it to appear.</p> <p>EDIT: The only reason I am trying this route is that the third-party does not provide a JSON-P interface.</p> <p>EDIT2: Unfortunately, I am not on an application server.</p> <p>EDIT3: This is for iPhone.</p>
javascript jquery iphone
[3, 5, 8]
400,650
400,651
Is there a way to revert the Jquery drag-drop draggable to its original position if it fails validation?
<p>I am trying to understand how to get this to work and I am unsure...</p> <p>I have multiple parent divs (the droppables) and multiple child divs (the draggables).</p> <p>The child divs contain a form and the form contains many input tags.</p> <p>All of the input elements are required and I want user to enter a value in it. If they are empty and user does not enter value in it and if the user drags any one of them within any parent div, I want the child div to be validated. If the validation fails then I want the child div to revert back to its location.</p> <pre><code>$( ".parent" ).droppable({ accept: ".child", activeClass: "ui-state-hover", hoverClass: "ui-state-active", tolerance:'pointer', drop: function( event, ui ) { //validate and then reject if it fails??? $( this ) .addClass( "ui-state-highlight" ) .find( "p" ) .append(ui.draggable).animate({width:'100',height:'100'}); } }); $( ".child" ).draggable();​ </code></pre> <p>I can't figure out how to implement this Example: </p> <pre><code>http://jsfiddle.net/Dyawa/7/ </code></pre> <p>Is it possible for child div to revert back to its original position if the name of the child is empty?</p>
javascript jquery
[3, 5]
6,017,759
6,017,760
different small js files per page VS. 1x site-wide js file?
<p>Different pages of my site have different js needs (plugins mainly), some need a lightbox, some dont, some need a carousel, some dont etc.</p> <p>With regards to pageloading speed should i </p> <p><strong>option 1 - reference each js file when it is needed:</strong></p> <p>so one page might have:</p> <pre><code>&lt;script type="text/javascript" src="js/carousel/scrollable.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery.easydrag.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/colorbox/jquery.colorbox-min.js"&gt;&lt;/script&gt; </code></pre> <p>and another have:</p> <pre><code>&lt;script type="text/javascript" src="st_wd_assets/js/carousel/scrollable.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="st_wd_assets/js/typewatch.js"&gt;&lt;/script&gt; </code></pre> <p><strong>option 2 - combine and compress into one site_wide.js file:</strong></p> <p>so each page would reference:</p> <pre><code>&lt;script type="text/javascript" src="js/site_wide.js"&gt;&lt;/script&gt; </code></pre> <p>there would be unused selectors/event listeners though, how bad is this? I would include any plugin notes/accreditations at the top of the site_wide.js file</p>
javascript jquery
[3, 5]
32,970
32,971
button toggles between states
<p>I was wondering if anyone knew of some code which implements two buttons where one is just plain text and the other is say a link. When the user clicks on the link the other text becomes a button and vice versa when the user clicks the link again.</p> <p>Think of it like this: One link is active the other isn't. One is a listview link and the other is a gridview text and when you click listview that link becomes text and the gridview text becomes a link. Does anyone know of an example that implements this kind of behavior or can someone show me an example in jQuery?</p>
javascript jquery
[3, 5]
4,604,369
4,604,370
can't call String.isEmpty() in android
<p>In my android application I can't use <strong><em>String.isEmpty()</em></strong> function which is situated in JDK 1.6. Android 2.1 lib doesn't have this function in java.lang.String class</p> <p>I tried to input JRE System library to my project, because it has this function, but there was no effects.</p> <p>How can I solve this problem and allow my application to use this function?</p>
java android
[1, 4]
3,810,429
3,810,430
InvalidOperationException - Can you get more information out of it?
<p>I am trying to track down and error that a user had on an ASP.NET 3.5 web page. The whole error is the standard "Could not find a row that matches the given keys in the original values stored in ViewState. Ensure that the 'keys' dictionary contains unique key values that correspond to a row returned from the previous Select operation." upon updating. I understand that this means that the viewstate is complaining that it thinks there are options being posted back from the dropdown boxes that are not valid. </p> <p>Here is the twist, the code for the production page hasn't been changed for almost a whole year. This is the first time this error has ever occurred according to the aspnet_WebEvents_Events table of the production page. So what I did is pulled up the project locally and made a copy of the user's data via SQL query on the local server. It didn't break. So I assumed that the source had been changed and not deployed. To make a long story short, I ended up making a copy on the production server for the user and changing the UserID on the bad version via SQL query again. The user thinks it is fixed and all is well but the original copy that breaks continues to break. I can not recreate this error even though I have what are exact copies of the bad rows via SQL query. Is there any way to get more information about this error? Is it possible to have the LinqDataSource tell me exactly which value it thinks is bad? TIA!</p>
c# asp.net
[0, 9]
2,795,154
2,795,155
Force picker view to pop up using Javascript on iPhone
<p>When you touch on a menu item in a web page on the iPhone, a picker view appears that allows you to select from the values that are in the menu.</p> <p>I have a web page with a menu, but I'm trying to get the picker view to appear programmatically rather than have the user touch it first. This is my form </p> <pre><code>&lt;form id="myForm"&gt; &lt;select id="mySelect"&gt; &lt;option value="a"&gt;a&lt;/option&gt; &lt;option value="b"&gt;b&lt;/option&gt; &lt;option value="c" selected&gt;c&lt;/option&gt; &lt;option value="d"&gt;d&lt;/option&gt; &lt;option value="e"&gt;e&lt;/option&gt; &lt;/select&gt; &lt;/form&gt; </code></pre> <p>I've tried the click() function on "mySelect" and I've tried adding focus first as below</p> <pre><code>$(document).ready(function() { $('#mySelect').focus(function() { $('#mySelect').click(); }); }); </code></pre> <p>but nothing seems to work. I've tried this in Safari without success either, so it probably not webkit-specific.</p> <p>What am I doing wrong?</p>
javascript jquery iphone
[3, 5, 8]
1,259,933
1,259,934
How to read html content of Ajax based site
<p>I would like to know how the HTML source of ajax based sites can be read using HttpWebRequest / HttpWebResponse (That is reading the contents of a website at server side). The problem that I'm facing is that I'm unable to read parts of the webpage which uses Ajax or stuffs like UpdatePanel.</p> <p>My application is in ASP.NET / C#, so can't think of using stuffs like Browser control or mshtml.dll since I would not be able to serve multiple requests.</p> <p>Thanks in advance.</p>
c# asp.net
[0, 9]
1,279,320
1,279,321
jQuery posts version in AJAX call
<p>I have a simple script that gets the value of a textarea and posts this via AJAX. If I post "??" I get strange values. If I log out the value it retrieves before posting it all is correct. But the POST data my script receives includes the jQuery version number. My code and results are are below. Should I be escaping this somehow ?</p> <pre><code>var value = $("#textarea").val(); $.ajax({ url:'index.php', type:'POST', data:'text='+value, dataType:'JSON', success:function(data){} }); </code></pre> <p>My post data comes through as "jQuery17106460378167700797_1345234676316" for the value of text.</p>
php javascript jquery
[2, 3, 5]
2,076,093
2,076,094
i want to make function for 6 edittext boxes in android which includes all properties of edittext so that i can just simply call function
<p>i have 6 edittext boxes i want to make a function for that 6 edittext boxes so that i can simply call that function instead of defining edittext boxes all the times. here is d code of edittext boxes ....</p> <pre><code>TableLayout t1=(TableLayout)findViewById(R.id.table_layout01); TableRow tr1=new TableRow(inventory.this); tr1.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT)); EditText ed6=new EditText(inventory.this); ed6.setTextColor(Color.BLACK); ed6.setText("1"); tr1.addView(ed6); EditText ed7=new EditText(inventory.this); ed7.setTextColor(Color.BLACK); ed7.setText("2"); tr1.addView(ed7); EditText ed8=new EditText(inventory.this); ed8.setTextColor(Color.BLACK); ed8.setText("3"); tr1.addView(ed8);.............(3 more edittext same like these) </code></pre>
java android
[1, 4]
4,481,914
4,481,915
Store and retrieve arrayList from internal memory?
<p>I'm building a home replacement app. I need to store the ArrayList with the apps the user picked to show on the launcher in the internal memory. I mean the array mustn't be deleted when the app is closed.</p> <p>I'm very close to finishing the app and I don't think I'll work a lot more on Java, I'm not a programmer so I just want the easiest way to do it. How can I store and retrieve an ArrayList in the internal memory?</p>
java android
[1, 4]
4,274,370
4,274,371
variable not accessible outside success function
<p>this function gets a question from a database and is supposed to return it. The database is a Parse object(https://www.parse.com/docs/js_guide). As indicated in the comments in the code the question is accessible from within the success function of the db call but not from outside it and simply putting the return statement inside the success block doesn't work either. Code below. Any suggestions? </p> <pre><code>function getQuest(){ var Question = Parse.Object.extend("Question"); var query = new Parse.Query("Question"); var questlist = []; var newquestion; //get list of questions if chosen track is python or java. track is set globally if (track == "python") { query.equalTo("track", "xstsysysus7"); } else if (track == "java"){ query.equalTo("track", "XAWqBgxFAP"); } query.find({ success: function(questions){ // return list of questions var i = Math.floor(Math.random()*10); newquestion = questions[i].get('question'); console.log(newquestion); // works here }, error: function(error){ console.log(error.message); } }); console.log(newquestion); //returns undefined here return newquestion; } </code></pre>
javascript jquery
[3, 5]
1,034,038
1,034,039
Multiple grep for a single array/ Faceted search
<p>I have a long array with multiple items per object and I have to start to exclude items depending on what someone selects as a check box, you can see a basic idea working here</p> <p><a href="http://jsfiddle.net/caseybecking/QwtFY/" rel="nofollow">http://jsfiddle.net/caseybecking/QwtFY/</a></p> <p>My question is how do I start to narrow the list without having to do a check on how man y items they have checked, also this doesn't work if they check multiple items per "Fit" or "Wash"</p> <p>To elaborate further my objectives. I need to store object(s) that only contain the specific item(s) the user wants to FILTER down to. All this is is a ginat filter of multiple pieces of a long array.</p>
javascript jquery
[3, 5]
4,656,534
4,656,535
australia post tracking API integration
<p>we are developing online shopping site and we are using australia post as our shipping method. so we are also using tracking system for australia post.</p> <p>Can any one tell me how can i integrate australia post API for tracking.</p> <p>Thanks in advanced,</p>
c# asp.net
[0, 9]
1,896,360
1,896,361
How do you move html from one div to another with Jquery without breaking javascript
<p>I have two divs for different sections of my webpage, a working and a reference section. One is fixed size, the other is variable sized and they are vertically stacked. I am trying to design it so that if you want to work on something in the reference pane, you click a link and it swaps all the data between the two panes. My idea was to do the following:</p> <pre><code>var working = $("#working_pane").html(); var ref = $("#reference_pane").html(); $("#working_pane").html(ref); $("#reference_pane").html(working); </code></pre> <p>The problem with this, is it seems that any javascript referenced inside of these panes (for example, in place editors) get broken upon switching. No javascript errors occur, it's just that nothing happens, like the javascript ties are broken.</p> <p>Is there any to move the html without breaking the javascript contained?</p>
javascript jquery
[3, 5]
5,721,503
5,721,504
Finding an element in a javascript array and returning the position of the matched element
<p>I'm plucking my brain away at this but was hoping someone could help after several failed attempts.</p> <p>I have an HTML list like this:</p> <pre><code>&lt;ul&gt; &lt;li&gt;&lt;span class="current"&gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="normal"&gt;&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>I'm trying to figure out a way to find the li element in this list which has the span with the class current with the number it is at in the ul. So, in this case, it would be 1.</p> <p>I tried using different jquery functions but I seem to be getting nowhere. This is what it looks like right now:</p> <pre><code>var list = $('ul li'); $.each(list, function(key, value) { if( $(this).find('.current') ) { alert(key); } }); </code></pre> <p>This just alerts 0, and 1, essentially meaning that it doesn't work. Does anyone have any idea what is wrong with what I'm doing?</p>
javascript jquery
[3, 5]
4,490,401
4,490,402
Check username and password in Login Form (jQuery)
<p>I use jQuery to check username and password in Login form. I use GET method. Doing so well?</p>
javascript jquery
[3, 5]
3,652,704
3,652,705
When I moved from study of JavaScript to study jquery
<p>Which is better, learn the basics of JavaScript, and then jQuery</p> <p>Or master JavaScript and then learn jQuery</p> <p>Now I know the basics well But I did not write many exercises of javascript</p> <p>thanks</p> <p>sorry about My bad English</p>
javascript jquery
[3, 5]
2,393,360
2,393,361
How to add a new field each time a button is clicked
<p>I want to create a new fileupload field each time i click on a button. i have a form in a page and i want to add the fields to that form. i tried to save an array of fileupload fields in a session but it deosnt seem to work.</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) this.Session["fileUploadArray"] = new FileUpload[5]; } protected void Button1_Click(object sender, EventArgs e) { FileUpload[] flArray = ((FileUpload[])(this.Session["fileUploadArray"])); for (int i = 0; i &lt; flArray.Length; i++) { if (flArray[i] == null) { flArray[i] = new FileUpload(); form1.Controls.Add(flArray[i]); this.Session["fileUploadArray"] = flArray; return; } } } </code></pre>
c# asp.net
[0, 9]
1,514,497
1,514,498
jquery - save image as specified filename
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7717851/save-file-javascript-with-file-name">Save file Javascript with file name</a> </p> </blockquote> <p>Here is jsfiddle: <a href="http://jsfiddle.net/WwDdr/3/" rel="nofollow">http://jsfiddle.net/WwDdr/3/</a></p> <p>On a page I have: </p> <ul> <li>an Image</li> <li>an input box with a string (comes from elsewhere, disregard this essentially)</li> <li>an input box with the URL of the image</li> <li>a span containing the file extension</li> </ul> <p>How can I:</p> <p>Click a button/link/whatever that will prompt a "Save As" windows, with the original filename of the image being replaced by the "title" string? Is this possible?</p> <p>EDIT: Looks like there's no jq solution - can be done with a server side language however.</p>
javascript jquery
[3, 5]
677,708
677,709
Javascript asp.net c# multi objet pass to Js code file
<p>I have code on html page and it is working:</p> <pre><code>document.getElementById('&lt;%=IdOstan.ClientID %&gt;').options.length = 0; </code></pre> <p>it is part of a function. Object is found and code run. But if I move code to a seperate js file, then call the file using :</p> <pre><code>&lt;script src="../../../../Script/AjaxCall.js" type="text/javascript"&gt;&lt;/script&gt; </code></pre> <p>then object is not found. My conclusion was that Object on the same file can be found with calling document.getElementById , but it is not true about object passed to Js, and seems normal. I have tried to pass object while calling JS function like this :</p> <pre><code>&lt;asp:DropDownList ID="IdLand" runat="server" onchange="UpdateOstan(this);" DataTextField="NameLand" DataValueField="IdLand" ViewStateMode="Enabled" AutoPostBack="false"&gt; &lt;/asp:DropDownList&gt; </code></pre> <p>and it also works. But I need to pass a second object too I have tried :</p> <pre><code>onchange="UpdateOstan(this, IdsecondObj);" </code></pre> <p>which failed, also this</p> <pre><code>onchange="UpdateOstan(this, document.getElementById('IdSecondObject'));" </code></pre> <p>not working. So pleas let me know how to pass html object to Javascript which is not on the same page. <strong>I don't want to use jQuery files as helper,at all.</strong> Thanks</p>
c# javascript asp.net
[0, 3, 9]
5,637,963
5,637,964
How to show a jquery ui dialog at page reload?
<p>I want to show a jquery ui dialog , if user will reload, close the browser. I tried :</p> <pre><code>$(window).bind('beforeunload', function () { $("#confirm").dialog({ width: 500, modal: true, buttons: { "Ok": function () { // let the page reload }, "Cancel": function () { // cancel reloading the page $(this).dialog('close'); } } }); }); </code></pre> <p>But the page is reloading without showing confirmation dialog. If i put a return statement then it shows a general alert message. But i want to show a dialog. How can i do this ?</p>
javascript jquery
[3, 5]
953,132
953,133
Layout orientation?
<p>I made 2 layout , the first one for android 2.1 ( I need it only in <code>portrait</code>) and second one for android 3 ( I need it only in <code>landscape</code>) and these 2 layout use one class . now how can i set these two layout on landscape and portrait? if i set it in <code>AndroidManifest</code> , i can just use one of these mode <code>portrait</code> or <code>landscape</code> , just it ,</p> <p>we can't use:</p> <pre><code>&lt;activity android:name=".activity" android:screenOrientation="portrait"&gt;&lt;/activity&gt; </code></pre> <p>now which method is true?</p> <p>Thanks</p>
java android
[1, 4]
2,997,663
2,997,664
how to get stored procedure's batches query in different dataset
<p>I'm trying to fetch all the data from one stored procedure for different different Dataset in a single page.</p> <pre><code>CREATE PROCEDURE [dbo].[usp_Details](@status int, @Id int) AS begin Select u.Id,u.FName,u.ImageName,u.ImagePath,u.Sex FROM [User] as u where u.Id IN (SELECT MyId as Id FROM Friends WHERE FriendId=@Id AND FriendStatus=0) Select Points,FName from [User] where Id=@Id SELECT ImagePath from [User] where Id=@Id end GO </code></pre> <p>Now, how I can bind datatable/dataset for individual query. Example: query1 for dataset1, query2 for dataset2, query3 for dataset3</p> <p>If this is not possible then which is the best way to avoid connecting database each time for fetching different tables.</p>
c# asp.net
[0, 9]
5,945,651
5,945,652
Calling a method in parent page from dynamically generated user control
<p>I have a problem similar to <a href="http://stackoverflow.com/questions/623136/calling-a-method-in-parent-page-from-user-control">Calling a method in parent page from user control</a>, except that my user control is dynamically generated at page creation.</p> <p>I tried the preferred solution in the answer above, but since I don’t know in advance how many copies of the control will be required on the page, I can’t subscribe to the event on Page_Load.</p> <p>This application needs a major overhaul in its logic, but it’s out of scope for my current project. I’ve currently implemented the less preferred <code>((MyPageName)this.Page).CustomMethod();</code>, but would like to do it the “right” way if I can.</p> <p>Do you have any suggestions?</p> <p>EDIT: The code for the control is in a page separate from the page. (I intend to reuse it elsewhere in the project.) This means the control doesn't know what handlers are available on the page.</p>
c# asp.net
[0, 9]
2,066,340
2,066,341
jquery asp load content
<p>(I work in asp.net) I'm looking for a way to have a div with a jquery.toggle ( plus/less button)</p> <p>the content of the div need to load only when the div is visible (need to be hide on page load).</p> <p>Did I "NEED" to have a page with the content of my div</p> <p>Or I can use an updatepanel inside the div. And call the panel to load his content.</p> <p>I dont wnat my page to reload because I have multiple block div, in the page, that can be loaded if the user want it. and each of them have too many data inside.</p> <p>Any tips,<br> tank you</p>
jquery asp.net
[5, 9]
4,407,124
4,407,125
How can I give control back (briefly) to the browser during intensive JavaScript processing?
<p>I have read the post <a href="http://www.julienlecomte.net/blog/2007/10/28/">here</a> about using setTimeout() during intensive DOM processing (using JavaScript), but how can I integrate this function with the below code? The below code works fine for a small number of options, but when the number of options gets too big my "please wait" animated GIF freezes while the local JavaScript is processing. Thanks!</p> <pre><code>function appendToSelect() { $("#mySelect").children().remove() ; $("#mySelect").html( '&lt;option selected value="' + obj.data[0].value + '"&gt;' + obj.data[0].name + '&lt;/option&gt;' ); var j = 1 ; for (var i = 1; i &lt; obj.data.length; i++) { $("#mySelect").append( '&lt;option value="' + obj.data[i].value + '"&gt;' + obj.data[i].name + '&lt;/option&gt;' ); } } </code></pre>
javascript jquery
[3, 5]
96,320
96,321
Updating an ImageView with an image from a URL
<p>Within my android application, I'm wanting to update an ImageView, with an image specified from a URL. This URL has been fetched via an API as part of an AsyncTask.</p> <p>I have defined the ImageView as follows:</p> <pre><code>&lt;ImageView android:adjustViewBounds="true" android:scaleType="fitCenter" android:layout_height="wrap_content" android:id="@+id/product_image" android:src="@drawable/no_product_image" android:layout_marginRight="6dip" android:layout_width="wrap_content" /&gt; </code></pre> <p>That way, whilst the data is loading, there is a blank image present behind a ProgressDialog.</p> <p>As part of the doInBackground of the AsyncTask, after fetching the product details, I call:</p> <pre><code>private void createProductScreen(Product product){ Log.i(TAG, "Updating product screen"); //Set the product image ImageView imgView =(ImageView)findViewById(R.id.product_image); Drawable drawable = loadImageFromWeb(product.getImageUrl()); imgView.setImageDrawable(drawable); Log.i(TAG, "Set image"); } </code></pre> <p>The image is loading from the web as follows:</p> <pre><code>private Drawable loadImageFromWeb(String url){ Log.i(TAG, "Fetching image"); try{ InputStream is = (InputStream) new URL(url).getContent(); Drawable d = Drawable.createFromStream(is, "src"); Log.i(TAG, "Created image from stream"); return d; }catch (Exception e) { //TODO handle error Log.i(TAG, "Error fetching image"); System.out.println("Exc="+e); return null; } } </code></pre> <p>When this runs I see <em>"Created image from stream"</em> in the log, but don't see <em>"Set image"</em> and the onPostExecute of the AsyncTask is never called.</p> <p>Does anyone have any ideas on the issue or a better way of updating the image from the blank image to the product image?</p>
java android
[1, 4]
4,496,476
4,496,477
How do i modify an ArrayList from one Activity in a separate Activity
<p>How do i add more <code>Cars</code> to my <code>ArrayList&lt;Car&gt;</code> from a separate <code>Activity</code>?</p> <p>Because I have something like this :</p> <pre><code> private List&lt;Car&gt; getData() { List&lt;Car&gt; cars = new ArrayList&lt;Car&gt;(); cars.add(new Car("Dodge", "Viper")); cars.add(new Car("Chevrolet", "Corvette")); cars.add(new Car("Aston Martin", "Vanquish")); cars.add(new Car("Lamborghini", "Diablo")); cars.add(new Car("Ford", "Pinto")); return cars; } </code></pre> <p>But cars are only example, I have textswitcher in one application and I want to get text from textswitcher and place it as new item in other Activity with listview.</p>
java android
[1, 4]
2,385,455
2,385,456
Getting php session using c#
<p>I know how to get the source code but the website that I have been working on uses PHP session, this mean that you will need to login(which I have) and use the session ID that the server send back. How do I do this?</p>
c# php
[0, 2]
4,658,690
4,658,691
Java primitive type bit size on Android
<p>In a Java program running on the JVM, primitive data types have guaranteed bit size. e.g. </p> <pre><code>byte 8-bit short 16-bit int 32-bit </code></pre> <p>et cetera.</p> <p>Are these bit sizes guaranteed on Android as well? I've been looking for documentation on Android Developers for confirmation. Any links to documentation are appreciated.</p>
java android
[1, 4]
3,893,764
3,893,765
Dynamically generated buttons, on click not being executed
<p>I need to generate a dynamic list of buttons, I already did, with an event handler attached to it.</p> <p>However the event handler is not being executed.</p> <pre><code>private void GetOptions(EcoBonusRequest request) { var ecobonuswworkflow = WorkflowFactory.CreateEcobonusWorkflow(); ecobonuswworkflow.SetCurrentStep(request.CurrentStatus); var currentoptions = ecobonuswworkflow.GetCurrentOptions(); foreach(var option in currentoptions) { var btn = new Button() {Text = option.OptionName}; btn.Click +=new EventHandler(btn_Click); Buttons.Controls.Add(btn); } } void btn_Click(object sender, EventArgs e) { var btn = (Button) sender; string command = btn.Text; EcoBonusRequest request = this.GetDBRequest(RequestBaseId.Value); EcoBonusRequestBL.AddWorkflowHistoryItem(request, command,CurrentUser, command); } </code></pre>
c# asp.net
[0, 9]
5,387,769
5,387,770
Execute a function at the end of the last effect of a Jquery.queue
<p>&nbsp;&nbsp;I would like to use fx and functions I have a animation, and i would like to, at the end of the queue, do an ajax call. <br/> &nbsp;&nbsp;I can't seem to make it work... <br/> &nbsp;&nbsp;I have absolutely no idea how to procede... </p> <p>that would a very very rough example, but</p> <pre><code>$('#dvHeader').queue(function() { $('#dvLeftContent').slideDown(2000); $('#dvRightContent').animate({ backgroundColor: '#c71717' }, 2500) callAjax(); } </code></pre> <p>&nbsp;&nbsp;This code calls the callAjax function way before the last effect starts, in fact, almost as the first one is called.<br/> <i>&nbsp;&nbsp;The real case is a little more complex, i cannot use a callback of the animate effect, per example. I would like to know when the queue ends the last effect, or something like it.</i><br/> &nbsp;&nbsp;How could I make that call to be triggered at the end of the last animation?</p>
javascript jquery
[3, 5]
3,431,396
3,431,397
how to edit column value before binding to gridview after retriving from database?
<p>After i retrieved a set of datatable from database, i need to edit the rows value before binding to the gridview. for example, a set of datatable is retrived from database. </p> <p>eg: [userid], [userEmail] --> 1 , [email protected]</p> <p>i would like to change "[email protected]" to "james" then bind it to gridview. Every rows of [userEmail] will be separated with the mail extension (@hotmail.com) ... how should i do..?</p>
c# asp.net
[0, 9]
4,029,930
4,029,931
jquery/javascript caching question
<p>i was wondering - when using jQuery (or any other javascript include) in my web, does the browser cache it after the first download for all all pages (i assume yes) or will it download it every time?</p> <p>2nd, when the user quits the browser and starts it again (for loading my website), will the jquery js file still be cached or will it completely download again?</p> <p>thx</p>
javascript jquery
[3, 5]
2,752,034
2,752,035
team foundation error in VS 2010
<p>I get this error when opening code in VS. I am not sure what its' looking for or where to check in the code.</p> <p>Go offline. The team foundation server default collection <a href="http://www.win-m2axnpi3m6v8080/ts/defaultcollection" rel="nofollow">http://www.win-m2axnpi3m6v8080/ts/defaultcollection</a> is currently unavailable</p> <p>this solution will be opened offline</p>
c# asp.net
[0, 9]
3,262,711
3,262,712
putting source of all images into an array
<p>What is the cleanest way to put the source attribute string of all images within a div into an array?</p> <p>I was hoping this would work - </p> <pre><code>var imageSourceArray = $("#leDiv img").attr('src'); alert(imageSourceArray[3]); //not alerting the source, boo hoo. </code></pre> <p>Do I need to loop through $("#leDiv img") and add each src string to an array individually? Or is there a more elegant way to do this?</p>
javascript jquery
[3, 5]
4,294,009
4,294,010
jQuery doesn't get loaded in client's office
<p>I have a strange problem that is only happening in a single location. I am using jQuery and my page is working fine in my machine as well as in other locations. In a single location the page isn't working. I shamelessly asked the client to use Firefox and install Firebug and I am surprised to find that a "jQuery is not a function" error is reported.</p> <p>It seems that jQuery fails to load. This only happens in the client's office. The client can successfully run the web application from home. What could have caused such a thing to happen? Can a javascript policy be defined in a LAN to block scripts from specific locations? Could it be something wrong with my code?</p> <p>I have used both local jquery and google references (not both at the same time):</p> <pre><code>&lt;script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="jquery-1.3.2.min.js"&gt;&lt;/script&gt; </code></pre>
javascript jquery
[3, 5]
4,831,621
4,831,622
GridView is not shown in the content page
<p>I have a gridview in my Master page.I have taken an item template inside it. I have given some text to the controls initially. In the design view of the content page gridview is visible but while running the page it's not showing gridview. when i deleted gridview and put some simple text in place of it ,it's working .</p> <p>i tried setting z- index and some peculiar things but nothing seems to work.Please help me out </p>
c# asp.net
[0, 9]
1,421,648
1,421,649
Android intent bundle always null?
<p>I am running the below code. There are two snippets. The first is how I am setting the bundle and the second how I am retrieving it. For some reason every time i check the bundle it returns as null.</p> <p>Any advice on why this is or what I have done wrong would be greatly appreciated.</p> <pre><code> Intent intent = new Intent(this, com.hom.app.Hom.class); Bundle b = new Bundle(); b.putString("WELL", "yes"); intent.putExtras(b); startActivity(intent); </code></pre> <p>Retrieving Bundle:</p> <pre><code> String well =""; Bundle bun = getIntent().getExtras(); String standard = "yes"; if(bun != null){ Log.v("Bundle", "Contains data"); well = bun.getString("WELL"); if(well == null) well = ""; if(well == standard) method(); } </code></pre>
java android
[1, 4]
2,087,332
2,087,333
ASP.NET Login box positioning
<p>I am using VS2005 C#. I have a login box in my .aspx page, but I can't find the parameter I have to set too position it in the middle of my webpage.</p> <p>I have tried using <code>&amp;nbsp;</code> but it did not work as well.</p> <p>Below is my code for my login box:</p> <pre><code>&lt;asp:login id="Login1" runat="server" font-size="Large" BackColor="#F7F6F3" BorderColor="#E6E2D8" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" ForeColor="#333333" DestinationPageUrl="~/Common/Default.aspx" DisplayRememberMe="False" FailureText="Login failed" RememberMeSet="False"&gt; &lt;TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="0.9em" ForeColor="White" /&gt; &lt;InstructionTextStyle Font-Italic="True" ForeColor="Black" /&gt; &lt;TextBoxStyle Font-Size="0.8em" /&gt; &lt;LoginButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284775" /&gt; &lt;/asp:login&gt; </code></pre> <p>Anyone knows how to position login control?</p> <p>Thank you</p>
c# asp.net
[0, 9]
4,115,744
4,115,745
Proxy setings for web service(client or service hosted server)
<p>I am trying to add the a web service through Web reference, i am able to find the service while trying to add it, not able to add, the option is disabled. I suspect this is because of the proxy settings, What do you suggest? While mentioning he proxy in the the client application which proxy should i mention,the proxy of my machine in which client application is hosted which is consuming the web service or the proxy of the machine in which the web service is hosted?</p>
c# asp.net
[0, 9]
4,758,268
4,758,269
jquery/js: OnFocus OnBlur?
<p>Hey, i wish to make an ajax call if it has lost the focus from my site for 1 minute, so when it's onfocus again it send an ajax call? How can i do that?</p>
javascript jquery
[3, 5]
3,675,575
3,675,576
Single reusable function to open a single instance of form
<p>I am trying to create a reusable function that can open a single instance of form. Means if a form is not already open it should create and show the new form and if already open it should bring the existing form to front.</p> <p>I was using the following function,</p> <pre><code>if (Application.OpenForms["FPSStorageDemo"] == null) { FPSStorageDemo fp = new FPSStorageDemo(); fp.Name = "FPSStorageDemo"; fp.Show(); } else { ((FPSStorageDemo)Application.OpenForms["FPSStorageDemo"]).BringToFront(); } </code></pre> <p>But I have to write this code again and again whereever I have to open a form. But I need a single reusable function that can do this job.</p> <p>I wrote a function like,</p> <pre><code>void OpenSingleInstanceForm(Type TypeOfControlToOpen) { bool IsFormOpen = false; foreach (Form fm in Application.OpenForms) { if (fm.GetType() == TypeOfControlToOpen) { IsFormOpen = true; fm.BringToFront(); break; } } if (!IsFormOpen) { Object obj = Activator.CreateInstance(TypeOfControlToOpen); //obj.Show(); //Here is the problem } } </code></pre> <p>But at the end I don't know how to show the new form instance. Can anybody suggest how to do it? Is this wrong or there is another way to do this?</p> <p>Thanks in advance.</p>
c# asp.net
[0, 9]
1,717,444
1,717,445
Reading custom format files in C#
<p>I would like to fetch n bytes from specific place in a file into my specific data structure (a struct). </p> <p>The old C - application (which we are porting) uses fseek() and fread().</p> <p>Is where a comparable solution in C#/.Net, without using the Win32-API?</p>
c# c++
[0, 6]
1,554,592
1,554,593
How to upload a file without refreshing page?
<p>I want to upload files in server folder but while uploading i dont want to refresh aspx page. I mean to say i dont want refresh page while i click on upload button. So how can i do??</p>
c# asp.net
[0, 9]
2,404,568
2,404,569
Jquery repeat function every 60 seconds
<p>Using setTimeout() it is possible to launch a function at specified time, e.g.:</p> <pre><code>setTimeout(function, 60000); </code></pre> <p>But what if I would like to launch the function multiple times? Every time a time interval passes, I would like to execute the function (every 60 seconds, let's say).</p>
javascript jquery
[3, 5]
2,690,933
2,690,934
jquery.backstretch.min.js pulling image from databse or variable
<p>here the problem that nobody seems to know the answer, </p> <p>i got </p> <p>i want use jquery.backstretch.min.js to resize image variable from database ,but it's not working???</p> <p><strong>PHP</strong></p> <pre><code>$usr = $_SESSION['user']; $q10 = "SELECT * FROM `users` WHERE `user` = '$usr'"; $result10 = @mysql_query ($q10); $row10 = mysql_fetch_assoc ($result10); $avatar = $row10['avatar']; $myimg = "&lt;img src=\"$avatar\"&gt;"; </code></pre> <p><strong>Javascript</strong></p> <pre><code>$.backstretch("&lt;?php echo $myimg ?&gt;"); </code></pre>
php javascript
[2, 3]
722,771
722,772
Retaining select box based values on page refresh
<p>I have one form where in select box in which I have two options "oui" and "non":</p> <ul> <li>When "oui" is selected "hello" is displayed</li> <li>When "non" is selected "not valid" is displayed</li> </ul> <p>My problem is when I refresh page after submitting form, "oui" or "non" is properly selected but not the value based on it like "hello" or "not valid"</p> <p>here is some code</p> <pre><code>&lt;p&gt;choose option: &lt;select name="opt" class="slct"&gt; &lt;option value="0" selected="selected"&gt;--&lt;/option&gt; &lt;option value="oui"&gt;Oui&lt;/option&gt; &lt;option value="non"&gt;Non&lt;/option&gt; &lt;/select&gt; &lt;/p&gt; &lt;div id="oui" class="brandDiv"&gt; hello &lt;/div&gt; &lt;div id="non" class="brandDiv"&gt; not valid &lt;/div&gt; </code></pre> <p>and the jquery</p> <pre><code>function showhide() { $("div.brandDiv").hide(); $("select.slct").bind('change', function() { $('div.brandDiv').hide(); var targetId = $(this).val(); $('div#' + targetId).show(); }); } </code></pre> <p>Thank you all in advance.</p>
php jquery
[2, 5]
2,731,534
2,731,535
Scroll tabs with jQuery?
<p>I have a horizontal tab menu. These tabs are all li elements. I show always 5 of them at once. To the left and right I have buttons which scrolls these tabs to either side. I am just not sure how to achieve that. Can I put the next 5 tabs in a different div which will be shown on click? That wouldnt be the best solution, would it? Can I do this somehow with JavaScript or jQuery?</p> <p>Thanks.</p>
javascript jquery
[3, 5]
1,802,663
1,802,664
How send C# DateTime object into Javascript?
<p>I want to send C# DateTime object into Javascript. How can I accomplish that?</p>
c# javascript
[0, 3]
4,244,330
4,244,331
jQuery scrollTo accordion end position
<p>I have multiple accordions on a page which have large amounts of text inside each. Only one accordion can be opened at once. I have scrollTo plugin and I'm animating the scrollTo when an accordion is clicked to align with the top of the accordion. If I have too much text, the scrollTo doesn't align to the accordion top. Is there a way to get the ending position of the accordion before the animation starts? Or simply a resolution to aligning the scroll position to the accordion?</p> <pre><code>$(".accordion h3").click(function () { var thisTrigger = $("span", this); var thisIntro = $(this).siblings(".intro"); var thisPane = $(this).siblings(".pane"); var otherIntros = $(this).parents(".parentClass").siblings().find(".intro"); var otherPanes = $(this).parents(".parentClass").siblings().find(".pane"); var otherHeaders = $(otherPanes).siblings(".current"); var otherTriggers = $(otherHeaders).find("span"); if ($(this).hasClass("current")) { $(this).removeClass("current"); $(thisIntro).removeClass("open"); $(thisPane).slideUp("fast"); } else { $(this).addClass("current"); $(thisIntro).addClass("open"); $(thisPane).slideDown("fast"); $(otherIntros).removeClass("open"); $(otherHeaders).removeClass("current"); $('html, body').animate({ scrollTop: $(this).position().top }, 500); } }); </code></pre>
javascript jquery
[3, 5]
4,341,883
4,341,884
Jquery fade in fade out issue
<p>Here is the page I'm working on: <a href="http://dsa.dartmouth.edu/" rel="nofollow">http://dsa.dartmouth.edu/</a>. Below the slideshow are four panels that change colors on hover. The background color works fine, but the title color never turns back to its dark color after turning white. Below is the javascript controlling this - how can I get the h2 text to change back to a dark color on rollout?</p> <pre><code>$featured_control_item.hover( function(){ if ( ! $(this).hasClass('active-slide') ){ $(this).find('.et_slide_hover').css({'display':'block','opacity':'0'}).stop(true,true).animate( { 'opacity' : '1' }, featured_controllers_opacity_speed ); $(this).find('.controller').find('h2').css({'color':'white'}).stop(true,true).animate( { 'color' : '#656464' }, featured_controllers_opacity_speed ); }}, function(){ $(this).find('.et_slide_hover').stop(true,true).animate( { 'opacity' : '0' }, featured_controllers_opacity_speed ); $(this).find('.controller').find('h2').stop(true,true).animate( { 'color' : '#656464' }, featured_controllers_opacity_speed ); } ); </code></pre>
javascript jquery
[3, 5]
4,312,656
4,312,657
Which is faster, int or long if targeting 32 and 64 bit platforms
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/6903235/will-using-longs-instead-of-ints-benefit-in-64bit-java">Will using longs instead of ints benefit in 64bit java</a> </p> </blockquote> <p>I have an algorithm that needs to be optimised as much as possible. The received wisdom is that integer maths is fastest when the primitive op types are the same "bitness" as the CPU. If I am targeting 32 and 64 bit platforms, is there any performance difference between int and long?</p>
java android
[1, 4]
3,619,169
3,619,170
Why aren't my dynamically-added form inputs posting?
<p>I'm working on a form where I need to dynamically add inputs whenever the user clicks a "more widgets" button. There's a hidden div inside the form, and I append the inputs to it with jQuery, like this:</p> <pre><code>$('div#newwidgetinputs').show().append(newInputs); </code></pre> <p>They show up, are properly named, etc, but when I post the form, their contents are not in the PHP <code>$_POST</code> array.</p> <p>So I tried just appending them to the form itself:</p> <pre><code>$('form#someform').append(newInputs); </code></pre> <p>They can't be seen on the page, but I give them default values, and this time they <strong>do</strong> appear in '$_POST'.</p> <p>This makes me think that <code>div#newwidgetinputs</code> isn't considered part of the form, but I don't see why; it's between the opening and closing <code>&lt;form&gt;</code> tags.</p> <p>Why wouldn't those inputs post?</p>
php jquery
[2, 5]
3,743,008
3,743,009
jQuery UI dialogs and TinyMCE in fullscreen mode
<p>I'm using tinyMCE and jquery-ui in the same application. The problem is, when tinyMCE is switched to fullscreen mode, it hides all the jquery-ui dialogs. Any ideas on how it is possible to keep the dialogs on top of the editor even when its in fullscreen mode?</p>
javascript jquery
[3, 5]
2,547,823
2,547,824
Android emulator queues clicks?
<p>The problem i'm facing at the moment is that the android emulator seems to queue the clicks i do on the button below. If i click in a regular speed, it's no problem what so ever. But whenever i so to say, spam-click the button, it seems that it recieves all clicks and does that number of operations. </p> <p>Example: The array is 5 values long, if i stand on index 5 and click on the backbutton 4 times very fast, i end up at index 1, but if i stand at index 2 and spam-clicks three times, it throws <code>java.lang.ArrayIndexOutOfBoundsException</code></p> <p>code as follows:</p> <pre><code> ButtonGoBack.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { // here i set it disabled to prevent mass clicks/taps/touches. ButtonGoBack.setEnabled(false); enumCounter--; temporaryValue = values[enumCounter]; doSomething(temporaryValue); // hides button if(enumCounter== 0) { ButtonGoBack.setVisibility(4); } } }); </code></pre> <p>100~ or so code-lines after.</p> <pre><code>ButtonGoBack.setEnabled(true); </code></pre> <p>does not seem to do the trick. </p> <p>any suggestions how to do this in a different manner?</p>
java android
[1, 4]
2,401,004
2,401,005
improveddown causing scrollbar flickering
<p>I have used improveddropdown jquery plugin... my page has 10-20 dropdowns.. when the page loads the vertical scrollbars starts flickering.. it flickers because the improveddrodown jquery runs on dropdowns which takes some time... how to avoid this flickering of the scrollbar?</p>
jquery asp.net
[5, 9]
1,226,325
1,226,326
jquery slide delay for jooml yt megamenu plugin
<p>I have a working joomla extension (YT Mega menu). I want to make some updates to the existing code.</p> <p>Here is the code for mouseenter and mouseleave,</p> <pre><code> li.addEvent('mouseenter', function (e) { //if (objectReference.hasOpenning) return; log('enter parent of ' + (ul ? ul.id : 'li has not child')); li.addClass('hover'); if (ulexists) { objectReference.showChild(ul); } }); li.addEvent('mouseleave', function (e) { log('leave parent of ' + (ul ? ul.id : 'li has not child')); li.removeClass('hover'); if (ulexists) { if (ul.pinned) return false; objectReference.hideChild(ul); } }); </code></pre> <p>On mouseleave i want a delay before hiding the UL. is there any way to do??</p> <p>Please help, i am a beginner and confused. </p>
javascript jquery
[3, 5]
2,031,553
2,031,554
use of twitter apis in android
<p>i spent my time mainly as a graphic/web designer. I realize that there is no really beautiful designed twitter client for android. So, I designed the UI myself and its quiet impressive I have to say. The problem is, I never went past the android tutorials on the developers website because Im about to start college and lack the time of continuing to learn all the stuffs of it. I just wanted to know if there is a COMPLETE tutorial on how to build a twitter client for android with what I have right now. Thanks..</p>
java android
[1, 4]
4,834,454
4,834,455
jQuery function call not working
<p>I am trying to add and remove a class within a <code>&lt;span&gt;</code>, but the removeClass is not working though the function is being called. </p> <pre><code>setInterval(changeClass,4000); var spanId=1; function changeClass(){ $('#'+spanId).addClass("hilite"); setTimeout(remove, 1000); spanId++;} function remove(){ $('#'+spanId).removeClass("hilite"); return true; } </code></pre> <p>Can any one tell the reason ?</p> <p>How can I do this with a while loop something like this i tried all my ways but chould not get it working</p> <pre><code>var spanSet=4; var spanId=1; while(spanSet &gt; 0) { changeClass(); spanSet--; } function changeClass(){ $('#'+spanId).addClass("hilite"); setTimeout(remove, 3000); } function remove(){ $('#'+spanId).removeClass("hilite"); spanId++; return true; } </code></pre>
javascript jquery
[3, 5]
3,598,172
3,598,173
Why do some JS objects get displayed as arrays in the console?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7261670/what-makes-a-jquery-object-show-up-as-an-array-in-chromes-developer-tools">What makes a jQuery object show up as an array in Chrome&#39;s Developer Tools?</a> </p> </blockquote> <p>I would like to know why this behavior in javascript console:</p> <p>In this example everything is clear:</p> <pre><code>var obj = {find: function () {}} obj // Object { find=function()} obj.find // function() </code></pre> <p>In the following example I would like some explanation about the output of <code>$.fn</code></p> <p>I would expect the output of $.fn like an Object containing keys and values, but ....</p> <pre><code>$.fn // [] // ***************** freaky part **************** $.fn.find // function() </code></pre>
javascript jquery
[3, 5]
2,839,913
2,839,914
Android ListView Filtering Without Repeatedly Instantiating ArrayAdapters
<p>I have a ListView filled with twitter tweets. I made a custom Tweet class so I could store a special type number. So, I have the Tweet class and custom ArrayAdapter:</p> <pre><code>class Tweet { private int typeNumber; // My unique type number which does not come from Twitter private String message; // ... other tweet data } class TweetsAdapter extends ArrayAdapter&lt;Tweet&gt; { private ArrayList&lt;Tweet&gt; tweets; TweetsAdapter(Context context, int textViewResourceId, ArrayList&lt;Tweet&gt; tweets) { super(context, textViewResourceId, tweets); this.tweets = tweets; } public View getView(int position, View convertView, ViewGroup parent) { // Inflate my own view and set my own tweet row information } } </code></pre> <p>There is a nav bar which has 4 Buttons representing the 4 special type numbers. I want to display a filtered tweet ListView when a person clicks on one of the type number buttons without destroying the data in the ArrayAdapter.</p> <p>One approach I came up with is to break up my main tweets ArrayList into sub-ArrayLists and set a new ArrayAdapter with the corresponding sub-ArrayList on the ListView every time you click one of the Buttons. That seems inefficient to instantiate a new ArrayAdapter every time.</p> <p>Is there a better way to display a filtered ListView while maintaining all the tweet data on the ArrayAdapter(I also tried looking at the filter class and it seems to destroy the data on the adapter to "filter")?</p>
java android
[1, 4]
4,121,281
4,121,282
The process cannot access the file because it is being used by another process while deleting image
<p>I am trying to delete original image after thumbnail create but original image cannot be deleted. It throws the exception </p> <blockquote> <p>The process cannot access the file because it is being used by another process.</p> </blockquote> <p>Here is my code </p> <pre><code>public static string deleteImage(string imagename,string rootpath) { try { string completePath = HttpContext.Current.Server.MapPath(rootpath + "Images/") + imagename; if (File.Exists(completePath)) { File.Delete(completePath); } } catch (Exception e) { throw e; } } </code></pre> <p>Any idea, I am using Visual Studio 2008, thanks</p>
c# asp.net
[0, 9]
1,238,086
1,238,087
jQuery $.Get not working correctly
<p>I'm having a problem with $.get that I've never had before, and can't seem to be able to fix it. When calling the following function:</p> <pre><code>function getDefinition (word) { var toget = "http://www.stands4.com/services/v1/defs.aspx?tokenid=TOKEN&amp;word=" + word; jQuery.support.cors = true; $.get(toget, function (data) { if(data.indexOf("&lt;definition&gt;") !== -1) { var definition = data.split("&lt;definition&gt;")[1].split("&lt;/definition&gt;")[0]; return definition; } else { return false; } }); </code></pre> <p>}</p> <p>Internet Explorer (I've not tested it on other browsers) throws </p> <blockquote> <p>"SCRIPT438: Object doesn't support property or method 'indexOf' randomfunctions.js, line 5 character 3" (line 5 character 3 would be the "i" in "if")</p> </blockquote> <p>Earlier I was getting a CORS error, so I added the </p> <pre><code>jQuery.support.cors = true; </code></pre> <p>line. I've attempted to alert(data), but the same thing happens. I'm using jQuery 1.6.1.</p> <p>any help would be greatly appreciated, Matthew</p>
javascript jquery
[3, 5]
315,626
315,627
jQuery insertAfter doesn't work in some situations
<p>I want to add a hidden input after some element. I am using this code:</p> <pre><code>$("&lt;input type="text"&gt;").insertAfter(".addProduct"); </code></pre> <p>It doesn't work. But if I replace to it works.</p> <pre><code>$("&lt;span&gt;ddd&lt;/span&gt;").insertAfter(".addProduct"); </code></pre> <p>It works. Help me.</p> <p>Thank you.</p>
javascript jquery
[3, 5]
3,130,843
3,130,844
jQuery .hover() auto return to previous state
<p>I am wondering if there is a simple solution where after the user un-hovers, the data will return to its original state? My current solution is to save the original state, and load this data once the user has un-hover. This can become tedious as each hover changes alot of text fields, and it is a hassle to store all this information.</p> <p>I am essentially wondering if there is something in JavaScript/jQuery something like the CSS <code>:hover</code> where it will auto return to its original state?</p>
javascript jquery
[3, 5]
3,969,470
3,969,471
Can I run some custom script after ASP.NET client side page validation fails?
<p>I'm trying to run some client side script if, <em>and only if</em>, the client side Page validation fails, and can't figure out where I can hook it in.</p> <p>If i bind my JavaScript function to the OnClientClick of the button that submits the form, it runs before the client side validation. If I bind it to the OnSubmit of the form, that only fires if the validation passes.</p> <p>Any ideas of how or where I can hook something like this up? Or if you have other suggestions, I'm open to them.</p> <pre><code>&lt;form id="frm" runat="server" onsubmit="FUNCTION HERE WONT FIRE IF VALIDATION FAILS"&gt; &lt;asp:requiredfieldvalidator id="vld" runat="server" controltovalidate="txt"/&gt; &lt;asp:textbox id="txt" runat="server"&gt;&lt;/asp:textbox&gt; &lt;asp:button id="cmd" runat="server" OnClick="dosomething" OnClientClick="FUNCTION FIRES BEFORE VALIDATION OCCURS"&gt; &lt;/form&gt; </code></pre>
javascript asp.net
[3, 9]
1,561,316
1,561,317
Unable to catch the Dropdown selected value in a textbox inside a repeater
<p>I have a <code>DropDownList</code> inside a repeater and whenever the selected text is changed, I have to show it in a <code>TextBox</code> but I'm getting <code>Object reference not set to an instance of an object</code> error</p> <pre><code>protected void Ddl_SelectedIndexChanged(object sender, EventArgs e) { DropDownList ddl = (DropDownList) sender; RepeaterItem item = (RepeaterItem) ddl .NamingContainer; TextBox txt = (TextBox) item.FindControl("TextBox4"); txt.Text = ddl.SelectedItem.Text; } </code></pre>
c# asp.net
[0, 9]
2,785,227
2,785,228
Java Request Codes in constant variables
<p>According to the docs for this function: <a href="http://developer.android.com/reference/android/app/Activity.html#startActivityForResult%28android.content.Intent%2C%20int%29" rel="nofollow">startActivityForResult()</a></p> <p>I'm seeing that there is a request code that it accepts. If I understand correctly I'll use this same code to refer to the results of this activity. Is it common practice to put these resource links in constant variables?</p>
java android
[1, 4]
2,689,541
2,689,542
How to insert into a specific location in a list with jQuery?
<p>I have a list of form-field divs inside a containing div. </p> <pre><code>&lt;div id="container"&gt; &lt;div class="form-field"&gt; // Data &lt;/div&gt; &lt;div class="form-field"&gt; // selected item // Data &lt;/div&gt; &lt;div class="form-field"&gt; // Data &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I have a selected item var which holds the item that we're working with. Say for example, the second form field div is selected. How would I append another element right after the selected item? Another form field div needs to be added to the 3rd spot in the list. The list will be dynamic, so where it goes will always depend on the selected item.</p>
javascript jquery
[3, 5]
5,501,957
5,501,958
How to change the position of div during run time?
<p>I want to change the position of div during run time. i have taken two div. id is Div1 and Div2. Div2 is by default false. whenever user click on div1 div2 is visible and after user press the mouse down key on Div2 and drag, then position of the div2 will be change. position will be similar to cursor position. Whenever user up the mousekeyup then div2s position is similar to cursor position. in sort when user drag the corsor then div2 automatically drag with cursor and user stop the drag then div2s position is same as cursor position. So how to apply the cursor position to div2 position using only java script.withot jquery.</p>
javascript asp.net
[3, 9]
5,150,630
5,150,631
custom calendar in Android
<p>I have created a custom calendar(Date for starting of the year is to be entered by the user).</p> <p>For example,if a user sets date as 13th May, then his year must be set to 13-May to 12-May.Now I need to calculate the difference between 13th may and todays date(duration between 13th may- 24 sep)in number of days. Thanks</p>
java android
[1, 4]
5,153,772
5,153,773
Jquery Editable Table: How can i Make certain cells editable?
<p>I am building an editable table in jquery for fun.</p> <p>Here is my table:</p> <pre><code>&lt;table id="horiz-min" summary="Indices"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope="col"&gt;&lt;/th&gt; &lt;th scope="col"&gt;ID&lt;/th&gt; &lt;th scope="col"&gt;Description&lt;/th&gt; &lt;th scope="col"&gt;&lt;/th&gt; &lt;th scope="col"&gt;&lt;/th&gt; &lt;th scope="col"&gt;&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr onclick="show();" id="IDOL-FT"&gt; &lt;td class="editable" id="edit"&gt;Edit&lt;/td&gt; &lt;td class="edit-field"&gt;454&lt;/td&gt; &lt;td class="edit-field"&gt;TEXTTEXTTEXTTEXT&lt;/td&gt; &lt;td class="editable"&gt;Details&lt;/td&gt; &lt;td class="editable"&gt;Feeds&lt;/td&gt; &lt;td class="editable"&gt;Fields&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; </code></pre> <p>The first thing i would like to do is to make the ID and Descriptions editable by clicking on edit.</p> <p>So in JQUERY, i am trying to do this to replace, these td's content with the content that is currently inside of them, in an editable text box.</p> <p>Fixed: but what i have gives a console error of "$ is not defined"</p> <p>jquery:</p> <pre><code>$('td.edit-field').replaceWith('&lt;textbox&gt;&lt;/textbox&gt;'); </code></pre>
javascript jquery
[3, 5]
522,393
522,394
Sending JSON to server, using jQuery
<p>I am trying to send simple data to theservre, and I need a "rough and ready" way to do this.</p> <p>This is what I have so far:</p> <pre><code>var emails = ['[email protected]', '[email protected]', '[email protected]']; var ruff_json = "{ 'emails': ["; for (i in emails) ruff_json += ((i == 0) ? '' : ', ') + '\''+emails[i]+'\''; ruff_json += '] }'; jQuery.ajax({ type: 'POST', url: '1.php', data: ruff_json, dataType: "json", timeout: 2000, success: function(result){ //do something }, error: function (xhr, ajaxOptions, thrownError){ //do something } }); </code></pre> <p>Using Firebug, I can see that the data is POSTed to the server - however, at the server, there is no data ($_POST is empty) - what am I doing wrong?</p>
php jquery
[2, 5]
363,359
363,360
Get HREF property
<pre><code>&lt;a class="some" id="1" href="/s/1/2"&gt;link 1&lt;/a&gt; &lt;a class="some" id="2" href="/s/2/3"&gt;link 1&lt;/a&gt; &lt;script&gt; $(document).ready(function() { $('.some').click(function() { var id = this.id; var link = $(this).css('href'); alert(id); alert(link); return false; }); }); &lt;/script&gt; </code></pre> <p>When I click on the link I get correct id, but "undefined" link. What is the problem and how can I fix it?</p>
javascript jquery
[3, 5]
147,513
147,514
Why does this while loop make the browser crash?
<p>I'm trying to compare the differences between similar snippets with javascript and C++. Here's my snippet:</p> <pre><code>var i = 0; while (i&lt;=10) { document.write('Hello&lt;br /&gt;'); //i++; } </code></pre> <p>With C++, if I write an equivalent snippet, I recall the console prints that line forever until I enter Ctrl + C. However, with Javascript, if I try to open the browser, it would crash. Does it have to do with the browser trying to load that "Hello" line forever until I force quit?</p>
javascript c++
[3, 6]
1,307,567
1,307,568
How to call a code behinds button click event using javascript
<p>Is it possible to call a server side buttons click event using javascript or jquery If yes then how to do it</p>
javascript jquery
[3, 5]
4,223,212
4,223,213
jQuery centering div to window vertically resizing issue
<p>I am using this method to center a div vertically on my page:</p> <pre><code>$(window).resize(function() { $('.container').css({ top : ($(window).height() - $('.container').outerHeight()) / 2 }); }); $(window).resize(); </code></pre> <p>But the code doesn't work initially. I couldn't figure out what was going on until I tried physically resizing the window while the page is loading. As soon as I physically resize the browser window, the div centered immediately. Any way around this? Why is that happening in the first place?</p> <p>Thanks!</p>
javascript jquery
[3, 5]
3,125,978
3,125,979
How to make the 'Are you sure you want to navigate away from this page' warning message in browser?
<p>I have a web page that contains a textbox and a submit button. When the user edits the text in the textbox and clicks another link (not the submit button) how do I display the 'Are you sure you want to navigate away from this page' popup message?</p> <p><strong>I have researched this on the net</strong> and found a few javascript examples. Is this the only way you can do this? If not, what is the best way to do it?</p>
c# javascript asp.net
[0, 3, 9]
2,939,575
2,939,576
What is the best way to encode/protect a javascript-code?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/194397/how-can-i-obfuscate-javascript">How can I obfuscate JavaScript?</a> </p> </blockquote> <p>I want to "protect" my Javascript code. Are there any good, recommended ways which are very difficult to hack?</p> <p>I tested some encoder on the Web and sometimes my Javascript code doesn't work after encoding. Is this normal (cot the encoder is very bad)?... or is my code too bad/buggy?</p>
javascript jquery
[3, 5]
3,997,890
3,997,891
Do I have to create a thumb file for each picture?
<p>I have a website where there's a gallery, in this gallery there are thumbs that when clicked take you to an ad from linkbucks. Then when you wait for 5 secs then you can see the picture in its real size. The problem is, the user can skip this ad by just clicking on the thumb with the right button of the mouse, then select "Show picture" or something like that. How can I solve this without having to make a thumb image file for each picture?</p> <p>Note: I need this solution to be in Javascript/Jquery or/and PHP.</p>
php javascript jquery
[2, 3, 5]
2,385,437
2,385,438
How to prevent page reload after alert box on key down event?
<p>I want to prevent page reload after clicking ok on alert box. click search button is ok. But now I meet problem in enter key down event. Someone help me please.</p> <p>This is my html</p> <pre><code>&lt;div id="email"&gt; &lt;input type="text" id="txtSearchEmail" name="email" onkeydown="Javascript: if (event.keyCode==13) {JS_Search(); event.preventDefault();}" style="width: 161px; height: 16px; padding: 2px; border: 1px solid #a8a8a8; font-size: 13px; color: #434343" /&gt; &lt;/div&gt; &lt;div id="search"&gt; &lt;a class="gai-button" style="width: 96px; height: 25px;" onclick="JS_Search();"&gt;&lt;img src="images/findamessage_search.jpg" alt="" /&gt;&lt;/a&gt; &lt;/div&gt; </code></pre> <p>This is my javascript </p> <pre><code>if() { //some coding } else { alert ("Not found!"); return false; } </code></pre>
javascript jquery
[3, 5]
2,896,391
2,896,392
how to latebind click handler after ajax call without using callback
<p>we are trying to create a custom cms where when inside anchor tag you put a rel attribute and a target position and it automatically attach a click that can fetch data from specified location in rel tag. again new content(came through ajax) can have anchor tag with rel attribute.</p> <p>how can i achieve it without using callback<br> current code</p> <pre><code>$(document).ready(function(e) { $("a[rel $= txt]").each(function(index, element) { $(this).click(function(){ var path = $(this).attr("rel"); path = "./"+path; var target = $(this).attr("data-target") $(target).load(path, function(){ $("a[rel $= txt]", this).each(function(){ $(this).click(function(){ var path = $(this).attr("rel"); path = "./"+path; $("#result").load(path,function(){ $.getScript("js/common.js") }); }) }); $.getScript("js/common.js"); }) })//click ended }); }) </code></pre>
javascript jquery
[3, 5]
1,098,678
1,098,679
.prev(selector) not working
<p>Here's the problem (<a href="http://jsfiddle.net/vWafe/1/" rel="nofollow">live copy </a>):</p> <p>CSS:</p> <pre><code>div { border: 1px solid black; } </code></pre> <p>HTML:</p> <pre><code>&lt;div&gt;.&lt;/div&gt;&lt;br&gt; &lt;div&gt;.&lt;/div&gt;&lt;br&gt; &lt;div class="test"&gt;Should have a blue border&lt;/div&gt;&lt;br&gt; &lt;div&gt;.&lt;/div&gt;&lt;br&gt; &lt;div&gt;.&lt;/div&gt;&lt;br&gt; &lt;div&gt;.&lt;/div&gt;&lt;br&gt; &lt;div&gt;.&lt;/div&gt;&lt;br&gt; &lt;div&gt;.&lt;/div&gt;&lt;br&gt; &lt;div&gt;.&lt;/div&gt;&lt;br&gt; &lt;div&gt;.&lt;/div&gt;&lt;br&gt; </code></pre> <p>JavaScript:</p> <pre><code>$('div:last').css('border', '1px solid red') .prev('.test').css('border', '1px solid blue'); </code></pre> <p>It seems that when I do <code>$(selector).prev(.className)</code> or <code>$(selector).prev(tag.className)</code> I get an empty set. What's wrong with this?</p>
javascript jquery
[3, 5]
4,351,346
4,351,347
jqAlert Line Breaks?
<p>I'm being unsuccessful creating an alert with line breaks. I'm new to jQuery so I'm sure I'm missing something simple, which I'm also not finding via web searches.</p> <pre> jqAlert({ text: 'The item:\n\n ' + item.description + '\n\nhas already been added.', title: 'Duplicate Entry' }); </pre> <p>I have also tried using \r.</p>
javascript jquery
[3, 5]
2,248,402
2,248,403
Android getWindow to set the background of my activity according to Listpreference
<p>I've basically created a ListPreference where user would be able to choose from a list of options. After they have chosen one of the available option,the app will return to the main activity and the background image will change accordingly,however,it seems my app would't be able to detect the change in preference and change the background image.Can somebody please advice?Thanks!***Below snippet shows after my main activity resume,how it detects the change in preference and change the background image.</p> <pre><code>protected void onResume() { super.onResume(); listener = new SharedPreferences.OnSharedPreferenceChangeListener() { public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if(key.equals("listPrefwall")){ tv.setText(prefs.getString("listPrefwall", "ondon")); if(prefs.getString("listPrefwall", "ondon")=="ondon") { getWindow().setBackgroundDrawableResource(R.drawable.ondon); tv.setText("testing"); } else if(prefs.getString("listPrefwall", "ondon")=="japan") { getWindow().setBackgroundDrawableResource(R.drawable.japan); tv.setText("pivot"); } } } }; settings.registerOnSharedPreferenceChangeListener((OnSharedPreferenceChangeListener) listener); } </code></pre>
java android
[1, 4]
2,497,538
2,497,539
Timer.schedule not work in power save mode?
<p>timer.schedule not work in power save mode why ?</p> <p>Android</p>
java android
[1, 4]
4,327,146
4,327,147
ANDROID:How to format text that has to be saved in textfile
<p>I have an app in which I can choose data from a database and then I show the result in a TableView. Next thing I want to do is save the chosen data (currently shown in the TableView) into a textfile, so it can copied onto a PC and printed out on to paper. What I'm trying to achieve is equal spaces between each column. I'm using something like this to save text to a file:</p> <pre><code>out.write("\n "+name+" \t"+amount+" \t"+price); </code></pre> <p>But after opening the file in a text editor it doesn't look good. Is this the right method to do it? If not what is?</p>
java android
[1, 4]
1,940,252
1,940,253
How to: If fadeIn do not fade again (jQuery)
<p>I have this simple code that when you press a key it fades in a div. When I press it twice, it fades it twice. Is it possible you can prevent this with a simple line or two? Like if fadein do not fadeIn again or something?</p> <p>The code looks like:</p> <pre><code>jQuery(document).bind('keydown', 's',function (evt){ $("#div1").fadeIn(); return false; }); </code></pre> <p>Thanks alot.</p>
javascript jquery
[3, 5]
5,135,921
5,135,922
sorting elements in a javascript multidimensional array
<p>Doing some work in javascript I have a multidimensional made up in this format ( I know it’s not an actually array object, bit it gives you an idea of the format</p> <pre><code>[ [[“ip-address”][timestamp]], [[“ip-address”][timestamp]], [[“ip-address”][timestamp]], [[“ip-address”][timestamp]] ] </code></pre> <p>The array can include duplicate ip addresses and I need a way to first sort the array by timestamps and then echo out the first instance of the ip address (i.e. for each ip address I need the one with the earliest timestamp)</p> <p>For example</p> <pre><code>[[“10.0.0.1”][13:01:34]] [[“10.0.0.1”][ 13:21:56]] [[“192.168.1.1”][23:45:12]] [[“192.168.1.1”][12:34:42]] </code></pre> <p>Would give me the following output</p> <pre><code>10.0.0.1 = 13:01:34 192.168.1.1 = 12:34:42 </code></pre> <p>I’ve had a hunt around and can’t see a way to do this so any help would be appreciated</p>
javascript jquery
[3, 5]
1,620,430
1,620,431
Image upload Input: 1 input that will take up to 4 uploads
<p>I am right now working with this image upload from <a href="http://dondedeportes.es/uploader-previewer/" rel="nofollow">HERE</a>. Instead of having 3 separate image upload inputs is there a way to just have one that will take maximum 4 requests? </p> <pre><code>&lt;script&gt; (function($) { $(document).ready(function() { // it must be checked if there are div.imageForms because the // uploaderPreviewer javascript may be not included and produce an error if ($('div.imageForms').length) { $.uploaderPreviewer.formsCount = 4; $('div.imageForms').append($.uploaderPreviewer.createImageForms()); // the images are populated if the admin form is to edit, and not // to insert if ($('div.imageForms[images]').length) { var imageFilenames = $('div.imageForms[images]').attr('images').split(','); $.uploaderPreviewer.populateImages(imageFilenames); $('div.imageForms[images]').removeAttr('images'); } } $('#buttonSave').click(function() { var itemId = $(this).attr('itemId'); if (itemId) { $.itemForm.update(itemId); } else { $.itemForm.insert(); } }); }); })(jQuery); &lt;/script&gt; </code></pre>
php jquery
[2, 5]
6,021,372
6,021,373
how to kill the session when user closed the brower without logout
<p>I am developing one aspnet application in that i am using Sessions. if user login into the application and click on logout here i am closing session. </p> <p>suppose if the user doesn't click on the logout and he close the browser. how to kill the session when user closed the brower without logout</p> <p>Regards kumar</p>
c# asp.net
[0, 9]
492,158
492,159
Dynamically generated html elements stop working
<p>In the following code I have some comments in an array which are displayed in a div using jQuery. Each comment has an options button which works fine until I post a new comment. I tried using unique IDs for each element but it didn't work either.</p> <p>When the page loads, the options buttons work; but when I submit a new comment, none of the buttons work. What am I doing wrong? </p> <p>Here's my script:</p> <pre><code>var i = 0; var comments_display= ""; var comments = ['Hello World!', 'Hello! This is a comment.']; //reads the entire array, creates the content, and sends it to the div function show_comments(){ for (i=0; i&lt;comments.length; i++){ comments_display += "&lt;div class='single_comment_container'&gt;"; comments_display += "&lt;div class='comment_comment'&gt;" + comments[i] + "&lt;/div&gt;"; comments_display += "&lt;div class='options'&gt;Options&lt;/div&gt;&lt;/div&gt;"; } $("#comment_container").html(comments_display); comments_display = ""; } //appends a new comment to the array function new_comment(){ if ($("#comment_input").val() == null || $("#comment_input").val() == ""){ alert("Your comment must be at least 1 character long."); } else{ comments.push($('#comment_input').val()); show_comments(); $("#comment_input").val(""); } } $(document).ready(function(){ show_comments(); $("#submit_comment").click(function(){ new_comment(); }); //display a message when an element of the class 'options' is clicked $(".options").click(function(){ alert("OPTIONS"); }); }); </code></pre> <p>And here's a fiddle to see how it works. <a href="http://jsfiddle.net/fahKb/3/" rel="nofollow">http://jsfiddle.net/fahKb/3/</a></p> <p>Thank you for taking your time to read this question.</p>
javascript jquery
[3, 5]
1,417,304
1,417,305
jQuery - Imitate Click
<p>I want to imitate an anchor click when a user clicks on the containing <code>&lt;TD&gt;</code> but having problems.</p> <p>This is the JS part:</p> <pre><code>$('contactTab').click(function() { $('contactTabLink').trigger("click"); }); </code></pre> <p>And this is the HTML part:</p> <pre><code>&lt;td class="previewTabs" id="contactTab"&gt; &lt;a class="previewTabLink" id="contactTabLink" rel="#contactOverlay"&gt;CONTACT&lt;/a&gt; &lt;/td&gt; </code></pre> <p>When somebody clicks the <code>&lt;TD&gt;</code> contactTab, it should trigger a click event on <code>&lt;A&gt;</code> contactTabLink which then launches an Overlay. My problem is that the JS function with click listener is NOT firing at all.</p> <p>Can anybody see where I am going wrong?</p> <p>EDIT 1:</p> <p>I have changed the selectors to have #'s but it still won't fire the function.</p>
javascript jquery
[3, 5]
6,005,883
6,005,884
Need help with string manipulation please
<p>If my string has values as :-</p> <pre><code>myString = "Good Morning,Good Night"; </code></pre> <p>and I want to reverse the values in it like as follows:-</p> <p>I want the final values in the myString as:-</p> <pre><code>myString = "Good Night,Good Morning"; </code></pre> <p>How do I achieve this? Any help will be appreaciated. Thanks. :)</p>
c# asp.net
[0, 9]
3,156,831
3,156,832
How to get values from templatefields in Grdiview SelectedIndexChanged
<p>I have a gridview and sqldatasource.</p> <pre><code>protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = GridView1.SelectedRow; TextBox rrdp = (TextBox)row.FindControl("name"); txt1.Text = rrdp.text.ToString() } </code></pre> <p>But I'm getting : Object reference not set to an instance of an object. at the txt1.text = //etc..</p> <p>The columns are itemtemplates , the values are not nulls.</p> <p>Thanks</p>
c# asp.net
[0, 9]
280,024
280,025
android : getting installed application's default methods
<p>Is there any default methods to perform backup process. Tell me if anyone knows. Thanks in Advance.</p>
java android
[1, 4]
79,156
79,157
add web Reference in webservices issue
<p>i have developed a web servcies in my local system with name (inbox service). when i did add web reference i got like this in my web service descpition file</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/"&gt; &lt;contractRef ref="http://localhost:1518/popup-message/InboxService.asmx?wsdl" docRef="http://localhost:1518/popup-message/InboxService.asmx" xmlns="http://schemas.xmlsoap.org/disco/scl/" /&gt; &lt;soap address="http://localhost:1518/popup-message/InboxService.asmx" xmlns:q1="http://tempuri.org/" binding="q1:InboxServiceSoap" xmlns="http://schemas.xmlsoap.org/disco/soap/" /&gt; &lt;soap address="http://localhost:1518/popup-message/InboxService.asmx" xmlns:q2="http://tempuri.org/" binding="q2:InboxServiceSoap12" xmlns="http://schemas.xmlsoap.org/disco/soap/" /&gt; &lt;/discovery&gt; </code></pre> <p>but when i deploy my application (project) on server. i have my project url like this ex: <a href="http://abc.com" rel="nofollow">http://abc.com</a>, now my webservice is like this <a href="http://localhost:1518/popup-message/InboxService.asmx" rel="nofollow">http://localhost:1518/popup-message/InboxService.asmx</a>.<br /> if i tied to call method from my page it is not working what is issue here</p> <p>anyhelp would be great. thank you</p>
c# asp.net
[0, 9]