Unnamed: 0
int64
302
6.03M
Id
int64
303
6.03M
Title
stringlengths
12
149
input
stringlengths
25
3.08k
output
stringclasses
181 values
Tag_Number
stringclasses
181 values
4,729,966
4,729,967
Map the PHP date format into Javascript
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/847185/convert-a-unix-timestamp-to-time-in-javascript">Convert a Unix timestamp to time in Javascript</a> </p> </blockquote> <p>I have been storing the user's date format preference in the database as a string of the format used by PHP's date() function.</p> <p>A need has arisen for dates to be calculated by Javascript. Is anyone aware of some sort of mapping of the PHP format into Javascript?</p> <p>From passing the PHP date format <code>Ymd</code> string to a Javascript function I would expect it to return <code>20010310</code></p>
php javascript
[2, 3]
4,092,101
4,092,102
Reset a Checkbox Field Clientside
<p>I have a checkbox control and a reset button on a web page. I want the chekbox to be unchecked whenever the rest button is pressed. This should be a clientside process.</p> <p>How can i achieve it? can it be done by using document.getelementbyID()?</p>
javascript asp.net
[3, 9]
458,029
458,030
Uploadify v3.1 passing POST Data
<p>Iam getting Crazy with JQuery Uploadify V3.1.</p> <pre><code>// setup fileuploader $("#file_upload").uploadify({ 'swf': 'flash/uploadify.swf', 'uploader' : 'upload/do-upload', 'debug' : false, 'buttonText': 'Files auswählen', 'multi': true, 'method': 'POST', 'auto': false, 'width': 250, 'queueSizeLimit' : 10, 'fileSizeLimit' : '100MB', 'cancelImg': 'img/uploadify-cancel.png', 'removeCompleted' : true, 'onUploadSuccess' : function(file, data, response) { $('#message').append(data); }, 'onUploadError' : function() { $('#message').html('&lt;h2&gt;Fehler beim Upload&lt;/h2&gt;'); } }); </code></pre> <p>To start Download onClick </p> <pre><code>// handle the event stuff $("#event_start_upload").on({ click: function(){ var key = $('#key').val(); if (key.length &lt; KeyLength) { $('#form-encryption-control').addClass('error'); return; } else { $('#form-encryption-control').removeClass('error'); } // some space for new download links $('#message').empty(); $('#file_upload').uploadify('upload','*') } }); </code></pre> <p>My Problem is: I have to pass addtional params to the serverSide, in Uploadify V2 there was an Method uploadifySettings to pass "scriptData" , but not in V3? Someone knows how this works?</p> <p>If someone else needs the clue:</p> <pre><code>'onUploadStart' : function(file) { var key = $('#key').val(); $("#file_upload").uploadify('settings', 'formData', {'key' : key}); }, </code></pre>
javascript jquery
[3, 5]
2,965,313
2,965,314
Ajax Accordian control not working properly in IE 8
<p>We have used Ajax Accordian control in our ASP.Net application. It is working fine in IE 6 and IE 7. But while i executing it in IE 8 the accordion not properly work. Can anyone help me How can i solve that problem. Thanx in advance...</p>
c# asp.net
[0, 9]
1,171,215
1,171,216
jquery click tracking is acting a little strage
<p>On some links on my HTML page I have a special CSS class, that when clicked, I make a ajax call to a click.aspx page and track the click.</p> <pre><code>&lt;a href="..." class="click" id="blah-1"&gt;blah-1&lt;/a&gt; $(".click").bind("click", function() { $.get("/click.aspx?&amp;source=" + $(this).attr("id")); }); </code></pre> <p>So what is happening is the value of source, after clicking a few links (that open in a new window) becomes:</p> <pre><code>source=blah1 </code></pre> <p>then it becomes</p> <pre><code>source=blah1,blah2 </code></pre>
c# asp.net javascript jquery
[0, 9, 3, 5]
3,600,386
3,600,387
How can create a dictionary in android?
<p>Am developing A Malayalam-> English dictionary app in android .how can i do this stuff? can anyone please help me.which is the best method to create a dictionary?..all answers are highly appreciative..</p>
java android
[1, 4]
3,159,054
3,159,055
"List.Remove" in C# does not remove item?
<p>Hello how can i remove item from generic list here is my code im trying to do it right but i dont know where i make mistake;/</p> <pre><code>Users us_end = new Users(); foreach (var VARIABLE in ((List&lt;Users&gt;)Application["Users_On"])) { if(VARIABLE.Id == (int)Session["Current_Id"]) { us_end.Name = VARIABLE.Name; us_end.Id = VARIABLE.Id; us_end.Data = VARIABLE.Data; } } List&lt;Users&gt; us = ((List&lt;Users&gt;)Application["Users_On"]); us.Remove(us_end); Application["Users_On"] = us; </code></pre>
c# asp.net
[0, 9]
541,446
541,447
MailTo: Asp.net
<p>I have a asp label that I need to be able to change according to the code behind. How can I do this? </p> <p>ASPX: (The first part works correctly only for "[email protected]" and the second part dynamically changes the label (EmailLabel) according to the "if" statement in the code behind. How can I integrate these two so the label is mailto? Thanks.</p> <pre><code>&lt;p&gt;Email at &lt;a href="mailto:[email protected]?subject=Comments"&gt;[email protected]&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Email at &lt;asp:Label ID="EmailLabel" runat="server"&gt;&lt;/asp:Label&gt;.&lt;/p&gt; </code></pre> <p>Code Behind:</p> <pre><code>public changeLabel() { if (//Some Condition Here) { this.EmailLabel.Text = "[email protected]"; } else { this.EmailLabel.Text = "[email protected]"; } } </code></pre>
c# asp.net
[0, 9]
4,019,692
4,019,693
getting value of second input located inside the form. javascript jquery
<p>I have this html form</p> <pre><code>echo "&lt;form name='delete_article_form".$row['id']."' action='sources/public/article_processor.php' method='POST' &gt;"; echo "&lt;input name='processor_switcher' id='processor_switcher' type='hidden' value='delete_article'&gt;&lt;input name='article_id' id='article_id' type='hidden' value='".$row['id']."'&gt;&lt;a class='delete_button' href='#'&gt;".$s_delete[$lid]."&lt;/a&gt;"; echo "&lt;/form&gt;"; </code></pre> <p>Now here is jquery code</p> <pre><code>$('.delete_button').live('click',function(){ article_id = ??????? alert(article_id); }); </code></pre> <p>What should I do to get the value from input named "article_id"? Problem is that I have several such forms on my page so I must use THIS statement. <code>input=$('input',this).val();</code> will not help cause there are 2 inputs.</p> <p>Any Ideas?</p>
javascript jquery
[3, 5]
3,852,724
3,852,725
How to append data from .load() function to div using javascript?
<p>Sorry if my question confusing, currently i got this working :</p> <pre><code>success: function(json) { $('.msgWrapper').load('http://localhost:88/TicketSystem/support/ajaxmsg', {date: json.date, msg: json.msg}).fadeIn("slow"); } </code></pre> <p>But this only <strong>replace</strong> my div's content with the data returned by the .load() function, i want to <strong>append</strong> the data to my div instead of just replacing. Thanks in advance.</p>
javascript jquery
[3, 5]
5,859,180
5,859,181
Global variable not working
<p>I've been beating my head against the wall with this. Can someone please tell me what I'm doing wrong?</p> <pre><code>var foo = 100; function loadData() { // this pops up a window that says it's 100 alert(foo); $.getJSON(myvars.constants.ajaxpath + "getsettings", function(data) { foo = 200; // this pops up a window that says it's 200 alert(foo); }); // this pops up a window that says it's 100 alert(foo); } </code></pre> <p>Any value that I set the global variable to inside the getJSON() call is only valid within the getJSON() call. Once the function exits the global variable reverts back to its previous value.</p> <p>How can I set this global variable from within the getJSON() call? I've tried using .success(), .complete(), etc. as well. I want it to stay set to 200, not revert to 100.</p> <p>Thanks!</p> <p>P.S. Obviously I'm doing other things with global variables in the getJSON() call, but the simple variable settings are to illustrate the issues.</p>
javascript jquery
[3, 5]
2,151,534
2,151,535
How a function in window A got triggered when window B is close?
<p>Could you please give me an example how a function X got triggered in window A when window B is closed. For example, window A is launched first, and a button in window A is pressed, then window B is open and does something...then close window B. As soon as window B is closed, the focus shifts to window A. At this time, I would like a function X in window A is executed. Plesae let me know how to do this in Javascript.</p>
javascript jquery
[3, 5]
4,405,739
4,405,740
Running a shell utility from my app causes it to use 100% CPU
<p>This is sort of an odd one:</p> <p>I am trying to run a terminal command from my android app. The command launches a small linux utility that runs in the background. When I launch it from a terminal emulator it works fine, with no unusual CPU activity, but when I run the same command from my app, the utility that it launches uses a ton of CPU. Also, another process (system/bin/logcat2) shows up and starts using a bunch of CPU as well.</p> <p>Here is the code I am using to issue the shell commands:</p> <pre><code> void execCommandLine(String command) { Runtime runtime = Runtime.getRuntime(); Process proc = null; OutputStreamWriter osw = null; try { proc = runtime.exec("su"); osw = new OutputStreamWriter(proc.getOutputStream()); osw.write(command); osw.flush(); osw.close(); } catch (IOException ex) { Log.e("execCommandLine()", "Command resulted in an IO Exception: " + command); return; } finally { if (osw != null) { try { osw.close(); } catch (IOException e){} } } try { proc.waitFor(); } catch (InterruptedException e){} if (proc.exitValue() != 0) { Log.e("execCommandLine()", "Command returned error: " + command + "\n Exit code: " + proc.exitValue()); } } </code></pre> <p>Anyone know what's going on?</p>
java android
[1, 4]
4,131,257
4,131,258
Obtain data from dynamically incremented IDs in JQuery
<p>I have a quick question about JQuery. I have dynamically generated paragraphs with id's that are incremented. I would like to take information from that page and bring it to my main page. Unfortunately I am unable to read the dynamically generated paragraph IDs to get the values. I am trying this: </p> <pre><code>var Name = ((data).find("#Name" + id).text()); </code></pre> <p>The ASP.NET code goes like this:</p> <pre><code>Dim intI As Integer = 0 </code></pre> <p>For Each Item As cItem in alProducts1 Dim pName As New System.Web.UI.HtmlControls.HtmlGenericControl("p") pName.id = "Name" &amp; intI.toString() pName.InnerText = Item.Name controls.Add(pName) intI += 1 Next </p> <p>Those name values are the values I want...Name1, name2, name3 and I want to get them individually to put in their own textbox... I'm taking the values from the ASP.NET webpage and putting them into an AJAX page.</p>
asp.net jquery
[9, 5]
322,959
322,960
How to apply the fore color and bold in message text using c#..net
<p>i am displaying the one confirm box after saving the values like this</p> <pre><code>showalert("Quote has been saved successfully. Your Submission Number is:" + SaveValue ); </code></pre> <p>now i have display the savevalue bold and underline and some fore color, how to apply(using any format and html styles also)</p>
c# asp.net
[0, 9]
3,805,742
3,805,743
Restrict number of decimals to be displayed from DB
<p>I am fetching some values from my DB. The columns are of float type and are being displaed in DataList in the following manner. </p> <pre><code>&lt;ItemTemplate&gt; &lt;tr&gt; &lt;td style="width:200px;text-align:left"&gt; Item1: &lt;%#Eval("Item1") %&gt; | Item2: &lt;%#Eval("Item2") %&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/ItemTemplate&gt; </code></pre> <p>I have to restrict the number of decimal values being displayed int he data list to 3. How can I do that here?</p> <p>In the code-behind, the data is being fetched into the DataTable as follows.</p> <pre><code>SqlDataAdapter adp = new SqlDataAdapter("Retrieve", ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.SelectCommand.CommandType = CommandType.StoredProcedure; adp.SelectCommand.Parameters.Add("@s1", SqlDbType.NVarChar, 255).Value = strategies; adp.SelectCommand.Parameters.Add("@s2", SqlDbType.NVarChar, 255).Value = DropDownList1.SelectedItem.ToString(); adp.Fill(ds); DataList1.DataSource = ds; DataList1.DataBind(); </code></pre>
c# asp.net
[0, 9]
1,884,880
1,884,881
Jquery-load event not firing asp.net button click event
<p>i Have tow Web page Home.aspx And login.aspx ---</p> <p><strong>login.aspx SouceCode</strong></p> <pre><code>&lt;div id="Lbox"&gt; &lt;asp:Label ID="Label1" runat="server" Text="User Id" CssClass="lable"&gt;&lt;/asp:Label&gt; &lt;asp:TextBox ID="Txt_userId" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;asp:Label ID="Label2" runat="server" Text="Password" CssClass="lable"&gt;&lt;/asp:Label&gt; &lt;asp:TextBox ID="Txt_userPass`enter code here`" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;asp:Button ID="Bt_login" runat="server" Text="Bt_login" onclick="Bt_login_Click" /&gt; &lt;div&gt; </code></pre> <p><strong>login.aspx.cs</strong></p> <pre><code> protected void Bt_login_Click(object sender, EventArgs e) { //code here...... } </code></pre> <p><strong>home.aspx source code</strong></p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#log").click(function () { $.blockUI({ message: $($("#Info").load("Login.aspx #Lbox")) }); }); }); &lt;/script&gt; &lt;a id="log"&gt;Login&lt;/a&gt; &lt;div id="Info"&gt;&lt;/div&gt; </code></pre> <p>problam is here - in login.aspx page <strong>Bt_login_Click</strong> not firing</p>
jquery asp.net
[5, 9]
2,981,907
2,981,908
Moving a box in JavaScript again -- the program seems to be detecting two key presses even though I'm only pressing one
<p>I'm trying to build on the top answer <a href="http://stackoverflow.com/questions/4950575/how-to-move-a-div-with-arrow-keys">here</a> by adding "gravity" such that the box always moves down unless a key is pressed. </p> <p>I've been fiddling for a couple of hours now and I can't figure it out. In the previous code he send two variables to the calculateNewValue function, for top and left of the css position. </p> <p>I thought I would simply be able to break these two tests for true/false key presses out into four, and then add a +1 for when the up arrow is false, hence the box will always fall down unless you tell it not to.</p> <p>It almost works, but the box moves down and to the right, instead of just down. And gravity doesn't work like that.</p> <p>This must have something to do with top and left being used to move the box in two directions. But if the event handler is storing the keycode for only one key, wouldn't all the other tests return false? How can I get it to not move right?</p> <pre><code>$(function(){ var pane = $('#pane'), box = $('#box'), maxValue = pane.width() - box.width(), keysPressed = {}, distancePerIteration = 3; function calculateNewValue(oldValue) { var newValue = parseInt(oldValue, 10) - (keysPressed[37] ? distancePerIteration : 0) - (keysPressed[38] ? distancePerIteration : 0) + (keysPressed[39] ? distancePerIteration : 0) + (keysPressed[40] ? distancePerIteration : 1) return newValue &lt; 0 ? 0 : newValue &gt; maxValue ? maxValue : newValue; } $(window).keydown(function(event) { keysPressed[event.which] = true; }); $(window).keyup(function(event) { keysPressed[event.which] = false; }); setInterval(function() { box.css({ left: function(index ,oldValue) { return calculateNewValue(oldValue); }, top: function(index, oldValue) { return calculateNewValue(oldValue); } }); }, 20); }); </code></pre>
javascript jquery
[3, 5]
5,956,205
5,956,206
jquery / javascript: Uncaught TypeError?
<p>hey guys, i wrote a little custom animated scroll function...</p> <pre><code>function scroll(selector, animate, viewOffset) { pageOffset = selector.offset(); scrollPos = pageOffset.top - viewOffset; if (animate) { $('html, body').animate({scrollTop : scrollPos + 'px'}, { duration: 'slow', // how fast we are animating easing: 'easeOutQuint', // the type of easing complete: function() { } }); } else { $('html, body').scrollTop( scrollPos ); } } </code></pre> <p>I call it with <code>scroll($('#something'), false, 30);</code></p> <p>It actually works, however sometimes it's a little bit buggy and the function doesn't properly work. I always call the scroll() function on a click-event.</p> <p>The biggest problem I have is that on page load my console tells me the following line.</p> <blockquote> <p>Uncaught TypeError: Cannot read property 'top' of null (script.js line 191 which is line 3 in my example above)</p> </blockquote> <p>Any idea what could cause this error? the scroll() function is not even called on dom-ready or on-load. It's just called on specific click-events.</p> <p>thank you for your help</p>
javascript jquery
[3, 5]
4,362,088
4,362,089
jquery print iterators
<p>I have the below code that iterates through a number of text fields. I am trying to write an if statement that will print if the jQuery is <code>jQuery('.textTextArea.print')</code> and not <code>jQuery('.txtTextArea.print').each</code>. I am new to jQuery but have experience writing if statements in rails but unsure about how to write an if statement to print if <code>jQuery('txtTextArea.print')</code>. Any help would be greatly appreciated </p> <pre><code>jQuery('.textTextArea.print').each(function() { // set label text label.setObjectText("TEXT", this.value); jQuery('.numTextArea').each(function() { label.setObjectText("TEXT_2", this.value); // select printer to print on // for simplicity sake just use the first LabelWriter printer var printers = dymo.label.framework.getPrinters(); if (printers.length == 0) throw "No DYMO printers are installed. Install DYMO printers."; var printerName = ""; for (var i = 0; i &lt; printers.length; ++i) { var printer = printers[i]; if (printer.printerType == "LabelWriterPrinter") { printerName = printer.name; break; } } if (printerName == "") throw "No LabelWriter printers found. Install LabelWriter printer"; // finally print the label label.print(printerName); }); }); </code></pre>
javascript jquery
[3, 5]
5,232,578
5,232,579
Java Package names and conflicts
<p>a simple question but Ive realised im not sure of the answer for this one....</p> <p>If I am creating an android application with a library package named</p> <pre><code>com.example.one </code></pre> <p>and then i create another app and include another package with the name</p> <pre><code>com.example.one </code></pre> <p>which has a slightly refactored class, could this cause any problems in either of the apps?</p> <p>The reason i ask is recently I had a problem with some google source code and it was down to the fact that a device manufactorer had included the same libs in the custom OS that I had used in my apk, and it was not happy! (or so i was told)</p> <p>If anyone can fill me in here, as i obviosuly dont understand something quite findamental here :)</p> <p>thankx</p> <p><strong>EDIT:</strong> a good link on the diff between Android and Java package names <a href="http://blog.javia.org/android-package-name/" rel="nofollow">http://blog.javia.org/android-package-name/</a></p>
java android
[1, 4]
2,824,479
2,824,480
JQuery to collapse table?
<p>I'm running the MyBB forum software and was able to load jQuery without breaking the functionality. The board itself already has a collapse function but I would like to do it in jquery, or well add a nice jquery effect to it, more smoother.</p> <p><a href="http://craftedbyfrank.com" rel="nofollow">http://craftedbyfrank.com</a></p> <p>At the moment when the [+] and [-] images are clicked the table collapses and shows.</p> <p>I'm trying the following but having no luck.</p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function() { $("tr.thead").click(function () { $("tr.thead.img", $(this).parent()).slideToggle("fast"); }); }); &lt;/script&gt; </code></pre> <p>I loaded jQuery 1.9</p> <p>All help is appreciated.</p>
javascript jquery
[3, 5]
4,544,264
4,544,265
javascript not working on iPhone
<p>I have the following javascript in my index file but its not showing for iPhone</p> <pre><code>onComplete: function() { var video_id = $('#video_id').val(); if(video_id == 1){ $("#TB_window").remove(); $("body").append("&lt;div id='TB_window'&gt;&lt;/div&gt;"); tb_show("","#TB_inline?height=500&amp;width=750&amp;inlineId=hiddenModalTest&amp;modal=false",""); }else if(video_id == 2){ $("#TB_window").remove(); $("body").append("&lt;div id='TB_window'&gt;&lt;/div&gt;"); tb_show("","#TB_inline?height=500&amp;width=750&amp;inlineId=hiddenModalEvaluation&amp;modal=false",""); } } </code></pre> <p>Is there a way to make it iPhone compatible ?</p>
javascript iphone
[3, 8]
5,508,545
5,508,546
moving aspx eval to code behind
<p>In my aspx file, I have some code that looks like this:</p> <pre><code>&lt;script type="text/javascript"&gt; var MyVar = '&lt;% =MyFunction() %&gt;'; &lt;/script&gt; </code></pre> <p>All this works fine: MyVar actually holds a json string that later gets evaluated on the client. The problem is that this code was designed for a one-time situation and it's turning out to becoming more than a one-time situation and it just looks messy.</p> <p>I'd like to move this to my code behind. How could I do this?</p> <p>Thanks.</p>
c# asp.net
[0, 9]
2,261,263
2,261,264
can stop zooming my page in desktop browser
<p>how can i stop zooming my web page in desktop browser. or, prevent minimum &amp; maximum zooming. that the page will not zoom in or out after the width &amp; height. Thanks. </p>
php javascript
[2, 3]
388,827
388,828
use javascript variable into python Block
<p>I want to use JavaScript variable into python Block.</p> <pre><code>&lt;script&gt; $(document).ready(function() { $("#WO_cpp_id").change(function() { id = this.selectedIndex; ajax('{{=URL(r=request,f='get_CIs',vars={'CPP_Id':'#here I want to use id variable')}}', ['WO_cpp_id'], 'WO_ci_id'); }) .change(); }); &lt;/script&gt; </code></pre> <p>Thanks in Advance</p>
javascript jquery python
[3, 5, 7]
2,775,451
2,775,452
using jquery to access event values?
<p>When using for events for internet explorer we are currently using statements like this to access or change values:</p> <pre><code>window.event.cancelBubble = true; clickX = window.event.screenX; </code></pre> <p>I was wondering how to do this cross browser or using JQuery?</p>
javascript jquery
[3, 5]
3,933,801
3,933,802
How to Execute Command/function in Asp.net Automatically To send Email / Sms Without user logged In
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7645302/doing-scheduled-background-work-in-asp-net">doing scheduled background work in asp.net</a> </p> </blockquote> <p>I want To Send Email/SMS To my user Automatically in Asp.net C#, even they are not logged In.</p> <p>I want To do : On Birthday Of User Automatically send Email/Sms To Users To say Happy Birthday. </p> <p>Example of running site: Way2SmS.com send User Sms automatically on Their Birthday Also Way2Sms send SMS automatically When user set it to send(user provide date &amp; time).</p> <p>Can You please help me regarding this.?</p> <p>Is any possibilities of doing this.?</p> <p>If yes please provide me some code or link or details. :)</p>
c# asp.net
[0, 9]
4,477,580
4,477,581
Load Image and Fade In, but in sequential way
<p>I'm trying to load my images and fade in. Its working. But lets suppose that I have 4 images. Right now, my script its working by loading the last image, not the first. How can I make my js load the first image, and just start loading the second after the first has been loaded?</p> <p>Here's my code:</p> <pre><code>$(function(){ $("a").click(function(){ $("#load").load('load.html', function() { $('#load img').hide(); alert($("#load img").length); $('#load img').each( function(){ $(this).on('load', function () { $(this).fadeIn(); }); }); }); return false; }); }); </code></pre>
javascript jquery
[3, 5]
5,523,619
5,523,620
Aspnet Compiler is compiling my aspx files
<p>I'm using the aspnet_compiler compiler program as part of the automated build procedure for a website. We have a website project and the build step generates the assembily for the project for the release build. However it generates these dlls in such a way that the aspx pages reference those at the moment randomly named assembilies. So my question is how would I modify this process to allow me to swap the dll's without updating the entire site. Also we're using nant at the moment for the build process.</p>
c# asp.net
[0, 9]
2,335,108
2,335,109
how we can use url rewrite to generate and get url like google provide cutome website url
<p>I need to make dynamic website like google provide services of develop and design on line website, I have completed all things of database and design, but how could i get the url at loading time of the web application if page not found then 404 error acre</p> <p>in google</p> <p>the website url would be www.website.google.com/ourlwebsitename here ourlwebsitename is as a example of user created name. same thing I want to do.</p> <p>www.mywebsite.com/userchiceaname</p>
c# asp.net
[0, 9]
4,750,013
4,750,014
RenderControl in HtmlTextWriter - InvalidOperationException
<p>I would like to render a Control object which is just created on the fly when the user send a postback request. To do so, I use the code below:</p> <pre><code>StringBuilder sb = new StringBuilder(); HtmlTextWriter ht = new HtmlTextWriter(new StringWriter(sb)); Rating r = new Rating("r", 5, 3, No, Big); r.RenderControl(ht); </code></pre> <p>which unfortunately yields to an <code>InvalidOperationException</code> at the last line and with the following error: </p> <blockquote> <p>The page can not be null. Make sure that this operation is performed in the context of an ASP.NET request.</p> </blockquote> <p>I probably misunderstood the way I should use this <code>RenderControl</code> method, and I hope you can help me with my problem. </p> <p>Thank you, David</p>
c# asp.net
[0, 9]
4,473,637
4,473,638
Jquery Keypress is not working for my input box
<pre><code>$("#epFilter").keypress(function(){ query = $("#epFilter").val(); alert(query); }); </code></pre> <p>In this code, whenever I type in my text box, it always alert one character less. It doesn't catch the last character. Why?</p>
javascript jquery
[3, 5]
820,756
820,757
What is a better way to write this Javascript hover function?
<p>This works but of course is a bit redundant. Items can also be dynamically added so I need to have it always increment by one. What is a better way to write this into one function?</p> <p>Update: Just added the markup. Bascially when a user hovers any of the list item a classname should be attached to the banner div. e.g., banner_0, banner_1, etc.</p> <pre><code>&lt;ul id="list"&gt; &lt;li&gt;&lt;a href="#" data=""&gt;item1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data=""&gt;item2&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data=""&gt;item3&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data=""&gt;item4&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data=""&gt;item5&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data=""&gt;item6&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data=""&gt;item7&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div id="banner" class=""&gt;&lt;/div&gt; $('#list a').eq(0).hover( function() { $('#banner').addClass('banner_0'); }, function() { $('#banner').removeClass(); } ); $('#list a').eq(1).hover( function() { $('#banner').addClass('banner_1'); }, function() { $('#banner').removeClass(); } ); $('#list a').eq(2).hover( function() { $('#banner').addClass('banner_2'); }, function() { $('#banner').removeClass(); } ); $('#list a').eq(3).hover( function() { $('#banner').addClass('banner_3'); }, function() { $('#banner').removeClass(); } ); </code></pre>
javascript jquery
[3, 5]
3,427,778
3,427,779
Context in android
<p>i am a newbie.Please explain what all things are passed through a context.Like when constructing an object for the following class..</p> <p>public class myclass{</p> <p>public myclass (Context context){....} }</p>
java android
[1, 4]
2,849,932
2,849,933
Issues in Reorder list - C#
<p>I am using Reorder list in my page. In IE it is working properly. But in Firefox it is not working properly. I am not able to reorder the last few items. Can any one of you tell what may be the problem?</p>
c# asp.net
[0, 9]
2,776,085
2,776,086
jQuery - Library or Framework?
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/7062775/is-jquery-a-javascript-library-or-framework">Is jquery a javascript library or framework?</a> </p> </blockquote> <p>jQuery: The Write Less, Do More, JavaScript <strong>Library</strong>.</p> <p>Why do people call it a framework when it clearly isn't? Also, why does jQuery call itself a library and Mootools calls itself a framework?</p> <p>I'm in a debate. Mootools, jQuery, Prototype, they are libraries. Are they not?</p>
javascript jquery
[3, 5]
5,352,659
5,352,660
Stripping out a link in jQuery
<p>I have a bit of html like so:</p> <pre><code>&lt;a href="#somthing" id="a1"&gt;&lt;img src="something" /&gt;&lt;/a&gt; &lt;a href="#somthing" id="a2"&gt;&lt;img src="something" /&gt;&lt;/a&gt; </code></pre> <p>I need to strip off the links so I'm just left with a couple of image tags. What would be the most efficient way to do this with jQuery?</p>
javascript jquery
[3, 5]
4,225,046
4,225,047
Trouble executing pygooglevoice under a PHP script (as www-data user)
<p>I can get the <a href="http://code.google.com/p/pygooglevoice/" rel="nofollow">pygooglevoice</a> library to work and place a call when when running under a normal user account, however when trying to run under PHP using the exec() function, nothing happens, and no output is generated. So I tried running the script as the www-data user in the terminal:</p> <pre><code>$ python call.py Traceback (most recent call last): File "call.py", line 5, in &lt;module&gt; voice.login() File "/home/r/repos/first-leap/www/lib/pygooglevoice/examples/googlevoice/voice.py", line 59, in login email = config.email File "/home/r/repos/first-leap/www/lib/pygooglevoice/examples/googlevoice/conf.py", line 51, in &lt;lambda&gt; email = property(lambda self: self.get('email','auth')) File "/home/r/repos/first-leap/www/lib/pygooglevoice/examples/googlevoice/conf.py", line 30, in get return ConfigParser.get(self, section, option).strip() or None File "/usr/lib/python2.7/ConfigParser.py", line 596, in get sectiondict = self._sections[section] AttributeError: Config instance has no attribute '_sections' </code></pre> <p>Does anyone have any idea what might be going on here?</p>
php python
[2, 7]
5,470,141
5,470,142
Unable to assign Resource Key to asp.net Label
<p>Am new to development , as startup, am learning from different videos and tutorials. Right now am facing a strange problem</p> <p>i have a asp.net label</p> <pre><code>&lt;asp:Label ID="Label2" runat="server" Text="&lt;%$ Resources:Label1TextKey %&gt;" /&gt; </code></pre> <p>and i have defined his key in </p> <pre><code>App_GlobalResources &gt;&gt; Resource.resx &gt;&gt; Label1TextKey </code></pre> <p>but when i build , it is giving </p> <pre><code>Error 1 The resource object with key 'Label1TextKey' was not found. C:\Documents and Settings\Maya\My Documents\Visual Studio 2008\WebSites\WebSite1\Default.aspx 14 </code></pre> <p>Can and body help me out?</p>
c# asp.net
[0, 9]
1,798,403
1,798,404
Determine if page was refreshed
<p>Would it be possible to determine if a webpage was accessed from the result of a refresh (pressing F5 or simply clicking the refresh button) using JavaScript? I'm also using jQuery.</p>
javascript jquery
[3, 5]
4,912,113
4,912,114
Triple (3) Equal Signs
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/359494/javascript-vs-does-it-matter-which-equal-operator-i-use">JavaScript === vs == : Does it matter which &ldquo;equal&rdquo; operator I use?</a> </p> </blockquote> <p>I asked <a href="http://stackoverflow.com/questions/11112127/prevent-backspace-from-navigating-back-with-jquery-like-googles-homepage">another question</a> here and received a great answer as follows:</p> <pre><code>$(document).on("keydown", function (e) { if (e.which === 8 &amp;&amp; !$(e.target).is("input, textarea") || $(e.target).is('[readonly]')) { e.preventDefault(); } }); </code></pre> <p>Notice the three equal signs <code>===</code> in the if-statement. I have always thought you only needed two equal signs <code>==</code> for a javascript/jQuery if-statement. Is there any reason for the three?</p> <p><strong>UPDATE</strong></p> <p>Sorry for the duplicate question - I searched but didn't find any good questions. I guess I was using the wrong search terms.</p>
javascript jquery
[3, 5]
2,268,572
2,268,573
Services returning JSONP
<p>I have heard about JSONPand want to try it with a live service (except flickr). Can anyone give me a very simple example in jquery/javascript on how to call this service? Also how do I pull large images (> 1MB) efficiently. Is there a way to add a progress bar during the call</p>
javascript jquery
[3, 5]
4,738,503
4,738,504
Cannot display converted PDF to image php
<p>I've got this page called pdf.php:</p> <pre><code>&lt;?php $im = new imagick( 'uploadedfiles/logo.pdf[0]' ); $im-&gt;setImageFormat( "png" ); header( "Content-Type: image/png" ); echo $im; ?&gt; </code></pre> <p>Then I've got script that echos this:</p> <pre><code>$pdf_ext = '&lt;div class="aList" style="cursor:pointer; width:100%; clear:both; overflow:hidden; height:auto; margin-bottom:5px;" id="pdf.php"&gt;&lt;div style="float:left; margin:0 5px 0 0; padding:0 5px; width:auto;height:20px;border:2px solid black;"&gt;' . $ext . '&lt;/div&gt;' . $a_name . '&lt;/div&gt;'; </code></pre> <p>This is what's displayed when I click on div.aList:</p> <pre><code>&lt;div id="aPreview"&gt;&lt;img /&gt;&lt;/div&gt; </code></pre> <p>And in background jquery script after clicking on div.aList does this:</p> <pre><code>// Element ID is send via $(".aList").live("click") event function showPreview(elementId) { $("#aPreview img").attr('src',elementId); $("#aPreview").fadeIn('slow'); $("body").click(function() { $("#aPreview").fadeOut('slow'); }); } </code></pre> <p>But it doesn't show the image, what might be wrong?</p>
php jquery
[2, 5]
1,720,611
1,720,612
Does a function inside jQuery constructor do anything different?
<p>I feel like I've only ever seen this here on SO, but I can't seem to find any documentation on it. The code I am talking about is stuff like this:</p> <pre><code>$(function foo(){ alert('foo'); }); </code></pre> <p>Is there anything to that or is that just something that novices do because they think jQuery is a language? There is no scope change. It just seems completely unnecessary. Is there any method that you can invoke on this like:</p> <pre><code>$(function foo(){ alert('foo'); }).someMethod(); </code></pre> <p>The closest thing I can think of is <a href="http://api.jquery.com/jQuery.proxy/" rel="nofollow">$.proxy</a>, but that doesn't use this syntax. Am I right, is this completely unnecessary? </p>
javascript jquery
[3, 5]
2,647,976
2,647,977
How to get sorting without removing Row-Created function(Use for changing column of header-text in run-time)
<p>The following code is my Grid View AA from aspx page.</p> <pre><code>&lt;asp:GridView ID="GridView_AA" runat="server" OnSorting = "Gridview_AA_Sorting" OnRowCreated="GridView_AA_RowCreated"&gt; &lt;asp:TemplateField HeaderText="Period Name" SortExpression="PERIOD_NAME"&gt; &lt;EditItemTemplate&gt; &lt;asp:TextBox ID="txtGVPeriodName" runat="server" Text='&lt;%# Bind("PERIOD_NAME") %&gt;'&gt;&lt;/asp:TextBox&gt; &lt;/EditItemTemplate&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID="lblGVPeriodName" runat="server" Text='&lt;%# Bind("PERIOD_NAME") %&gt;' Visible="False"&gt;&lt;/asp:Label&gt; &lt;asp:LinkButton ID="lborganize" runat="server" OnClick="lborganize_Click" Text='&lt;%# Bind("PERIOD_NAME") %&gt;'&gt;&lt;/asp:LinkButton&gt; &lt;/ItemTemplate&gt; &lt;HeaderStyle HorizontalAlign="Center" Width="400px" /&gt; &lt;ItemStyle HorizontalAlign="Center" Width="400px" /&gt; &lt;/asp:TemplateField&gt; &lt;/asp:GridView&gt; </code></pre> <p>I cannot sort after adding GridView_AA_RowCreated function. Each column of Grid view header-text worked well before I add this Row Created function. If I cut the following code: e.Row.Cells[2].Text = "Period Name"; Sorting works. I want to get sorting without removing this Row Created function. Do you have any brighter solution about my problem?</p> <pre><code> protected void GridView_AA_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Header) { e.Row.Cells[2].Text = "Period Name"; //Change header text in run-time } } </code></pre>
c# asp.net
[0, 9]
3,443,960
3,443,961
Firing a server-side method via PageMethod
<p>I wrote a JavaScript function that fires when the user clicks OK in a RadConfirm dialog. This is supposed to trigger a JavaScript callback to the server to delete a record from the database. This may not be the best architecture (I can think of other ways to accomplish my goals) but I'm trying to struggle through this as a learning exercise. Below is the code I've written thus far. I think I've gotten most of it correct.</p> <p>This Javascript function:</p> <pre><code> function confirmCallBackFn(arg) { if (arg == true) { PageMethods.RemovePackagePageMethod(); } else { } } </code></pre> <p>Should invoke the following WebMethod on the server:</p> <pre><code> [WebMethod()] public static void RemovePackagePageMethod(object sender, EventArgs e) { Inventory inv = new Inventory(); inv.RemovePackage(); } </code></pre> <p>Which in turn should execute the following method:</p> <pre><code> private void RemovePackage() { SBMData2.SBMDataContext db = new SBMData2.SBMDataContext(); var boxes = from p in db.Packages where p.PackageID == Convert.ToInt32(RadGrid1.SelectedValues["PackageID"].ToString()) select p; foreach (var box in boxes) { db.Packages.DeleteOnSubmit(box); } try { db.SubmitChanges(); RadGrid1.Rebind(); } catch (Exception ex) { RadWindowManager1.RadAlert("System error deleting package", 200, 200, "exception", null); } } </code></pre> <p>Everything looks good to me and seems to be consistent with the posts I've read on this site and others about using PageMethod to fire code on the server. However, it's failing to execute the deletion in the final method (which I've tested in isolation). Can someone spot where I went wrong?</p>
c# javascript asp.net
[0, 3, 9]
3,376,034
3,376,035
Changing Javascript method to Jquery
<p>So I have the following Jquery calling a Javascript method</p> <pre><code>$j("a.Pinterest").attr("href", "javascript:void(addScript());"); </code></pre> <p>And this is the Javascript Method</p> <pre><code> function addScript() { var e = document.createElement('script'); e.setAttribute('type', 'text/javascript'); e.setAttribute('charset', 'UTF-8'); e.setAttribute('src', 'http://assets.pinterest.com/js/pinmarklet.js?r=' + Math.random() * 99999999); return document.body.appendChild(e); } </code></pre> <p>I was wondering if there was a way to have it all in Jquery ?</p>
javascript jquery
[3, 5]
3,672,413
3,672,414
detecting change in a text input box using jquery/javascript
<p>in html and javascript, I can use keyup, focus, blur to detect most of the content changes in a text input, however if the user do a copy and paste into the text input, how do I capture this change? The issue here is that the input is already in focus when user paste into it.</p>
javascript jquery
[3, 5]
2,151,673
2,151,674
How are Java objects laid out in memory on Android?
<p>I'm fairly familiar with the layout of objects on the heap in HotSpot, but not so much for Android.</p> <p>For example, in a 32-bit HotSpot JVM, an object on the heap is implemented as an 8-byte header, followed by the object's fields (one byte for <code>boolean</code>, four bytes for a reference, and everything else as expected), laid out in some specific order (with some special rules for fields from superclasses), and padded out to a multiple of 8 bytes.</p> <p>I've done some research, but I can't find any Android-specific information.</p> <p>(I'm interested in optimizing some extremely widely used data structures to minimize memory consumption on Android.)</p>
java android
[1, 4]
896,053
896,054
PLC Compiler and an Interpreter
<p>I am Trying to Build a PLC Compiler and an interpreter can anybody give me Some Links which will be useful for me.. Thanks</p>
java javascript
[1, 3]
1,444,942
1,444,943
jQuery to find all previous elements that match an expression
<p>Using jQuery, <strong>how do you match elements that are prior to the current element in the DOM tree?</strong> Using <code>prevAll()</code> only matches previous siblings.</p> <p>eg:</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td class="findme"&gt;find this one&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="#" class="myLinks"&gt;find the previous .findme&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td class="findme"&gt;don't find this one&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>In my specific case, I'll be searching for the <em>first</em> <code>.findme</code> element prior to the link clicked.</p>
javascript jquery
[3, 5]
1,050,205
1,050,206
External Javascript file is being called twice and doesn't work?
<p>I have two identical sites.</p> <p>One is in <strong>localhost/taiwantalk2</strong></p> <p>The other in <strong>localhost/taiwantalk3</strong></p> <p>The have this same code in the header:</p> <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="&lt;?php bloginfo('template_directory'); ?&gt;/js/cleditor/jquery.cleditor.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="&lt;?php bloginfo('template_directory'); ?&gt;/js/custom.js"&gt;&lt;/script&gt; </code></pre> <p>But for some reason, in <strong>localhost/taiwantalk3</strong> the file is being called twice (<strong>jquery.cleditor.min.js</strong>):</p> <p><img src="http://i.stack.imgur.com/c0uSG.png" alt="enter image description here"></p> <p>And the script doesn't work:</p> <p><img src="http://i.stack.imgur.com/rsYwM.png" alt="enter image description here"></p> <p>Everything was working OK in <strong>localhost/taiwantalk2</strong>:</p> <p>The file was being called just once:</p> <p><img src="http://i.stack.imgur.com/smOm3.png" alt="enter image description here"></p> <p>and the script was working perfectly:</p> <p><img src="http://i.stack.imgur.com/s4moA.png" alt="enter image description here"></p> <p>I really don't know what's going on. Any suggestions?</p> <p>My site is being developed in Wordpress (well, but this is a Javascript question). I'm using ubuntu 11.04 with LAMP.</p>
javascript jquery
[3, 5]
4,214,551
4,214,552
Who passed the "args" to the main method?
<p>I tried to run a small c# and java program (using VS and NetBeans not from the command line) and print the value of the args[0] but I got an <code>IndexOutOfRangeException</code>.<br/> I know that the <code>args</code> is for passing in command line parameters but it is <strong>still</strong> in the main method any way, So how the program will run if there is no <code>args</code> parameter passed to it ?</p>
c# java
[0, 1]
4,767,769
4,767,770
When page loads display 1st image text - hide all other text
<p>I have created <a href="http://techavid.com/design/test3.html" rel="nofollow">this page</a> and when you load the page you see there are 3 images. The sun image is focused(in color), while the others are greyed out until clicked. That is how it should be for the images.</p> <p>Also when you load the page you see under each image it's own text(i.e. 1st: Sun, 2nd: Airplane, 3rd: Nano), but on page load I only want 1st:Sun to display and hide all other text until their respective image is clicked.</p>
javascript jquery
[3, 5]
5,493,216
5,493,217
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,469,914
3,469,915
Display a link to the status of my latest tweet using jQuery & how to execute it?
<p>So I have jQuery in the <code>&lt;head&gt;</code> of my page as this:</p> <pre><code>&lt;script language="javascript" type="text/javascript" src="./javascript/jquery-1.2.6.js"&gt;&lt;/script&gt; </code></pre> <p>and already I was gratefully given this code that will display a linked text that reads 'Read' and the link will be to my latest tweet's status and it looks like this:</p> <pre><code>jQuery.getJSON('http://twitter.com/status/user_timeline/brianj_smith.json?count=1&amp;callback=?', function(data){ if (data.length &gt; 0) { var link = jQuery('&lt;a&gt;').attr('http://twitter.com/brianj_smith/status/' + data[0].id) .text('Read'); }); </code></pre> <p>Now I am not an expert at jQuery, so I don't exactly know how to make the above jQuery coding work and for the text "Read" to be displayed on my website, while at the same time it being linked to the status of my latest tweet.</p> <p>I think that makes sense for the most part. If anyone could help me out that would be great. I know I made a post earlier, but I didn't understand much of what was being said :S</p>
javascript jquery
[3, 5]
5,092,098
5,092,099
asp.net validator add class to input if validation is wrong
<p>Is it possible to add css class to validated input if value isnt valid ? Im using asp.net validators.</p> <p>Maybe there is javascript event on taht validators which I can use ?</p> <p>thanks for any advice</p>
c# asp.net
[0, 9]
4,339,473
4,339,474
Repeat code in android
<p>I want an app which changes background color when pressing a button. After 500 ms, I want to change background color to black for 2000ms. And then repeat whole process again, until user terminates that.</p> <p>I have following code but its not working as I think it should.</p> <pre><code>private void set() { rl.setBackgroundColor(Color.WHITE); timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { runOnUiThread(new Runnable() { @Override public void run() { rl.setBackgroundColor(Color.BLACK); set(); // can I do that? } }); } }, 500); } </code></pre> <p>Can someone point me to right direction how can I do that? So I want:</p> <ol> <li>Execute some code</li> <li>After X time passed by , I want to execute another code and it should stay that way for X amount of time</li> <li>Repeat process until user cancels that.</li> </ol>
java android
[1, 4]
355,314
355,315
setting a class to a menu depending of the url link
<p>Here is my scenario, my sub pages are not recognizing the parent, probably cause I set the structure bad, however going to back to fix that is not an option for now, problem the menu parent is getting the parent class in the wrong places....</p> <p>So what I need to achieve...</p> <p>if I have this url structure: domain.com/products/.... assign "current" class to menu X...</p> <p>If I have this other: domain.com/sales/..... assign "current" class to Y....</p> <p>I know I can do it via javascript, however I lack of knowledge of it, I'm just looking for a solid starting point.</p> <p>I would appreciate any help.</p> <p>Thanks in advanced.</p>
javascript jquery
[3, 5]
1,110,705
1,110,706
jw player javascript function to read title when pressed
<p>I made a page where jw player is loaded with some vars that create a playlist to load and play a video file when a respective link is pressed. How can i get the text from the link when is pressed and display it at the top of the video as title?</p> <p>So every time when a new links is pressed to load the video, this function to get the text from tag and assign it as title at the top of the video.</p> <p>the link is structured like this: <code>&lt;a tabindex="5" href="#" onclick="jwplayer().load('/vod/rbc_10_1_11_pm.f4v')"&gt;&lt;em class="date"&gt;description&lt;/em&gt;Video title here&lt;/a&gt;</code></p> <p>Thank you.</p>
php jquery
[2, 5]
5,019,246
5,019,247
How to retrieve value from asp.net textbox from javascript?
<p>I have an asp.net web form with a couple of asp.net textbox controls:</p> <pre><code>&lt;asp:TextBox ID="txtTextBox" runat="server" /&gt; . </code></pre> <p>I have a javascript file tools.js that are included in the page:</p> <pre><code>&lt;script src="tools.js" type="text/javascript"&gt;&lt;/script&gt; </code></pre> <p>How can I access the value from txtTextBox from javascript?</p> <p>Ive tried using</p> <pre><code>document.getElementById('&lt;%= txtTextBox.ClienID %&gt;').value; document.getElementById('&lt;%= txtTextBox.UniqueID %&gt;').value; document.getElementById('&lt;%= txtTextBox %&gt;').value; </code></pre> <p>but none of them works. </p> <p>Any ideas?</p>
asp.net javascript
[9, 3]
3,347,954
3,347,955
Jquery not working
<pre><code>(function($) { $(document).ready(function(){ /*$('body').css('position','relative'); $('body').animate({'left':'-9999px'},3000);*/ alert('hello'); }); }(jQuery)); </code></pre> <p>Tried also</p> <pre><code>$(document).ready(function(){ /*$('body').css('position','relative'); $('body').animate({'left':'-9999px'},3000);*/ alert('hello'); }); </code></pre> <p>And firebug jumps:</p> <pre><code>jQuery is not defined [Detener en este error] }(jQuery)); </code></pre>
jquery javascript
[5, 3]
3,450,446
3,450,447
How to concat string to List C#
<p>I was trying to add the strings to the List and export the list as csv file but the result I got is not the way I want. Here is the code -</p> <pre><code>List&lt;string&gt; values = new List&lt;string&gt;(); using (StreamReader sr = new StreamReader(filePath)) { while (sr.Peek() != -1) { string line = sr.ReadLine(); List&lt;string&gt; lineValues = line.Split(',').ToList(); var tempMinInt = 1; var tempValue = 1; var tempValInt = Convert.ToInt32(lineValues[4]); if (tempValInt % 60 != 0) { tempMinInt = (tempValInt / 60) + 1; tempValue = tempMinInt * 30; } else { tempMinInt = tempValInt / 60; tempValue = tempMinInt * 30; } values.Add(lineValues + "," + tempValue.ToString()); } } </code></pre> <p>Here is the sample input data: </p> <pre><code>33083,2011-12-19 05:17:57+06:30,98590149,1876,258 33084,2011-12-19 05:22:28+06:30,98590149,1876,69 33085,2011-12-19 05:23:45+06:30,98590149,1876,151 33086,2011-12-19 05:30:21+06:30,98590149,1876,58 33087,2011-12-19 06:44:19+06:30,949826259,1876,66 </code></pre> <p>And here is the output data:</p> <pre><code>System.Collections.Generic.List`1[System.String],150 System.Collections.Generic.List`1[System.String],60 System.Collections.Generic.List`1[System.String],90 System.Collections.Generic.List`1[System.String],30 System.Collections.Generic.List`1[System.String],60 </code></pre> <p>Please advice. Thank you.</p>
c# asp.net
[0, 9]
3,084,529
3,084,530
Read file from android based device?
<p>I am new to Android and Java so pardon me if the question sounds stupid.</p> <p>I have connected a device to PC which runs android OS. Once the device is attached I can see its direcotry F:\ . </p> <p>How do I write a code in JAVA which can display me those files. I am using Eclipse IDE and Android plug in.</p> <p>Thank you</p>
java android
[1, 4]
1,189,867
1,189,868
Div width resize based on how many radio buttons are selected
<p>Basicly theres 2 divs open by default, the one of the left is always there and then you have 3 radio buttons. Atleast one must be selected (can't have "default" column all by itself). By default, the "default" div and "1" is there, and "2" and "3" are invisible (display:none). Each radio button is linked to specific div, so when clicked, jQuery will animate width to merge the selected div into the overall div with the other visible divs. How would this be achievable with jQuery?</p> <p><a href="http://imgur.com/HGvJ9" rel="nofollow">Picture</a> &lt;-----i have a link to a picture i made for a better understanding</p>
javascript jquery
[3, 5]
2,849,680
2,849,681
Find whether an element contains in a jquery selector
<p>Let say I have, </p> <pre><code>&lt;a id="a123"&gt;&lt;/a&gt; </code></pre> <p>Now I need to check whether $("a") selector contains $("#a123") element.</p>
javascript jquery
[3, 5]
4,371,057
4,371,058
javascript problem doPostBack
<p>I am having some problems. </p> <p>My page is failing in this javascript code (the second line):</p> <pre><code>function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } </code></pre> <p>It is telling me:</p> <blockquote> <p>'theForm.onsubmit' is null or not an object.</p> </blockquote> <p>Any ideas please?</p> <p>Thanks ! C</p>
javascript asp.net
[3, 9]
136,676
136,677
Array selector function by property value
<p>I have: </p> <pre><code>var array = [ { key: '1' }, { key: '2' }, { key: '3' } ] </code></pre> <p>I want:</p> <pre><code>var obj = getFirstItem(array, 'key', '2'); </code></pre> <p>And as a result:</p> <pre><code>obj = { key: '2' } </code></pre> <p>Is there such function in JavsScript or jQuery?</p>
javascript jquery
[3, 5]
1,153,170
1,153,171
animate move to the left and to the right?
<p>I want is to move my pagination to the left and to the right after clicked on <code>#prev_pag</code> and <code>#next_pag</code>. how is it and solve my problem?</p> <p><strong>Eg:</strong> <a href="http://jsfiddle.net/szVKD/5/" rel="nofollow">http://jsfiddle.net/szVKD/5/</a></p> <pre><code>$('#next_pag').click(function() { $('#pagination').animate({ left: '-=100px' }, 500); }); $('#prev_pag').click(function() { $('#pagination').animate({ left: '+=100px' }, 500); }); }); </code></pre>
javascript jquery
[3, 5]
5,645,590
5,645,591
populating dropdownlist with hours in c#
<p>I have to 2 dropdownlists and I want to populate them with hours from 1 to 24. Then I want to make the difference between them.If i choose in the first dropdown let's say the hour 12 AND in the second 16 then the difference will be 4. How can I achieve that in c#? I'm developing a asp.net web application with c#.This is how I populate my dropdownlist:</p> <pre><code> DateTime Date = DateTime.Today; DateTime Time = DateTime.Now; ListItem item1 = new ListItem(Time.ToShortTimeString(), Time.ToShortTimeString()); for (int i = 0; i &lt;= 48; i++) { ListItem item2 = new ListItem(Date.ToShortTimeString(), Date.ToShortTimeString()); droplist.Items.Add(item2); if (Date.CompareTo(Time) &lt; 0 &amp;&amp; Date.AddMinutes(30).CompareTo(Time) &gt; 0) droplist.Items.Add(item1); Date = Date.AddMinutes(60); } </code></pre> <p>How can I assign values to my dropdown, values being the hours??</p>
c# asp.net
[0, 9]
3,772,877
3,772,878
JavaScript or C#
<p>I'm new to development and want to learn JavaScript and C#, which one do you think would be best to start with. I want to mainly build web apps.</p>
c# javascript
[0, 3]
6,022,614
6,022,615
displaying php content in JavaScript new window
<p>Here is the code that I have so far: </p> <pre><code>$output = &lt;&lt;&lt;BLOCK &lt;html&gt; &lt;head&gt; &lt;title&gt;Preview!&lt;/title&gt; &lt;script type="text/javascrit"&gt; var content = $data; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;a href="" onclick="preview()"&gt;Click Me!&lt;/a&gt; &lt;script type="text/javascript"&gt; function preview(){ var preview = window.open('','preview','scrollbars=1,height=500,width=500,resizable=1'); preview.document.open(); preview.document.write(content); preview.document.close(); } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; BLOCK; echo $output; </code></pre> <p>$data contains a full html document generated by the php script. </p> <p>This doesn't seem to work, but I think you can get the idea what I'm trying to do. Your help is appreciated. Thanks. </p>
php javascript
[2, 3]
4,644,008
4,644,009
get what element the mouse is over with the mousemove event on the body
<p>If you use the <code>mousemove</code> event on the body tag. Is it possible to get what element in the html the mouse is currently over.</p> <pre><code>$('body').mousemove(function (e) { var details = e; // can e.something return what element the mouse cursor is over? console.log(details); }); </code></pre>
javascript jquery
[3, 5]
4,368,818
4,368,819
ASP.NET: Session state not updated when redirecting in explorer
<p>I have an aspx page (page1.aspx) where I set a Session variable and then redirect to another page:</p> <pre><code>HttpContext.Current.Response.Redirect("page2.aspx"); </code></pre> <p>On page2.aspx I want to read the session variable, but it doesn't exist until I reload the page. I try to read the session variable in page_load. </p> <p>The weird thing is that it works in firefox, but not in explorer??</p> <p>(Note that I've simplied this a bit to explain the problem page1.aspx is accessed from my HttpModule that and is rewritepathed (my workaround to get access to Session). So the flow is HttpModule -pathrewrite-> page1.aspx (set session var) -redirect-> page.2.aspx.)</p>
c# asp.net
[0, 9]
468,611
468,612
jQuery Toggle Text change
<p>when using slideToggle, how to change the Text close/show. I did a simple one, but cannot get the text change back.</p> <p>Here is what I did <a href="http://jsfiddle.net/9EFNK/" rel="nofollow">http://jsfiddle.net/9EFNK/</a> If someone could give me a hand? thanks</p>
javascript jquery
[3, 5]
4,967,405
4,967,406
how can I add buttons in array in android
<p>I am new user of android and making slide puzzle game and using eclipse.I made buttons in xml file.In java file I made an array of button type.Now my problem is how I add my buttons in array which I made in the xml file in table layout...</p>
java android
[1, 4]
5,607,037
5,607,038
String variable out of context for use in HTML output
<p>I'm trying to understand why the variable <code>myUrl</code> is out of context in the example below. What's the best way to handle this situation? Are there alternatives? The code is C# in an ASP.NET page.</p> <pre><code>&lt;% string myUrl = "http://www.website.com"; %&gt; &lt;ul class="footerLinks"&gt; &lt;li&gt;&lt;a href="&lt;%= myUrl %&gt;/index.html"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre>
c# asp.net
[0, 9]
1,971,435
1,971,436
slideshow - return to 1st image
<p>does anyone know how to add another button to this slideshow that takes the user back to the first image at any given point during the slideshow?</p> <p><a href="http://www.switchonthecode.com/tutorials/jquery-creating-a-slideshow" rel="nofollow">http://www.switchonthecode.com/tutorials/jquery-creating-a-slideshow</a></p> <p>Any help on this would be really appreciated.</p> <p>Thanks!!</p>
javascript jquery
[3, 5]
1,426,231
1,426,232
ClickListener and ListView Item Layout
<p>I have the following ClickListener on my ListView. My item layout is a RelativeLayout with 3 TextViews. I'm trying to return the value of the list item but I'm getting "android.widget.TextView@44ed....". What am I doing wrong?</p> <pre><code> itemList=(ListView)findViewById(android.R.id.list); itemList.setTextFilterEnabled(true); itemList.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView&lt;?&gt; a, View v, int position, long id) { Intent intent = new Intent(); Bundle b = new Bundle(); b.putString("TEXT", ((RelativeLayout) v).getChildAt(position).toString()); intent.putExtras(b); setResult(SUCCESS_RETURN_CODE, intent); finish(); } }); </code></pre>
java android
[1, 4]
144,652
144,653
Implicit super constructor LoginActivity() is undefined for default constructor. Must define an explicit constructor
<pre><code>public class Utils extends LoginActivity{ public static String postData(String url, Map&lt;String , String&gt; params, Context context) { String responseString=null; </code></pre> <p>the above one is child class and below one is parent class and i am getting error at</p> <pre><code>public class LoginActivity extends BaseActivity implements OnClickListener, OnKeyListener { private final Activity activity; private final Context context; private final String lisnId; public LoginActivity(Activity activity, Context context, String lisnId){ this.activity=activity; this.context = context; this.lisnId = lisnId; } </code></pre>
java android
[1, 4]
5,408,030
5,408,031
Best Language to Scrape a Webpage?
<p>I have excellent knowledge of PHP and moderate knowledge of Java.</p> <p>Basically, I was to go to a website, auto-enter a form input with a date range, click the search button, then return the information listed in the results.</p> <p>What language above would give me the best/most features for manipulating and navigating pages -- and are there any classes you recommend me getting to assist in this? Thanks!</p>
java php
[1, 2]
2,941,385
2,941,386
javascript links same number as div
<pre><code>&lt;div class="slider"&gt; &lt;div class="slide"&gt; ..// &lt;/div&gt; &lt;div class="slide"&gt; ..// &lt;/div&gt; &lt;div class="slide"&gt; ..// &lt;/div&gt; &lt;ul class="pagination"&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>I want to make the number of <code>li</code> the same as the number of <code>slide</code> with javascript/jquery</p> <p>I tried this but it doesn't seem to work</p> <pre><code>var pagination = $('.pagination li a').size(); var slides = $('.slide').size(); $(function(){ pagination=slides; }); </code></pre> <p>This is my real question, if I have more then one slider, how can i make the number of links inside of the div to be equal to the slides inside the <code>div class="slider"</code> not all the slides in the page</p> <p>In other words if I have the html i typed and i have another structure like this one but with more/less <code>div class="slide"</code> how can i make the links in the pagination equal to the number of thos divs</p>
javascript jquery
[3, 5]
3,958,342
3,958,343
Simple ASP Query Question
<p>How can I make the SelectCommand use a textbox from the default page so that I can add that to the where clause? Please include an example I am new to programming and it helps me understand the concept better. thanks in advance.</p> <blockquote> <p>Example WHERE (BADGE = 10000 + xBadgeTextBox.Text)?</p> </blockquote> <pre><code>string Badge = "100000" + Request.Form["xBadgeTextBox"]; &lt;asp:SqlDataSource ID="Time" runat="server" ConnectionString="&lt;%$ ConnectionStrings:Time %&gt;" ProviderName="&lt;%$ ConnectionStrings:Time.ProviderName %&gt;" SelectCommand="SELECT CLOCK_IN_TIME, CLOCK_OUT_TIME, BADGE FROM CLOCK_HISTORY WHERE (BADGE = 100000342)"&gt; // use the badge number instead. &lt;/asp:SqlDataSource&gt; </code></pre>
c# asp.net
[0, 9]
714,986
714,987
HTTPS Issue with redirecting
<p>So I inserted a SLL Certificate and now in the code for the web.config file I have</p> <p>Code:</p> <pre><code>&lt;system.webServer&gt; &lt;rewrite&gt; &lt;rules&gt; &lt;rule name="removed by me" stopProcessing="true"&gt; &lt;match url="(.*)" /&gt; &lt;conditions&gt; &lt;add input="{HTTPS}" pattern="(^OFF$)" /&gt; &lt;/conditions&gt; &lt;action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" /&gt; &lt;/rule&gt; &lt;/rules&gt; &lt;/rewrite&gt; &lt;/system.webServer&gt; </code></pre> <p>Now this works great and all but the directory that is what i use is site/folder/root(where all my files i need accessed are set to) Now with the code I used when I go to lets say login and I am at site/folder/loginfile and I login, it takes me to site/loginsuccess file when it should be site/folder/root.</p> <p>Please let me know if you need anything else! </p> <p>Thank you!</p> <p>EDITED-----------</p> <p>My redirect once you successfully login is:</p> <pre><code>header("location:http://Site/folder/memberinterface.php"); </code></pre>
java php javascript
[1, 2, 3]
5,800,274
5,800,275
extensive JS in php-file with buffering - how
<p>I'm including a great deal of (partly server-generated) JS in a php.file.</p> <p>What's the best approach? </p> <p>I know there's something like ">>>excerpt" or something that just let me type anything, but I forgotten..</p> <p>Regards, //t </p>
php javascript
[2, 3]
3,207,458
3,207,459
how to pass data with quotation(") to a dialog in jQuery
<p>Supposed I have the following code:</p> <pre><code>&lt;html:link onclick="jQuery('#add').data('name','${name}').dialog('open');" href="#"&gt; </code></pre> <p>And with this, if <strong>${name} = a"b"c</strong>, problem occurs, link was not rendered well. I have tried to escape the value, serialize but maybe my way is wrong.</p> <p>Any suggestion how to do this? I have been searching, but i just cant find the answer.</p> <p>Thanks all in advance.</p>
javascript jquery
[3, 5]
5,849,383
5,849,384
Protect javascript code from copying
<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 have some complex Jquery/Javascript code wich i want to protect from reading. Is there a possibility to put the code in a map wich is only acceable for the webserver? So others can view the page with the jquery functionality, but can't read the sourcecode?</p>
javascript jquery
[3, 5]
1,477,300
1,477,301
Which library/framework can be used for this specific project?
<p>I have a project, but I don't know which library that I could use for this project:<br> <em>Project requirement</em></p> <ol> <li>Log into hotmail.com</li> <li>Click on each email individually and take a specific link out of the email. </li> <li>Copy and add the link i want into a txt file. </li> </ol> <p>I've used to try Watir with Ruby, however I would like to try C++ and C# libraries this time. Plus, non-commercial please since I'm still a student. Any idea?</p> <p>Thank you,</p>
c# c++
[0, 6]
595,547
595,548
fire jquery/javascript when a certain section of the screen changes?
<p>I want to detect when a specific part of a webpage changes and have the page refresh when it happens. Is this possible? For example, let's say there's a green, absolutely positioned element about 50px by 50px in the upper left corner of a page - I want the page to refresh whenever it turns red.</p> <p>Basically what I'm trying to build is an overlay of a website that will detect when notifications pop up and refresh the page automatically. If there's other methods that are better than what I've come up with, please I'm open to anything.</p>
javascript jquery
[3, 5]
5,497,515
5,497,516
$(this) with child and pseudo selector
<p>I have the selection below, is there any way to make this selection work with <em>$(this)</em>?</p> <p>(select the second div child of .container)</p> <pre><code>$(".container div:eq(2)").width(); </code></pre>
javascript jquery
[3, 5]
5,063,113
5,063,114
How to capture a complete webpage using javascript
<p>I inject javascript code into a page user is currently viewing, on users command this script make DOM changes. At the end of this interaction user might want to save the page so that s/he can view/edit it later. I could remember the DOM changes that user made, But if the original page(at its source) is changed, I will not be able to restore this page for user. That is why I want to send the changed page to my server. I should be able to restore it completely and the page should behave exactly the way it did(including scripts and media).</p> <p>Additionally I can not store media of users page at my end(resource limitation), so I guess I have to parse and modify all addresses/references/links of media to global URL/URI in various scripts(HTML/CSS/JavaScript).</p> <p>Now the question is, Is there a library/framework/jquery extension that can help me achieve this objective ?</p> <p>else, What is the right/professional way to do it ?</p>
javascript jquery
[3, 5]
2,228,818
2,228,819
A btnclick Function calls another function,but the call not in the btnclick function
<p>consider the following: code for buttonclick fn in .cs file :</p> <pre><code>protected void additembtnClick(object sender, EventArgs e) { DataTable dt = createTemptable(); dt = (DataTable)Session["dfdtemptable"]; this.DFDLOVlst.DataSource = dt; this.DFDLOVlst.DataBind(); this.txtLOVCode.Visible = true; this.txtLOVvalue.Visible = true; MDIngrdientsCode.Show(); } </code></pre> <p>this is the on_row clicked fn of the datagrid</p> <pre><code>protected void OnFindSelect(int Value) { } </code></pre> <p>code for findbtn click: </p> <pre><code>protected void btnFind_Click(object sender, EventArgs e) { this.FindLookup.SetLookup(); this.FindLookup.SearchLookup(); this.MdFindLookup.Show(); } </code></pre> <p>When the find button is clicked,the lookup control gets loaded with values from database.On selecting any row the selected row values will be added to corresponding text boxs and data grid. The additembtnclick is to add new entry to the datagrid.The user can add new values or can click the find and select a row and update its values in the datagrid. Theres no problem when the user adds fresh values .When the user click the find and select a particular row.The values gets add to correspondind fieldls..And now if the user clicks the additem button to add new values to already existing values in datagrid then the fn onfindselected(fn for the onrowclicked event for the lookup control containg datagrid) is called automatically,but the call is not in the button click fn..</p> <p>Can't figure out whats wrong..?</p>
c# asp.net
[0, 9]
2,307,391
2,307,392
How to update a TextView of an activity from another class
<p>Iam new to android/java programming. I have two class, one is an activity and other normal class. In my activity class contains TextView. Can i update TextView of activity class from normal class. I tried with random code, but it fails. Please provide a solution...</p> <pre><code>// activity class public class MainMenu extends Activity { public TextView txtView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView txtView = (TextView)findViewById(R.id.text); } } // other class public class ClassB { public ClassB(){ } public void Update(){ TextView txtView = (TextView)findViewById(R.id.text); txtView.setText("Hello"); } } </code></pre>
java android
[1, 4]
580,091
580,092
Jquery: How to prevent further animating to the left when style: left == 0 or 0px?
<p>How would I prevent a div from scrolling further left when the style 'left' of that div reached '0' or '0px'? Right now I am using the animate custom effect to scroll a div left and right to display hidden overflows but when the div reaches '0' or '0px' on style: left, I want the user to be prevented from scrolling further left where there is no content, just empty space. I currently have the following code which doesn't seem to be working the way I want:</p> <pre><code>$(document).ready(function(){ if ($("#ajax-matched-results").css('left') == '0' || '0px') { $("#scrollLeft-results").click(function() { $(".matched-results-items").animate({"left": "0px"}, "slow"); }); $("#scrollRight-results").click(function() { $(".matched-results-items").animate({"left": "-=547px"}, "slow"); }); } else { $("#scrollLeft-results").click(function() { $(".matched-results-items").animate({"left": "+=547px"}, "slow"); }); $("#scrollRight-results").click(function() { $(".matched-results-items").animate({"left": "-=547px"}, "slow"); }); } }); </code></pre> <p>Thanks for any help!</p>
javascript jquery
[3, 5]
2,821,926
2,821,927
jQuery Tree View and wp_list_pages
<p>I'm looking to use the <a href="http://www.dynamicdrive.com/dynamicindex1/treeview/index.htm" rel="nofollow">jQuery TreeView</a> script on wp_list_pages to get a nice collapsable-tree effect going. </p> <p>The script requires that I add some classes to the list elements such as:</p> <pre><code>&lt;ul id="red" class="treeview-red"&gt; </code></pre> <p>So I tried putting this in my template:</p> <p>First, load scripts on my template page via wp_enqueue_script() </p> <pre><code>wp_enqueue_script("av_jquery_tree"); get_header(); </code></pre> <p>Where "av_jquery_tree" is defined in a plugin:</p> <pre><code>function av_jquery_tree() { wp_register_script('jquery.treeview', get_template_directory_uri() . '/js/jquery.treeview/jquery.treeview.js', array('jquery'), '1.0' ); wp_register_script('jquery.cookie', get_template_directory_uri() . '/js/jquery.treeview/jquery.cookie.js', array('jquery'), '1.0' ); wp_enqueue_script('jquery.treeview'); wp_enqueue_script('jquery.cookie'); } add_action('wp_enqueue_scripts', 'av_jquery_tree'); </code></pre> <p>Second, In order to add the class and id to the first ul element on the page, I just insert this script above the call to wp_list_pages:</p> <pre><code>&lt;script&gt; jQuery(document).ready(function(){ jQuery("ul").first().attr("id", "red").addClass("treeview-red"); }); &lt;/script&gt; </code></pre> <p>Unfortunately, my output is just a bunch of red lines across wp_list_pages. Also keep in mind that I'm using the Suffusion Theme, which <a href="http://aquoid.com/forum/viewtopic.php?f=4&amp;t=7466&amp;p=32243#p32243" rel="nofollow">preloads jquery</a>.</p>
jquery javascript
[5, 3]
3,125,443
3,125,444
Incrementing input "name" value with JS
<p>I have a table that is using jQuery to generate a "new row" when a button is clicked. When this new row is generated, new inputs are generated. Here is where I got the script from:</p> <p>chris-barr[dot]com/projects/table_jquery</p> <p>I am using this code on an order form for a client and I need to specifically target each "name" for the form processing part. The four that are static upon entering the page have "names" like this:</p> <p>orderType1, orderType2, orderType3, orderType4</p> <p>So, with each new row that is added, I need to append an incrementing name to each new input that is generated starting at orderType5 and maxing out at orderType10. </p> <p>**I have max table rows set to 10.</p> <p>here is my example:</p> <p><a href="http://www.tdidesign.com/designerorderform.php" rel="nofollow">http://www.tdidesign.com/designerorderform.php</a></p> <p>I would appreciate any help or insight on how to get started with this. Thanks in advance.</p>
javascript jquery
[3, 5]
793,380
793,381
Eliminating State on the Server Side - Best Practice? Pros / Cons
<p>After seeing how easy client-side state can be accomplished on this <a href="http://stackoverflow.com/questions/10807822/can-javascript-maintain-any-state-after-a-reload">SO Post</a> and verifying that using local storage will work on all major modern browsers, I want to eliminate the Session Class in PHP...I want to eliminate sessions and keep this info on the client side.</p> <p>What are the pros and cons to doing this? Did I miss anything? This is a major refactoring so I wanted to cover my bases.</p> <p>Should I implement state on the client side?</p> <p><strong>Pros</strong></p> <ul> <li>Less load to the server</li> <li>Simpler Implementation ( note link above )</li> </ul> <p><strong>Cons</strong></p> <ul> <li>Must pass back state variables to server when needed</li> </ul>
php javascript
[2, 3]
636,121
636,122
how can I disable links while animate
<p>I have 3 links and every link do some animation</p> <pre><code> $("a#home_hits").click(function () { $(".hits").animate({left: "549px", opacity: 1}, { duration: 1500, queue: false }); }); $("a#home_hits1").click(function () { $(".hits1").animate({left: "549px", opacity: 1}, { duration: 1500, queue: false }); }); $("a#home_hits2").click(function () { $(".hits2").animate({left: "549px", opacity: 1}, { duration: 1500, queue: false }); }); </code></pre> <p>but the problem is if I click on any link the other links still working </p> <p>I tried this code with no luck</p> <pre><code>$('a').click(function () { if ($('div:animated')) { return false; } </code></pre> <p>});</p> <p>what can I do to disable the other links while animation is done</p> <p>thank you</p>
javascript jquery
[3, 5]
1,671,412
1,671,413
Structuring javascript / jQuery
<p>I work in a lot of ASP.NET webforms projects. Since im not a big fan of postbacks, i tend to write a lot of jquery ajax calls to handle the cilent -> server calls. </p> <p>But keeping most of the logic in script tags / javascript files usually gets messy pretty fast, even though im trying to use a lot of functions and also simulating classes. I should add that 99% of the code is jquery, not "pure" javascript. </p> <p>So i would like to know how you guys deal with this issue. I cant be the only one :-) Thanks in advance</p>
jquery asp.net
[5, 9]