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 |
---|---|---|---|---|---|
292,525 | 292,526 | JSON Delete Table Row | <p>I'm trying to delete a row of data using JSON, however when I prompt a confirm dialog my javascript function doesn't work as follows:</p>
<pre><code><script type="text/javascript">
$().ready(function() {
$("a.delete").click(function() {
$.ajax({
type: "POST", contentType: "application/json; charset=utf-8", url: this.href, data: "{}", dataType: "json",
success: function(msg) {
if (msg.status == "ok") {
$("tr#" + msg.id).hide();
}
else {
alert(msg.exception);
}
}
});
return false;
});
});
</script>
</code></pre>
<p>The above works absolutely fine, but the minute I put the following in:</p>
<pre><code> <script type="text/javascript">
$().ready(function() {
$("a.delete").click(function() {
if (!confirm("Are you sure you want to delete this?")) return false;
$.ajax({
type: "POST", contentType: "application/json; charset=utf-8", url: this.href, data: "{}", dataType: "json",
success: function(msg) {
if (msg.status == "ok") {
$("tr#" + msg.id).hide();
}
else {
alert(msg.exception);
}
}
});
return false;
});
});
</script>
</code></pre>
<p>This <strong>does</strong> carry out the delete, but it doesn't hide the table row, which makes me think it hasn't been deleted. Any ideas?</p>
| javascript jquery | [3, 5] |
3,461,944 | 3,461,945 | Need swflash player support to all files | <p>I have video uploading functionality but needs to play that video on a website.
Video files are all type i.e. <code>.flv,.avi,.mp4,.wmv</code> <br />
I have used following javascript code but it does not support to <code>avi</code> & <code>wmv</code> files. This should play all type of video files.</p>
<p><code>AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0', 'width', '182', 'height', '165', 'src', ((!DetectFlashVer(9, 0, 0) && DetectFlashVer(8, 0, 0)) ? 'OSplayer' : 'OSplayer'), 'pluginspage', 'http://www.macromedia.com/go/getflashplayer', 'id', 'flvPlayer', 'allowFullScreen', 'true', 'allowScriptAccess', 'always', 'movie', ((!DetectFlashVer(9, 0, 0) && DetectFlashVer(8, 0, 0)) ? 'OSplayer' : '{/literal}{$siteroot}/uploads/video/OSplayer{literal}'), 'FlashVars', 'movie={/literal}{$siteroot}/uploads/video/{$docDetails.video}{literal}&btncolor=0x333333&accentcolor=0x31b8e9&txtcolor=0xdddddd&volume=30&autoload=on&autoplay=off&vTitle=Super Mario Brothers Lego Edition&showTitle=no');</code></p>
<p>Please suggest me solution as early as possible.</p>
<p>Thanks</p>
| javascript jquery | [3, 5] |
2,615,004 | 2,615,005 | Wildcard in jQuery selector | <p>I'd like to retrieve all elements which start with a specific ID. After a short search, the solution appeared to be:</p>
<pre><code>$('*[id^="foo_"]')
</code></pre>
<p>to select all elements with an ID starting with <code>foo_</code>. Although this selector syntax is very logical, I was just wondering whether it is possible to do this in a more 'shorthand' way, like:</p>
<pre><code>$('#foo_*');
</code></pre>
<p>This did not work, however. Is there support for wildcarting like this?</p>
| javascript jquery | [3, 5] |
4,771,000 | 4,771,001 | setting the height of the parent according to the highest child element, jquery | <p>I have a layout, which basically contains a</p>
<pre><code><div class="line" id="#">
<div class="summary">
Some Text
</div>
<div class="summary">
Some
</div>
<div class="summary">
Some long text
</div>
</div>
</code></pre>
<p>I want, using jQuery, to expand the height of the <code><div class="line"></code> according to the highest child element, I tried fiddling with:</p>
<pre><code>$(".line").attr("id", function()
while ($(this).next().length > 0)
{
ac = $(this).children(".summary").outerHeight();
a = $(this).children(".summary").next().outerHeight();
if (a > ac)
{
a = ac;
}
}
$(this).css("height", a + "px");
});
</code></pre>
<p>and no success, what selectors I need to use, and how would I go about achieving this?</p>
| javascript jquery | [3, 5] |
4,020,057 | 4,020,058 | jQuery $.inArray doesn't seem to work with associative arrays | <p>I have made this fiddle: <a href="http://jsfiddle.net/benhowdle89/CANX8/1/" rel="nofollow">http://jsfiddle.net/benhowdle89/CANX8/1/</a></p>
<p>Which creates an assoc array and then runs a test for a value that is in the array. The wrong results are reached!</p>
<p>Outline of code:</p>
<pre><code>$(document).ready(function(){
var newArray = [];
newArray['first'] = 1;
newArray['second'] = 1;
$('button').click(function(){
if($.inArray(1, newArray) != -1){
$('#dump').css('border', '1px solid red');
} else {
$('#dump').css('border', '1px solid blue');
}
});
});
</code></pre>
| javascript jquery | [3, 5] |
1,880,298 | 1,880,299 | How to update table cell value in Jquery | <p>I ma new to jquery.
I would like to update the table cell from Jquery.<br>
The Php is as below.
For example I would like to update "firsttotal" with a different value. Please help.</p>
<pre><code><tr>
<td class="Left">Total</td>
<td></td>
<td id="firsttotal"><?php echo number_format('%.2n', $Total_Calculated_Cash); ?></td>
<td id="cashcalculator_total"><a href="#"><?php echo number_format($Total_Actual_Cash, 2); ?></a></td>
<td><?php echo number_format($Total_Calculated_Other, 2); ?></td>
<td><?php echo number_format($Total_Actual_Other, 2); ?></td>
</tr>
</code></pre>
| php jquery | [2, 5] |
4,842,179 | 4,842,180 | $("123").ready (fn(){}) triggering no matter what | <p>I have a problem where the $().ready is triggering no matter what I put into the parameter which means that it actually triggers before the page is ready. I am using ASP.NET mixed in with EXT.NET and would like to implement jQuery to spice things up a little. As the description says, it triggers no matter what so if I put "123" into the paramter it will show me the alart() anyways. Here is the code is am running:</p>
<pre><code> $("123").ready(function () {
var $kids = $("x-column-inner").children();
alert($(".x-column-inner").height());
});
</code></pre>
<p>As a result ".x-column-inner" is null because it hasn't finished compiling the page and is already executing the javascript.</p>
| javascript jquery asp.net | [3, 5, 9] |
4,259,400 | 4,259,401 | About select option value | <p>Hmm...this question may sounds silly , hope you all don't mind...</p>
<p>If I have a drop list:</p>
<pre><code> <select name="myoption" onchange="document.textbox.value=this.value">
<option value="1">A</option>
<option value="2">B</option>
<option value="3">C</option>
</select>
<input type="text" name="textbox" id="textbox">
</code></pre>
<p>So with this now the textbox will display what is selected , but is it possible to display the A,B,C instead of 1,2,3? </p>
<p>Actually I need a drop-list which will display 2 different values to 2 textbox,such as if A is selected,textbox1 will display "A" and textbox2 will display "1".</p>
<p>I don't know if it is possible and I tried for some times already...can someone give me some hints?</p>
<p>Thanks in advance.</p>
| php javascript | [2, 3] |
3,429,427 | 3,429,428 | Total width of parent according to number of children | <p>I want to add dynamic width in UL according to the its child. Any idea how to do this using jQuery or Javascript?</p>
<pre><code><ul style="width:?">
<li style="width:50px;float:left;">&nbps;</li>
<li style="width:50px;float:left;">&nbps;</li>
<li style="width:50px;float:left;">&nbps;</li>
</ul>
</code></pre>
| javascript jquery | [3, 5] |
5,771,505 | 5,771,506 | RTSP streams play only sound, while local does video and sound | <p>In my application, RTSP streams play only sound without video, but if i specify the video path as a local file, it plays the video and audio.</p>
<p>How would i get the RTSP streams to show video?</p>
<pre><code>public void onClick(View arg0) {
Player.setVideoPath("rtsp://rtspvideohere.sdp");
Player.start();
}
</code></pre>
| java android | [1, 4] |
1,469,981 | 1,469,982 | .slideDown() Doesn't Seem To Work | <p>JQuery's <a href="http://api.jquery.com/slideUp/" rel="nofollow"><b>.slideUp()</b></a> doesn't work after <a href="http://api.jquery.com/append/" rel="nofollow"><b>.append()</b></a> is used to append value of textarea to the div. <br/><br/><b>HTML:</b></p>
<pre><code><html>
<body>
<div id="cont">
<textarea id="txt"></textarea>
<button onclick="click()">Click</button>
</div>
</body>
</html>
</code></pre>
<p><br/>
<b>JavaScript:</b></p>
<pre><code>function click(){
var txt = $('#txt').val();
var html = document.createElement('div');
$(html).hide().html(txt);
$('#cont').append(html);
$(html).slideUp(500);
}
</code></pre>
<p>I can't figure out what the problem is because when I used <b>.show()</b> instead of <b>.slideUp()</b> it works fine.</p>
| javascript jquery | [3, 5] |
1,636,824 | 1,636,825 | How to upload video to PHP SERver from Android | <p>Hi Guys i m using following code but getting error0 as response . Please help in following code as i m near to success. </p>
<pre><code> public void video()
{
File file = new File(exsistingFileName);
try {
HttpClient client = new DefaultHttpClient();
String postURL = "http://10.0.0.27/sportscloud/devices/uploadBlogData.php";
HttpPost post = new HttpPost(postURL);
FileBody bin = new FileBody(file);
MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
reqEntity.addPart("email", new StringBody("[email protected]", "text/plain", Charset.forName( "UTF-8")));
reqEntity.addPart("gameId", new StringBody("1024", "text/plain", Charset.forName( "UTF-8")));
reqEntity.addPart("source", new StringBody("phone", "text/plain", Charset.forName("UTF-8")));
reqEntity.addPart("uploadfile",bin );
post.setEntity(reqEntity);
HttpResponse response = client.execute(post);
HttpEntity resEntity = response.getEntity();
if (resEntity != null) {
Log.i("RESPONSE",EntityUtils.toString(resEntity));
}
} catch (Exception e) {
e.printStackTrace();
}
</code></pre>
<p>}</p>
| php android | [2, 4] |
1,487,402 | 1,487,403 | Regular Expression in android for password without spaces | <p>I have a EditText field in android. The password should contain minimum 4 characters and maximum 20 characters without spaces at the start or in the middle. Example blankspaceRaghu and RaghublankspaceRaghu should not be alllowed.</p>
<pre><code>Pass= password.getText().toString();
Pattern p= Pattern.compile("[^\\S]+[a-z,A-Z]+");
Matcher m = p.matcher(Pass);
</code></pre>
| java android | [1, 4] |
5,102,925 | 5,102,926 | Use of event.stopPropagation() | <p>In the case of a game where user have to click/use keys mutli and many times,</p>
<blockquote>
<p>Is there any advantage to use event.stopPropagation() in all event
handler which i know bubbling is useless?</p>
</blockquote>
<p>Suppose i have a div with a click event binded, </p>
<pre><code><div id="mydiv">CLICK</div>
$('#mydiv').click(function(){...});
</code></pre>
<p>if i click on it, this event will propagate to all ancestors elements of this div (e.g body/html/document/window). So just wondering if this could be better or same or worst to stop immediatly propagation of event.</p>
<p>In fact, i don't know how javascript engine internally deal with events binded (or not) to elements, if this works as a listener or what...</p>
| javascript jquery | [3, 5] |
1,783,463 | 1,783,464 | Why does onLongPress() not return a boolean like all other SimpleOnGestureListener? | <p>As the title states. The fact that I can't consume the event is causing a <code>click</code> event to occur immediately afterwards. Now I am manually keeping track of whether or not a longpress has occurred when handling a potential click.</p>
<p>Am I missing something here? I mean, I can't even get around this trying to implement the OnGestureListener interface because it expects a void for <code>onLongPress()</code>. What are my options?</p>
| java android | [1, 4] |
6,028,714 | 6,028,715 | Displaying 3 or more php files data on one webpage? | <p>I have 3 php files; pie.php, bar.php and line.php. These when run individually give output as a webpage. If all are run, 3 separate webpages open up displaying a pie chart, bar chart and line graph.</p>
<p>What i want to do is to divide a single webpage into three part and show each individual php file's result (i.e. the graphs) in one of the three parts. </p>
<ol>
<li>Is it possible to do it?</li>
<li>Would i need some hack for php or should i turn to java script</li>
<li>Any example that you know giving the same </li>
</ol>
| php javascript | [2, 3] |
3,912,001 | 3,912,002 | How to implement a slide-out/drawer effect in JQuery? | <p>I'm looking for a JQuery plug-in for a drawer-like effect. <a href="http://wpaoli.building58.com/2009/09/jquery-tab-slide-out-plugin/" rel="nofollow">I found that plug-in</a> which is quite similar to what I want but it slides from one side of the screen (top, bottom, left or right). In my case, I have an image as wide as the content div, and I want it to slide down when clicked to reveal the content, but not from the top of the screen, the image won't be located at the top of the screen. In other words, the effect I want is exactly like what that plug-in does but the only difference is that I don't want it to slide from the top side of the screen, it should slide from wherever the image is on the page.</p>
<p>Any suggestions would be really appreciated...</p>
| javascript jquery | [3, 5] |
3,033,683 | 3,033,684 | How can Javascript securely access user info? | <p>When a user clicks on my green button, I need Javascript to detect this and pass the $UserID and $ActivityID to the server to be stored in the database.</p>
<p>But what's the best way for JS to securely get this info and send it to the server?
I've been hiding variables in the HTML:</p>
<p>HTML:</p>
<pre><code> <div class="green-button">Add it</div>
<input type="hidden" class="u" value = " <?php $UserID ?> "/>
<input type="hidden" class="a" value = " <?php $ActivityID ?> "/>
</code></pre>
<p>jQuery:</p>
<pre><code>jQuery('.green-button').click(function(event){
var $UserID = jQuery(this).siblings('input').hasClass('u').attr('value');
var $ActivityID = jQuery(this).siblings('input').hasClass('a').attr('value');
// rest of the code...
</code></pre>
<p>However, this doesn't seem secure.
What if someone uses Firebug to change the HTML and then clicks on the button?
Won't garbage be written into the dbase?</p>
<p>Thanks for the tips.</p>
| php javascript jquery | [2, 3, 5] |
142,732 | 142,733 | JQuery: .text() get the html within a node, how do I set the text within a node? | <p>Using JQuery, I can do the following to get the text within my <code>LI</code></p>
<pre><code>$("#listingTabs li").eq(2).text();
</code></pre>
<p>How do I <strong>set</strong> the text? Because the following doesn't work</p>
<pre><code>$("#listingTabs li").eq(2).text() = 'insert new text';
</code></pre>
| javascript jquery | [3, 5] |
1,387,589 | 1,387,590 | best way to build dyanmic pop up menus | <p>I have a scheduling page that display a week (sunday to saturday) schedule.</p>
<p>They way I want to add employees to this schedule is with a series of popup menus that change based on the values selected.</p>
<p>For example the first menu will be Jobs with <code><option></code> values propagated from the jobs table in my db.</p>
<p>Now say a user selects 'Cook' in the Jobs popup menu. The next menu 'Employees' will show all the employees from the employees table that have the job code of 'cook' set. Thus showing me all the cooks that would be available that day.</p>
<p>What is the best way to make a series of menus like this?</p>
<p>Any links to quality tutorials would be appreciated.</p>
| php javascript | [2, 3] |
1,973,524 | 1,973,525 | Attach PDF file to email from app | <p>Im working on android and trying to send an email with a file attached but getting the following error. </p>
<blockquote>
<p>android.content.ActivityNotFoundException: No Activity found to handle
Intent { act=android.intent.action.SENDTO
dat=file://assets/Cards/myfile.pdf typ=Applications/pdf flg=0x10000000
(has extras) }</p>
</blockquote>
<p>Im very new to android dev so Im kinda lost as to what i need to do . Below is what I am currently trying</p>
<pre><code>Intent intent = new Intent(Intent.ACTION_SENDTO ); // it's not ACTION_SEND
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, "Card Set "));
intent.putExtra(Intent.EXTRA_TEXT, "");
intent.setData(Uri.parse("mailto:"));
intent.setDataAndType(Uri.parse("file://assets/Cards/" + "myfile.pdf"),
"Applications/pdf");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
activity.startActivity(intent);
</code></pre>
<p>I can create and send emails fine without attaching a file. Any help on how i should be attaching file correctly would be great thanks</p>
| java android | [1, 4] |
4,633,379 | 4,633,380 | Adding a tool bar to a web page | <p>I want to add a tool bar (just like the one above the text area where we type our questions in this forum , with bold,italic etc) to a web page.Is there an easier way of doing this?I am using ASP.Net c# and VS2008.
Thankx in advance.</p>
| c# asp.net | [0, 9] |
4,306,484 | 4,306,485 | A string replacement question with C# | <p>How do I remove string in <strong>bold</strong> within following url where <strong>q=</strong> is fixed parameter?</p>
<p><a href="http://abc.com/qwe.aspx" rel="nofollow">http://abc.com/qwe.aspx</a>?<strong>q=DIEYeGJgNwvPSJ32ic1sY5x1ZYjOZTQZD9mjWl2EQJ8=</strong>&u=/foo/boo/kb</p>
<p>Thanks.</p>
| c# asp.net | [0, 9] |
1,772,764 | 1,772,765 | Python URL decoding? | <p>In javascript I do the following:</p>
<pre><code>encodeURIComponent(comments)
</code></pre>
<p>while in Python i do the following:</p>
<pre><code>urllib2.unquote(comments)
</code></pre>
<p>For some reason, when I do the following:</p>
<pre><code>encodedURIComponents('ø')
</code></pre>
<p>I get <code>%C3%B8</code>, but when I decode</p>
<pre><code>urllib2.unquote('%C3%B8')
</code></pre>
<p>I get <code>ø</code> instead of <code>ø</code>, which is the original character.</p>
<p>What gives?</p>
<p>I'm on a platform that uses jQuery on client side, and Python/Django server side.</p>
| javascript python | [3, 7] |
4,577,838 | 4,577,839 | jQuery not working but Javascript will | <p>I feel really silly asking this, but it is completely blowing my mind why my link to the Google jQuery api isn't working. I know my code isn't broken because it works here: <a href="http://jsfiddle.net/jefffabiny/8p46d/" rel="nofollow">http://jsfiddle.net/jefffabiny/8p46d/</a></p>
<p>Here are my script tags in my index file:</p>
<pre><code><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="js/functions.js"></script>
</code></pre>
<p>Other than that, the doctype is HTML5, and I'm working on an local xampp install. I bet I over looked something small; does anyone see the problem here? Thanks.</p>
<p><strong>EDIT</strong>
Actually, after I submitted this post I got an alert at the top of my browser saying stack overflow requires javascript from an external domain to run properly, but it was being blocked. I guess that's my problem, but does anyone know how to fix that?</p>
| javascript jquery | [3, 5] |
4,877,905 | 4,877,906 | each returns "undefined" | <p>Hy guys,</p>
<p>I have a table like</p>
<pre><code> <table id="table4">
<tr>
<td>Id:</td>
<td>Nome:</td>
</tr>
<tr>
<td>1515</td>
<td>Thiago</td>
</tr>
<tr>
<td>2015</td>
<td>Guttierre</td>
</tr>
</table>
</code></pre>
<p>and when my script do...</p>
<pre><code> $("#table4 tr td:nth-child(1)").each(function ai() {
var d = $(this).text();
if ((d != 0) && (d != "") && (d != 'undefined') && (d != "Id:")) {
alert(d);
};
});
</code></pre>
<p>It returns: 1515, then 2015 and then returns an error:</p>
<blockquote>
<p>Microsoft JScript run-time error:"Undefined" is null or isn't an object.</p>
</blockquote>
<p>Why it returns "undefined"???</p>
<p>Thks guys!</p>
| javascript jquery | [3, 5] |
4,971,066 | 4,971,067 | User control that returns formated text | <p>I am looking for a way to return some formatted text via a user control in ASP.NET C#. This is basically what I am looking for:</p>
<p>Call a user control such as</p>
<pre><code><mycontrol:formatedtitle id="blah" runat="server">Text to format</mycontrol:formatedtitle>
</code></pre>
<p>And then have it return some formatted HTML such as</p>
<pre><code><div class="blah">Text to format</div>
</code></pre>
<p>I have been reading up online on creating user controls but nothing comes close to what I am looking for. I was able to do this in PHP easily by calling a command and having it return the fomatted text such as:</p>
<pre><code><? print_section_start("Text to format"); ?>
</code></pre>
| c# asp.net | [0, 9] |
111,451 | 111,452 | What is the correct syntax for writing custom attributes in a jQuery method? | <p>I have a ternary ahead of variable instantiations. The problem is, that this is an incorrect way to assign a variable for an attribute.</p>
<pre><code>$partial = $data.cell_info_box === undefined ? job_box : cell_info_box
$rel = $($data.$partial).attr('rel');
$klass = $($data.$partial).attr("rel").match(/job/) == null ? 'task' : 'job';
</code></pre>
<p>How can I provide my ternary like demonstrated but create callable attributes with my initial ternary's product?</p>
| javascript jquery | [3, 5] |
1,355,863 | 1,355,864 | jquery or javascript active element on foreground, lock background? | <p>I have a layer that is presented by a logic var. </p>
<p>that layer is just a hidden div - how do I make it so the layer is the only element that can be interacted with on the page when it is visible?</p>
<p>thanks!</p>
<p>Update:</p>
<p>used a full size div in the background with a transparent gif - works in firefox, but not IE - thoughts?</p>
<pre><code>#overlay {
background-image: url('../images/transparent.gif');
width:100%;
height:100%;
z-index:8999;
display:none;
margin-top: 0;
margin-left:0;
position:fixed;
}
</code></pre>
| javascript jquery | [3, 5] |
5,110,805 | 5,110,806 | Upload files to a remote server | <p>I need to upload files from my asp.net (C#) page residing in the web server to a remote server. </p>
<p>I managed to upload files to remote server from localhost using this code:</p>
<pre><code> string serverPath = "\\\\xx.xxx.xx.xx\\Folder\\" + FileUpload1.FileName;
FileUpload1.PostedFile.SaveAs(serverPath);
</code></pre>
<p>But after I published this code to my web server, it stopped working with the error "The network path was not found."</p>
<p>I have looked at a few solutions which suggest using UNC network share and implementing impersonation.
I couldn't figure out how to apply these solutions.</p>
<p>Can someone please give an example, or suggest a simpler solution.</p>
<p>Thanks!!</p>
| c# asp.net | [0, 9] |
4,646,486 | 4,646,487 | Int values get automatically converted into float values on Binding the text values in gridview | <p>I am getting int values from the stored procedure. But when i bind this datasource with the gridview i am seeing the values being converted into float.
i am using <strong>Text='<% # Bind("Quantity") %'</strong>
<br/> I wanna that to be displayed as int, with out zero's
eg: let the value be 233, when i bind that its getting displayed as 233.00</p>
| c# asp.net | [0, 9] |
4,354,925 | 4,354,926 | How does one close an overlay by clicking outside of the overlay? | <p>I have a jquery drop down that activates and deactivates when you click the header for the drop down</p>
<pre><code>$j('#category_header').click(function() {
$j('#category_dropdown').slideToggle("fast");
return false;
});
</code></pre>
<p>but I want it to also close when I click anywhere on the page that isnt the drop down.
How do I go about doing that?</p>
| javascript jquery | [3, 5] |
3,203,620 | 3,203,621 | How to attach XML file in message body of HTTP post request? | <p>How to attach XML file in message body of HTTP post request? </p>
<p>can any one give example for that kind</p>
| java android | [1, 4] |
159,184 | 159,185 | How do I create a dynamic set of slider bars | <p>I'm well-versed in HMTL/CSS but lean heavily on ready-made jQuery solutions to accomplish some more advanced interactions. I'm looking to create a set of sliders similar to what is done on the <a href="http://www.humblebundle.com/" rel="nofollow">Humble Indie Budle</a> payment distribution section. I need several slider bars that will total 100% and as you move them the others adjust in real-time. I check the HIB source but it looks like custom JS and I don't want to lift it outright. Anyone know of any available JS or jQuery resources that might help? Thanks!</p>
| javascript jquery | [3, 5] |
3,987,844 | 3,987,845 | multiple entries from csv files in java script | <pre><code> var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"Hello World!"
});
<?php
$fd = fopen ("landmarks.csv", "r");
echo "var latlngarr=new Array();";
$i=0;
echo "var markerarr=new Array();";
while (!feof ($fd)) {
$buffer = fgetcsv($fd, 4096);
echo "var latlngarr[$i] = new google.maps.LatLng($buffer[2],$buffer[3]);";
echo "var markerarr[$i] = new google.maps.Marker({
position: latlngarr[$i],
map: map,
title:$buffer[1]";
});
$i++;
}
fclose ($fd);
?>
</code></pre>
<p>I want to create multiple markers in google maps..the first entry works...but the other ones, from the csv file dont work? Is there something wron with the mixed php and Javscript code?</p>
| php javascript | [2, 3] |
5,965,303 | 5,965,304 | Decimal Hour into Time? | <p>I have an hour field in a database like 1.4, 1.5, 1.7 that I need to convert back to HH:MM. What is the easiest way to do this?</p>
| c# asp.net | [0, 9] |
3,363,853 | 3,363,854 | Creating dynamic objects with Javascript | <p>I'm trying to create a new Javascript object from attributes pulled from the DOM using jQuery.
The info I'm trying to pull is the data-* from this:</p>
<pre><code> <button type='button' class='pickup' data-name="apple" data-weight='1' data-color='red'>food</button>
</code></pre>
<p>So I want to get data-name and data-weight and put them into a new (or existing if I have to) object. Here's where I'm having problems. I want the object to look like this:</p>
<pre><code> MyObject = {
food: {
weight: 1,
color: 'red'
}
}
</code></pre>
<p>I've been trying to create a new object like this through a "for(var i in MyObject)" loop, but when it comes down to adding the attributes and values to MyObject{} I can't figure out how to make it work.</p>
<p>Any ideas or suggestions?</p>
<hr>
<p>The answers below worked perfectly! Thank you!
How if I wanted to dynamically create:</p>
<pre><code> MyObject.food = {}
</code></pre>
<p>from a variable, like this:</p>
<pre><code> var Name = "meal";
MyObject.Name = {} // creates MyObject.meal = {};
</code></pre>
<p>How would I do that? I thought MyObject[Name] = {} would work but it didnt seem to for me. Maybe I typed it wrong? :S</p>
| javascript jquery | [3, 5] |
1,095,785 | 1,095,786 | jquery: $(window).scrollTop() but no $(window).scrollBottom() | <p>I want to place an element to the bottom of the page whenever the user scrolls the page. It's like "fixed position" but I can't use "position: fixed" css as many of my clients' browser can't support that.</p>
<p>I noticed jquery can get current viewport's top position, but how can I get the bottom of the scroll viewport?</p>
<p>So I am asking how to know: $(window).scrollBottom() </p>
| javascript jquery | [3, 5] |
5,974,022 | 5,974,023 | creating an array of objects? | <p>It seems like this question gets asked frequently, but having looked through all of them, I find I'm still without aid. I'm taking my first step into oop, and I need to create an object with an attribute "Products" that is an array of up to 7 possible objects of class "Product". I just just barely understand the {get;set;} method, and am reading up on it, but I was hoping I could get some help with the syntax of what I'm trying to do here. I'm using C#. My code is below:</p>
<pre><code>public class Submission
{
public Submission() {}
public int SubmissionId {get;set;}
public int CustId {get;set;}
public int BroId {get;set;}
public int Coverage {get;set;}
public Array Products // what goes here? It's a mystery.
}
</code></pre>
| c# asp.net | [0, 9] |
3,297,392 | 3,297,393 | While-loop divs not reacting | <p>I have a list of divs created using a while-loop</p>
<pre><code>while($row = mysql_fetch_array($result)){
$output = "<div id='drag'>$row[id] - $row[name] - $row['email']</div>";
echo $output;}
</code></pre>
<p>When I try to make those divs highlighted for a few seconds.
Only the first div seems to be reacting.</p>
<pre><code>$("#drag").effect("highlight", {}, 2000);
</code></pre>
<p>Is there any strategy to make all the output be highlighted this way? And is there a way to make a certain div or divs highlighted?</p>
| php javascript | [2, 3] |
3,033,378 | 3,033,379 | jquery hide hides and immediately displays again | <p>jQuery is doing something strange for me: it just doesn't work and hides the div only for split a second. What am I doing wrong?</p>
<p>The code in question, as simple as can be.</p>
<pre><code><html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Experiment</title>
<script type="text/javascript"
src="http://code.jquery.com/jquery.min.js"></script>
</head>
<body>
<script>
function doHiding() {
$("div.thread").each(function() {
$(this).hide();
});
}
</script>
<a href="" onClick="doHiding()">Hide</a>
<div class="thread">I like trains.</div>
</body>
</html>
</code></pre>
<p>I am using Chromium on Linux. I see the div dissapear for split a second, but it appears again immediately.</p>
| javascript jquery | [3, 5] |
2,060,347 | 2,060,348 | JQuery - How do I count the number of elements selected by a selector? | <p>I am using $().fadeOut() to fade items out in a list ( < li> < /li>). When the list is empty I wish to hide a parent object.</p>
<p>I plan on doing this by checking in my trigger event that fades the list if the count of the objects is 0 then hide the parent element. I can use the fadeOut callback to remove the elements if necessary.</p>
<p>The to the point question:
<strong>How do I select li tags inside a ul and then get the total count of them using jquery?</strong></p>
| javascript jquery | [3, 5] |
3,727,507 | 3,727,508 | How to get the text-area content as exactly user entered | <p>In my webpage i am using textarea to get the details form the users and stored it in the database.</p>
<p><strong>1.This is how the user entered</strong></p>
<p><img src="http://i.stack.imgur.com/vkHrS.png" alt="enter image description here"> </p>
<p><strong>2. This is how it stored in the database</strong></p>
<p><strong>Our Needs: 1.WireSet 2.Amps 3.Lights</strong> </p>
<p>Now i am retrieve the details in some-other pages How to display the result as show in the image(1) </p>
| c# asp.net | [0, 9] |
209,136 | 209,137 | Get URL of ASP.Net Page in code-behind from another page | <p>I am trying to find away to determine a pages url from the page object. It seems you can only get the path of the current context.</p>
| c# asp.net | [0, 9] |
1,900,248 | 1,900,249 | Javascript: Changing src not working | <p>I'm calling a function like this:</p>
<pre><code><img src="/images/icons/info.png"
width="18" height="18" class="iconbutton" alt="Add to Library"
onclick="AddLibrary(12345,this.id); this.onclick=null;" />
</code></pre>
<p>The function then POSTS 12345 to another script and then is supposed to change the icon image:</p>
<pre><code>function AddLibrary(pibnval,thisid) {
$.post('/addlibrary.php', {
pibn: pibnval
}, function() {
thisid.setAttribute('src', "/images/icons/tick.png");
});
};
</code></pre>
<p>The POST works great, but the image does not change.</p>
<p>I also tried:
<code>document.getElementById(thisid).src = "/images/icons/tick.png";</code>
but that didn't work either.</p>
<p>Any ideas?</p>
| javascript jquery | [3, 5] |
1,337,283 | 1,337,284 | How to access Database which was in APP_DATA | <p>I developed a sample for membership and roles using the tutorial available. Now what i need is if i run my example in the other machine i would like to login and access the pages with the user name and password that were created using Asp.Net Configuration in my machine can any one give me an idea to achieve this</p>
| c# asp.net | [0, 9] |
1,977,728 | 1,977,729 | Getting the context inside a custom view? | <p>I have made a small custom view component:</p>
<pre><code>public class ActionBar extends RelativeLayout
{
public ActionBar(Context context, AttributeSet attrs)
{
super(context, attrs);
// .. custom logic here
}
private class homeButtonListener implements OnClickListener
{
@Override
public void onClick(View v)
{
// how do i get the context here?
}
}
}
</code></pre>
<p>Every ActionBar component comes with a home-button, so I thought it would be appropriate to put it's onClickListener inside the view definition itself. The button should return the user to the main activity when clicked, but I need a Context in order to start activities. Can I create a local reference to the context passed in the constructor, without running into a mess of memory leaks?</p>
| java android | [1, 4] |
4,968,808 | 4,968,809 | How to show a jquery message after textbox in php | <p>I have a textbox to show date which follows icon of jquery calandar to choose date. I used jquery form validation to show message if the user doesn't select a date. if i enter submit means that message shows between textbox and icon. I want that message after that icon. How to show that message?</p>
| php jquery | [2, 5] |
4,182,000 | 4,182,001 | How to get particular number of bytes from a video file in android | <p>I have a problem that I want to get first 2^21 bytes of a video file which is resided in our sdcard. But I don't know to do the same? Please suggest me the right solution regarding the same.</p>
<p>Thanks in advance.</p>
| java android | [1, 4] |
4,911,556 | 4,911,557 | ASP.net upload file, rename if exists | <p>I wrote this:</p>
<pre><code>protected void btnup_Click(object sender, EventArgs e)
{
if (ASPxUploadControl1.HasFile)
{
try
{
string filename = Path.GetFileName(ASPxUploadControl1.FileName);
ASPxUploadControl1.SaveAs(Server.MapPath("upload/") + filename);
StatusLabel.Text = "Upload status: File uploaded!";
}
catch (Exception ex)
{
StatusLabel.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message;
}
}
}
</code></pre>
<p>Problem is, if I already have File1.jpg, it will overwrite it if someone else uploads File1.jpg.</p>
<p>What to do here?</p>
| c# asp.net | [0, 9] |
343,040 | 343,041 | New line in javascript confirmation message | <p>I've a .net application wherein one of my pages, during initial page load, I'm setting the text of an asp label control. In my aspx page, I've a javascript function to read the label text and show a confirmation pop-up message. The problem is, "\n" with in the label text is not introducing a line break in the JS confirmation message. </p>
<p>My Code Behind-</p>
<p>lblMsg.Text = "string1" + "\n" + "string2"</p>
<p>Aspx Page-</p>
<pre><code> function PendingDeleteValidate() {
var x = document.getElementById("<%=lblMsg.ClientID%>");
if (confirm(x.innerHTML))
return true;
else
return false;
}
</code></pre>
<p>The JS confirmation dialog message shows - string1\nstring 2. I need to show a line break between the two strings.</p>
| javascript asp.net | [3, 9] |
1,069,385 | 1,069,386 | creating and saving a file to a directory | <p>I'm using a string builder to read several files from a directory like this:</p>
<pre><code>StringBuilder sb = new StringBuilder();
sb.Append(System.IO.File.ReadAllText(
HttpContext.Current.Server.MapPath("~\\Scripts\\File1.js")));
sb.Append(System.IO.File.ReadAllText(
HttpContext.Current.Server.MapPath("~\\Scripts\\File2.js")));
var TheFile = sb.ToString();
</code></pre>
<p>Now I want to save this sb in the \Script directory in file called MyFile.js. I see several methods available but I'm not sure which one to choose.</p>
<p>How do I do this?</p>
<p>Thanks.</p>
| c# asp.net | [0, 9] |
5,955,629 | 5,955,630 | How to generate a pop-up window if a user is not logged in? | <p>In an HTML page:</p>
<pre><code><a href="/files/getfile.php?name=abc.zip">file download</a>
</code></pre>
<p>in PHP script(getfile.php):</p>
<pre><code>if('notlogged')
{
echo 'please, loggin~'; //pop up, possible?
return false;
}
</code></pre>
<p>So my question is, When user click the anchor tag, can I pop up a login window if user didn't log?</p>
<p>I knew I can pre-check in Javascript before calling the PHP script whether user logged or not.</p>
<p>But, it's not my case for use; the PHP script should have to throw pop up code.</p>
<p>The page user is viewing should not changed — just pop up login window.</p>
| php javascript | [2, 3] |
933,908 | 933,909 | Searching the name of web pages according to the word entered in a textbox | <p>I have a textbox and a button in one page.I want to enter a word in the textbox and click the button. After clicking the button I want to display the name of the web pages containing the word entered in the textbox. So please tell me how to do it? I am using C#.</p>
| c# asp.net | [0, 9] |
722,303 | 722,304 | Text of the clicked link | <pre><code><ul class="Buttons">
<li><a href="#" onclick="myFunc(); return false;">Accept</a></li>
<li><a href="#" onclick="myFunc(); return false;">Reject</a></li>
<li><a href="#" onclick="myFunc(); return false;">On Hold</a></li>
<li><a href="#" onclick="myFunc(); return false;">Completed</a></li>
</ul>
</code></pre>
<p>In my script.js:</p>
<pre><code>var myFunc = function () {
// I want to get the Text of the link e.g. if the first list item link is
// clicked, store "Accept" in a variable.
};
</code></pre>
<p>How can I achieve this?</p>
| javascript jquery | [3, 5] |
5,023,446 | 5,023,447 | Find in Multidiamentional Array | <p>I have an multi dimensional array as </p>
<pre><code>[
{"EventDate":"20110421221932","LONGITUDE":"-75.61481666666670","LATITUDE":"38.35916666666670","BothConnectionsDown":false},
{"EventDate":"20110421222228","LONGITUDE":"-75.61456666666670","LATITUDE":"38.35946666666670","BothConnectionsDown":false}
]
</code></pre>
<p>Is there any plugin available to search for combination of LONGITUDE,LATITUDE?</p>
<p>Thanks in advance</p>
| javascript jquery | [3, 5] |
5,895,634 | 5,895,635 | some advice on how to write a window.resize function? | <p>Im trying to write a function that resizes the css widths of some elements when the browser window is resized, right now I dont seem to be getting things right and would love it if someone could help me out on where Im going wrong, my code so far is:</p>
<pre><code>function windowResize() {
$('#content').css('width', $windowWidth);
$('#div.mySection').css('width', $windowWidth);
$('#div.mySection .story').css('width', $windowWidth);
}
$(document).ready(function() {
var $windowWidth = $(window).width();
$(window).resize(function() {
windowResize();
});
});
</code></pre>
<p>Im not sure if I have placed everything in its correct place, if someone could advise me on how I can make this code much better it would be great.</p>
<p>Thanks
Kyle</p>
| javascript jquery | [3, 5] |
2,814,611 | 2,814,612 | jQuery event ajax dispatching | <p>In jQuery is there clever/shorthand way of tacking on an identifier to some general ajax events?</p>
<p>To explain, i am creating some functionality that is split between two seperate pieces of functionality: module A and module B. Module A, along with some other things, is primarily responsible for an ajax call. Module B is responsible for frontend dom work, after module a has finished and the ajax call has been returned.</p>
<p>I am currently simply triggering events for each of the ajax functions:</p>
<ul>
<li>beforeSend</li>
<li>success</li>
<li>complete</li>
<li>error</li>
</ul>
<p>So module has this code (among other stuff):</p>
<pre><code> $.ajax({
url: 'myajaxurl',
beforeSend : function() {
$('#form').trigger('module_a_before_send');
},
success: function(response) {
$('#form').trigger('module_a_success');
},
complete: function() {
$('#form').trigger('module_a_complete');
},
error: function(textStatus) {
$('#form').trigger('module_a_error');
},
timeout: 3000
});
</code></pre>
| javascript jquery | [3, 5] |
1,938,533 | 1,938,534 | adding a column with textbox inside from code behind | <p>I have a gridview that I want to add a textbox to the row that is clicked on. I have a button on each row, when clicked I want a column with a textbox added to that row. Which I then can type in and save to database. </p>
<p>I have found code online but some of the objects that are defined I don't have for some reason.</p>
<p>Any ideas?</p>
| c# asp.net | [0, 9] |
414,038 | 414,039 | how can get only numbers from the text using jquery | <p>I want to get only the numbers(123) not the text(confirm), here is my code</p>
<pre><code><p>123confirm</p>
<script type="text/javascript">
$(document).ready(function(){
$(p).click(function(){
var sd=$(this).text();
alert(sd);
});
});
</script>
</code></pre>
| javascript jquery | [3, 5] |
1,013,747 | 1,013,748 | Joomla javascript(JQuery) accordion menu always expand all nodes when click on last child element | <p>I'm new to joomla and Jquery. Please take this in mind.</p>
<p>I've a javascript accordion menu that is not working well: when I click on the last child element, then all nodes appears expanded. Not only the node(father) of the children clicked.</p>
<p>I've the index.php of the template that shows:</p>
<pre><code>function initMenu() {
$('.menu ul').hide();
$('.menu li.active.parent ul').show();
$('.menu li a').click(
function() {
$(this).next().slideToggle('normal');
}
);
}
$(document).ready(function() {initMenu();});
</code></pre>
<p>[I can't post the images that I edited to show the behaviour(because I don't have reputation), so I'll explain the situation with a concept menu]</p>
<p><strong>Behaviour shown:</strong></p>
<p>Node1<br>
|||||Node1.1<br>
|||||Node1.2<br>
||||||||||||Node1.2.1<br>
<strong>|||||||||||||||||||||Node 1.2.1.1</strong><----- Clicking here all nodes below are expanded!<br>
|||||Node1.3<br>
Node2<br>
|||||Node2.1<br>
||||||||||||Node2.1.1<br>
||||||||||||Node2.1.2<br>
||||||||||||Node2.1.3<br>
|||||||||||||||||||||Node2.1.3.1<br>
|||||||||||||||||||||Node2.1.3.2<br>
|||||||||||||||||||||Node2.1.3.3<br>
Node3<br></p>
<p><strong>Correct Behaviour:</strong></p>
<p>Node1<br>
|||||Node1.1<br>
|||||Node1.2<br>
||||||||||||Node1.2.1<br>
<strong>|||||||||||||||||||||Node 1.2.1.1</strong> <----- Clicking here don't show any more childs<br>
|||||Node1.3<br>
Node2<br>
Node3<br></p>
<p>Any help on this will be apreciated.
Regards. </p>
| javascript jquery | [3, 5] |
41,568 | 41,569 | Accessing the array with dynamic keys | <p>I have an array (name array) which is smarty assigned and I want to access the value of every element of an array. I know we need to use eval here, but not sure how to use it?</p>
<pre><code>var loop = 'true' , text , i=0;
while(loop == 'true')
{
text = ~$array[i] ;//ERROR :-(
i++;
if(text=='')
loop = 'false';
}
</code></pre>
| javascript jquery | [3, 5] |
2,646,196 | 2,646,197 | Display label text with line breaks in c# | <p>Is it possible to display the label text with line breaks exactly as per the image</p>
<p><img src="http://i.stack.imgur.com/YkAPV.jpg" alt="enter image description here"></p>
<p>I need the text on the label to be printed exactly can some one help me, my desired text that has to be shown on the label will be stored in a string-builder</p>
| c# asp.net | [0, 9] |
5,253,369 | 5,253,370 | Why doesn't my hide function work on a click | <pre><code>$(document).ready(function() {
$('#promotion_profile_booking_description').keyup(function () {
var left = 200 - $(this).val().length;
if (left < 0) {
left = 0;
}
$('#counter').text('Characters left: ' + left);
});
$('#counter').bind('click', function() {
(this).hide();
});
});
</code></pre>
<p>The previous code essentially inserts "Characters left: x", as a text counter. It works great. However hiding the element on a click is another story. Why isn't my hide function working? Do you see any obvious errors in my JS?</p>
| javascript jquery | [3, 5] |
3,544,472 | 3,544,473 | Not Adding Record with "Space" | <p>I'm using direct url to a record in my database, but my problem was, when the records contains " " or "space" it didn't save. for example:</p>
<blockquote>
<p>name = "Lebron" this is working.</p>
<p>name = "Lebron James" </p>
</blockquote>
<p>this will not work because of the space between first and last name. Did anyone already encountered this type of error?</p>
| c# asp.net | [0, 9] |
214,110 | 214,111 | Comparing dates only by year, month and date? | <p>Say we have 2 Date objects in Javascript;</p>
<pre><code>var d1 = new Date('...');
var d2 = new Date('...');
</code></pre>
<p>We do a comparison:</p>
<pre><code>d1 < d2;
</code></pre>
<p>This comparison will always take into account hours, minutes, seconds.</p>
<p>I want it to only take into account the year, month and date for comparison.</p>
<p>What's the easiest way to do this?</p>
<p>jQuery is allowed aswell.</p>
| javascript jquery | [3, 5] |
5,410,892 | 5,410,893 | Height of the block after deleting a product | <p>Here is the link - <a href="http://layot.prestatrend.com/" rel="nofollow">http://layot.prestatrend.com/</a>
After deleting a product from shopping cart the block #cart_block_slide_content does not change its height while not hovering on it one more time.
Here is the code, you can find it at ajax-cart-top.js:</p>
<pre><code>$('#cart_block_top').hover(function() {
var h = parseInt($('#cart_block_top_list').height())+ 'px';
$("#cart_block_slide_content").stop().animate({height: h}, {queue:false, duration: 500, easing: "easeOutBounce"});
}, function() {
$("#cart_block_slide_content").stop().animate({height: 0}, {queue:false, duration: 300});
});
</code></pre>
<p>So is there a way to make a block's height animating after deleting a product from shopping cart?</p>
| javascript jquery | [3, 5] |
2,233,354 | 2,233,355 | How can stop change event? | <pre><code>var InDate = trim($(".inDate").val());
if (InDate == '') {
$(".inDate").val(dateDisplayFormat);
}
//Bind date picker
daymarker.bindElement(".inDate",
{
onSelect: function(date) {
$(".inDate").trigger('change');
},
dateFormat:jsDateFormat
});
$(".inDate").change(function() {
//some validation functions are called here.
});
</code></pre>
<p>Lets say that i have two rows with indate and outdates.</p>
<p>for example:</p>
<pre><code>Indate outDate
2011-02-20 2011-02-24
2011-02-25 2011-02-27
</code></pre>
<p>so when i change the first date using the date picker indate change will be called twice.so because of the it is not possible to give the validation message.Lets say my first date is wrong.and second date is correct.because of that validation message will get hidden.</p>
<p>Is there a way that i can stop the second trigger if the first date is wrong???</p>
| javascript jquery | [3, 5] |
1,981,223 | 1,981,224 | Using a variable when traversing elements in JQuery | <p>Very quick and hopefully simple question.</p>
<p>I am trying to select a hidden input by value with some predefined variable.</p>
<pre><code>var id = $("#puid").val();
$('input[value=id]').closest('tr').css({'background-color':'red'});
</code></pre>
<p>I thought the above code would have worked, however its not processing id as a variable. What is the right notation to do this? (I have tested the code by replacing id with the actual number and the rest of the code works fine).</p>
| javascript jquery | [3, 5] |
5,338,814 | 5,338,815 | Block popup windows settings give error to close popup window in javascript | <p>I have one web page, on which when user click on button(for calculation purpose) one popup window open(its an aspx page as popup) .</p>
<p>When user done calculations on popup then automatically popup is close. </p>
<p>But when user block popup windows through browser setting then popup open but cant close.</p>
<p>I want to close this popup window even when user block popup windows.</p>
<p>If you have any solution for this then plz give reply.</p>
<p>Code for open popup window:</p>
<pre><code>window.open('frmSelection.aspx?form=' + formname + '&controlname=' + controlname + '&caption=' + caption + '&control1=' + control1 + '&control2=' + control2 + '&control3=' + control3 + '&Filter=' + filter + '', null,
'height=500,width=562,status=yes,toolbar=no,menubar=no,location=center');
</code></pre>
<p>Code for close popup window:</p>
<pre><code> protected void dgrdSelection_ItemCommand(object source, DataGridCommandEventArgs e)
{
if (e.CommandName == "Select")
{
StringBuilder strScriptBuilder = new StringBuilder();
strScriptBuilder.Append("<script language='javascript' type=text/javascript> ");
strScriptBuilder.Append(" window.close(); ");
strScriptBuilder.Append(" </script> ");
}
}
</code></pre>
<p>Thanks in adv.
Pallavi</p>
| c# javascript asp.net | [0, 3, 9] |
5,903,920 | 5,903,921 | Calling C/C++ library function from PHP | <p>We have a PHP web app running on a customer's machine. For an update, we have a bit of code in C that we'd like to include as a native opaque library along with the PHP web app.</p>
<p>How does one go about calling a C/C++ lib. function from PHP? </p>
<p>It cannot be assumed that the PHP app, called by the web server, has any sort of permission to call an exec(), eval(), or system() type of function to execute a C wrapper driver which in turn uses the C/C++ library, so it would need to be a direct C library use from within the PHP code. </p>
| php c++ | [2, 6] |
1,418,347 | 1,418,348 | Adding Android SDK to an existing Java project? | <p>I'm a fan of a fairly big open-source program which is written in Java and uses Swing as a front-end client on series of web actions. As I've been working with Android development for a few months, I had an idea that I could create a new app that works similarly to the Swing application. The program is well-organized and separates interface from implementation, also offering a command line interface as well as Swing.</p>
<p>So ideally I'd like to be able to just inject a new Android package into the existing file system somewhere, make use of the back end that already exists, and have it work seamlessly with new updates to the program. The closest suggestion I found was this:</p>
<p><a href="http://stackoverflow.com/questions/7722074/create-an-android-project-from-existing-one">Q: How can I create a new project from an existing project, using Android command line tools?</a></p>
<p>A: Copy the directory tree of the old project into a new project.</p>
<p>This doesn't seem like it can be feasible advice for me, since I have to work with the existing SVN repository rather than starting the whole thing from scratch. Is there any way to pull this off?</p>
| java android | [1, 4] |
4,002,885 | 4,002,886 | Explain this fragment of Javascript to me | <p>I am newbie to jQuery,
can someone explain what this code does:</p>
<pre><code>$("#currency form").submit(function(e) {
triggers.eq(1).overlay().close();
return e.preventDefault();
});
</code></pre>
| javascript jquery | [3, 5] |
5,511,829 | 5,511,830 | Read log and save it to string | <p>I want to read the log and save it to a string inside the app. I use the Log.d(..) to save log. I've read that you use logcat? But that doesn't work when running the android phone. Is there a boolean that you need to switch, READ_LOG?</p>
| java android | [1, 4] |
861,563 | 861,564 | How to change div content with smooth changing | <p>Div with id="content" need to change content. I have two divs, somewhere generated with id=1 and id=2, and I want to div id="content" show one, but when I click on some button to change content on another, but with smooth horizontal changing, like on image galeries scroll left and right. How to do that with JQuery ?</p>
<pre><code><!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="content">
</div>
</body>
</html>
</code></pre>
| javascript jquery | [3, 5] |
397,103 | 397,104 | Javascript Onclick | <p>I want to achieve a very simple effect to scroll divs when pressing an arrow button ... How do i do this?</p>
<p>Basically i have a maximum of 4 divs named:</p>
<p>Slideframe, slideframe1, slideframe2 and slideframe3</p>
<p>I have a PHP variable called count which generates the slideframe content based on a PHP loop which increments a variable called $count.</p>
<p>Therefore the count variable can be between 0 and 3.</p>
<p>I want buttons to scroll divs left and right based on the count variable
If the count variable is 0 then no scroll buttons would appear.
If the count variable is 1 or 2 then both left and right scroll buttons would be visible and woudl scroll the relevant divs.
lastly if count = 3 then only a left arrow would be visible.</p>
<p>this is the javascript i use (in conjunction with jqmin liibary) to move the divs:</p>
<pre><code>$(document).ready(function(){
$("#one").click (function(){
if (navi =1){
$(".slideframe").animate({opacity: "0.1", left: "-=960"}, 1200);
$(".slideframe1").animate({ left: "-=960"}, 1200);
}
});
});
</code></pre>
<p>"#one" = the id of the left arrow image.</p>
<p>Whats the simplest way of doing all of this?</p>
<p>thx</p>
| javascript jquery | [3, 5] |
736,796 | 736,797 | Android/java beginner syntax question | <p>so I was watching a tutorial and I am trying to understand this syntax</p>
<pre><code> Thread thread = new Thread()
{
//if i declare variables here i get errors
public void run()
{
// ....define variables in function
}
}
</code></pre>
<p>How does this code work? I think when the thread object is created, it defines adds or "appends" a function to its "list" of functions? So thread.run() or thread.start() can be called later. I'm not sure I'm guessing..can someone enlighten me. From the tutorial I watched in the run function he did this</p>
<pre><code>//the same run that is in the Thread class
public void run()
{
int timer = 0 ;
while(timer < 5000)
{
sleep(100) ;
timer+=100;
}
}
</code></pre>
<p>What does sleep do? I've googled it but couldn't find anything good. Does it basically stop the current application for 100 ms before it continues with the loop? which means sleep is called 50 times? I'm terrible at maths lol..but if that is so, is the code above equivalent to </p>
<pre><code>public void run()
{
int timer = 0 ;
while(timer < 50)
{
sleep(100) ;
timer++;
}
}
</code></pre>
<p>However I know the simplest method would just be to say sleep(5000) ;</p>
<p>Clearly, I'm a noob at this..so will appreciate any explanation..the thorough the better thanks. Sorry, no Idea how to use code tags..</p>
| java android | [1, 4] |
5,514,399 | 5,514,400 | Programmatically Setting Text of Validation Control | <p>I have following validator control. How can we set the <code>color</code> of <code>Text</code> of this control from code behind?</p>
<p>Note: Text of the control is <code>*</code> as shown in the code below.</p>
<p><strong>CODE</strong></p>
<pre><code><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator"
Text="*" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
</asp:RequiredFieldValidator>
<asp:Button ID="Button1" runat="server" Text="Button" />
</code></pre>
<p></p>
| c# asp.net | [0, 9] |
2,325,940 | 2,325,941 | Problem with jQuery mouseleave firing when container has select box | <p>I have a two containers -- one is nested inside of another. When I hover over the parent, I want the child container to appear. When I mouseout, I want the child container to fadeout. The problem I'm having is the child container has a form that contains a "select box". When the user selects the select box -- the mouseleave event is accidentally fired. </p>
<p>How can I stop the select box from tripping the mouseleave event?</p>
<p>You can see my working code here: <a href="http://jsfiddle.net/rsturim/9TZyh/3/" rel="nofollow">http://jsfiddle.net/rsturim/9TZyh/3/</a></p>
<p>Here's a summary of my script:</p>
<pre><code>$('#parent-container').live("mouseenter", function () {
var $this = $(this),
$selectOptionsContainer = $this.find('#child-container');
$selectOptionsContainer.stop().fadeTo('slow', 1.0);
}).live("mouseleave", function (e) {
var $this = $(this),
$selectOptionsContainer = $this.find('#child-container');
$selectOptionsContainer.stop().hide();
});
</code></pre>
<p><strong>edit</strong>: appears fine in WebKit-based browsers. Fails in Firefox and IE7-IE9.</p>
| javascript jquery | [3, 5] |
505,135 | 505,136 | Python equivalent of vector::reserve() | <p>I am looking for the Python equivalent of the C++ vector::reserve(). I don't know how big the list is going to be ahead of time, but I know it's going to be fairly large, and I want to avoid as many resizings as possible as the list is being grown inside a deep inner loop.</p>
<p>The only solution I've come up with so far is very cumbersome compared to the vector::reserve() idiom. That solution is to pre-create the list using [None]*K, tracking the size of the list in a separate counter, appending or setting items into the list as need be, then copying a slice of the list once it's fully constructed. Is there any alternative?</p>
| c++ python | [6, 7] |
2,582,269 | 2,582,270 | If was not alert go to url else do not go | <p>I want make validation jquery <strong>without using from plugin</strong>, problem is here that after click on button and get alert(if field is empty) it go to url <code>#</code> that there is in <code><form action="#"...</code>. </p>
<p>I want if get alert(mean if field is empty) 'input is empty' not go to url that there is in <code>...action="#"...</code>, if filed has value it go to url. i can not use from <code>ajax call</code> or <code>preventDefault</code> or <code>window.location</code>(Because one from field is <code>input:file</code>).</p>
<p><strong>Example:</strong> <a href="http://jsfiddle.net/gb7nh/1/" rel="nofollow">http://jsfiddle.net/gb7nh/1/</a></p>
<p>How can fix it?</p>
<pre><code><form action="#" method="POST">
<input type="text" name="name">
<button id="cli">Submit</button>
</form>
$('#cli').live('click',function(e){
//e.preventDefault();
if($('input[type="text"]').val()=='')alert('input is empty')
})
</code></pre>
| javascript jquery | [3, 5] |
3,877,352 | 3,877,353 | How to avoid security message in IE7 when starting a file download? | <p>The message reads:</p>
<blockquote>
<p>To help protect your security, Windows Internet Explorer blocked this site from
downloading files to your computer. Click here for more options... </p>
</blockquote>
<p>I am receiving this error when I try to initiate a download after successfully filling a CAPTCHA in my ASP.NET (C#) website. </p>
<p>Has anybody faced this issue earlier? If so can you please let me know how you have tried to make it work. I have no option to remove the AJAX calls in my code. </p>
<p>This issue seems to be specific to IE7. The work around suggested for this issue by Microsoft is:</p>
<blockquote>
<p>To ensure that your Web site downloads are not blocked, do not automatically launch a file download. Instead, use hyperlinks or buttons that require a user action. If you use a script to navigate to the resource, it must run synchronously within the context of the OnClick event handler for the link.</p>
</blockquote>
<p>I even tried to create a button dynamically and trigger a click after my AJAX call is completed. Even then the issue is not resolved.</p>
| c# asp.net | [0, 9] |
931,734 | 931,735 | Inline JS (OnMouseOver) - Repeat Something Until MouseOut Occurs | <p>Is there a way to run a given function every 10ms, considering that I am limited to running only inline code (no external js files or tags)?</p>
<p>I can only use:</p>
<pre><code><div onmouseover="functions here" onmouseout="functions here">
</code></pre>
<p>To be more specific I want to move another element to the left with 50px every 10ms using marginLeft, but I can not run externail functions or js libraries as mentioned above.</p>
<p>I was thinking of maybe incorporating it all in the onmouseover with setInterval(function, 10), but I don't see a way of stopping this when the mouseout occurs.</p>
<p>I know I can use jQuery event handlers like .on, but these are not an option here since they will have to be externally loaded (not inline)</p>
| javascript jquery | [3, 5] |
808,844 | 808,845 | How do I get to cousin elements with JQuery? | <p>I have a table with many rows of data, and I want to show or hide some of the details on each row based on a checkbox in the first element. For example:</p>
<pre><code><table>
<tr>
<td><span class="aspnetweirdness"><input type=checkbox></span></td>
<td>Text Text Text</td>
<td><select /></td>
<td><input type=text></td>
</tr>
</table>
</code></pre>
<p>I'm looking to traverse from the checkbox to the cousin elements (the text, the select, and the text input) with jquery and toggle the visibility on those elements based on whether the checkbox is checked. One small snag is that the checkbox is wrapped in a span, since this is being output by asp.net. That also makes the elements harder to get at by id.</p>
<p>How would I go about doing this? I've tried $(this).parentsUntil('tr').siblings(), but it doesn't seem like i get the right elements.</p>
<p>Any help would be appreciated.</p>
<p>EDIT:</p>
<pre><code> $(".crewMemberTable input:checkbox").toggle(function() {
$(this).closest('tr').find('select, input:not(:checkbox)').fadeIn();
$(this).closest('tr').find('label').css('font-weight', 'bold');
}, function() {
$(this).closest('tr').find('select, input:not(:checkbox)').fadeOut();
$(this).closest('tr').find('label').css('font-weight', 'normal');
});
</code></pre>
| javascript jquery | [3, 5] |
5,003,489 | 5,003,490 | mouseover an image and show another, using jQuery | <p>I have an image, and when I mouseover I want another image to 'slide' over the first image from the bottom up. On mouseout the image should disappear again, slide from top to bottom, showing the first image again.</p>
<p>How to do this with jQuery? I tried <code>animate</code> and <code>slidetoggle</code>, but I can't get it working.</p>
<p>EDIT: solution</p>
<pre><code><div class="image" style="width:90px;height:67px;position:relative;overflow:hidden">
<a href="#">
<img style="position:absolute;top:0;left;0;z-index:1;" class="first" src="images/stories/logos/in-dialoog.gif" alt="logo" />
<img style="position:absolute;top:0;left:0;z-index:0;" class="second" src="images/stories/logos/c-riders.gif" alt="logo" />
</a>
</div>
$('.image').mouseenter(function(){
$('.first').stop().animate({
top: '56px'
}, 800, function() {
// Animation complete.
});
});
$('.image').mouseleave(function(){
$('.first').stop().animate({
top: '0'
}, 800, function() {
// Animation complete.
});
});
</code></pre>
| javascript jquery | [3, 5] |
3,569,889 | 3,569,890 | Button click event not firing after postback | <p>I've got the following code defined in a button click event on my webform. The code executes properly the first time I click the button. Additional clicks should add more values to my database, but in this case after the first postback, the click event doesn't fire.</p>
<p>When I leave the page and come back, I can add one more name to the list, but subsequent clicks still don't work. I'm stumped on this one...not throwing any Javascript errors on the page (which is the first thing I thought of)</p>
<pre><code>if (!String.IsNullOrEmpty(tbSuggestedSupplier_Add.Text))
{
SqlCommand cmd = new SqlCommand("pSuggestedSupplier_AddNew", dbConnection);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Clear();
cmd.Parameters.Add("@NewSupplierRequestID", SqlDbType.Int);
cmd.Parameters.Add("@SupplierName", SqlDbType.VarChar, (500));
//cmd.Parameters.Add("@SupplierTypeID");
cmd.Parameters["@NewSupplierRequestID"].Value = Session["NewSupplierRequestID"];
cmd.Parameters["@SupplierName"].Value = tbSuggestedSupplier_Add.Text;
functions.NewSupplierRequest.Open();
try
{
cmd.ExecuteNonQuery();
gvSuggestedSuppliers.DataBind();
tbSuggestedSupplier_Add.Text = string.Empty;
}
catch (Exception err)
{
this.lblError.Text = err.Message;
}
finally
{
functions.NewSupplierRequest.Close();
}
}
</code></pre>
| c# asp.net | [0, 9] |
3,104,189 | 3,104,190 | How can I display "please fill required field" in diferent languages using jquery.validate and ?lang=? | <p>I'm using <code>$lang = $_GET['lang'];</code> and some arrays to change the language of the page.
So my pages URL look like this when I select a language: <code>...index.php?lang=en</code>
(so my index page never changes neither my jquery files) </p>
<p>(more details in my <a href="http://stackoverflow.com/questions/2306763/php-variable-is-activated-when-i-call-it-from-index-file-but-not-from-included-fi">previous post</a>)</p>
<p>I'm using jQuery validate plugin to validate my form and a <strong>custom.js</strong>:</p>
<pre><code>$(document).ready(function(){
$("#sendmail").validate({
rules: {
FieldData0: {
required: true
},
FieldData1: {
required: true,
email: true
},
FieldData2: {
required: true
}
},
messages: {
FieldData0: {
required: "Please enter your name"
},
FieldData1: {
required: "Please enter your email address"
},
FieldData2: {
required: "Please enter a message"
}
}
});
})
</code></pre>
<p>How can I show different requirement warning for different languages in this case?
Do I have to make a <code>custom.js</code> for every language and then use php if else statements, is the a better way?</p>
| php jquery | [2, 5] |
5,145,933 | 5,145,934 | problem with onclientclick and postbackurl | <p>I want to trigger on click of a button this:</p>
<pre><code><asp:Button runat="server" ID="submit" Text="Submit" OnClientClick="country(this.form);" PostBackUrl="http://www.google.com/" />
</code></pre>
<p>In javascript I m checking validation of the form.The problem is when I m clicking on the button it is not waiting for the validation but its postback to google.com...</p>
<p>If I do <code>return country(this.form)</code> then on button click it waits for validation but don't postback after I fill the form. I want something like that if javascript validation is false..then OnClientClick should be <code>return country(this.form)</code> if its true then only</p>
<pre><code>country(this.form)
</code></pre>
| asp.net javascript | [9, 3] |
4,763,452 | 4,763,453 | Handling code which relies on jQuery before jQuery is loaded | <p>I'd like to follow the general guideline of putting all JavaScript at the very bottom of the page, to speed up loading time and also to take care of some pesky issues with conflicting jQuery versions in a web app (Django).</p>
<p>However, every so often I have some code, code which depends on jQuery, but which must be further up on the page (basically the code can't be moved to the bottom).</p>
<p>I'm wondering if there's an easy way to code this so that even though jQuery is not yet defined the code works when jQuery is defined.</p>
<p>The following seems, I have to say, like overkill but I don't know of another way to do it:</p>
<pre><code>function run_my_code($) {
// jquery-dependent code here
$("#foo").data('bar', true);
}
var t = null;
function jquery_ready() {
if (window.jQuery && window.jQuery.ui) {
run_my_code(window.jQuery);
} else {
t = window.setTimeout(jquery_ready, 100);
}
}
t = window.setTimeout(jquery_ready, 100);
</code></pre>
<p>Actually, I might need to use code more than once in a page, code that doesn't know about other code, so even this probably won't work unless I rename each jquery_ready to something like jquery_ready_<em>guid</em>, jquery_ready_<em>otherguid</em> and so on.</p>
<h1>Clarification</h1>
<p>Just so this is clear, I am putting the include to JavaScript (<code><script type="text/javascript" src="jquery.min.js" /></code>) at the <strong>very bottom</strong> of the page, just before the <code></body></code>. So I can't use the <code>$</code>.</p>
| javascript jquery | [3, 5] |
4,488,621 | 4,488,622 | jQuery - move element with javascript inside | <p>I'm using jquery to move a element that contains javascript code inside it, like this:</p>
<pre><code><li class="a1">
<div class="el">
<script type="text/javascript"> document.write('Hello World'); </script>
...
</div>
</li>
<li class="a2">
</li>
<a class="trigger">link</a>
</code></pre>
<p>so I attached a click event on a.trigger that will move div.el into the 2nd list.
the problem is that the js inside it makes the browser to open a new window only with div.el inside it :(</p>
| javascript jquery | [3, 5] |
42,520 | 42,521 | how to use capcha code in the asp.net | <p>how i can add capcha code in the asp.net registration form</p>
| c# asp.net | [0, 9] |
1,071,606 | 1,071,607 | Get a specific word from a specific line from a text file in Android | <pre><code>String line = "";
int lineNo;
try
{
File file = new File("/sdcard/mysdfile.txt");
FileReader fr = new FileReader(file);
BufferedReader br = new BufferedReader(fr);
//char[] inputBuffer1 = new char[READ_BLOCK_SIZE];
for (lineNo = 1; lineNo < 20; lineNo++)
{
if (lineNo == 1)
{
line = br.readLine();
etFName.setText(line);
}else//{br.readLine();}
if (lineNo == 2)
{
line = br.readLine();
char c = line.charAt(0);
//char c =line.charAt(0);
String s1 = Character.toString(c);
//String Str1 = line;
//String bloodgroup = String.copyValueOf(Str1, 10,13);
fBldGp.setText(s1);
}else//{br.readLine();}
if (lineNo == 5)
{
line = br.readLine();
char c = line.charAt(0);
String s1 = Character.toString(c);
etMName.setText(s1);
}else
if (lineNo == 6)
{
line = br.readLine();
char c = line.charAt(0);
String s1 = Character.toString(c);
mBldGp.setText(s1);
}else br.readLine();
}
}
catch (IOException e)
{
e.printStackTrace();
}
</code></pre>
<p>This gives me the required line but i am unable to get the specific word from that line
and add it to the textview in android layout. Please help me.</p>
<p>My expected output is to display the word of the line 1,2,5,6th line leaving first 10 alphabets of every line.</p>
| java android | [1, 4] |
1,046,792 | 1,046,793 | Android/Java question. How are these two decision trees different? | <p>I'm very confused as to how these two decision trees are different. I'm building an app that needs to decide which view to load based on the position selected from a ListView. I've tried to build the logic into a single controller module and found that the switch-case will cause a NullPointerException and FC while the if-else will work perfectly. Can anyone enlighten me as to why? I've got a strong background in C and C++ and am used to being able to easily re-write switches to if-else's and vice versa.</p>
<p>Defined vars:</p>
<pre><code>private final int VALUEA = 0;
private final int VALUEB = 1;
private final int VALUEC = 2;
</code></pre>
<p>Switch-case:</p>
<pre><code>TextView t = new TextView(null);
switch(value){
case VALUEA:
setContentView(R.layout.valuealayout);
t = (TextView) findViewById(R.id.valuealayout);
t.findViewById(R.id.valuealayout);
break;
case VALUEB:
setContentView(R.layout.valueblayout);
t = (TextView) findViewById(R.id.valueblayout);
t.findViewById(R.id.valueblayout);
break;
case VALUEC:
setContentView(R.layout.valueclayout);
t = (TextView) findViewById(R.id.valueclayout);
t.findViewById(R.id.valueclayout);
break;
default:
break;
}
</code></pre>
<p>The block above will cause a NullPointerException.</p>
<p>If-else:</p>
<pre><code>if(value == VALUEA ){
setContentView(R.layout.valuealayout);
TextView t = (TextView) findViewById(R.id.valuealayout);
t.findViewById(R.id.valuealayout);
}else if(value == VALUEB){
setContentView(R.layout.valueblayout);
TextView t = (TextView) findViewById(R.id.valueblayout);
t.findViewById(R.id.valueblayout);
}else if(value == VALUEC){
setContentView(R.layout.valueclayout);
TextView t = (TextView) findViewById(R.id.valueclayout);
t.findViewById(R.id.valueclayout);
}else{
}
</code></pre>
<p>This version works perfectly. Does the second block work because of some funky Java scoping rule that allows each branch of the decision tree to create and properly initialize the TextView in a way that the first block doesn't?</p>
| java android | [1, 4] |
155,993 | 155,994 | To get path name with url values in jquery | <p>This is an example URL.</p>
<pre>
http://stackoverflow.com/questions/ask?a=1&b=2
</pre>
<p><strong>question</strong>: I need to fetch path name along with url values like this<pre>/questions/ask?a=1&b=2</pre>
I need jquery or javascript solution</p>
| javascript jquery | [3, 5] |
5,230,911 | 5,230,912 | jQuery doesn't always load | <p>Okay so I have this page with quite a lot of javascript/jQuery in it. Now the problem is that it sometimes loads and it sometimes doesn't. It eventually gets working after a few refreshes. The page is still a prototype and it's not yet viewable to the users, but i noticed that the problem sometimes spans across the whole website. Does anyone know how to fix this? The login script is jQuery/Ajax based, the contact form is jQuery based and a lot of other design related stuff are based on jQuery as well. Without it, i have a big problemo. All functions are inside document ready functions and all the scrypt tags are using the new html 5 `async="async".</p>
| javascript jquery | [3, 5] |
1,867,741 | 1,867,742 | unable to start a new project eclipse | <p>I am a new android developer. </p>
<p>I was trying to install eclipse in my system and after installation when I was to open a new project the column of build target is been empty. </p>
<p>So i can't create or start a project... please help me in rectifying this problem.</p>
| java android | [1, 4] |
2,258,089 | 2,258,090 | Snake script is not passing values to variable | <p>So here is my snake script - </p>
<p><a href="http://jsfiddle.net/6bKHc/24/" rel="nofollow">http://jsfiddle.net/6bKHc/24/</a></p>
<p>I started to create a snake game, but basically move(top), move(bottom) e.c. is not working. Any ideas why? I understand that I can't pass the elements to variable like this, so maybe you could show me how to do that correctly?</p>
| javascript jquery | [3, 5] |
5,820,320 | 5,820,321 | How do you make a javascript popup like the ones on AllTop.com | <p>I need to make simple javascript popups like the ones on alltop.com (when you hover over the links). Is there a jQuery plugin for this?</p>
| javascript jquery | [3, 5] |
3,600,757 | 3,600,758 | Javascript code example copied into a pre-tag gets executed | <p>I'm trying to add a piece of javascript code to a certain <code><div></code>.
I enclosed the code in pre and code tags, but when I actually run this the code gets <em>executed</em>. Obviously, that's not what I want at all.</p>
<pre><code> var code = '<pre><code><script type="text/javascript" src="http://source.com/test.js"><\/script>\n';
code = code + '<script type="text/javascript">\n';
code = code + '\tadimp.id = ' + 1 + ';\n';
code = code + '\tadimp.type = ' + 1 + ';\n';
code = code + '\tadimp.generate();\n';
code = code + '<\/script></code></pre>';
$("#code").html(code);
</code></pre>
| javascript jquery | [3, 5] |
2,084,937 | 2,084,938 | How can I Enable\Disable all subcontrols of a table? | <p>I have a checkBox, which when it's checked i want to enable a table and its subcontrols and when it's disabled I want to do the opposite.</p>
<p>I have already understand that I have to iterate all subControls of the table, and my question is if there is any nice and generic way of doing it.</p>
<p>Thanks in advance,</p>
<p>oz.</p>
| c# javascript | [0, 3] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.