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,427,334
2,427,335
calling javascript from server side
<p>How to call javascript function from server side</p>
c# asp.net
[0, 9]
2,267,786
2,267,787
calculate all textboxs value OnTextChanged
<p>i have many textboxes that the user should fill, and i have in the bottom of the page a textbox sum.</p> <p>i need a way to calculate the sum of all the textboxs values and put the result in the sum textbox.</p> <p>and the sum should be updated after every textbox changed.</p> <p>example :</p> <pre><code>&lt;asp:TextBox ID="tb1" runat="server" onkeypress="CheckNumeric(event);" OnTextChanged="calculate" AutoPostBack="true" &gt; &lt;asp:TextBox ID="tb2" runat="server" onkeypress="CheckNumeric(event);" OnTextChanged="calculate" AutoPostBack="true" &gt; &lt;asp:TextBox ID="tb2" runat="server" onkeypress="CheckNumeric(event);" OnTextChanged="calculate" AutoPostBack="true" &gt; &lt;asp:TextBox ID="tbSum" runat="server"&gt; </code></pre> <p>it doesn't matter if the solution should be in javascript</p>
c# javascript asp.net
[0, 3, 9]
3,850,154
3,850,155
JQuery call to .php file and passing three arguments
<p>I want to call a .php file and pass three arguments so that the .php files GETS from the query string. I am new to JQuery. Can someone illustrate how to call the .php file using JQuery?</p>
php jquery
[2, 5]
3,697,319
3,697,320
jQuery: trying to load jQuery dynamically. Not instantiating until after script has been run
<pre><code>javascript:var width=1900; var height=800; var jQueryScriptOutputted = false; function initJQuery() { if (typeof(jQuery) == 'undefined') { if (! jQueryScriptOutputted) { jQueryScriptOutputted = true; var oHead = document.getElementsByTagName('HEAD').item(0); var oScript= document.createElement("script"); oScript.type = "text/javascript"; oScript.src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; oHead.appendChild( oScript); } setTimeout("initJQuery()", 50); } else { $(function() { }); } } initJQuery(); var container=$("#foreplay-root"); var canvas=$("#foreplay-root canvas"); canvas.width(width); canvas.height(height); container.width(width); container.height(height); </code></pre> <p>the above is a bookmark (hence the <code>javascript:</code> at the beginning).</p> <p>but, in the console, it says $ is undefined. But when I type $ or jQuery into the console (webkit of course) I get f<code>unction (a,b){return new e.fn.init(a,b,h)}</code> which is correct.</p> <p>So, I'm thinking there is something wrong with the time it takes to init jQuery from teh time it loads.</p> <p>*NOTE: this is for angry birds. <a href="http://chrome.angrybirds.com/" rel="nofollow">http://chrome.angrybirds.com/</a></p>
javascript jquery
[3, 5]
2,486,894
2,486,895
Moving a view perfectly from one side to another in Android using Animations
<p>I want to have a block start perfectly off of the screen, and then have it move across the entire screen so that it becomes invisible.</p> <h2>This is a graphic of what it should look like:</h2> <p><img src="http://i.stack.imgur.com/kc8xU.png" alt="enter image description here"></p> <h2>And this is my code:</h2> <pre><code>public class Move extends Activity { TranslateAnimation moveup; Button btn; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_move); moveup = new TranslateAnimation (Animation.RELATIVE_TO_PARENT, 0, Animation.RELATIVE_TO_PARENT, (float) .99, Animation.RELATIVE_TO_PARENT, 0, Animation.RELATIVE_TO_PARENT, 0); moveup.setDuration(6000); moveup.setFillAfter(true); btn = (Button) findViewById(R.id.btn); btn.startAnimation(moveup); } </code></pre> <p>I want to know if this is possible just using parameters in the TranslateAnimation method. I feel like I should be able to, but my parameters aren't correct.</p>
java android
[1, 4]
2,685,748
2,685,749
Asp.net upload file programatically
<p>I need a way to upload a file to server programatically or using a client side API.</p> <p>Any help is very appreciated.</p>
c# javascript asp.net
[0, 3, 9]
5,585,073
5,585,074
Change values in <td>'s with jquery
<p>I have a table of values. Is it possible with JQuery by clicking on currency link to change value in cells with exchange rates? This static example table</p> <pre><code>&lt;table border="1"&gt; &lt;tr&gt; &lt;td class="currency"&gt;100&lt;/td&gt; &lt;td class="currency"&gt;200&lt;/td&gt; &lt;td class="current"&gt;now in USD&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="currency"&gt;150&lt;/td&gt; &lt;td class="currency"&gt;230&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="currency"&gt;400&lt;/td&gt; &lt;td class="currency"&gt;200&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="currency"&gt;550&lt;/td&gt; &lt;td class="currency"&gt;2920&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;a href="#" class="USD"&gt;USD&lt;/a&gt; &lt;a href="#" class="EUR"&gt;EUR&lt;/a&gt; </code></pre> <p>Pls look <a href="http://jsfiddle.net/halofourteen/PjPYV/2/" rel="nofollow">jsfiddle</a>. In other words by clicking on currency values must recalculate them according to rates. In my example on jsfiddle I want to understand how simply change value(for example <code>usd=1</code> <code>eur=1.3</code>) Thanks!</p>
javascript jquery
[3, 5]
491,235
491,236
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,849,557
3,849,558
Open popup onbeforeunload
<p>I want to open pop-up on exit (Not "stay on page or leave" box). I can't get this working. Where do I make mistake ?</p> <pre><code> function poponload() { testwindow = window.open("http://www.google.com", "mywindow", "location=1,status=1,scrollbars=1,width=5,height=5,left=100,top=100"); } $(document).ready(function () { window.onbeforeunload = function () { poponload(); }); $(window).unload(function () { poponload(); }); }); </code></pre>
javascript jquery
[3, 5]
2,639,580
2,639,581
How do you disable a button using an onclick javascript function?
<p>I need to remove button click event after press. How can I edit the function so whenever it's clicked, it gets disabled then runs the url, or vise-versa.</p> <pre><code>&lt;form id="edit" action="" method="post"&gt; &lt;input type="submit" name="button" onclick="this.value='test...'; MyFunction();" id="1" class="button blue" value="Submit"&gt; &lt;/form&gt; &lt;script&gt; function MyFunction() { var url = "editing.php"; document.getElementById("edit").setAttribute('action', url); return false; } $(".blue").click(function(){ $(".blue").removeClass("disabled"); $(this).addClass("disabled"); }); &lt;/script&gt; </code></pre>
javascript jquery
[3, 5]
4,588,459
4,588,460
accessing html control inside the page from web user control
<p>I have created a web user control I want to change the iframe' src value when the user click on the link but the problem is that I dont have access to iframe inside the page from web user control I think there is a way because my control is in the page they have some relation perhaps I like to find something like this : <br /></p> <pre><code>public void On_WebUserControl_LinkButton_Click(object sender, EventArgument e) { HtmlControl iframe = (HtmlControl) MainPage.findcontrol("myFrameName"); iframe.attribute["src"] = mystringsrc; } </code></pre>
c# asp.net
[0, 9]
1,761,638
1,761,639
How to optimize an asp.net spawning a new process for each request?
<p>I have an asp.net mvc application that spawns a <code>Process</code> as follows:</p> <pre><code> Process p = new Process(); p.EnableRaisingEvents = true; p.Exited += new EventHandler(p_Exited); p.StartInfo.Arguments = "-interaction=nonstopmode " + inputpath; p.StartInfo.WorkingDirectory = dir; p.StartInfo.UseShellExecute = false; p.StartInfo.FileName = "pdflatex.exe"; p.StartInfo.LoadUserProfile = true; p.Start(); p.WaitForExit(); </code></pre> <p>Before going further, I need to know whether, e.g., <code>pdflatex.exe</code> is a managed code or a native code?</p> <h2>Edit 1</h2> <p>I need to consider this because: (Hopely I am not wrong...)</p> <ol> <li>Each Asp.net application runs in an separate/isolated AppDomain as opposed to a separate/isolated process.</li> <li>A native executable cannot live in an AppDomain.</li> </ol> <p>to be continued...</p> <p>Shortly speaking, I hope my site does not spawn a new process for each request. Because a process is more expensive than an application domain.</p> <h2>Edit 2</h2> <p>My asp.net mvc application allows users to submit <code>LaTeX</code> input commands such as <code>$ax^2+bx+c=0$</code> to be converted to a pdf file rendering an quadratic equation. Behind the scene, this web app will spawn a process executing <code>pdflatex.exe</code>. The job of <code>pdflatex.exe</code> is converting the <code>LaTeX</code> input commands to pdf document.</p>
c# asp.net
[0, 9]
4,653,590
4,653,591
navigation bar animation hiden from the last to the first
<p>I am new in jquery and animations, and I need help to do this. I've got a navegation bar in my website and it has 10 buttons (level 1), when one of them has been clicled the navigation bas has to hide the buttons from right to left, when all of them have been hiden, start to appera a new navegation bar (level 2) shown from the first button to the last. the level 2 can have more or less number of buttons. to be more clear I have this:</p> <p>1 2 3 4 5 6 when I click 4 the bar has to do something like this</p> <p>1 2 3 4 5 6</p> <p>1 2 3 4 5 </p> <p>1 2 3 4 </p> <p>1 2 3 </p> <p>1 2 </p> <p>1 </p> <p>and the new navigation has the items of 4. (4 it's the parent and this level has the children)</p> <p>4.1 </p> <p>4.1 4.2</p> <p>4.1 4.2 4.3</p> <p>4.1 4.2 4.3 4.4 </p> <p>4.1 4.2 4.3 4.4 4.5</p> <p>I will thank all the help to create it.</p>
javascript jquery
[3, 5]
4,921,408
4,921,409
How to set readonly property of a textbox in javascript
<p>i have a textbox whose property i need to set as readonly... how to set that? I tried </p> <pre><code>document.getElementbyid("txtbox").readonly=true; document.getElementbyid("txtbox").disable=true; document.getElementbyid("txtbox").setattribute("readonly","readonly"); </code></pre> <p>all these are not working for me. Disable is working but that is passing the control values as null to the database...again that is a problem for me..</p>
javascript asp.net
[3, 9]
3,021,179
3,021,180
hosting a java based server
<p>i want to write a game that will utilize java applets as client programs and will run a server application to operate the game (control the game handle the chat etc) is there a way to host such an application on a free server, or does it require a specialized server? also is there a way to use php for tcp connection so it will receive the data and send it using tcp to the users (using a db to store user information from request to request) (for instance will forward chat massages)</p>
java php
[1, 2]
1,061,991
1,061,992
Javascript/jQuery, Display div after animation finishes
<p>here is a working jsfiddle:</p> <p><a href="http://jsfiddle.net/YnT2X/" rel="nofollow">http://jsfiddle.net/YnT2X/</a></p> <p>I don't want the div to display until AFTER the return animation completes. </p> <p>jQuery:</p> <pre><code>$(document).ready(function () { $("#menu").hover(function () { $('#arrow').hide(); $("body").children(':not(#menu)').css("-webkit-filter", "blur(2px)"); $(this, '#arrow').stop().animate({ width: "200px" }, 250, function () { if ($('#menu').width() == '200') { $('.text').fadeIn(200); } }); }, function () { $(this).stop().animate({ width: "0px" }, 250) $("body").children(':not(#menu)').css("-webkit-filter", "none"); $('.text').fadeOut('fast'); $('#arrow').show(); }); }); </code></pre>
javascript jquery
[3, 5]
2,484,972
2,484,973
Javascript array with default values (equivalent of Python's defaultdict)?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/11503666/set-undefined-javascript-property-before-read">Set undefined javascript property before read</a> </p> </blockquote> <p>Is there an equivalent of <a href="http://docs.python.org/library/collections.html#collections.defaultdict" rel="nofollow">Python's defaultdict</a> in Javascript? This would be a Javascript array where the value returned for a missing key is definable. Something like:</p> <pre><code>var a = defaultArray("0"); console.log(a['dog']); // would print 0 </code></pre> <p>If not, how would you implement it?</p>
javascript python
[3, 7]
3,981,282
3,981,283
retrieve all the hyperlinks from html file using jquery or javascript
<p>I need to retrieve all the hyperlinks present in current html page using jquery. How can i use regular expressions to do that? Also can i use collections in javascript to store all the hrefs in the list?</p>
javascript jquery
[3, 5]
3,693,673
3,693,674
Calculate largest width of a set of elements using jQuery
<p>I have made a quick Jsbin: <a href="http://jsbin.com/ujabew/edit#javascript,html,live" rel="nofollow">http://jsbin.com/ujabew/edit#javascript,html,live</a></p> <p>What i'm trying to achieve is to find out which is the largest <code>&lt;section&gt;</code> out of the 3 from the link. So what i'd like is to, after the loop runs, is to have <code>var width</code> set to the largest possible number that any of the widths could be.</p> <p>Code in progress posted in link</p>
javascript jquery
[3, 5]
797,703
797,704
Refresh a div without using jquery .load?
<p>I have been refreshing my divs by using .load but this is not the easiest thing for my site. Is there some sort of jquery function that will just reload a div's content. Because the div contains PHP, I simply want it to refresh to reflect a change that the user has made.</p> <p>I've been searching for a while but cannot find anything that explains how to do this.</p>
javascript jquery
[3, 5]
5,775,950
5,775,951
Call Server Side function with Keyup Event in Asp.Net
<p>I have a TextBox and I want to capture the <code>Keyup</code> in the Textbox and get the TextBox value at the Code Behind File and Bind The GridView with the Input Received from the TextBox.</p> <p>I don't want to use <code>Text_Change</code> Event of Asp.net. i want that when ever user enter anything in the TextBox, that value should go to code behind and bind the grid by calling <code>BindGrid</code> Function</p> <pre><code>&lt;asp:TextBox ID="txtSearch" runat="server"&gt;&lt;/asp:TextBox&gt; protected void BindGrid(string searchvalue) { // i want the txtSearch value over here. } </code></pre>
c# asp.net
[0, 9]
4,229,791
4,229,792
PHP to C#.NET/ASP.NET
<p>How to write this in C #? Can you use Dictionary to this?</p> <pre><code>$count = 0; if(count($_SESSION['goods']) &gt; 0) { $count = count($_SESSION['goods']) -1; // array start on zero. } $_SESSION['goods'][$count]["products_id"] = $_POST["products_id"]; $_SESSION['goods'][$count]["price"] = $_POST["price"]; $_SESSION['goods'][$count]["number"] = $_POST["number"]; </code></pre>
c# php
[0, 2]
2,157,878
2,157,879
Shared Preferences in Android using check box
<p>I have a preference file which uses checkboxes and i want to use it to determine when it been checked or not. However in the code itself, there is already a boolean statement. please check this:</p> <pre><code>String key = LocationManager.KEY_PROXIMITY_ENTERING; Boolean enteringRegion = intent.getBooleanExtra(key, false); if (enteringRegion){ Log.d(getClass().getSimpleName(), "entering"); } else{ Log.d(getClass().getSimpleName(), "exiting"); } boolean enteringRegions = prefs.getBoolean("alarm_entering", true); boolean exitRegion = prefs.getBoolean("alarm_exiting", false); </code></pre>
java android
[1, 4]
4,340,708
4,340,709
Is there a way to search for text inside rows of a table with Javascript?
<p>I have an input text box and an html table with rows of text.</p> <p><strong>Table:</strong></p> <ul> <li>This is the first row of my table. </li> <li>This is the second row of my table.</li> <li>This is the third row of my table.</li> </ul> <p>When I start typing in the input text box, I want the rows that do not match to disappear.</p> <p>For example, if I type <strong>second row</strong>, I would like my table to show only this row:</p> <ul> <li>This is the <code>second row</code> of my table.</li> </ul> <p>If I type <strong>this is the</strong>, I would like my table to show all 3 matching rows:</p> <ul> <li><code>This is the</code> first row of my table. </li> <li><code>This is the</code> second row of my table.</li> <li><code>This is the</code> third row of my table.</li> </ul> <p>If anyone knows of a script to do this, I would appreciate it! (javascript or jquery)</p>
javascript jquery
[3, 5]
427,449
427,450
C# object sender - getting the Method from which it was called
<p>I've got these Methods:</p> <pre><code> private void button_Click(object sender, EventArgs e) { //Changes the Text in the RichBox, EXAMPLE: richtTextBox.Text = "Now Changed and calling Method richTextBox_TextChanged"; } </code></pre> <p>And,</p> <pre><code> private void richTextBox_TextChanged(object sender, EventArgs e) { //Wants something like that if(called from button_click) { //DO SOMETHING } else { //DO SOMETHING } } </code></pre> <p>How can I handle this, to know if it was called from the Button_click? Do I have to use the object sender to get informations? But how?</p> <p>Hope u guys can help me</p>
c# asp.net
[0, 9]
5,496,504
5,496,505
Executing JavaScript function in Code behind -- How to Get the Return Value in Code Behind
<p>I have following JavaScript function, Which call Jquery JSON function and get the DateTime with respect to timezone. This works fine.</p> <pre><code> &lt;script type="text/javascript"&gt; function JSFunctionName() { $(document).ready(function () { var timezone = "US/Central"; $.getJSON("http://json-time.appspot.com/time.json?tz=" + timezone + "&amp;callback=?", function (data) { if (data.hour &lt; 12) { //alert(data.hour + ':' + data.minute); // want to return this value data.hour + data.minute //document.getElementById('&lt;%=HiddenField1.ClientID %&gt;').value = data.hour + ':' + data.minute;// this does not work } }) }); } &lt;/script&gt; </code></pre> <p>Now I am calling this Javascription function in Code behind on onclick of button</p> <pre><code>&lt;asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /&gt; </code></pre> <p><strong>Code behind</strong></p> <pre><code>protected void Button1_Click(object sender, EventArgs e) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "JSFunctionName();", true); // here I need the DateTime value that is get from JSON //Response.Write(HiddenField1.Value); } </code></pre> <p>How can I return the value from Javascript to code behind immediate after call of <code>Page.ClientScript.RegisterStartupScript</code></p> <p>Please note I have try to set the value in HiddenField, but its not working. you can see in the comment.</p> <p>Any idea or alternative solution will be appreciated.</p> <p>Thanks</p>
c# javascript jquery asp.net
[0, 3, 5, 9]
1,401,582
1,401,583
How can I Execute a code in background?
<p>On a click event I have some codes that takes about 4 seconds before the user can be redirected.</p> <p>Is there a way that I can redirect the user, and the code will still be executed on the server? I </p>
c# asp.net
[0, 9]
3,737,287
3,737,288
Making the case for .net
<p>I work for a small company of about 10 developers. My boss considering dumping .net and moving over to java for new developments. His brother in law convinced him that windows server license cost is a waste of money and that linux based machines are more stable. Also the fact that java is open source, means that there is more developer community support. I am trying to make my case to stick to .net (all our existing web applications are in .net).</p> <p>My arguments are</p> <ol> <li>Development is a lot faster in c#. Especially with the advent of Linq, you can do the same thing a lot faster and with much lesser code in C#. Since the developer time over a year is far more than windows server licensing fee, the cost argument for java is out of the window.</li> <li>As far as stability is concerned massive sites like hotmail and earlier versions of stackoverflow worked fine on windows based machines. </li> </ol> <p>Are there any other strong reasons?</p>
java c#
[1, 0]
539,726
539,727
Unbinding inline onClick not working in jQuery?
<p>Okay so, I'm wondering how to unbind an inline onclick event in jQuery. You'd think <code>.unbind()</code> would work, however it doesn't. </p> <p>To test this for yourself, play around with the following HTML and JavaScript:</p> <pre><code>function UnbindTest() { $("#unbindTest").unbind('click'); } function BindTest() { $("#unbindTest").bind('click', function() { alert("bound!"); }); } &lt;button type="button" onclick="javascript:UnbindTest();"&gt;Unbind Test&lt;/button&gt; &lt;button type="button" onclick="javascript:BindTest();"&gt;Bind Test&lt;/button&gt; &lt;button type="button" onclick="javascript:alert('unbind me!');" id="unbindTest"&gt;Unbind Button&lt;/button&gt; </code></pre> <p>As you can see, unbinding does not unbind the inline <code>onclick</code> event... however it does unbind the click event added with <code>bind()</code>. </p> <p>So, I'm wondering if there is a way to unbind inline onclick events short of doing the following:</p> <pre><code>$("#unbindTest").get(0).onclick = ""; </code></pre> <p>Thanks</p>
javascript jquery
[3, 5]
2,050,902
2,050,903
Drop-down navigation - menu flickering on mouseleave
<p><a href="http://jsfiddle.net/deswolf/D9X53/" rel="nofollow">http://jsfiddle.net/deswolf/D9X53/</a> If you play around with this menu for a little bit, you will notice that when your mouse leaves at the top, you get a lot of flickering, which is really annoying. How can I fix this?</p>
javascript jquery
[3, 5]
3,235,959
3,235,960
Easing the excution flow in JS/JQuery
<p>Easing the excution flow in JS/JQuery I've loop like this:</p> <pre><code>for (int i = 0; i &lt; 100; i++) { doSomething(...); // returns momentally } </code></pre> <p>I'm looking for a way to apply easing to the execution flow - by giving a total duration and an easing pattern (ex. 2 seconds &amp; easeback). Is is something doable in JS (I'm using jQuery too)?</p> <hr> <p><strong>Update 2</strong> Updated to clarify the question - I'm looking for the following:</p> <p><strong>Update 3</strong> - Sheikh Heera is right, the sample I gave doesn't illustrate the real problem, execute function is updated to call an external module, which is closer to what I have. I don't see how jQuery's animate can be applied directly for calling functions.</p> <pre><code>easer.ease({ start: 0, end: 100, duration: 900, easing: "easeOutBounce", execute: function (e) { ExternalModule.DoSomethingUseful(e); } }); </code></pre> <p>where <code>start</code> the <code>end</code> are integers, specifying the animated range, <code>duration</code> is animation duration in milliseconds, <code>easing</code> is the easing pattern used to animate the values within a range, <code>execute</code> - the function which gets called with values from <code>0</code> to <code>100</code>, using the easing pattern supplied in the sample above it will animate myDiv's height from <code>0</code> to <code>100</code> within <code>0.9</code> seconds using <code>easeOutBounce</code> easing function. </p> <p>Ideally as a small standalone plugin based on <code>jQuery</code>, definitely not part of <code>Mootools</code> or any other heavy hitters I can't afford bringing them in just for that.</p>
javascript jquery
[3, 5]
2,573,859
2,573,860
Android: Opening an email application on clicking the label
<pre><code>&lt;TextView android:id="@+id/TextView03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/header" android:layout_alignLeft="@+id/button1" android:layout_marginBottom="127dp" android:text="@string/email" android:textColor="#000000" android:textSize="12dp" android:typeface="sans" /&gt; </code></pre> <p>I have a test view which holds my email information. How do i open an default email client on the click of the message. </p> <pre><code>&lt;string name="email"&gt;E-mail:[email protected]&lt;/string&gt; </code></pre> <p>Here is my Override method. </p> <pre><code> @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView t2 = (TextView) findViewById(R.id.TextView03); email.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // TODO Auto-generated method stub } }); } </code></pre> <p>What should i do from here?</p>
java android
[1, 4]
3,605,936
3,605,937
How to show User name after login when not present in DB?
<p>On my website master page there are 2 divs- div_login and div_welcome. By default login div is visible and welcome div is hidden. When user fills his/her login details then div_login gets hide and welcome div appears. I am fetching data from web-service. On welcome div I want to give first name and last name of the user, but in case if user do not have his first name and last name in Database then welcome div appears but gives error. please help. Website link is [this][1]</p> <p>Code:</p> <pre><code> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["myLogin"] != null &amp;&amp; Session["Pwd"] != null) { Login_Div.Visible = false; WelCome_Div.Visible = true; lblFName.Text = Sessio["lblFName"].ToStrin(); lblLName.Text = Session["lblLName"].ToString(); } else { WelCome_Div.Visible = false; Login_Div.Visible = true; } } } [1]: https://www.starbazaarindia.com/test/index.aspx </code></pre>
c# asp.net
[0, 9]
2,737,443
2,737,444
Methods and practices of making an URL hash
<p>My application uses ajax and refreshes some parts of a template. Now I need to make an URL hash containing some variables that will be used for refreshing a page after a page is loaded that contains a hash.</p> <p>Now I need a javascript procedure for making a hash. </p> <ol> <li><p>How to serialize variables?</p></li> <li><p>How to encode that serialized string?</p></li> </ol> <p>I'm using jquery, maybe there is a solution already?</p>
javascript jquery
[3, 5]
2,849,406
2,849,407
Client side image resize and save
<p>is there a way to resize and save an image to a temp file through a web browser client side?</p> <p>What I am trying to accomplish is resize an image to a max 1024px wide/high, save it locally and then upload the resized image to a server.</p> <p>The reason is that I am building an online app that allows users to upload a maximum of 6 high res images upto 4mb each. Then when on the server I resize to 1024px wide/high which is actually only 200kb or so. This is a bit of a waste uploading 4mb only to be resized to a smaller file size so I am hoping there is a way to resize, save a temp file client side before uploading.</p> <p>Any help appreciated.</p>
php javascript jquery
[2, 3, 5]
5,542,320
5,542,321
Local Storage using Javascript / Jquery (Without using HTML5)
<p>I want to replicate Local Storage concept (similar to HTML5) in javascript or jquery.</p> <p>But unfortunately I don't have idea, how to start this.</p> <p>Can any one suggest how to implement local storage using javascript or jquery (Without using HTML5)?</p>
javascript jquery
[3, 5]
857,821
857,822
Merge Merger header columns in gridview?
<p>How can I create below type of gridview with merge merged header columns? If anybody have example share with me.</p> <p><img src="http://i.stack.imgur.com/LqC9E.jpg" alt="alt text"></p> <p>Thanks in advance.</p>
c# asp.net
[0, 9]
1,815,623
1,815,624
create a game level
<p>I am looking to create a game like mega man or mario, I have been trying to find a good solution as to how to generate my levels. The only thing I can think of would be to create a level file and load coordinates as the player moves through the level. Which would suck because I would have to code the floor to load, any boxes or objects all seperately. Assuming this would work.</p> <p>for example</p> <pre><code> public static TextureRegion platform; items = new Texture(game, "level.png"); platform = new TextureRegion(items, 64, 160, 64, 16); </code></pre> <p>Then go through and add collision detection for each region. I am sure there is a better and easier way. I was looking at replica island but their code is a hot mess. Just curious what others have used, I am new to programming and still learning some things.</p>
java android
[1, 4]
3,613,892
3,613,893
autocomplete with JsonConvert.SerializeObject
<p>Am just trying to display a autocomplete list in my asp page, am using JsonConvert.SerializeObject here, when I search for the items starts with <code>1</code>, after serializing the data, while debugging I can see the data like,</p> <pre><code>"[{\"PharmacyItemName\":\"100GM\",\"PharmacyItemId\":1} ,{\"PharmacyItemName\":\"12 HERB SHAMPOO 100ML\",\"PharmacyItemId\":2} ,{\"PharmacyItemName\":\"12HERB SHAMPOO 50ML\",\"PharmacyItemId\":3} ,{\"PharmacyItemName\":\"1ST AID PLASTER\",\"PharmacyItemId\":4} ,{\"PharmacyItemName\":\"1ST BITES RAGI&amp;DAL 400G\",\"PharmacyItemId\":19712}]" </code></pre> <p>and in the jQuery am displaying the result like,</p> <pre><code>success: function (data) { var s = jQuery.parseJSON(data.d); if (s != null) { response($.map(s, function (item) { return { label: item.PharmacyItemName, value: item.PharmacyItemName } })); } else { return null; } }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } </code></pre> <p>here am getting the <code>PharmacyItemName</code> correctly when I search the names starts with numeric values like <code>1,2,3 etc.,</code>. But, when I try to search the names starts with strings like <code>a,b etc</code> in the webservice I can see the values like,</p> <pre><code>[{\"PharmacyItemName\":\"S AMLONG 2.5MG TAB\",\"PharmacyItemId\":15860} ,{\"PharmacyItemName\":\"S AMLONG 5MG TAB\",\"PharmacyItemId\":15861"}] </code></pre> <p>but it throws error in the jQuery part like, <code>Microsoft JScript runtime error: Unable to get value of the property 'toString': object is null or undefined</code>.</p> <p>Y it throws like this, can anyone help me here</p>
jquery asp.net
[5, 9]
1,895,264
1,895,265
Android SMS Database Columns Variation HTC/AOSP
<p>I'm trying to read sms information such as sms and received phone number and i use this code </p> <p>`private void populateSMS(Context context, int max_count) { Cursor c = context.getContentResolver().query( Uri.parse("content://sms"), null, null, null, "date desc limit " + max_count);</p> <pre><code> int sms_icon = android.R.drawable.sym_action_email; if (c.moveToFirst()) { do { String callerPhoneNumber = c.getString(3); try { Long.valueOf(callerPhoneNumber.replace("+", "").replace( "-", "")); } catch (NumberFormatException e) { callerPhoneNumber = c.getString(16); if (callerPhoneNumber == null) { callerPhoneNumber = c.getString(3); } ` </code></pre> <p>this code works fine but if i install this on AOSP system the column number changes. If i use the above code on AOSP, the application would crash and i have to change the c.getString(16) to (12) and (3) to (2) as HTC Sense 4 uses (16) and Sense 3.x uses (15) and i end up having separate projects for each system.. </p> <p>the question what should i do to have it read all possible columns in just one project..</p> <p>thanks</p>
java android
[1, 4]
4,246,933
4,246,934
How pass variable from jquery to php?
<p>i want way to pass variable from jquery to php how to do it? ihave this code </p> <pre><code>&lt;script&gt; $(document).ready(function(){ $('a').click(function(){ var title = $(this).attr('value'); $('.div').attr('value', title); }); }); &lt;/script&gt; </code></pre> <p>i want to pass the title of an element to php via a javascript variable.</p>
php javascript jquery
[2, 3, 5]
5,961,548
5,961,549
How can I execute js function calls when my .js file is loaded?
<p>I have the following function calls:</p> <pre><code>Layout.Controls.sidebar(Button.Add); Layout.Controls.sidebar(Button.Init); Layout.Controls.printScreen(Button.Add); Layout.Controls.theme(Button.Add); Layout.Controls.theme(Button.Init); </code></pre> <p>I put the calls inside of a .js file. But how can I make it so these calls are executed when the .js file is loaded?</p>
javascript jquery
[3, 5]
839,980
839,981
Get Javascript tag content
<p>Hi I want to save a website's source code into a file using java. From the source code i want to get only <code>&lt;script&gt; &lt;/script&gt;</code> tag contents how can i do that?</p>
java javascript
[1, 3]
197,938
197,939
javascript replace newlines in textareas
<p>I have a <code>textarea</code> in a contact form, when it is submitted to the page that sends the mail, it passes through another page.</p> <p>in the second page, when I <code>echo $_POST['textarea']</code> I get all the text in one line.</p> <p>Is there a javascript or PHP code that fix this?</p>
php javascript
[2, 3]
5,140,246
5,140,247
In jQuery Isotope or Masonry, can I ignore an item?
<p>I have this list of items I want to filter through:</p> <pre><code>&lt;ul id="container"&gt; &lt;li class="item filter"&gt;This is where I'd put my filters&lt;/li&gt; &lt;li class="item"&gt;Item 1&lt;/li&gt; &lt;li class="item"&gt;Item 2&lt;/li&gt; &lt;li class="item"&gt;Item 3&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>So then I want to execute it like so...</p> <pre><code> $container.isotope({ itemSelector : '.item' }); </code></pre> <p>...but I want an option like <code>ignore: '.filter'</code>. Is something like that doable?</p> <p>The whole goal is to put the filters inside the container, taking on the same styles and transitions.</p>
javascript jquery
[3, 5]
3,708,183
3,708,184
Cannot select the ComboBox item
<p>I have two Comboboxes where the second one is dependent upon the first one.</p> <p>When the SelectedIndexChanged event of the first Combobox fires then the second Combobox will be enabled.</p> <p>After the event, the second Combobox is enabled but I cannot select the ComboBox item.</p> <p><strong>EDIT</strong></p> <p>I use Dev express Tools</p> <p>First Combo I load in Page_Load Event</p> <p>I use Server Side code:</p> <pre><code>protected void ASPxComboModule_SelectedIndexChanged(object sender, EventArgs e) { LoadSecondCombo(); LoadSecondCombo.Focus(); } </code></pre> <p>There is no problem in loading, but I'm unable to select 2nd combo item.</p>
c# asp.net
[0, 9]
1,798,087
1,798,088
How to limit character in jquery tags input?
<p>i have used the following code to limit the character but it is not working.. pls help me. thanks in advance.</p> <pre><code> &lt;td nowrap="nowrap"&gt; &lt;asp:TextBox MaxLength="60" runat="server" ID="Keyword" CssClass="TaskTitle" Width="270px" TextMode="SingleLine" /&gt; &lt;/td&gt; $('#Keyword_tag').bind('keyup', function() { var characterLimit = 60; var charactersUsed = $('#Keyword').val(); charactersUsed = charactersUsed.replaceAll(','); if (charactersUsed.length &gt; characterLimit) { alert(charactersUsed.length); charactersUsed.length = characterLimit; alert(charactersUsed.length); $(this).val($(this).val().slice(0, characterLimit)); $(this).scrollTop($(this)[0].scrollHeight); } </code></pre> <p>I have to limit the character to 60 but when i assign the character limit value to character used it is not getting assigned. I am using jquery tags input plugin for the keyword field</p>
jquery asp.net
[5, 9]
3,085,632
3,085,633
The “backspace” character '\b' in the Android Edittext does not work?
<p>I'm trying to look at someone else's code on developing android virtual keyboards.</p> <p>I have a gesture[swipeLeft] hooked to one of the backspace gesture and I use the following to implement that:</p> <pre><code>playSound(backspacePlayer); // background sound InputConnection connection = getCurrentInputConnection(); connection.commitText("\b", 1); </code></pre> <p><strong>My main problem is that I can hear the sound of the backspace but it is not executed in the EditText. I mean that the characters do NOT get erased in the EditText.</strong></p> <p>Is the code I'm using okay? or is there a problem with commiting "\b" to text. Also this code works for all other characters except backspace!</p> <p>Any help would be awesome ! Adit</p>
java android
[1, 4]
3,866,799
3,866,800
How to retrieve dynamically created label control from Gridview
<p>I have the buttons and label boxes that are dynamically created in Grid view Template page, this is done in C#. On page load, only the buttons are visible. When a button is clicked, I want the respective label to change its visibility to true.</p> <p>I am unable to retrieve the control in the Gridview OnRowCommand. I already declared the following:</p> <pre><code>lblAvailone = (Label)row.FindControl("lblFirstAvail"); </code></pre> <p>Could you please tell me how I can get that label value in row command?</p>
c# asp.net
[0, 9]
4,320,264
4,320,265
jQuery .data() Selector
<p>This question has been asked before, but I can't find any answers that have been given since May 2010. If one or more of these answers are still relavent, I'd be happy to delete this question.</p> <p>Does jQuery have a selector that will allow me to filter by values added by <code>.data()</code>?</p> <p><strong>Example: (see comments)</strong></p> <pre><code>//Set IsValid data attribute on all elements that have fired the blur event $(".txtPayment").blur(function (e) { if (IsCurrency($(this).val())) $(this).data("IsValid", true); else $(this).data("IsValid", false); SumPayment(); }); //Sum all payments // I'd like to be able to select all inputs with: // class == "txtPayment" value != "" &amp;&amp; IsValid == true $('.txtPayment[value!=""]').each(function () { var sum = 0; if ($(this).data("IsValid")) { sum += Number($(this).val()); $(this).removeClass("textError"); } else { $(this).addClass("textError"); $("#spanSumPayment").addClass("textError"); } }); </code></pre> <p>Is this possible <strong>without plugins?</strong></p>
javascript jquery
[3, 5]
4,903,437
4,903,438
Finish threads in the order in wich they were started
<p>I am downloading simultaneously several images in separate threads.I need to set these images to adapter. I need to finish these threads in the order in which they were started because I am using callbacks to inform adapter and.... How can I do this(finish threads in the order in which they were started)?</p>
java android
[1, 4]
5,488,331
5,488,332
Adding extra button to FullCalendar
<p>Can we modify or change the view of <strong><a href="http://arshaw.com/fullcalendar/" rel="nofollow">FullCalendar</a></strong> as per our need ?</p> <p>I want to add an extra button to it and write the event on it. Please Suggest me for the same asap.. Any help will be appreciated.</p>
javascript jquery
[3, 5]
3,631,440
3,631,441
how do I make the floating header not show when the page gets smaller without scrolling?
<p>I have a floating header and it shows with the following code:</p> <pre><code>$(window).scroll(function () { if ($(this).scrollTop() &gt; 200) { $('#floatingHeader').show(); } else { $('#floatingHeader').hide(); } }); </code></pre> <p>In this floating header I have a filter drop down - when I am half way down the page I use the filter - I filter the results to 1 row of results and the page gets smaller - but the above scrip doesn't get executed - it only works when you scroll - how do I make the floating header not show when the page gets smaller without scrolling??</p>
javascript jquery
[3, 5]
2,536,887
2,536,888
How to upload table data from Excel to SQL Server 2008 in C# ASP.Net
<pre><code>protected void btnup_Click(object sender, EventArgs e) { if (FileUpload1.HasFile) { if (System.IO.Path.GetExtension(FileUpload1.FileName) == ".xls" || System.IO.Path.GetExtension(FileUpload1.FileName) == ".xlsx") { FileUpload1.SaveAs(Server.MapPath("~/Excal/sample.xlsx")); } } } protected void Button2_Click(object sender, EventArgs e) { string sSourceConstr = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:\sample.xlsx; Extended Properties=""Excel 12.0;HDR=YES;"""; string sDestConstr = ConfigurationManager.ConnectionStrings["TestConnection"].ConnectionString; OleDbConnection sSourceConnection = new OleDbConnection(sSourceConstr); using (sSourceConnection) { string sql = string.Format("Select [ID],[Name],[Designation] FROM [{0}]", "sample$"); OleDbCommand command = new OleDbCommand(sql, sSourceConnection); sSourceConnection.Open(); using (OleDbDataReader dr = command.ExecuteReader()) { using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sDestConstr)) { bulkCopy.DestinationTableName = "rr"; //You can mannualy set the column mapping by the following way. //bulkCopy.ColumnMappings.Add("MSISDN", "MSISDN"); bulkCopy.WriteToServer(dr); } } } lblmsg.Text = "Record update"; } </code></pre>
c# asp.net
[0, 9]
2,565,920
2,565,921
Execute jquery animate only one time
<p>I've the following function:</p> <pre><code>$('.link1').click(function(){ $("#div2").slideUp(function(){$("#div1").slideToggle();}); $('html, body').animate({scrollTop: '600px'}, 800); }); </code></pre> <p>It toggles a div and scroll the page down. The problem is that everytime the user toggles the page scroll down again...how could I run this animate function only at first click?</p>
javascript jquery
[3, 5]
2,066,569
2,066,570
Trying to extend 3rd party Jquery plugin for sliders
<p>I am working with a third party scrolling plugin from <a href="http://www.dynamicdrive.com/dynamicindex11/scrollc.htm" rel="nofollow">http://www.dynamicdrive.com/dynamicindex11/scrollc.htm</a>, and they give you two javascript files one is the slickcustomscroll.js and the other jquery.mousewheel.min.js. I am writing this question for help on understanding the jquery.mousewheel.min.js( <a href="http://www.dynamicdrive.com/dynamicindex11/jquery.mousewheel.min.js" rel="nofollow">http://www.dynamicdrive.com/dynamicindex11/jquery.mousewheel.min.js</a> ) file so that I can modify it to add the up key and down key functionality.</p>
javascript jquery
[3, 5]
2,553,898
2,553,899
Check is textarea empty (treating only 'enter' like empty)?
<p>Welcome,</p> <p>I have textarea and i have small function what allow me to submit message on enter keypress.</p> <pre><code>$(function(){ $('input').keydown(function(e){ if (e.keyCode == 13) { $(".sender").click(); return false; } }); }); </code></pre> <p>That's work fine, i mean great :)</p> <p>Next, i want disallow sending empty form. So i was thinking it will be a easy task.</p> <pre><code>var tag = $("#mytextarea").val(); if(tag.length&lt;1 ) { //empty } else { //not empty } </code></pre> <p>But it's not working. I also try val=='' I think it count that enter what user hit to send form ;) I was trying alert value, but i got only that enter...</p> <p>So, how can i check if is empty or not, but counting enter, like empty. If only enter will be found, threat like empty space val=='' </p> <p>Regards</p>
javascript jquery
[3, 5]
400,949
400,950
help designing a method, should I use out or ref or return the type?
<p>I have a method that I will use in the following contexts:</p> <p>1.</p> <p>User user = null;</p> <pre><code>if(...) { user = defaultUser; SetUser(a,b,user); } else { SetUser(a,b,user); } SaveUser(user); </code></pre> <p>So some cases are where user may be null, while in other cases it will already be initialized.</p> <p>How should I design the SetUser method?</p> <p><strong>I currently have it like so, but this causes an error when user is null.</strong></p> <pre><code>public void SetUser(object a, object b, User user) { if(user == null) user = new User(); user.Security = a.security; user.Blah = b.type; } </code></pre>
c# asp.net
[0, 9]
1,096,370
1,096,371
Make a DropdownList visible on click of a RadioButton
<p>When I perform a <code>radiobuttonclick</code>, I want to set a <code>dropdownlist</code> to become visible. The <code>radiobutton</code> and <code>dropdownlist</code> are within the same <code>datagrid</code>. I am not sure how to do this.</p> <pre><code>&lt;asp:UpdatePanel ID="updatepanel" UpdateMode="conditional" runat="server"&gt; &lt;ContentTemplate&gt; &lt;asp:DataGrid ID="DataGrid" AutoGenerateColumns = "false" CssClass="objectSubTitle" ItemStyle-Wrap="true" runat="server" OnItemCommand="handler" &gt;&lt;Columns&gt; &lt;asp:TemplateColumn&gt; &lt;ItemTemplate&gt; &lt;asp:RadioButton ID ="RadioButton1" Text="Yes" GroupName="creatingNewCard" OnCheckedChanged="RadioButtonYes" AutoPostBack="True" runat="server" /&gt; &lt;asp:DropDownList ID="DropDownList1" Visible="false" runat="server"/&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateColumn&gt; </code></pre>
c# asp.net
[0, 9]
242,171
242,172
How to make toggle in 2 parts?
<p>Super simple concept. See here <a href="http://jquerytest.thepeoplesmarketing.us/jquerydev/index2.html" rel="nofollow">http://jquerytest.thepeoplesmarketing.us/jquerydev/index2.html</a> . The gray div is a "slide". I want 5 left to right(not a problem), and on hover, each "animates" the red div which is currently visible on hover in the example.</p> <p>Obviously, the problem is that when I toggle the red div, my hover focus changes to it, thus untoggling it. How can I make it not "untoggle" until I've moused off the entire parent div?</p> <p>((Disclaimer; pretty extreme JS/JQ noob with strongish python background, so forgive my stupidity))</p>
javascript jquery
[3, 5]
5,243,951
5,243,952
DatePicker on a textbox
<p>i am trying to implement a <code>datepicker</code> control using Jquery,</p> <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;title&gt;&lt;/title&gt; &lt;link href="jquery-ui.css" rel="stylesheet" type="text/css" /&gt; &lt;script src="js/jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="js/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="js/jqueryrelese.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#&lt;%= TextBox1.ClientID %&gt;").datepicker(); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;div&gt; &lt;asp:TextBox ID="TextBox1" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>but it is not working as <code>datepicker</code> doesn't popup. What code i am missing or any is there any error in this code. Thanks for any assistance.</p>
jquery asp.net
[5, 9]
5,726,831
5,726,832
getAction() gives only ACTION_DOWN
<p>For an application I am writing, I want to invoke a certain action once the user lifted his finger off the screen. I understood I need to check if event.getAction() is ACTION_UP, but all I get from getAction() is ACTION_DOWN. My code looks like this:</p> <pre><code>menu = new MenuView(this); menu.setBackgroundColor(Color.WHITE); menu.setKeepScreenOn(true); ... setContentView(menu); menu.requestFocus(); ... public class MenuView extends View { ... public MenuView(Context context) { super(context); setFocusable(true); } </code></pre> <p>Anybody knows what is the reason for the problem?</p> <p>Thank you in advance.</p>
java android
[1, 4]
1,622,150
1,622,151
how to add 2 values of textbox in asp.net using javascript
<p>I have 2 textbox in my asp.net page and also have one hiddenfield in my asp.net page , my hiddenfield will always have numeric value like 123.00 , and in my one textbox also I will always have numeric value like 20.00 now I want to add this hiddenfield value and textbox value and display it into second textbox thru javascript </p> <p>I wrote the following code to do this </p> <pre><code>var amt = document.getElementById("txtsecond"); var hiddenamt = document.getElementById("AmtHidden").value var fee = document.getElementById("txtFirst").value; amt.value = hiddenamt + fee; </code></pre> <p>this should give me result like 123.00+20.00 = 143.00 but this is concatnating hiddenamt value and fee value and giving me result like 12320.00 in my first textbox </p> <p>can anybody suggest me what is wrong in my code and what is the right way to get desired value</p>
asp.net javascript
[9, 3]
4,823,109
4,823,110
Detecting touch screen devices with Javascript
<p>In Javascript/jQuery, how can I detect if the client device has a mouse? </p> <p>I've got a site that slides up a little info panel when the user hovers their mouse over an item. I'm using jQuery.hoverIntent to detect the hover, but this obviously doesn't work on touchscreen devices like iPhone/iPad/Android. So on those devices I'd like to revert to tap to show the info panel.</p>
javascript jquery iphone android
[3, 5, 8, 4]
3,728,462
3,728,463
jquery $(td) exclude colspan?
<p>Hi. I have the following that adds a class to all <code>&lt;td&gt;</code> elements, however I have a particular <code>&lt;td colspan="3"&gt;</code> and I want to exclude it. How do I do this in jquery? Thanks for any help.</p> <pre><code>$('td', table).addClass('ui-widget-content'); // exclude a &lt;td colspan="3"&gt; </code></pre>
javascript jquery
[3, 5]
1,041,779
1,041,780
How to .hide() a single div from a class
<p>I have a set of divs which are specified under the same class name, and which have no ids. Given this scenario, how can I use Jquery's <code>.hide()</code> method to hide only the div that was clicked, and not the entire class without having to specify an id for each div? </p> <pre><code>&lt;div class="div"&gt;&lt;p&gt;Some placeholder text &lt;/p&gt; &lt;/div&gt; &lt;div class="div"&gt;&lt;p&gt;Some more placeholder text &lt;/p&gt; &lt;/div&gt; &lt;div class="div"&gt;&lt;p&gt;And even placeholder text &lt;/p&gt; &lt;/div&gt; $(".div").click (function(){ $(".div").hide(); }); </code></pre> <p>The script above will hide all divs with the class "div" but we only want to hide the div that was clicked, not the entire class. </p>
javascript jquery
[3, 5]
3,305,879
3,305,880
Append text into a div with Jquery
<p>I've tried the following code in my sample page and it doesn't work.All I'm trying to do is just append some text into a div on the page when the button is clicked.</p> <pre><code>&lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&gt; &lt;script type="text/jscript"&gt; $(document).ready(function () { $('#Button1').click(function () { $('#testdiv').append("Hello World!!"); }); }); &lt;/script&gt; &lt;input id="Button1" type="button" value="button" /&gt; &lt;div id="testdiv"&gt; adiv &lt;/div&gt; &lt;/asp:Content&gt; </code></pre> <p>Please guide me on how to get this simple thing to work in jquery...</p> <p>Thanks</p> <p>Edit:I updated my code as you suggested...still doesn't work...please help me...Thanks</p>
c# asp.net jquery
[0, 9, 5]
4,959,946
4,959,947
How to prevent OnSelectedIndexChanged to cause postback unless the user uses the mouse or the enter key?
<p>here's a dropdownlist that posts back on selected index changed. </p> <pre><code>&lt;asp:DropDownList ID="_ddlClientType" runat="server" AutoPostBack = "true" OnSelectedIndexChanged="ClientType_SelectedIndexChanged" &gt; &lt;asp:ListItem Value="-1" Text="CANCEL.."&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="11" Text="External"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="12" Text="Internal"&gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="13" Text="TOM"&gt;&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; </code></pre> <p>When using the mouse, everything works perfectly. However, I want user to be able to press key to select different items either by by using up/down arrow key. Also when when user type a letter, then the first item starting with that letter gets highlighted.</p> <p>The problem is when a different item gets selected in the dropdownlist, the page posts back because of the "<strong>OnSelectedIndexChanged</strong>" event. </p> <p>Is there a way to prevent the postback to occur when key are being pressed (as opposed to mouse being clicked), until the <strong>enter key</strong> is pressed? </p> <h1>EDIT</h1> <p>I'm able to display the alert prompt when a key is pressed</p> <pre><code>$('select').keypress(function () { alert('A key was pressed') }); </code></pre> <p>Now, I need to know which key was pressed. Thus, I'll be able to make a decision.</p>
jquery asp.net
[5, 9]
1,580,070
1,580,071
How do I load Javascript within jQuery based tabs?
<p>I have Jquery and CSS tab like <a href="http://www.sohtanaka.com/web-design/examples/tabs/" rel="nofollow">this one</a> and in the each tab I have <a href="https://developers.facebook.com/docs/reference/plugins/activity/" rel="nofollow">facebook feed box</a>, <a href="http://twitter.com/about/resources/widgets" rel="nofollow">twitter widget</a>, and my blog's ranking widget. BUT if I place these widgets within the tab area content, each widgets stops working. How do I get these widgets to load with in these jQuery tabs?</p> <p>My tabs: <a href="http://www.sohtanaka.com/web-design/examples/tabs/" rel="nofollow">http://www.sohtanaka.com/web-design/examples/tabs/</a></p>
javascript jquery
[3, 5]
175,899
175,900
How to save mouse coordinates onbeforeunload?
<p>I can track mouse coordinates dynamically with this</p> <pre><code>$(document).ready(function() { $().mousemove(function(e) { $('p').html("X Axis : " + e.pageX + " | Y Axis " + e.pageY); }); }); </code></pre> <p>With this, the numbers change on each mouse move dynamically. What I want to do is to save all coordinates. It should save it onbeforeunload. How to save all numbers ? I am thinking of append an iframe onbeforeunload like </p> <p>save.php?coords=162x412-143x716-678x12</p> <p>How can I do this ?</p>
php javascript jquery
[2, 3, 5]
5,750,480
5,750,481
Way to include a .js inside a .js?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/950087/include-javascript-file-inside-javascript-file">Include javascript file inside javascript file?</a> </p> </blockquote> <p>Is this possible? Including a reference to another .js that your current .js file code is reliant on instead of having to add 2 includes in every page to ensure that both those files are there?</p> <p>I assume the answer is no...as I have not found any info on it on the net so far.</p>
asp.net javascript
[9, 3]
5,729,830
5,729,831
Response.WriteFile stopping previous request
<p>I have a button that calls a click event to download a picture. In my click event I have some code to change my display as the Save dialog pops up. The issue I am having is that when the dialog comes up it stops the previous line of code from executing. How can I check to see that my code has executed before calling the function?</p> <p>Here is my button event handler and function:</p> <pre><code> protected void btnSave_Click(object sender, EventArgs e) { var _title = txtTitle.Text; txtTitle.Text = string.Empty; txtDescription.Text = string.Empty; ChangeDisplay(); if (Request.Browser.Browser == "IE") lblSnapShot.Visible = (lblSnapShot.Visible) ? false : true; SaveSnapShot(_title); } void SaveSnapShot(string _title) { try { FileInfo _fileToDownload = new FileInfo(_path); Response.Clear(); Response.ContentType = "image/png"; Response.AppendHeader("Content-Disposition", "attachment; filename=\"" + _title + ".png\""); Response.WriteFile(_fileToDownload.FullName); HttpContext.Current.ApplicationInstance.CompleteRequest(); } catch (System.Exception ex) { ChangeDisplay(); if (Request.Browser.Browser == "IE") lblSnapShot.Visible = (lblSnapShot.Visible) ? false : true; Response.Write("SAVE FAILED \n Error: " + ex.Message); } } </code></pre>
c# asp.net
[0, 9]
3,286,228
3,286,229
Show the div with the number that was indexed in the navigation
<p>I have a setup like this:</p> <pre><code>Link ------------------------------ Link | | Link | | Link | DIV | | | | | ------------------------------ (3 more divs are hidden) </code></pre> <p>The number of links will vary but for each link there will also be one content div.</p> <p>So far I have used this code and it works:</p> <pre><code>$(".link").click(function () { var divname = this.name; $("."+divname).fadeIn('slow').siblings().hide(); </code></pre> <p>But this time since the content is user generated I have no control over the given names.</p> <p>Is it possible with jQuery to count the numbers of links and the number of boxes (which will be always equal) and let's say I click the second link, the second div will show. If I click the third link the third div will show and so on.</p> <p>This is the html:</p> <pre><code>&lt;div id="links"&gt; &lt;span&gt;Link&lt;/span&gt; &lt;span&gt;Link&lt;/span&gt; &lt;span&gt;Link&lt;/span&gt; &lt;span&gt;Link&lt;/span&gt; &lt;/div&gt; &lt;div id="content"&gt; &lt;div&gt;DIV 1&lt;/div&gt; &lt;div&gt;DIV 2&lt;/div&gt; &lt;div&gt;DIV 3&lt;/div&gt; &lt;div&gt;DIV 4&lt;/div&gt; &lt;/div&gt; </code></pre> <p>This is my attempt:</p> <pre><code>$(".div").not(":first").hide(); $(".link").click(function () { var number = $("#links").index(this); }); </code></pre> <p>Not pretty much yet. But how can I now tell the content, that it should show the div with the indexed number just clicked in the links?</p>
javascript jquery
[3, 5]
3,711,398
3,711,399
Date comparison in Jquery
<p>I want to compare the selected date and current date. Iam using jquery date picker. While using the following code only the date field comparison is takes place... How can i compare with month and year also... Advance thanks..</p> <pre><code>$(document).ready(function() { var objDate = new Date(); var selectedDate = document.getElementById("&lt;%=txtRqstDate.ClientID %&gt;").value; var currentDate = $.datepicker.formatDate('dd/mm/yy', new Date()); if (Date.parse(selectedDate) &gt; Date.parse(currentDate )) { alert("Invalid date range!\n Please choose a date that is not later than today!") return false; } else { return true; } </code></pre>
javascript jquery
[3, 5]
5,887,962
5,887,963
how to send a variable from jquery to a template?
<p>how to send a variable from jquery to a template?</p>
javascript jquery
[3, 5]
1,004,407
1,004,408
How can I unbind JQZOOM in my JQuery Script?
<p>I have this script at the moment, which changes an image when a thumbnail has been changed. I then want JQZOOM to be added to that new image. However, if I put it inside the Onclick event, it gets slower and slower the more times you click on it... I guess because its running multiple instances.</p> <p>Is there anyway to unbind the JQZOOM from something then rebind it to something else?</p> <p>Here is my jquery at the moment:</p> <pre><code>var options = { zoomWidth: 400, zoomHeight: 325, xOffset: 25, yOffset: 0, position: "right", lens: true, zoomType: "reverse", imageOpacity: 0.5, showEffect: "fadein", hideEffect: "fadeout", fadeinSpeed: "medium", title: false }; $('.jqzoom').jqzoom(options); $('.single-zoom-image').click ( function () { $('#bigProductImage').attr("src", $(this).attr("zoom")); $('.jqzoom').attr("href", $(this).attr("extrazoom")); }); </code></pre> <p>Thanks in advance if anyone can help me.</p> <p>Cheers!</p>
php jquery
[2, 5]
4,021,666
4,021,667
how to put a fixed number of 0's infront of a long in java?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/473282/left-padding-integers-with-zeros-in-java">Left padding integers with zeros in Java</a> </p> </blockquote> <p>I have a problem. i am working on a android app</p> <p>I have a long timestap and a string that i need to combine. The catch is that if the long is less than 8 digits, then i need to display 0's to make it look good.</p> <p>Example</p> <p>long time = 311;</p> <p>how can i fill it out so it will be </p> <p>00000311</p> <p>long time2 = 3111</p> <p>00003111</p> <p>I hope any of you an help me with it since i been trying to find a solution for it for over an hour now..</p> <p>Rasmus</p>
java android
[1, 4]
1,235,642
1,235,643
How to hide a div if user clicks anywhere but a link and the div itself using jQuery?
<p>Ok, so simple question. I have a link which when clicked shows a div. If the user blurs off that link the div is hidden. This is good, but I don't want the div to be hidden if the user clicks on it. So if the user clicks anywhere other than the link or div itself only then should the div be hidden. Right now my code doesn't do this.</p> <p>JSFiddle:</p> <p><a href="http://jsfiddle.net/gTkUG/" rel="nofollow">http://jsfiddle.net/gTkUG/</a></p> <p>jQuery:</p> <pre><code>$('#myLink').click(function(e) { $('#myDiv').show(); e.preventDefault(); }); $('#myLink').blur(function() { $('#myDiv').hide(); }); </code></pre> <p>HTML:</p> <pre><code>&lt;div style="display:none;width:100px;height:100px;border:1px solid red" id="myDiv"&gt;&lt;/div&gt; &lt;a href="" id="myLink"&gt;Click Me&lt;/a&gt; </code></pre> <p>So I guess the question is, how to detect blur on two or more events instead of just one?</p>
javascript jquery
[3, 5]
693,877
693,878
What can be the reason for the following error
<p>Using jQuery Ajax to fetch data from local server: it works well with IE8 but with Firefox4 it goes wrong: (entering error function with just "error" message). Firebug shows the data is getting correct.</p> <p>The running URL is: <a href="http://localhost:47092/testajax" rel="nofollow">http://localhost:47092/testajax</a></p> <p>The related jQuery code is: </p> <pre><code> $.ajax( { type: "GET", url: "http://localhost/test", processData: true, data: {}, dataType: "json", success: function (data, code, jqx) { console.log(data); }, error: function (jqx, err, ex) { console.log(ex); } } ); </code></pre> <p>What can be the cause of the error? I am using jQuery 1.5.2</p> <p>Also, I am using jQuery.support.cors = true to enable cross domain scripting.</p>
javascript jquery
[3, 5]
5,488,937
5,488,938
What does IsPostBack actually mean?
<p>I am interested to know what specifically Page.IsPostBack means. I am fully aware of it's day to day use in a standard ASP.NET page, that it indicates that the user is submitting data back to the server side. See <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback.aspx" rel="nofollow">Page:IsPostBack Property</a> </p> <p>But given this HTML</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;form method="post" action="default.aspx"&gt; &lt;input type="submit" value="submit" /&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>When clicking on the Submit button, the pages Page_Load method is invoked, but the Page.IsPostBack is returning false. I don't want to add <code>runat=server</code>.</p> <p>How do I tell the difference between the pages first load, and a Request caused by the client hitting submit?</p> <p><strong>update</strong><br /> I've added in <code>&lt;input type="text" value="aa" name="ctrl" id="ctrl" /&gt;</code> so the Request.Form has an element, and Request.HTTPMethod is POST, but IsPostBack is still false?</p>
c# asp.net
[0, 9]
2,947,879
2,947,880
Button used for redirecting, with a php function
<p>I would like to be able to redirect to a page with a button. I do not want to use the headers function. I want to be able to call some function inside a php file. My function for redirecting looks something like this. Basicly the first part set what page to load in a static variable and then executes a reload of page which then executes the load function in some other initialization function.</p> <p>This can be modified, its just how i taught of doing it.</p> <pre><code>public function WSP_Redirect($site) { self::$_mainsite = $site; //This is one option //$this-&gt;LoadPage(); // This is another option echo '&lt;script&gt;window.location.reload()&lt;/script&gt;'; } </code></pre> <p>The in another file i would, say press a button, and the button would then call this function(via post or whatever) to redirect to some page...</p> <p>To me its not important how it is done but it is important that it uses the redirect function.</p> <p>Any suggestions would be nice, I did check out the ajax and jquery but nothing i have tryed has worked so far :(</p>
php javascript jquery
[2, 3, 5]
5,278,201
5,278,202
c# control names
<p>Is there a way to control how .Net sets the <code>Name</code> and <code>ID</code> property of my controls? I have some radio buttons for which I need the name to be the same. However if I set the <code>ID</code> property of the radio button control it sets the <code>Name</code> and the <code>ID</code>. I see no way to treat the <code>ID</code> and <code>Name</code> separately. So now all button's ids are the same as well.</p> <p>If you are thinking that I should be using a <code>RadioButtonList</code> to achieve this you may be right, but I have not found a way to include table structure in a dynamically created <code>RadioButtonList</code>. </p> <p>Thanks</p>
c# asp.net
[0, 9]
3,314,216
3,314,217
hide div if clicked outside of it
<p>I’m having a little trouble with this JQuery function.</p> <p>Basically, I have a div, that when clicked, shows another Div. It’s set to a toggle, actually, so it toggles on/off when you click.</p> <p>I want to have it where if you click on anywhere outside of the opened div (that appears after you click on the first div), the div that was opened is closed.</p> <pre><code>$("#idSelect").click(function() { $("#idDiv").toggle(); }); </code></pre>
javascript jquery
[3, 5]
4,359,195
4,359,196
Android Ldap with Sasl Security
<p>I am making application on android in which my server is windows server 2008.I am using LDAP Protocol for accessing detail from my app.For it I am using unboundid.jar for making connections.I am using various security mechanism like ssl Tls Sasl Digest MD5,Genric sasl.SSL Tls working fine on Android but Sasl is not working on android for LDAP. i go through many forums and try many codes but not find any useful solution.Can Any knows what is the problem?Does android support sasl?Please give me solution........!!! </p>
java android
[1, 4]
5,061,744
5,061,745
C++ and Java objects communication
<p>I need to establish a communication model between C++ layer and Java layer in my application. Initially, I planned to use SOAP with XML, but my clients are interested in setting up a database communication channel.</p> <p>I am new to DB and not sure how to proceed. I would like to take your sincere suggestions on the implementation of communication in terms of objects between C++ and Java layer using database.</p> <p>Thanks, Geet</p>
java c++
[1, 6]
2,146,409
2,146,410
ASP.NET Generate a table from list with dynamic number of rows and columns
<p>I have a list of items which I want the user to be able to tick which are appropriate to them.</p> <p>Currently I have a <code>&lt;ul&gt;</code> generated by a <code>Repeater</code> with checkbox and label controls placed in side, all working fine.</p> <p>However, the <code>&lt;ul&gt;</code> is taking up too much space on the screen and I need to condense it. I think the best approach would be a table that expands based on the number of items, 9 resultining a 3x3 grid, 12 a 3x4 grid, 16 a 4x4 grid etc up to a maximum width of 6 rows.</p> <p>Any suggestions for where to start?</p>
c# asp.net
[0, 9]
4,005,464
4,005,465
Doctype issue using jquery plugin
<p>i am using jquery chart it works fine when i remove DocType on the page but it shows give error if i add doc type in the page Any help please Doctype is as follow</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; </code></pre> <p>and jquery code is as follow</p> <pre><code>&lt;script type="text/javascript"&gt; var gauge = bindows.loadGaugeIntoDiv("gauges/g_speedometer_03.xml", "gaugeDiv"); var t = 0; var interval = 100; function updateGauge() { t += interval; var value = 80 + 80 * Math.sin(t / 3000) gauge.needle.setValue(value); gauge.label.setText(Math.round(value)); } setInterval(updateGauge, interval); &lt;/script&gt; </code></pre>
jquery asp.net
[5, 9]
64,280
64,281
Have Client-Server App, need to create a Client Simulator - ideas needed
<p>We've got a client app which connects using TCP to a server. Additionally, the client app makes use of .NET remoting to talk to another piece of locally running code.</p> <p>I'm tasked with creating a "Client Simulator" to do some testing, where we'd need to have 100's of clients connected simultaneously to the server. Ideally, this would work out great if I were to run each client in it's own space, such as a VM, but this is not logistically feasible. </p> <p>Any suggestions on how to handle this? Is there a tool that could do something like this? Or some sort-of .NET concept I could use?</p> <p>Thanks in advance.</p>
c# asp.net
[0, 9]
4,247,189
4,247,190
Call Javascript from GridView TemplateField
<p>I have a GridView, I have coded like the below</p> <pre><code>&lt;asp:TemplateField HeaderText="Item"&gt; &lt;ItemTemplate&gt; &lt;asp:Button ID="btnItem" OnClientClick="javascript:SearchReqsult(&lt;%#Eval("Id") %&gt;);" CssClass="Save" runat="server" /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; </code></pre> <p>I face a run time error which says that my button control is formatted correctly I suppose the issue with the following</p> <pre><code>OnClientClick="javascript:SearchReqsult(&lt;%#Eval("Id") %&gt;);" </code></pre> <p>Any idea?</p>
c# javascript asp.net
[0, 3, 9]
2,122,111
2,122,112
How to filter the user installed camera application from predefined camera application
<p>This is my piece of code </p> <pre><code>Intent cameraintent= new Intent(); cameraintent.setAction(Intent.ACTION_CAMERA_BUTTON); cameraintent.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_CAMERA)); sendOrderedBroadcast(cameraintent, null); </code></pre> <p>But it list out all camera application. I want to filter it. And another issues i need to implement full features of OS dependent camera. </p>
java android
[1, 4]
2,379,707
2,379,708
How can I get the android device id which I get on dialing " *#*#8255#*#* "
<p>How can I get the android device id which I get on dialing <kbd>*</kbd><kbd>#</kbd><kbd>*</kbd><kbd>#</kbd><kbd>8</kbd><kbd>2</kbd><kbd>5</kbd><kbd>5</kbd><kbd>#</kbd><kbd>*</kbd><kbd>#</kbd><kbd>*</kbd></p> <p>I am using the following code but it does not return the same...what I want</p> <pre><code>String android_id = Secure.getString(getActivity() .getContentResolver(), Secure.ANDROID_ID); </code></pre> <p><img src="http://i.stack.imgur.com/u0yGK.png" alt="enter image description here"></p>
java android
[1, 4]
1,736,059
1,736,060
changing some parts of location.href using js without redirecting the browser?
<p>hi here is the problem: my url is like this <code>http://somesite.com?theSearch=someword&amp;a=b&amp;c=d</code></p> <p>on this page search results are displayed and on this page i have put the functionality of ajax search i.e. the results are updated without the page reload but the problem is if the user clicks on any link on the page and then presses the back button he results on the page page with the search results of "someword" not the new word typed (i mean the word for which the ajax results were updated) the client complains it and i need to fix it anyone have a solution?</p> <p>i am using jQuery</p>
javascript jquery
[3, 5]
3,125,734
3,125,735
Javascript validation for radio button
<p>I am doing newsletter subscription.I have 2radio buttons-subscribe and unsubscibe and a submit button.But when I click on submit button,ajax function gets called for subscription.Now i want to do validation.I have written a javascript validation for radio buttons as below:</p> <pre><code>function validate_radio() { var radio_choice = false; var radio_val = document.newsletterform.subscribe.length; for (counter = 0; counter &lt; radio_val; counter++) { if (document.newsletterform.subscribe[counter].checked) radio_choice = true; } if (!radio_choice) { document.getElementById("mandatory").innerHTML="Select Subscribe/Unsubscribe"; return false; } } </code></pre> <p>But now I am getting the validate message but at the same time i am getting subscribed. tell me a way so that i can stop the subscription being done if the function returns false. I am calling the function as follows:</p>
php javascript
[2, 3]
877,384
877,385
How to show the non-selected options in a select form, after a previous form is submitted
<p>I have a form where im asking for name, surname, phone cellphone and at the end user has to check one or more options in a checkbox and then clicks submit.</p> <p>After that in the "thank you page" i want to show the exact form but this time to show only the non-checked checkboxes. Reason for this is that i want to say "We highly recommend you check all the options for better results, you can do so by simply clicking the submit button below"</p> <p>And then below that i want to present the form as i said, but the remaining checkboxes (the oens that were not checked before) would be only the NON-checked options in the previous page. Makes sense?</p> <p>Ive tried hard with php if states and switches but still cant get the result i want, it seems i have to define "false statements" in a way im not cabable of doing it.</p> <p>Should i use php or jquery?</p> <p>Can anyone help me? Im kinda lost. Thanks a lot in advance</p>
php jquery
[2, 5]
5,296,046
5,296,047
content appended with jquery is not part of the DOM
<p>I have an empty div <code>&lt;div id="content"&gt;&lt;/div&gt;</code> to which I add content via jquery append.</p> <pre><code>$('#content').append('&lt;div class="sub"&gt;sub1&lt;/div&gt;'); $('#content').append('&lt;div class="sub"&gt;sub2&lt;/div&gt;'); $('#content').append('&lt;div class="sub"&gt;sub3&lt;/div&gt;'); </code></pre> <p>When I click a button I want to run a jquery that reads the content of each sub, but I get nothing, I think because the div elements were added via javascript, so they're not really on the page. </p> <pre><code>$('.sub').each(function(){ alert($(this).text()); } </code></pre> <p>How can I still operate on html added via javascript? </p>
javascript jquery
[3, 5]
4,395,488
4,395,489
How to change background-image css property w/jquery
<p>How can I set the <code>background-image</code> css property of say a div using jquery? will something like this work?</p> <pre><code>$("#div").css("backgroundImage", "url('test.jpg')"); </code></pre>
javascript jquery
[3, 5]
2,302,627
2,302,628
show/hide loading message for html table
<p>How can I show a "loading" message when clicked/checked to expand table column(s), and hide the message as soon as its expended. <a href="http://jsfiddle.net/xamsw/" rel="nofollow">Here</a> is demo of what I've got so far. I can make the message appear, but can't hide it once the job is done. It seems useful when I'm trying to expand a large table, and I think it would be nice to let the user know that it's working. Any help/suggestion will be greatly appreciated.</p> <pre><code>$(document).ready(function() { $("#load").hide(); $("#check").live("click", function() { $("#load").show(); if ($("#check").is(":checked")) { $(".hidden").show(); } else { $(".hidden").hide(); } }); $("#load").hide(); }); </code></pre>
javascript jquery
[3, 5]
836,458
836,459
Javascript or Python? beginner getting up to speed
<p>Which language will allow a beginner to get up to speed quicker? </p> <p>Basically which language of the two is easier to learn</p>
javascript python
[3, 7]
66,539
66,540
How to determine if we're at the bottom of a page using Javascript/jQuery
<p>There is nothing called <code>scrollBottom()</code> in jQuery, so I can't do <code>$(window).scrollBottom()==0</code></p> <p>Hope the question is clear from the title itself. Any help would be greatly appreciated. I'm mostly interested in IE7+, FF3.5+ (Chrome etc are bonus!)</p> <p>Thanks, Raj</p>
javascript jquery
[3, 5]
1,925,092
1,925,093
How to convert WAV files to the frequency domain for use FFT libraries
<p><a href="http://stackoverflow.com/questions/4935691/compare-voice-wav-in-android-or-voice-tag-voice-commands-api">Compare voice wav in android or voice tag ( voice commands ) API</a> in answer number 2 I don't know how to convert the time-domain data of the original WAV file into frequency-domain data.</p>
java android
[1, 4]