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,129,135
4,129,136
Javascript decoding html entities
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1147359/how-to-decode-html-entities-using-jquery">How to decode HTML entities using jQuery?</a> </p> </blockquote> <p>I want to convert this text:</p> <pre><code>"&amp;lt;p&amp;gt;name&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;span style="font-size:xx-small;"&amp;gt;ajde&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;da&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;" </code></pre> <p>to html, with tags and everything in Javascript or Jquery. How to do this?</p>
javascript jquery
[3, 5]
1,457,425
1,457,426
Math.random() and "hexChars" PHP equivalents
<p>I am trying to convert a JavaScript to php but I am not sure how to convert <code>Math.random()</code> and <code>hexChars</code> method in below JavaScript function to PHP, thanks for any help</p> <p><strong>JavaScript function:</strong></p> <pre><code> function generateId(){ var a=[],b; a[8]=a[13]=a[18]=a[23]="-"; a[14]="4"; for(i=0;i&lt;36;i++) if(!a[i]){ b=0|Math.random()*16; a[i]=hexChars[i==19?b&amp;3|8:b] } return a.join("") } </code></pre> <p><strong>PHP function</strong> I converted so far:</p> <pre><code>function generateId(){ $a = array(); $a[8]=$a[13]=$a[18]=$a[23]="-"; $a[14]="4"; for($i=0;$i&lt;36;$i++){ if(!$a[$i]){ // not sure what to do here } } } </code></pre> <p>Edit: it will create a string like this: 902EA4DD-5445-4435-93F2-2A5203818255</p>
php javascript
[2, 3]
4,575,960
4,575,961
Why doesn't this jQuery code moving divs to the right?
<p><a href="http://jsfiddle.net/PsQBD/" rel="nofollow">jsFiddle</a> (with slightly modified values so it appears correctly).</p> <p>I am trying to move the position of some divs on my page.</p> <pre><code>div.note {float:left;width:666px; padding:0 0 0 50px;} div.first_note {margin-left: 565px;} </code></pre> <p>The divs are horizontally displayed, with 50px between each one.</p> <pre><code>&lt;div id="note-1" class="note first_note"&gt; note display here &lt;/div&gt; &lt;div id="note-2" class="note"&gt; note display here &lt;/div&gt; &lt;div id="note-3" class="note"&gt; note display here &lt;/div&gt; </code></pre> <p>This is the moving code:</p> <pre><code>$('.note').animate({"left": "+=500px"}, "slow"); </code></pre> <p>When this is run, the notes don't move at all, but the HTML changes to this:</p> <pre><code>&lt;div id="note-1" class="note first_note" style="left: 500px;"&gt; note display here &lt;/div&gt; &lt;div id="note-2" class="note" style="left: 500px;"&gt; note display here &lt;/div&gt; &lt;div id="note-3" class="note" style="left: 500px;"&gt; note display here &lt;/div&gt; </code></pre> <p>What am I doing wrong?</p>
javascript jquery
[3, 5]
4,907,855
4,907,856
What file types/extensions would you allow in for a document management application?
<p>I am working on a kinda document management system. The end users are business class users.</p> <p>I currently check and allow files to be uploaded only if they are one of the followings:</p> <pre><code>"png|jpe?g|gif|xls|doc|docx|csv|ppt|txt|pdf|rtf" </code></pre> <p>my questions are -</p> <ul> <li><p>If I add "xml" into the list? can they cause any security issue?</p></li> <li><p>What other document types/extensions I can add into this?</p></li> </ul> <p>Or</p> <p>Should I check NOT IN <code>"exe|bat|php|js"</code> and allow all other types?</p> <p>Thanks for suggestions.</p>
php javascript
[2, 3]
1,266,192
1,266,193
How to use object in javascript or jquery
<p>I need to create object parameter some thing like this </p> <pre><code>sample_data=[{ name: 'new', data: [1, 0, 2, 8, 1] }, { name: 'open', data: [1, 2, 3, 7, 1] },{ name: 'closed', data: [5, 4, 3, 1, 1] },{ name: 'onhold', data: [1, 1, 2, 0, 1] }, { name: 'completed', data: [0, 0, 5, 1, 2] }]; </code></pre> <p>I had totally 6 arrays all the name parameters in array1 and all data parameters in another arrays. </p> <p>Is there any option to built object as my requirement above, using arrays that i have</p> <p><strong>My arrays:</strong></p> <pre><code>name_array=Array("new","open","closed","onhold","completed"); new_data=Array(1, 0, 2, 8, 1); open_data=Array(1, 2, 3, 7, 1); closed_data=Array(5, 4, 3, 1, 1); onhold_data=Array(1, 1, 2, 0, 1); completed_data=Array(0, 0, 5, 1, 2); </code></pre> <p>Help me how to create object using these array in javascript or jquery.</p>
javascript jquery
[3, 5]
2,589,528
2,589,529
Gridview Data Update by textbox
<p>When am trying to update Datagridview with a textbox value it shows empty value in textbox my code is this.wt's wrong in this. bnddata() has dataset assign to gridview</p> <pre><code>protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { GridView1.EditIndex = e.NewEditIndex; bnddata(); } protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex]; string emailid = GridView1.Rows[0].Cells[0].Text; TextBox txtadress = (TextBox)row.FindControl("txtadress"); con.Open(); string upd = "update empeasty set adress='" + txtadress.Text+ "' where emailid='"+emailid+"'"; SqlCommand cmd = new SqlCommand(upd,con); int i=cmd.ExecuteNonQuery(); if (i &gt; 0) Response.Write("Data updated"); else Response.Write("Data not updated"); con.Close(); GridView1.EditIndex = -1; bnddata(); } </code></pre>
c# asp.net
[0, 9]
4,402,083
4,402,084
can i trigger click event onload
<p>i am having anchor tag in my page.i like to trigger click event onload . which means i wanna open this page "http://XXXXX.com" with new tab .because i don't wanna popup blockers. is there anyway to do this.</p> <p>anchor attrs are given bellow</p> <pre><code>id="add_redirect" href="http://XXXXX.com" target="_blank" </code></pre>
javascript jquery
[3, 5]
5,384,480
5,384,481
Insert an element before and after substring
<p>How would you insert substrings between elements using regular expressions or an alternative form in javascript/jQuery?</p> <p>For example I have the following string:</p> <blockquote> <p><code>This is a string 015 with numbers 1486453 randomly 10 inserted between words 0954</code></p> </blockquote> <p>If my regex is to find all numbers, the result would be the following:</p> <blockquote> <p><code>This is a string &lt;span&gt;015&lt;/span&gt; with numbers &lt;span&gt;1486453&lt;/span&gt; randomly &lt;span&gt;10&lt;/span&gt; inserted between words &lt;span&gt;0954&lt;/span&gt;</code></p> </blockquote>
javascript jquery
[3, 5]
5,917,119
5,917,120
Can I get a walkthrough on this Code
<p>I am trying to learn jQuery and I posted a question asking for some help on a topic. Someone kindly helped me out and I highly appreciate it. I just want to know if someone can help me understand what the different parts of this is doing</p> <pre><code>$(".gradeA, .gradeU").find(":checkbox").click(function() { if (this.checked === false) { return; } var cells = $(this).parent().siblings(); $(".fields").empty().append($("&lt;input type='hidden'&gt;").attr({ id: "request_venue", name: "request[venue]", value: cells[1].innerHTML })).append($("&lt;input type='hidden'&gt;").attr({ id: "request_showdate", name: "request[showdate]", value: cells[0].innerHTML })); }); </code></pre> <p>what does the find do and the empty and just a quick walk through would be awesome so i can learn from it</p>
javascript jquery
[3, 5]
3,190,571
3,190,572
Calling javascript Method from Code behind using ScriptManager.RegisterStartupScript
<p>I am using Ajax Toolkit on my content page . I have an Javascript Code which i want to call from the code behind using <code>ScriptManager.RegisterStartupScript</code>.</p> <p>The javaScript Code is :-</p> <pre><code>&lt;script type="text/javascript"&gt; function disp_confirm() { var r = jConfirm("Your Shift End ! Do you still want to Continue ? ") if (r == true) { jAlert("You pressed OK!") } else { jAlert("You pressed Cancel!") } </code></pre> <p></p> <p>How to call this <code>disp_confirm()</code>method of javascript from the code behind using C# .</p>
c# javascript asp.net
[0, 3, 9]
491,140
491,141
Calling a javascript function through micro template
<p>I am using the micro template (<a href="http://ejohn.org/blog/javascript-micro-templating" rel="nofollow">Micro Template</a>) in my project. Below is the sample</p> <pre><code>&lt;script type="text/html" id="user_tmpl"&gt; &lt;% for ( var i = 0; i &lt; users.length; i++ ) { %&gt; &lt;li&gt;&lt;a href="&lt;%=users[i].url%&gt;"&gt;&lt;%=users[i].name%&gt;&lt;/a&gt;&lt;/li&gt; &lt;% } %&gt; &lt;/script&gt; </code></pre> <p>Is it possible to call a javascript function say a simple function like this:</p> <pre><code>function SubstringText(input,length) { return input.substring(1, length); } </code></pre> <p>on users[i].name property ?</p>
javascript jquery
[3, 5]
3,007,061
3,007,062
setting returned ajax to variable to done() gives me an object
<p>How come </p> <pre><code>ajaxFunction().done(function(p){ console.log(p); }); </code></pre> <p>returns data as HTML as specified in <code>dataType</code> in the ajaxFunction, but </p> <pre><code>var data = ajaxFunction().done(function(p){ console.log(data) //returns what appears to be the entire deferred object //to see the returned HTML string, I have to do console.log(data.responseText); }); </code></pre> <p>What would be the practical application of having that object once I have it stored in data? Can I do something further with it? Or is it not intended to be used like this?</p>
javascript jquery
[3, 5]
3,414,704
3,414,705
Best way to setup an array of classes to ignore
<p>I have the following if statement in a jQuery script that checks if an image has a class of "ignore", and if so it will ignore it. <code>this</code> is an image the script found earlier within a specific section of my page:</p> <pre><code>if(!$(this).hasClass('ignore')) { //do something } </code></pre> <p>How can I set this up so that I can store an array of classes, and then have the if statement check against that array?</p>
javascript jquery
[3, 5]
5,824,842
5,824,843
Get Date() object with specific time
<p>I want to get week Start Date of a week. I am able to get the date, its just that the date returned has time wrt to the current system time. For example, if its 19:20 hours right now, I am getting the week start date as <strong>Date {Mon Mar 26 2012 19:20:16 GMT+0530 (IST)}</strong></p> <p>For accurate calculations, I need the time to be 00:00:00 GMT. </p> <p>How can I achieve that? </p> <p>My current code looks like this: </p> <pre><code>var tDate = new Date(); var wDate = new Date(); this.chosenDayIndex = this.currentDayIndex = tDate.getDay(); if (this.currentDate == '') { this.currentDate = new Date(); var today = formatDate(tDate); var diff = tDate.getDate() - this.currentDayIndex + (this.currentDayIndex == 0 ? -6:1); this.weekStartDate = this.weekMonDate = new Date(wDate.setDate(diff)); this.weekEndDate = new Date(this.weekStartDate.getFullYear(),this.weekStartDate.getMonth(), this.weekStartDate.getDate()+6); this.weekMonday = formatDate(this.weekMonDate); } </code></pre> <p>this.weekStartDate is currently handing out the false start date with the current timestamp.</p>
javascript jquery
[3, 5]
5,921,076
5,921,077
onkeyup function with PHP argument
<p>How to add PHP in an onkeyup function?</p> <pre><code>&lt;input type="text" onkeyup="if($_SESSION['user'] == TRUE) do.this else do.that"&gt; </code></pre>
php javascript
[2, 3]
4,188,453
4,188,454
Android - HTTP Get request on LAN
<p>I am using the following code to get a page's source which is a plain text (no html tags) from a webserver on LAN. But I am always getting empty string in return and If I open the same URI in browser I can see the text. Following is my code:</p> <pre><code> String url = "http://192.168.1.40/touchscreens/get.qsp?display=1"; HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(); request.setHeader("Content-Type", "text/plain; charset=utf-8"); request.setURI(new URI(url)); HttpResponse response = client.execute(request); in = new BufferedReader(new InputStreamReader(response.getEntity().getContent())); StringBuffer sb = new StringBuffer(""); String line = ""; String NL = System.getProperty("line.separator"); while ((line = in.readLine()) != null) { sb.append(line + NL); } String page = sb.toString(); Toast.makeText(getApplicationContext(), page, Toast.LENGTH_LONG).show(); </code></pre> <p>and one more thing when I enter the same URL in android emulator browser I don't see anything. Am i missing something?</p>
java android
[1, 4]
2,389,120
2,389,121
Prevent keydown() from being captured by document binding
<p>I'm not exactly sure how to phrase this, so I couldn't search it. Basically, I have a <code>keydown()</code> bind on <code>$(document)</code>. I'd like to <code>show()</code> another div, and have all keydown events be rerouted to this div and prevented from firing off in the document handler. Is this even possible, or would I have to put all my main keybindings on another div and work from there?</p>
javascript jquery
[3, 5]
794,030
794,031
Datareader's value in javascript array
<p>i want to fetch Image name, and 3 more field's value from database and pass it to the javascript's array....which would b generate from database(Image name and 3 field)</p> <p><a href="http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm" rel="nofollow">http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm</a></p> <p>.... var leftrightslide=new Array() var finalslide='' leftrightslide[cnt]='' cnt++ ....</p>
asp.net javascript
[9, 3]
3,367,205
3,367,206
Asp repeater accessing each line from an sql datasource
<p>I have a repeater that on itemdatabound i want to access the row in the sqldatasource so i can get the id of an item. </p> <p>I cant use hidden fields to do this so are there any other options? Thanks to all</p>
c# asp.net
[0, 9]
3,642,674
3,642,675
GridView take a Row
<p>net 4 and c#.</p> <p>I have a GridView, I would like take a Row when in Edit Mode in my code and find a control.</p> <p>Here my code, but does not work, it takes only the first row for the GridView.</p> <p>Any ideas?</p> <pre><code>protected void uxManageSlotsDisplayer_RowDataBound(object sender, GridViewRowEventArgs e) { switch (e.Row.RowType) { case DataControlRowType.DataRow: // Take Row in Edit Mode DOES NOT WORK PROEPRLY if (e.RowState == DataControlRowState.Edit) { Label myTest = (Label)e.Row.FindControl("uxTest"); } break; } </code></pre> <p>MY CODE EXAMPLES: <a href="http://stackoverflow.com/questions/5170261/gridview-row-in-edit-mode">GridView row in edit mode</a></p> <p>SOLUTIONS: After reading this: <a href="http://stackoverflow.com/questions/833490/asp-net-3-5-gridview-row-editing-dynamic-binding-to-a-dropdownlist">ASP.NET 3.5 GridView - row editing - dynamic binding to a DropDownList</a></p> <pre><code> protected void uxList_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow &amp;&amp; (e.Row.RowState &amp; DataControlRowState.Edit) == DataControlRowState.Edit) { // Here you will get the Control you need like: Label dl = (Label)e.Row.FindControl("uxLblTest"); dl.Text = "xxxxxxxxxxxxx"; } } </code></pre>
c# asp.net
[0, 9]
3,612,314
3,612,315
I am working on the ASP.NET with C# on the Web based project and I am having the compliation error
<p>Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. </p> <p>Compiler Error Message: CS1061: 'ASP.index_aspx' does not contain a definition for 'cmdCheckMail_Click' and no extension method 'cmdCheckMail_Click' accepting a first argument of type 'ASP.index_aspx' could be found (are you missing a using directive or an assembly reference?)</p> <p>Source Error:</p> <pre><code>Line 270: &lt;tr&gt; Line 271: &lt;td align="right" colspan="2"&gt; Line 272: &lt;asp:Button ID="cmdCheckMail" runat="server" Text="Check Mail" OnClick="cmdCheckMail_Click" Height="22px" Width="90px" /&gt; Line 273: &lt;/td&gt; Line 274: &lt;/tr&gt; </code></pre>
c# asp.net
[0, 9]
3,171,013
3,171,014
Timer not working inside class that extends SurfaceView and implements Runnable
<p>I'm doing a game and I have this class that I call GameLoop that extends SurfaceView and implements Runnable. I want to call methods inside the games sprite objects and change some their values in intervals. Therefore I came up with the idea to have a Timer object inside the constructor of the GameLoop class and call the methods via a manager for all the game sprite objects. I have done this before, and then it workt, but when I do it now the game force to close! What could be wrong and is their a better way to do this? </p> <p>This is the code for the time interval I have in the constructor of the GameLoop class. When I remove the code, it works fine, but I dont get any interval!? Help is preciated! Thanks!</p> <pre><code> // Set timer to call method to change directions of Circle object in interval timer1.scheduleAtFixedRate(new TimerTask() { public void run() { // Call method to change direction } }, 0, 1000); // 1 sec </code></pre>
java android
[1, 4]
3,439,163
3,439,164
Having problems with importing dropbox and getting it to run?
<p>I downloaded the dropbox sdk zip off the dropbox website, then imported the program into eclispe. Then i configured the build path and added the 2.2 jar file to run, theres no errors until I load up the aplication, when I ran it on the 1.5 emulator it gave me a Uncaught handler: thread main exiting due to uncaught exception error, then when I ran it on the 2.2 emulator it gave me a at android.app.Instrumentation.newActivity(Instrumentation.java:1021) error its not even letting the ap run, any ideas?</p>
java android
[1, 4]
887,757
887,758
how to draw the scribling using canvas in android?
<p>I want to draw the scribling using canvas in android. I use three options touchesdown, touchesmove and touchesup. The scribling path is appeared when I remove my hand from mouse button.</p> <pre><code>x = motionEvent.getX(); y = motionEvent.getY(); switch (motionEvent.getAction()) { case MotionEvent.ACTION_DOWN: currentDrawingPath = new DrawingPath(); currentDrawingPath.paint = currentPaint; currentDrawingPath.path = new Path(); currentDrawingPath.path.moveTo(x, y); mX = x; mY = y; break; case MotionEvent.ACTION_MOVE: currentDrawingPath.path.lineTo(mX, mY); float dx = Math.abs(x - mX); float dy = Math.abs(y - mY); isDrawings=true; if (dx &gt;= TOUCH_TOLERANCE || dy &gt;= TOUCH_TOLERANCE) { currentDrawingPath.path.quadTo(mX, mY, (x + mX)/2, (y + mY)/2); mX = x; mY = y; } break; case MotionEvent.ACTION_UP: isDrawings=false; currentDrawingPath.path.lineTo(mX, mY); drawingSurface.addDrawingPath(currentDrawingPath); undoBtn.setEnabled(true); redoBtn.setEnabled(false); break; } </code></pre> <p>I want to draw the scribling like freehand drawing, where I have to move the mouse the line will following, I need this type of scribling without <code>invalidate()</code> option... please help me. Thanks in advance.... </p>
java android
[1, 4]
2,488,006
2,488,007
Storing extended IIdentity in HttpContext.Current.User (IPrinciple)
<p>I have created an <code>ExtendedId</code> class which extends <code>GenericIdentity</code>. (This stores Id as well as name)</p> <p>In a httpmodule I stored this extended id in Current.User like so:</p> <pre><code>HttpContext.Current.User = new GenericPrincipal(myExtendedId, roles); </code></pre> <p>Problem is, later, how do I get at my <code>ExtendedId</code> type again?</p> <p>If I try this:</p> <pre><code>ExtendedId eId = (ExtendedId)HttpContext.Current.User.Identity; </code></pre> <p>I get a casting error. I have a feeling I'm doing something stupid here with casting, but I'm a bit foggy this morning. </p>
c# asp.net
[0, 9]
5,516,096
5,516,097
Filtering table rows with Jquery
<p>I have a table showing registered users and the rows of this table can be filtered according to Status (active/inactive users or both) or User Type (admin/user or both). In order to make sure all of the table rows are filtered according to both criteria, I have PHP generate a 'info' attribute for each table row. Info can be one of four things:</p> <ul> <li>Active Admin </li> <li>Active User</li> <li>Inactive Admin</li> <li>Inactive User</li> </ul> <p>This made it easy to filter out the user rows according to the options selected in the two filter drop-downs. </p> <p>What I'm trying to figure out is how to filter them when <strong>Both</strong> is selected for one of the filter drop-downs--I know there's a more efficient way to do this than running six if statements every time one of the drop-downs is changed. </p> <p>Here's my code: </p> <pre><code>function toggleAll(){ var selectedString = $('#userStatusDropDown').val() + ' ' + $('#userTypeDropDown').val(); switch (selectedString){ case 'Both Both': $('#tableUsers tr').show(); break; default: $('#tableUsers tr:gt(1)').hide(); $('#tableUsers tr[info="'+selectedString+'"]').show(); } } $(document).ready(function(){ toggleAll(); // admin/user drop down changes $('#userTypeDropDown').change(function(){ toggleAll(); }); // active/inactive drop down changed $('#userStatusDropDown').change(function(){ toggleAll(); }); }); </code></pre>
javascript jquery
[3, 5]
1,288,775
1,288,776
Is it possible to animate scrollTop with jQuery?
<p>I want to smoothly scroll down. I do not want to have to write a function for that - especially if jQuery already has one.</p>
javascript jquery
[3, 5]
4,780,412
4,780,413
Best practise for displaying multiple controls which require an extended class?
<p>If I want to display a <code>MapView</code> inside my <code>Activity</code> I would have to extend my <code>Class</code> from <code>MapActivity</code>. If I want to display a <code>Tabbed</code> interface I would have to extend my <code>Class</code> from <code>TabActivity</code>. Similar is the case with some other controls which require user class to extend from a specific class.</p> <p>Let's say inside my <code>Activity</code> I want to display both a <code>MapView</code> for displaying Google Map and a <code>TabView</code> to display some other data. I can't do it directly because Java doesn't support multiple inheritance. My question is how can I achieve this scenario? How can I display multiple controls inside my activity where each require your class to extend from a specific class. Is it possible first of all? If yes, what are the best practises to achieve this scenario? </p> <p><strong>Update</strong> I want to achieve this</p> <p><img src="http://i.stack.imgur.com/nLUci.png" alt="enter image description here"></p> <p><strong>I am using Map and Tab for sake of an example. I would like to know how you can tackle this scenario in general?</strong></p>
java android
[1, 4]
1,251,973
1,251,974
Get value from select with JavaScript for use in PHP
<p>I have this <code>select</code>:</p> <pre><code>&lt;select id="mymenu" name="id" onchange="getID()"&gt; &lt;option&gt;&lt;/option&gt; &lt;option value="1"&gt;A&lt;/option&gt; &lt;option value="2"&gt;B&lt;/option&gt; &lt;option value="3"&gt;C&lt;/option&gt; &lt;/select&gt; </code></pre> <p>I want to get the value from <code>mymenu</code> to use it in another <code>select</code> in the same form. I searched the 'net and found that I should use <code>onchange</code>.</p> <pre><code>&lt;select name="uid"&gt; &lt;option&gt;&lt;/option&gt; &lt;? $sql = mysql_query("Select * from $table WHERE id = '$ch_id'"); while ($row = mysql_fetch_array($sql)) { ?&gt; &lt;option value="&lt;? echo $row['unit_id']; ?&gt;"&gt;&lt;? echo $row['unit_name'];?&gt;&lt;/option&gt; &lt;? } ?&gt; &lt;/select&gt; </code></pre> <p>This is the getID() function:</p> <pre><code>&lt;script type="text/javascript"&gt; function getChapterID(){ //run some code when "onchange" event fires var selectmenu=document.getElementById("mymenu") &lt;?$ch_id?&gt; = this.options[this.selectedIndex].value } &lt;/script&gt; </code></pre>
php javascript
[2, 3]
887,743
887,744
Multiplying with jquery
<p>I have this simple script, i want to multiply Var a * Var b then Multiply this by Var C with a set number eg 15.</p> <p>But it doesn't seem to work?</p> <pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script&gt; $('input[name="box2"]').keyup(function() { var a = $('input[name="box1"]').val(); var b = $(this).val(); var c = $(15).val(); $('input[name="box3"]').val(a * b * c); }); ​ &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input name="box1" type="text" /&gt;&lt;br /&gt; &lt;input name="box2" type="text" /&gt;&lt;br /&gt; &lt;input name="box3" type="text" /&gt; &lt;/body&gt; </code></pre>
javascript jquery
[3, 5]
2,292,564
2,292,565
aspx.cs file not getting updated?
<p>i added some controls in designer file but cs file not accepting those controls, it says textbox1 does not exist in current context. i have tried these solutions: 1) convert to web application 2) recreated both files .aspx and .aspx.cs but it didn't solve my problem ? Any help will be appreciated.</p>
c# asp.net
[0, 9]
3,087,866
3,087,867
jQuery live("click", function() {...}) doesn't work for body
<p>I am trying this simple code <a href="http://jsfiddle.net/Cupidvogel/CRYDV/" rel="nofollow">here</a>. It doesn't work for either the actual <code>click</code> event or the one which is commented out. Can anybody explain why? I have had issues with <code>not</code> previously also...</p>
javascript jquery
[3, 5]
3,974,122
3,974,123
How can i use @string/xyz in .java file?
<p>I have created a 'hello world' Android project and i want to use my string in <strong>MainActivity.java</strong>. In <strong>string.xml</strong> file i have a string named <code>password</code></p> <p>How can i <em>call</em> this string to my <strong>MainActivity.java</strong>? </p> <pre><code>&lt;string name="password"&gt;Your password is:&lt;/string&gt; </code></pre> <p>a part of <strong>MainActivity.java</strong></p> <pre><code> .... .... //Show password on click showBTN.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { //i want to use a string called from string.xml instead of hard coded resTXT.setText("Your password is:"+ pass); } }); .... .... </code></pre>
java android
[1, 4]
4,288,512
4,288,513
Prevent anchor link from being added to URL
<p>I have a tabbed content box that when a tab is clicked, a '#div1' is appended to the end of my URL. Is there a way of preventing jQuery from doing this?</p> <p>I still can't get it to work. I've made a fiddle...</p> <p><a href="http://jsfiddle.net/k6Ks8/" rel="nofollow">http://jsfiddle.net/k6Ks8/</a></p>
javascript jquery
[3, 5]
625,581
625,582
How to get value from radio button when i checked on it?
<p>I have various type of input in which different values are present. I want that when i checked on a particular radio button then value present in that radio button would be filled in input text. </p>
php javascript jquery
[2, 3, 5]
4,079,923
4,079,924
Jquery autocomplete
<p>I have mysql table like this:</p> <pre><code> country | city_accented | latitude | longitude | --------------------------------------------------------- australia | sydney | -33.8833333 | 151.2166667 | USA | dallas | 35.3163889 | -81.1763889 | </code></pre> <p>I'm using jquery autocomplete to get country names in form text field. How can I post with this Jquery function all other data from database (latitude, longitude, ...) to my form and use it there like hidden field ?</p> <p>The Jquery code:</p> <pre><code>function lookup(inputString) { if(inputString.length == 0) { // Hide the suggestion box. $('#suggestions').hide(); } else { $.post("rpc.php", {queryString: ""+inputString+""}, function(data){ if(data.length &gt;0) { $('#suggestions').show(); $('#autoSuggestionsList').html(data); } }); } } // lookup function fill(thisValue) { $('#inputString').val(thisValue); $('#suggestions').hide(); } </code></pre> <p>HTML:</p> <pre><code>&lt;input size="30" id="inputString" onkeyup="lookup(this.value);" type="text" /&gt; &lt;div class="suggestionsBox" id="suggestions" style="display: none;"&gt; &lt;div class="suggestionList" id="autoSuggestionsList"&gt;&lt;/div&gt; </code></pre> <p>PHP:</p> <pre><code>if(isset($_POST['queryString'])) { $queryString = $_POST['queryString']; if(strlen($queryString) &gt;0) { $query = "SELECT * FROM cities WHERE city_accented LIKE '$queryString%' LIMIT 10"; $result = mysql_query($query) or die("There is an error in database"); while($row = mysql_fetch_array($result)){ echo '&lt;li onClick="fill(\''.$row['city_accented'].'\');"&gt;'.$row['city_accented'].','.$row['country'].' &lt;/li&gt;'; } } } </code></pre>
php jquery
[2, 5]
4,689,809
4,689,810
How To: Stackoverflow / Twitter JS dialogue box
<p>I am trying to build a text-bar above the website like <a href="http://techdows.com/wp-content/uploads/2010/12/older-verison-of-twitter.png" rel="nofollow">Twitter or SO does.</a> Any advice on how to build this would be great. I do not know what you call this feature, but maybe there is a jQuery plugin to do it?</p> <p>The functionality I'm thinking of is "message" [x] to close the alert.</p> <p>Thanks for your help!</p>
javascript jquery
[3, 5]
234,809
234,810
Difference between onclick() and onClientClick()?
<p>If I use both <code>onclick()</code> and <code>onClientClick()</code> can I make sure that server side will be called only after client side function returns TRUE or vice versa?</p> <p>For example:</p> <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt; &lt;%@ Import Namespace="System.Xml" %&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;% protected void save_n_display(object sender, EventArgs e) { // This must be called when validate() returns true... } %&gt; &lt;asp:Button ID="Button1" OnClientClick="validate()" onClick="save_n _display" "Text="Check" runat="server" /&gt; &lt;script type="text/javascript" language="javascript"&gt; function validate() // client side Validation is done { } &lt;/script&gt; </code></pre> <p>So can I use <code>onclick()</code> and <code>onClientClick()</code> or do I need something different for this? I even tried passing variables from javascript to asp functions so when validate returns true then save_n _display will be called.</p>
javascript asp.net
[3, 9]
4,281,235
4,281,236
How do I get the output CLASS file names after compiling Java files in C#?
<p>So, when you compile Java (<em>.java) into a class file (</em>.class), the name of the file can change, as well as the extension of the file. If I have a piece of code in C# that compiles the java code into class files, how would I then get the names of those output class files in C#?</p>
c# java
[0, 1]
5,107,600
5,107,601
Convert Text File to String in java
<p>i have a written a code to send a text file by converting it into string and sending it into a web service. Please can someone tell me other available methods for sending the string as stream to Web Service.</p> <pre><code>public class MainActivity extends Activity { Button b1; String s; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); b1=(Button)findViewById(R.id.button1); b1.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { File upfile=new File("sdcard/text/testfile.txt"); try { FileInputStream fin=new FileInputStream(upfile); byte[] buffer= new byte[(int)upfile.length()]; new DataInputStream(fin).readFully(buffer); fin.close(); s=new String(buffer,"UTF-8"); System.out.print(buffer); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } // TODO Auto-generated method stub Toast.makeText(MainActivity.this, s, 20).show(); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_main, menu); return true; } } </code></pre>
java android
[1, 4]
104,172
104,173
javascript function is not calling if m use responce object in .cs file
<p>I have called a javascript function from my code behind,it works but when i use responce object for exporting a excel file,it only export excel file,not calling the javascript function.</p> <p>Page.ClientScript.RegisterStartupScript(typeof(Page), "SymbolError",</p> <pre><code>"&lt;script type='text/javascript'&gt;HidePopUp();&lt;/script&gt;"); //Cdoe to Export file Response.Clear(); Response.Buffer = true; string filePath = "BrokerMemoData-" + DateTime.Now.ToString("dd") + DateTime.Now.ToString("MMM") + DateTime.Now.ToString("yy") + "_" + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + objDiaUserInfo.USER_ID.ToString() + ".xls"; //Response.Write("&lt;script type='text/javascript'&gt;Javascript:alert('sdas');&lt;/script&gt;"); Response.ContentType = "application/vnd.ms-excel"; Response.AddHeader("Content-Disposition", "inline;filename=" + filePath + ""); //Get the physical path to the file. //string FilePath = @"C:\PivotalExcel\Data.xls"; //Write the file directly to the HTTP content output stream. Response.WriteFile(sFileName); Response.End(); </code></pre> <p>Now excel is exported but the javascript hide fun is not called.</p>
javascript asp.net
[3, 9]
3,782,180
3,782,181
How can I open a window and select objects in that window?
<p>I have </p> <pre><code>newWindow=window.open(document.URL); $('div#header',newWindow.document).hide(); $('div#footer',newWindow.document).hide(); </code></pre> <p>But it doesn't seem to be working. Any ideas?</p>
javascript jquery
[3, 5]
245,327
245,328
If I host a JS file, can I identify what URLs embed it?
<p>If I host a javascript file on my server that users can embed in their webpages, is it possible to identify the URLS that embedded my file?</p> <p>I imagine I could only get the user requesting the file.</p>
php javascript
[2, 3]
2,243,305
2,243,306
Is regular Java the same as the Java for Android
<p>Is regular Java the same as the Java for Android?</p> <p>If yes - from where can I download a good java reference?</p> <p>Looking for something like: <code>Command | small sample | short Explanation</code></p>
java android
[1, 4]
2,399,145
2,399,146
jQuery UI Slider each value switch class
<p>I have a jQuery UI Slider that has a range between 1-100. I want to change the class of a div for each value between 1-100.</p> <p>How can I most efficiently go through every value between 1-100 and switch a new class for every value?</p> <p>Answer (this is what eventually worked out):</p> <pre><code>$( '#slider-container' ).slider({ min: 1, max: 100, slide: function() { var $activeBackgroundUrl = $('.position_100').css('background'); return function(event, ui) { activeBackgroundUrl = 'url(images/numbers/1'+(ui.value &lt; 10 ? '0' : '')+ ui.value +'.png)'; $('.position_100').css('background', activeBackgroundUrl); }; }() }); </code></pre>
javascript jquery
[3, 5]
413,996
413,997
how class works in jquery
<p>javascript</p> <pre><code>var name_of_inchatting_class="ch"+inchatting_sub.toString(); var prev_name_of_inchatting_class="ch"+prev_inchatting_sub.toString(); $(prev_name_of_inchatting_class).css({'background-color' : '', 'opacity' : ''}) ; $(name_of_inchatting_class).css({ 'background-color' : '#D5D5D2', 'opacity' : '0.70' }); </code></pre> <p>html code</p> <pre><code>&lt;ul id="inchatting"&gt; &lt;li class="ch0"&gt;&lt;img src="img/41403_1434825607_37944358_q.jpg"&gt;Jae Jung&lt;/li&gt; &lt;li class="ch1"&gt;&lt;img src="img/48983_615523712_8495_q.jpg"&gt;Yue&lt;/li&gt; &lt;li class="ch2"&gt;&lt;img src="img/41621_717814907_4472_q.jpg"&gt;David&lt;/li&gt; &lt;/ul&gt; </code></pre> <p><code>prev_name_of_inchatting_class</code> and <code>name_of_inchatting_class</code> returns number </p> <p>The numbers are added to the variable and it gets converted to string and in jquery it calls the class name but it doesn't work.</p> <p>Any thoughts</p>
javascript jquery
[3, 5]
3,586,479
3,586,480
Android Format calendar to output time
<p>I am using the below code to set an alarm. I would like to output what the time for this would be. I don't know if I going about this the wrong way. If I output the variable cal it has a long string of information. How do I extract only the hour and minutes?</p> <pre><code> Calendar cal = Calendar.getInstance(); // add 5 minutes to the calendar object cal.add(Calendar.MINUTE, 464); </code></pre>
java android
[1, 4]
3,587,528
3,587,529
Call External Javascript using php
<p>I am try to add a javascript using php as follows</p> <pre><code>&lt;?php Header("content-type: application/x-javascript"); $serverIP=$_SERVER['REMOTE_ADDR']; echo "document.write(\"Your IP address is: &lt;b&gt;" . $serverIP . "&lt;/b&gt;\")"; ?&gt; </code></pre> <p>Here i need to print my output as follows</p> <blockquote> <p>Your IP address is: <strong>127.0.0.1</strong></p> </blockquote> <p>but it is showing result like</p> <pre><code>document.write("Your IP address is: &lt;b&gt;127.0.0.1&lt;/b&gt;"). </code></pre> <p>i am using apache server in ubuntu.What is wrong with me. help me please...</p>
php javascript
[2, 3]
959,422
959,423
How to display online video tv in my asp.net website
<p>I want to run video displayed online to my asp.net 4 website</p>
c# asp.net
[0, 9]
1,203,495
1,203,496
Jquery simple menu
<p>I need to create a menu same as this one:</p> <p><a href="http://www.girard-perregaux.com/collection/univers-en.aspx?type=1" rel="nofollow">http://www.girard-perregaux.com/collection/univers-en.aspx?type=1</a></p> <p>Click on collections then on manufacturer, then again on manufacturer to close. As you can see first it slides down, then after that it just change links without again sliding up and down, untill you click on same open element.</p> <p>I first tried this:</p> <pre><code>$('ul.sub-menu').hide(); $('.sf-menu').children('li').click(function(){ $(this).children(".sub-menu").slideToggle('slow'); $('ul.sub-menu').hide(); </code></pre> <p>its working but its sliding up and down every time you click on menu, and not just changing list items. So I figured out I need to somehow target child li elements instead of ul. Also if you click between parrent list items, it needs to switch like on that menu, but if i click again on same open list item, it needs to close(slide up.)</p> <p>Many thanks for this as I spent half a day trying to figure it out. Also how to target children li, i tried this:</p> <pre><code>$('.sf-menu').children('li').click(function(){ $(this).children(".sub-menu li") </code></pre> <p>but nothing.</p>
javascript jquery
[3, 5]
2,538,393
2,538,394
how to redirect page using java script
<p>m using java srcipt messagebox..</p> <pre><code>private void MessageBox(string msg) { System.Web.UI.WebControls.Label lbl = new System.Web.UI.WebControls.Label(); lbl.Text = "&lt;script language='javascript'&gt;" + Environment.NewLine + "window.alert('" + msg + "');&lt;/script&gt;"; //lbl.Text = "&lt;script&gt;window.alert('" + msg + "');&lt;/script&gt;"; Page.Controls.Add(lbl); } </code></pre> <p>now i want to reload my page..but if i write response.redirect my messagebox is not display....i write this function in code behind and call it when i need to display messagebox...so, how can i reload my page???????</p>
c# javascript asp.net
[0, 3, 9]
1,867,048
1,867,049
android - How to check that the Process is alive or not?
<p>I want to check whether the process is still alive or not through programmatically ,Can I do that I am trying to do it by process name in <code>onCreate</code> method but the issue is that the <code>onCreate</code> method is called always .When I check that in <code>onCreate</code> method I always get the process name and I can not kill the current app and switch to previous one. Can anybody help me ? Thanks in advance. </p>
java android
[1, 4]
3,122,398
3,122,399
javascript ui framework for android
<p>I knew there are js library such us jquery mobile... can be used to develop android html app. Is there a android style javascript UI library/framework which makes the html app looks more like an android native app?</p> <p>Your comment welcome</p>
javascript android
[3, 4]
425,855
425,856
Redirect to same page after login becuse of session time out in asp.net
<p>Hi is there a anyway to land same page after sign in because of session time out in asp.net web application. I am recently migrated from java to .net and any suggestion will be greatly helpful. As a example </p> <p>I am on <strong>Page1</strong> and while i am idle on <strong>Page1</strong> my session was destroyed and i was redirected to <strong>Logging</strong> page. After i logging to system currently i am on <strong>Default</strong> page. What i want to do is simply redirect to <strong>Page1</strong> after logging. Sorry for my bad English.</p> <p>Here is Web.config</p> <pre><code>&lt;authentication mode="Forms"&gt; &lt;forms loginUrl="~/Login.aspx" timeout="2880"/&gt; &lt;/authentication&gt; </code></pre> <p>and the login button function #region"Validate login user" public void ValidateUser() {</p> <pre><code> try { string con = ConnectionSetting.SQLDBConnectionString(); sUserNameT = this.txtUname.Text.ToLower(); sPassWordT = this.txtPassword.Text; Some required functions user...... if (check some stuff) { Decrypting and other stuff.... if (matching password) { if (if the logging success) { LoadScreensByUser(userbyactive.UserId, con); UserLogedDetails(userbyactive.UserId);//Log User Loging Records. Response.Redirect("~/Main.aspx"); } else { Output...(); } } else { Output...(); } } else { Output...(); } } catch (Exception ex) { throw ex; } } #endregion </code></pre> <p>Here i have provided the minimum required codes..</p>
c# asp.net
[0, 9]
5,669,580
5,669,581
I Need Try Catch Use, Exception Handling and Refactoring Advice
<p>Should I frequently use try catch blocks and how do I determine when and where I need them the most? Also what should do with the exception when it gets caught as a normal practice on small to medium scale departmental business applications? Also is there a free tool to help me locate duplicate code or code that would be ideal to refactor up the food chain? I've got ReSharper and it's great but I need something to help me analyze what needs to be refactored.</p> <p>Thanks.</p>
c# asp.net
[0, 9]
1,237,594
1,237,595
Toggle does not work on the same element that show works on
<p>I am trying to use JQuery toggle, so when a user clicks the info icon, the hidden div containing item information is shown / hidden. For some reason it is not working for me.</p> <p>While trying to debug, I noticed that show(), correctly shows the target element that I would like to toggle. However, when I replace <code>show()</code> with <code>toggle()</code>, it does not work and does not return any error.</p> <p>I was wondering if someone can help me identify the cause of this problem.</p> <p>My Markup</p> <pre><code>&lt;div class="option"&gt; &lt;div class="prod-text"&gt;Toy Whistle &lt;/div&gt; &lt;div&gt; &lt;img class="info-icon" src="Info-icon.png"&gt; &lt;/div&gt; &lt;div class="option-info" style="display:none;"&gt; &lt;div&gt; &lt;div class="price-text"&gt;Price: $100&lt;/div&gt; &lt;div class="prod-id-text"&gt;Item Number: 231912&lt;/div&gt; &lt;div class="quantity-text"&gt;Quantity: 72&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>JQuery (does not work)</p> <pre><code>$(".info-icon").click(function(){ $(this).parent().parent().find('.option-info').toggle(); }); </code></pre> <p>JQuery (works!)</p> <pre><code>$(".info-icon").click(function(){ $(this).parent().parent().find('.option-info').show(); }); </code></pre> <p>Many thanks in advance!</p>
javascript jquery
[3, 5]
144,614
144,615
Middle selected list
<p>help me its very urgent i am new to jquery how to achieve below requirement </p> <p>i have a list ul li (unorderd list)</p> <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> <li>8</li> <li>9</li> <li>10</li> </ul> <p>Display only 5 item by default selection in middle always selected item(3).</p> <p>when click on down arrow 1 will move up and 2,3,4,5,6 should display here 4 is selected item.in second down arrow click 2 will move up and 3,4,5,6,7 should display and here 5 is selected item.same for up arrow also.</p> <p>when up 2,3,4,5,6 should display here item(4).</p> <p>please help me to achieve this in using javascript or jquery</p>
javascript jquery
[3, 5]
3,503,751
3,503,752
OnItemInstered, OnItemUpdated the same code behind
<p>I need to associate different methods of the control with exact same code. I'm doing it like this now: </p> <pre><code>protected void dgvProperty_ItemInserted(object sender, GridInsertedEventArgs e) { BindItems(); } protected void dgvProperty_ItemDeleted(object sender, GridDeletedEventArgs e) { Binditems(); } protected void dgvProperty_ItemUpdated(object sender, GridUpdatedEventArgs e) { BindItems(); } </code></pre> <p>It feels wrong. How can I avoid repetitions?</p>
c# asp.net
[0, 9]
1,010,533
1,010,534
How can I use cookies while screen scraping?
<p>I want to scrape data from PHP web pages that are behind a login page. How can make it so I log in only once and then be able to access data on the subsequent pages without logging in again?</p>
java android
[1, 4]
2,292,626
2,292,627
Show message when start typing inside textbox using javascript
<p>I'm using ASP.NETand I want to show message behind a textbox when I start to write in it, I want to do that on the client side so I think javascript is the key.</p> <p>Edit :</p> <p>My code:</p> <pre><code>&lt;tr&gt; &lt;td&gt; &lt;asp:Label ID="Label1" runat="server" Text="Alternate Email :"&gt;&lt;/asp:Label&gt; &lt;/td&gt; &lt;td&gt; &lt;asp:TextBox ID="_txtAlternateEmail" runat="server" onkeyup="typetext(this);"&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;asp:Label ID="Label2" runat="server" Text="Security Question :"&gt;&lt;/asp:Label&gt; &lt;/td&gt; &lt;td&gt; &lt;asp:TextBox ID="_txtSecurityQuestion" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;/td&gt; &lt;/tr&gt; </code></pre> <p>and the javascript</p> <pre><code>&lt;script type="text/javascript"&gt; function typetext(tb) { var mySpanElement = document.getElementById("_txtSecurityQuestion"); mySpanElement.innerText = tb.value; } &lt;/script&gt; </code></pre>
javascript asp.net
[3, 9]
5,276,490
5,276,491
Remove disabled attribute using JQuery?
<p>I have to disable inputs at first and then on click of a link to enable them.</p> <p>This is what I have tried so far, but it doesn't work:</p> <p><strong>HTML:</strong></p> <pre><code>&lt;input type="text" disabled="disabled" class="inputDisabled" value=""&gt; </code></pre> <p><strong>jQuery:</strong></p> <pre><code>$("#edit").click(function(event){ event.preventDefault(); $('.inputDisabled').removeAttr("disabled") }); </code></pre> <p>This shows me <code>true</code> and then <code>false</code> but nothing changes for the inputs:</p> <pre><code>$("#edit").click(function(event){ alert(''); event.preventDefault(); alert($('.inputDisabled').attr('disabled')); $('.inputDisabled').removeAttr("disabled"); alert($('.inputDisabled').attr('disabled')); }); </code></pre>
javascript jquery
[3, 5]
5,293,777
5,293,778
Read textbox from ASP.net page that repeated n times
<p>I have an asp.net web page that's has a number of controls that are repeated according to number of records retrieved from the database, and I wanna read the values of those text boxes after users enter values in them, so please if anyone can help me on this issue.</p> <p>I have an example of my work</p> <pre><code> &lt;% System.Data.SqlClient.SqlDataReader myDReader = myDatabaseConnector.getDataFromDBAsSQLDataReader("SELECT * from students); while(myDReader.Read()) { %&gt; &lt;asp:TextBox ID="txtCourseInfo" Test="" EnableViewState="false" CssClass="dataEntrySearchDataText" ReadOnly="true" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;% } %&gt; </code></pre> <p>This a sample of what I have mean from my question in which I want to retrieve the value of txtCourseInfo in my C# code behind</p>
c# asp.net
[0, 9]
4,836,864
4,836,865
Removing the element from the DOM is not removing the effects of javascript code inside that DIV element
<p>I dynamically load the whole page inside one DIV element with the help of javascript. But when I close the div I am using <code>("#Viewer").remove()</code> . But still the javascrpit/jquery loaded inside that element is in work. How can I remove the effect of that too.</p> <p>There is one Viewer DIV. Into which I am loading the whole another page. When I close this I use <code>("#Viewer").remove()</code> . When it is first loaded there are some animations and transitions associated with it are happening on other data loaded afterwords. </p> <p>Please help. Thank you.</p>
javascript jquery
[3, 5]
856,625
856,626
jQuery .on with multiple events using event delegation
<p>Using jQuery 1.8.2 to bind multiple events to a single class using event delegation:</p> <pre><code>$(document).on("focus blur", ".myClass", function() { console.log("Ba da boom."); }); </code></pre>
javascript jquery
[3, 5]
369,069
369,070
javascript memory leaks
<p>i am using jquery and doing something like this</p> <pre class="lang-html prettyprint-override"><code> //dom &lt;div id="parent"&gt; &lt;/div&gt; </code></pre> <pre class="lang-js prettyprint-override"><code> //js var _doSomeThing=function() { //some codes } $(function(){ //appending div and binding methods to span $('#parent').append('&lt;span&gt;1&lt;/span&gt;'); $('#parent').append('&lt;span&gt;2&lt;/span&gt;'); $('#parent span').bind('click',_doSomeThing); }); function _clearDiv() { //clear div $('#parent').html(''); } //sometime in future, call clear div _clearDiv(); </code></pre> <p>-- now my question is, binding events to dom and later just removing the elements from dom leads to memory leakage. if yes how to solve this problem.</p>
javascript jquery
[3, 5]
1,570,576
1,570,577
javascript url help in sending multiple values with url..
<pre><code>"sample1.php?q="+str </code></pre> <p>This code is for sending single parameter i need to send multiple variables </p>
php javascript
[2, 3]
2,361,095
2,361,096
Getting selected value from multiple dropdowns
<p>If user change the entry from any dropdowns in the <code>SalePlugin</code> div then it will need to get all the selected value and pass it into POST.</p> <p>How it should be done?</p> <pre><code>$('.SalePlugin &gt; *').live('change', function(){ var SalePluginData = $(this).closest('.SalePlugin').find('select').serialize(); $.post(host + '/ajax/file.php', { Data: SalePluginData }, function(data){ console.log(data); }); }); </code></pre> <p>HTML</p> <pre><code>&lt;div class='SalePlugin'&gt; &lt;ul&gt; &lt;li&gt; &lt;select name='something[]'&gt; &lt;option value='one'&gt;One&lt;/option&gt; &lt;option value='two'&gt;Two&lt;/option&gt; &lt;/select&gt; &lt;/li&gt; &lt;/ul&gt; &lt;ul&gt; &lt;li&gt; &lt;select name='something[]'&gt; &lt;option value='one'&gt;One&lt;/option&gt; &lt;option value='two'&gt;Two&lt;/option&gt; &lt;/select&gt; &lt;/li&gt; &lt;/ul&gt; &lt;ul&gt; &lt;li&gt; &lt;select name='foo[]'&gt; &lt;option value='one'&gt;One&lt;/option&gt; &lt;option value='two'&gt;Two&lt;/option&gt; &lt;/select&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre>
javascript jquery
[3, 5]
3,108,118
3,108,119
byte array to a file
<p>I have a byte array for a file, is there a way to take that and save it has a file to a remote file server?</p> <p>Thanks, rod.</p>
c# asp.net
[0, 9]
6,027,445
6,027,446
What is the java equivalent to javascript's String.fromCharCode?
<p>What it the java equivalent of javascript's:</p> <pre><code>String.fromCharCode(n1, n2, ..., nX) </code></pre> <p><a href="http://www.w3schools.com/jsref/jsref_fromCharCode.asp" rel="nofollow">http://www.w3schools.com/jsref/jsref_fromCharCode.asp</a></p>
java javascript
[1, 3]
6,020,494
6,020,495
How to get different selected values in javascript?
<p>Hello everyone how can I get two values from different select boxes? I get first value in my select box but I can't get the second value from another select box.Here is my javascript code:</p> <pre><code> &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { var select = document.forms[0].sel; var select2=document.forms[0].sel2; select.onchange = function () { var value = select.options[select.selectedIndex].value; // to get Value alert(value); } select2.onchange = function () { var value2 = select2.options[select2.selectedIndex].value; // to get Value alert(value2); } }); &lt;/script&gt; &lt;form&gt; &lt;SELECT NAME="sel" onChange="split(selected value)"&gt; &lt;OPTION VALUE=1&gt;Milk&lt;/option&gt; &lt;OPTION VALUE=2&gt;tea&lt;/option&gt; &lt;OPTION VALUE=3&gt;water&lt;/option&gt; &lt;OPTION VALUE=4&gt;coffee&lt;/option&gt; &lt;/SELECT&gt; &lt;/form&gt; &lt;form&gt; &lt;SELECT NAME="sel2" onChange="split(selected value)"&gt; &lt;OPTION VALUE=1&gt;Milk&lt;/option&gt; &lt;OPTION VALUE=2&gt;tea&lt;/option&gt; &lt;OPTION VALUE=3&gt;water&lt;/option&gt; &lt;OPTION VALUE=4&gt;coffee&lt;/option&gt; &lt;/SELECT&gt; &lt;/form&gt; </code></pre>
javascript jquery
[3, 5]
2,863,644
2,863,645
SSLSocket problem using BufferedWriter
<p>Im having problem sending command when using BufferedWriter</p> <p>Here is example</p> <pre><code> SSLSocketFactory f = context.getSocketFactory(); SSLSocket c = (SSLSocket) f.createSocket("198.168.0.10", 8888); c.setSoTimeout(20000); c.setUseClientMode(true); c.startHandshake(); BufferedWriter w = new BufferedWriter( new OutputStreamWriter(c.getOutputStream())); Thread.sleep(500); w.write("username"); w.flush(); Thread.sleep(50); w.write("password"); w.flush(); Thread.sleep(50); w.write("command"); w.flush(); Thread.sleep(50); </code></pre> <p>Problem is without Thread.sleep it doesnt work, if i lower number than 50 problems begin. Any idea how to fix it, or mabe use another writer?</p>
java android
[1, 4]
1,356,694
1,356,695
Automatically updating chatbox
<p>So i'm working on a javascript/php chatbox. Everything works except for it updating the contents of my div (this works once, but after that it doesn't keep updating it when a new message has been put into the database). Here is my code:</p> <p>Javascript part:</p> <pre><code> &lt;script language=javascript type='text/javascript'&gt; setInterval(function () { var arrayOfObjects = &lt;?print_r(getChatArray());?&gt;; var chat = ""; for (var i = 0; i &lt; arrayOfObjects.length; i++) { var object = arrayOfObjects[i]; chat += "["+object.date+"]"+object.op+": " + object.msg + "&lt;/br&gt;"; } $('#chat').html(chat); }, 10); &lt;/script&gt; </code></pre> <p>Php part:</p> <pre><code>&lt;?php function getChatArray() { $result = mysql_query("SELECT * FROM shouts ORDER BY id DESC"); $to_encode = array(); $count = mysql_num_rows($result); $size = 0; if($count &gt; 0) { while($row = mysql_fetch_assoc($result)) { $to_encode[$size]['id'] = $row['id']; $to_encode[$size]['msg'] = $row['msg']; $to_encode[$size]['op'] = $row['op']; $to_encode[$size]['date'] = $row['date']; $size += 1; } } else { return "None"; } return json_encode($to_encode); } ?&gt; </code></pre> <p>Any ideas as to why it isn't continually updating it?</p> <p>Thanks.</p>
php javascript
[2, 3]
2,728,973
2,728,974
Looking for Following JavaScript Library That Provide Navigation Menu Similar to FogBugz HomePage
<p>I was looking for JavaScript library, which is able to provide navigation menu similar to </p> <p><a href="http://www.fogcreek.com/FogBugz/learnmore.html" rel="nofollow">http://www.fogcreek.com/FogBugz/learnmore.html</a> (left most navigation menu)</p> <p>Any recommandation?</p> <p>Thanks.</p>
javascript jquery
[3, 5]
5,205,117
5,205,118
Pick the biggest height of all elements
<p>This is my code.</p> <pre><code> v=dom.find("ul:first").outerHeight(); // the height of the first li element // instead of taking the height of the first li element, it should loop through all // li elements and set v to the element with the biggest height </code></pre> <p>The comment in the middle of the code pretty much explains everything. I need to loop through all li elements and take the biggest height, instead of taking the height of the first element.</p>
javascript jquery
[3, 5]
3,803,915
3,803,916
onclick and onclientclick
<p>I have the following line in asp.net</p> <pre><code>&lt;asp:LinkButton runat="server" ID="createuser" OnClientClick="javascript:$('#dialogform').dialog('open');" onclick="AddCaseInfo_Click"&gt;Create Case&lt;/asp:LinkButton&gt; </code></pre> <p>onclientclick works fine, but not onclick. I tried</p> <pre><code>OnClientClick="javascript:$('#dialogform').dialog('open');return true;" </code></pre> <p>or </p> <pre><code>OnClientClick="javascript: return $('#dialogform').dialog('open');" </code></pre> <p>...but it still doesnt work.</p> <p>:( Any help please?</p>
javascript asp.net
[3, 9]
4,900,665
4,900,666
How to use DataPager with Database Paged
<p>I am using ListView/DataPager.</p> <p>For performance reasons I page my results at database, using ROW_NUMBER(SQl2005).</p> <p>At my C# code just comes one page at time. How can I say to DataPager that I have more rows that really are at my List?</p>
c# asp.net
[0, 9]
648,381
648,382
detect java not installed and provide a link from Javascript
<p>I have this panorama viewer that makes use of java, </p> <p>but when trying to acces from firefox and java not installed, it warns that some plugin is needed but it doesn't specify whitch one or where to download if from...</p> <p>So, can i, from javascript, detect if user hasn't installed java and provide him with a download link?</p>
java javascript jquery
[1, 3, 5]
5,031,109
5,031,110
Is it possible to bind a custom function instead of an event to a div in JQuery?
<p>I wonder if this is possible, I was able to do this with AS3. Is it possible to bind a listener on div that only listens for mouse events. So lets say I have a div called "lion", typically this is how a mouse event is bind:</p> <pre><code> $("#mouse").bind("click", function(e) { alert(e.currentTarget.id); } </code></pre> <p>But as you can see, the mouse event has already been declared as "click". What I would like to do is write a function and then bind that function to "lion" the div. And when lion encounters such mouse events then function is able to capture the mouse event type. Here is the function:</p> <pre><code> $.fn.chkType = function(e) { var evt = e.type; var str = ""; switch(evt) { case "mouseover": str = "MOUSE OVER"; break; case "mouseout": str = "MOUSE OUT"; break; case "click": str = "CLICK"; break; default: break; } alert(str); } </code></pre> <p>And now if I would like to assign this function to "lion", I am not certain how would this be possible? I have done a lot search and the closest I came was at:</p> <p><a href="http://api.jquery.com/bind/" rel="nofollow">http://api.jquery.com/bind/</a></p> <p>I would appreciate your input. Thank you.</p>
javascript jquery
[3, 5]
5,407,928
5,407,929
Need help with this fancybox form submit
<p>I am using fancybox to open submitted form like this:</p> <pre><code>&lt;form name="form" id="myForm" action="{$smarty.server.PHP_SELF}?action=abc" method="post" target="iframe" onsubmit="document.getElementById('iframe').src='{$smarty.server.PHP_SELF}?action=abc';"&gt; &lt;input type="hidden" name="xyz" value="123"&gt; &lt;input type="submit" value="REGISTER" id="button" class="button"&gt; &lt;/form&gt; $("#button").click(function() { $("#iframe").fancybox({ 'titlePosition' : 'inside', 'transitionIn' : 'fadeIn', 'transitionOut' : 'fadeOut' }).click(); }); </code></pre> <p>with <code>&lt;input type="submit" value="REGISTER" id="button" class="button"&gt;</code> everything is </p> <p>working fine. but for some reason i need to use <code>&lt;a href=""&gt;REGISTER&lt;/a&gt;</code>. So I tried</p> <pre><code>&lt;a href="#" onclick="document.getElementById('myForm').submit();"&gt;REGISTER&lt;/a&gt; </code></pre> <p>&amp;</p> <pre><code>&lt;a href="javascript:document.form.submit();"&gt;REGISTER&lt;/a&gt; </code></pre> <p>In above cases fancybox is popping out but my form is not getting submitted.</p> <p>How do I submit my form successfully within click function?</p>
javascript jquery
[3, 5]
1,177,309
1,177,310
What would be better to use in this case? c# or php?
<p>I am making a website where users can upload pictures and draw on them, add text etc. My team knows some php, but we know nothing about c#. Time is not too much of an issue. We all know java, what would the perks of each be? I have been hearing that c# will be much better for handling the canvas because there is a lot more libraries for it? Will it really matter c# of php? for both you have to use javascript and possibly jquery anyway? Keep in mind we are all more than willing to learn c# and we have a windows server also. Let me know your guys thoughts! Thanks!</p>
c# php javascript jquery
[0, 2, 3, 5]
2,706,616
2,706,617
jquery, javascript, update dropdown list options upon focus but retain selected value
<p>Brain not working right now. Someone help me fill in the blanks here.</p> <p>Need to select the currently selected value, repopulate the options, and then select the previous selection if it's still in the list.</p> <p>To make it easier, the new value and previously selected value will have the same name attribute assuming it's still in the list after updating, and names will always be unique for the list of options.</p> <pre><code>//assume Options is a globally defined var for this example with format: // [{"display":"something", "value": "something's value"}, etc.. ] function LazyLoadOptionsIntoSelect($select, options) { //get current option //repopulate options $select.html(""); $("&lt;option&gt;").text("--Select a File--") .appendTo($select); $.each(options, function() { var item = this; $("&lt;option&gt;").attr("name", function () { return item.display; }) .val(function () { return item.value; }) .text(item.display) .appendTo($select); }); //select previously selected option if still in list } $(".lazyloadedselect", "#context").live("focus", function() { LazyLoadOptionsIntoSelect($(this), Options); }); </code></pre> <p>EDIT: mistake in my code, unrelated to the problem, but still wrong</p>
javascript jquery
[3, 5]
1,880,781
1,880,782
Javascript/Jquery: Show a hidden div based on a Radio box select
<p>What I'm doing is building a form, where when you select one answer a bunch of new questions pop up. </p> <p>This is my working code: </p> <pre><code>$(".appliedWorked").click(function(){ if($(this).val()==="appliedWorkedYes") $(".appliedWorkedYesHide").show("fast"); else $(".appliedWorkedYesHide").hide("fast"); }); </code></pre> <p>It works for only 1 class. I want to do this for many classes, so I thought I'd stick it into an array. </p> <p>Here's my code for many classes but it's not showing when I hit yes on a radio box: </p> <pre><code>// storing an array of radio boxe class names var radioBoxArray = new Array( "appliedWorkedYes", "workStudyYes", "workHistoryYes", "workWeekEndsYes", "cprYes", "aedYes", "aidYes", "wsiYes", "gaurdYes" ); // looping over the radio box array, too use the show feature of jquery for(var j = 0; j &lt; radioBoxArray.length; j++){ // class name $("."+radioBoxArray[j]).click(function(){ // value box if($(this).val()==='"+radioBoxArray[j]+"') // show method $("."+radioBoxArray[j]+"Hide").show("fast"); // hide else else $("."+radioBoxArray[j]+"Hide").hide("fast"); }); } </code></pre> <p>I think the issue is: </p> <pre><code>if($(this).val()==='"+radioBoxArray[j]+"') </code></pre> <p>Please help! </p> <p>I've tried the following but will not show when I click on a box: </p> <pre><code>if($(this).val()=== radioBoxArray[j]) if($(this).val()=== String( radioBoxArray[j] )) if($(this).val()==='"'+radioBoxArray[j]+'"') </code></pre>
javascript jquery
[3, 5]
1,575,608
1,575,609
Problem importing existing Android project
<p>So I got a new laptop and I setup everything but now, when I try to import an existing project I get all kinds of problems. </p> <p>The console gives me this message...</p> <blockquote> <p>[2011-07-01 21:18:38 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Unable to read C:\Program Files\Android\android-sdk\AndroidManifest.xml: java.io.FileNotFoundException: C:\Program Files\Android\android-sdk\AndroidManifest.xml (The system cannot find the file specified)</p> <p>[2011-07-01 21:18:38 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Unable to read C:\Program Files\Android\android-sdk\AndroidManifest.xml: java.io.FileNotFoundException: C:\Program Files\Android\android-sdk\AndroidManifest.xml (The system cannot find the file specified)</p> <p>[2011-07-01 21:33:31 - Notepadv3] AndroidManifest.xml file missing!</p> </blockquote> <p>Within the app the various classes are telling me to remove the <code>@Override</code> annotation. Any ideas??</p>
java android
[1, 4]
2,481,476
2,481,477
Alternative of VMRuntime.getRuntime().setMinimumHeapSize in Gingerbread
<p>I know there's a VMRuntime.getRuntime().setMinimumHeapSize in Android 2.1/2.2 for developer to adjust the starting heap size of the application, and it is one of the most effective solution sfor solving the OutOfMemory error during BitmapFactory.decodeStream()</p> <p>However, since Android 2.3, this VMRuntime class is removed from official API, does anyone knows the alternative API of this function in 2.3?</p>
java android
[1, 4]
2,459,471
2,459,472
Issues in the Image timer
<p>I am trying to built a timer for my Image Slider as it is in this site <a href="https://store.sap.com/sap/cpa/repository/store/sapstore/US/default.html" rel="nofollow">https://store.sap.com/sap/cpa/repository/store/sapstore/US/default.html</a></p> <p>This is the one which I tried of my own. Image with text is sliding good, but there is issue in my timer. But there are some issues due to that I commented that code in my tried link:</p> <p><a href="http://codebins.com/bin/4ldqp9c/24" rel="nofollow">http://codebins.com/bin/4ldqp9c/24</a></p> <p>Here I created a thumbnails but the issue is binding the image and its text with this timer.</p>
javascript jquery
[3, 5]
4,836,461
4,836,462
How can I program a decimal addition with JavaScript
<p>How can i program this, the decimal shift needs to be programed that most of it I think , the rest would be just a normal add, any thoughts on how to program this? This is for an incrementer I'm building, the user can press plus or minus and increment a text input.</p>
javascript jquery
[3, 5]
5,896,859
5,896,860
Android application transparency and window sizing at root level
<p>Is it possible to create an application with a transparent background on the root task such that you can see the task running beneath it when it is part of a separate stack? Alternatively, is it possible to run an application so the window of the root task is only a portion of the screen instead of the whole screen?</p> <p>I understand how the transparency and window sizing is done with activities that are not the root task and this works fine. However, the root task of an activity seems to always fill the whole screen and be black even when a transparent theme is applied to the application object in the manifest file.</p> <p>ApplicationManifest.xml:</p> <p><code>&lt;application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true" android:theme="@style/Theme.Transparent"&gt; </code> </p> <p>Styles.xml</p> <p><code> &lt;resources&gt; &lt;style name="Theme.Transparent"&gt; &lt;item name="android:windowIsTranslucent"&gt;true&lt;/item&gt; &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt; &lt;item name="android:windowBackground"&gt;@drawable/ transparent_background&lt;/item&gt; &lt;item name="android:windowAnimationStyle"&gt;@android:style/ Animation.Translucent&lt;/item&gt; &lt;item name="android:colorForeground"&gt;#fff&lt;/item&gt; &lt;item name="android:windowIsFloating"&gt;true&lt;/item&gt; &lt;item name="android:gravity"&gt;bottom&lt;/item&gt; &lt;/style&gt; &lt;/resources&gt; </code></p> <p>Colors.xml</p> <p><code>&lt;resources&gt; &lt;drawable name="transparent_background"&gt;#00000000&lt;/drawable&gt; &lt;/resources&gt;</code></p>
java android
[1, 4]
5,688,446
5,688,447
Assigning value to tooltip of an ASP.net Custom Validator using javascript
<pre><code> I would like to provide a message as tooltip of a custom Validator based on some condition in Javascript. </code></pre> <p>Can any one please help me out?</p> <p>Thanks in Advance</p>
c# asp.net
[0, 9]
1,135,717
1,135,718
is jsobject eval method of java is same as eval method of javascript
<p>I have read so many times on these and other forums that you should not use eval() in JS. I am writing outputs from java applet to the browser, using JSObject eval method in import netscape.javascript.*;, its working fine in FF but on IE I am getting the Unspecified errors, if I lighten up the DOM by removing menus etc, this problem will go away then, I have tried everything but couldn't get to the problem.</p> <p>Read on these forums that if it is absolutely necessary to use eval then do that in try catch block in IE to avoid unspecified error, now since Java is calling it, this can not be put in try and catch block for JS (in java it is already in try catch block).</p> <p>The question is the Java implementation of JSObject eval is same as for browser's eval method? I know that a browser should have its implementation of JSObject for it to work with applet. </p> <p>Am I on right theory? if this is the case, any work arounds if possible?</p> <p>Thanks</p>
java javascript
[1, 3]
5,077,564
5,077,565
jquery trim value
<p>I have the following JavaScript:</p> <pre><code>var value = '19-JUL-10 04.36.38.643000 PM--&gt;19-JUL-10 05.06.33.962000 PM' </code></pre> <p>How can I use jQuery to trim it to become <code>'19-JUL-10 04.36.38 PM--&gt;19-JUL-10 05.06.33 PM'</code>?</p>
javascript jquery
[3, 5]
1,368,235
1,368,236
How to disable a certain radio button in a RadioButtonList in Javascript
<p>I'm at my wit's end when it comes to this. JavaScript definitely isn't my strong suit and I've been trying to google for a solution. Here's the code I have:</p> <pre><code>&lt;asp:RadioButtonList ID="Group1Most" onClick="disable('Group1Most', 'Group1Least')" runat="server" &gt; &lt;asp:ListItem Value="1"&gt; |&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="2"&gt; |&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="3"&gt; |&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="4"&gt; |&lt;/asp:ListItem&gt; &lt;/asp:RadioButtonList&gt; &lt;asp:RadioButtonList ID="Group1Least" runat="server" &gt; &lt;asp:ListItem Value="1"&gt; This and That&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="2"&gt; Fire and Ice&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="3"&gt; Black and Tan&lt;/asp:ListItem&gt; &lt;asp:ListItem Value="4"&gt; Smith and Wesson&lt;/asp:ListItem&gt; &lt;/asp:RadioButtonList&gt; </code></pre> <p>And here's the JavaScript:</p> <pre><code>function disable(index, control) { var selected=($("[ID$=_"+index+"] input[type=radio]:checked").val()); //The rest of the stuff that I can't figure out } </code></pre> <p>What I want to do is whenever you click a radio button on the <code>Group1Most</code> RadionButtonList, it will disable the corresponding radio button on the <code>Group1Least</code> RadioButtonList. The problem is I can't figure out how to select an individual radio button within the RadioButtonList. Can anybody help me?</p>
javascript asp.net jquery
[3, 9, 5]
3,545,918
3,545,919
Getting a displayed line from a large string
<p>What I want to do is to measure the data of a line on a large string. I am not sure if any has tried this but I have a string which looks like this.</p> <blockquote> <p>String a =<br> "This is<br> kinda<br> my String" </p> </blockquote> <p>which would display on android textview as</p> <blockquote> <p>This is<br> kinda<br> my String</p> </blockquote> <p>Now what I want to achieve is being able get the <strong>length</strong> of the second line "kinda".</p> <p>The purpose for this is to be able to set my paging for a book project.</p> <p>I hope I was clear enough. Thanks for any advice or ideas shared.</p>
java android
[1, 4]
2,020,971
2,020,972
I want to get the row value from the gridview into another gridview and use it for calculation
<p>I want to get the value from the gridview into another gridview and use it for calculation..</p> <p>my first gridview as</p> <pre><code> depotcode|depotname|lat_deg|lat_min |lat_sec| lon_deg |lon_min |lon_sec |lat_decimaldegree |lon_decimaldegree| </code></pre> <p>my secondgridview as</p> <pre><code> depotcode |custwt |custname| lat_deg |lat_min |lat_sec |lon_deg |lon_min |lon_sec |lat_decimaldegree |lon_decimaldegree.| </code></pre> <p>now to calculate difference between the 2longitude i need lon_decimaldegree from gridview1 and use it in second gridview.. please help to do this</p>
c# asp.net
[0, 9]
1,951,766
1,951,767
Freestanding independent javascript scrollbar
<p>I need a freestanding scrollbar. It wouldn't be attached to any div... just an independent scrollbar that I can hook into when scrolled by a user to get the current position. Would be great if it worked with mouse wheels..</p> <p>I'm using <a href="http://www.flotcharts.org" rel="nofollow">flot</a> to chart some time series, and I need the scrollbar so that I can scroll through all the data, while only displaying a small window. The position of the scrollbar determines what flot will chart.</p> <p><strong>Edit</strong> Using <a href="http://refreshless.com/nouislider/" rel="nofollow">NoUiSlider</a></p>
javascript jquery
[3, 5]
5,009,836
5,009,837
How to post value using loop
<p>I am facing the problem to post the value of form when using while or for loop.</p> <p>Here is my code.</p> <pre><code>&lt;form name="frm1" id="frm1" method="post" enctype="multipart/form-data"&gt; &lt;?php for($i=0;$i&lt;5;$i++) { ?&gt; &lt;a href="#" onclick="return test1();"&gt;Test&lt;?php echo $i;?&gt;&lt;/a&gt; &lt;input type="hidden" value="&lt;?php echo $i;?&gt;" name="var" /&gt; &lt;?php } ?&gt; &lt;/form&gt; </code></pre> <p>And i have used this javascript</p> <pre><code>&lt;script type="text/javascript"&gt; function test1() { document.frmviewer.method="post"; document.frmviewer.action="page2.php"; document.frmviewer.submit(); } &lt;/script&gt; </code></pre> <p>Now i want to get the value of tag means "Test1" in page2.php page with hidden variable.</p> <p>I am able to do it with passing value in javascript but i do not want to pass any variable in javascript and also do not want to pass any variable in url.</p> <p>Thanks in advance.</p> <p>Kanji</p>
php javascript
[2, 3]
1,974,051
1,974,052
DateTime Variable
<p>I want to pass a null value for a DateTime variable in C#. The value should be stored in the database as null.</p> <p>I've tried using Datetime.Minvalue, but that stores a default value. It has to be a null in database. How do I do that?</p>
c# asp.net
[0, 9]
1,332,886
1,332,887
REST,API and Php for searching online with android app
<p>I have an android app I accept a keyword to be searched,And I want to search ebay (an example) like searching for "Samsung S3" and displaying the values back in my app I dont know how to go about this,Ive been told about REST,Php and APIs</p> <p>Do I need to communicate with the database since Im not adding anything And is there a way to make an API only in php,not using REST</p> <p>I really have no experience of this..Im not trying to solicit a debate,I just want a very simple answer.So I will know which aspect I will start with.Thanks for ur support in advance</p>
php android
[2, 4]
497,267
497,268
Android:How to rotate LinearLayout
<pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/RelativeLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/bg2x" &gt; &lt;LinearLayout android:id="@+id/linear" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:gravity="center" android:layout_alignParentTop="true" android:background="#FF00FF00" &gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="#FF000000" android:textSize="70dp" android:text="test linearlayout" /&gt; &lt;/LinearLayout&gt; </code></pre> <p></p> <p>Now I wanna <strong>Rotate</strong> the "<strong>linear</strong>" layout by 90 degrees. <strong>* And I dont wanna use Animation*</strong>, is there any other way to achive this? Please help me.Thanks in advance!!</p>
java android
[1, 4]
4,668,413
4,668,414
Show table cell on table row mouseover
<p>I have a table that looks something like this.</p> <pre><code>&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Foo&lt;/th&gt; &lt;th&gt;Bar&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr class="data"&gt; &lt;td&gt;Info here&lt;/th&gt; &lt;td&gt;&lt;a href"/url_here" class="edit"&gt;Edit&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr class="data"&gt; &lt;td&gt;More here&lt;/th&gt; &lt;td&gt;&lt;a href"/url_here" class="edit"&gt;Edit&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; </code></pre> <p>I want to show the Edit link when you mouse over any of the rows inside of the . I have tried a few methods of doing this, but keep hitting the same problem. Assuming I'm just thinking about this the wrong way.</p> <p>This is what I currently Have.</p> <pre><code>$('a[class*=edit]').hide(); $('tr[class*=data]').bind("mouseover", function(e) { $(e.target).closest('a[class*=edit]').addClass("selected"); $('a[class*=selected]:first').show(); }).mouseout(function() { $('a[class*=selected]').hide(); $('a[class*=edit]').removeClass("selected"); }) </code></pre> <p>Problem with the existing code is it's not adding the selected class unless you hover directly over the edit link. Like I mentioned above I need it to add the selected class when you mouse over anywhere in the that row. I also only want it to display the edit link for that specific row.</p> <p>Any help would be really appreciated been pulling my hair out for a couple hours and I know it is probably something stupid. Thanks!</p>
javascript jquery
[3, 5]
1,017,440
1,017,441
How can a C# programmer build software for iPhone?
<p>What should I learn to develop software for iPhone?</p> <p>Thanks</p>
c# iphone
[0, 8]