Unnamed: 0
int64 302
6.03M
| Id
int64 303
6.03M
| Title
stringlengths 12
149
| input
stringlengths 25
3.08k
| output
stringclasses 181
values | Tag_Number
stringclasses 181
values |
|---|---|---|---|---|---|
2,977,351
| 2,977,352
|
On Android, how can i write a code that allow us to click an operating button on the first page get the result of calculation on another next page?
|
<p>for example: on current page we have 2 Texteditors. We enter numbers to each of the field and then click a operator button to see the result that will be shown on the next page. ^^ help...</p>
|
java android
|
[1, 4]
|
4,218,459
| 4,218,460
|
How do i trigger a popup on a webpage using javascript?
|
<p>I know how to make the popup come up when page opens but I'd like to know how to trigger it when they try to close the page.
Help?</p>
|
java javascript
|
[1, 3]
|
3,158,813
| 3,158,814
|
$(window).width() and $(window).height() return NULL -JQuery
|
<p>I want to get the size of browser window using <code>$(window).width()</code> and <code>$(window).height()</code> functions. However this two return null. the <code>$(window)</code> is not null, it's returning "object".
I have tried also using <code>$(document).width()</code> and <code>$(document).height()</code>, this two do not return null, they are returning specific values, but they are bigger than the window size. Any idea why the <code>$window</code> 2 values are null?</p>
<pre><code>$(window).load(function () {
var view = $("#view");
var image = $("#image");
var hiResImage = $("#hi-res-image");
var zoom = $("<a id='zoom'><span><br /></span></a>");
log("ERROR 1 = " + $(window).width());
log("ERROR 1 = " + $(window).height());
log("ERROR 1 = " + $(window));
image.width($(window).width());
image.height($(window).height());
</code></pre>
<p>.....</p>
<p>Should I initialize somw how the $(window) variable?</p>
|
javascript jquery
|
[3, 5]
|
4,323,344
| 4,323,345
|
javascript was working and now all javascripts being ignored?
|
<p>hi i have a page which i have a window auto close function in.
This was working fine, but now all of a sudden it's stopped working, whats more weird is i have cut and pasted javascript that i know works and completely cleared the contents of the page to see if any javascript will run in the page at all.</p>
<p>No matter what i do though the page just ignores javascript completely? Why is this?</p>
<p>The page is opened in a query pop up window, however this shouldn't affect anything, what i am trying to accomplish is the user opens the page and then the page auto closes after 3 seconds delay, this then closes the query window and refreshest he parent page.</p>
<p>but like i said its not doing anything, please can someone show me why. thanks</p>
<pre><code><?php ob_start(); ?>
<div class="login-frame-outer">
<html>
<head>
</head>
<body>
<?php
$page_title = "Login";
include('includes/headerframe.php');
?>
<div class="loginframe2">
<h1><strong>Login You In Securely</strong></h1>
<p>login you in securely. Please wait.<br/><br/>
<div class="login-logo">
<img src="assets/css/photobox/loading.gif" width="24" height="24"><div class="login-text-logo">Login You In. Please Wait</div></div>
</div>
<script language="JavaScript">
<!--
window.close();
if (window.opener && !window.opener.closed) {
window.opener.location.reload();
}
//-->
</script>
</body>
</html>
</div>
</code></pre>
|
php javascript
|
[2, 3]
|
4,845,085
| 4,845,086
|
How to force attach an app to android market?
|
<p>When we install an app (apk file) directly via file, that app is not associated to the market, so does not appear as "installed".</p>
<p>Titanium Backup as an option to force attach to market, which works very well.</p>
<p>My question is: anyone knows how can I do something similar? I want to develop an app just to correct those associations.</p>
|
java android
|
[1, 4]
|
3,879,261
| 3,879,262
|
Display ticket remaining time
|
<p>I am programming small page and I want to display expiration time of authentication ticket. I mean not the end, but remaining time. Current code is follows:</p>
<pre><code> DateTime cas = (DateTime)ticket.Expiration.Date;
DateTime cas1 = DateTime.Now;
DateTime cas2 = cas1.Subtract(cas);
</code></pre>
<p>However, VS says "Cannot implicitly convert system.timespan into system datetime".
Pls help. Thanks a lot.</p>
|
c# asp.net
|
[0, 9]
|
4,012,393
| 4,012,394
|
android and SQL Server
|
<p>i am developing an application that reads and writes data remotely on an SQL Server, the application is ment to run on an android devices.
i know that i have to make a java server that uses socket connetion to the android app, i did that and the server connect normally using MS JDBC driver and excutes sql queries and send the result as a "single String" to the client and the client subString that massive junk of data
the problem is, whenever the clients connect to the server and try to fetch data it hangs during the receive process!!
is there is something wrong with my approach "data size might be huge sometimes, over 30000 rows"</p>
|
java android
|
[1, 4]
|
130,963
| 130,964
|
Proper Procedure to create a n-tier Website in ASP.NET
|
<p>What is the correct procedure to create an n-tier Website in ASP.NET? Can this be done without setting up a server farm, and how would you be able to test it? Thx.</p>
|
c# asp.net
|
[0, 9]
|
4,073,468
| 4,073,469
|
Adding new query parameter to hyperlinks dynamically
|
<p>I have several hyperlinks in my homepage. I would like to add a query parameter at the end of each hyperlink dynamically.</p>
<p>For example;</p>
<pre><code><a href="detail.aspx?id=2" target="_blank" >xyz</a>
<a href="detail.aspx?cid=5" target="_blank" >pqr</a>
</code></pre>
<p>will be converted to</p>
<pre><code><a href="detail.aspx?id=2&redirectFrom=hp" target="_blank" >xyz</a>
<a href="detail.aspx?cid=5&redirectFrom=hp" target="_blank" >pqr</a>
</code></pre>
<p>a new query parameter "<strong>redirectFrom</strong>" with value have been added to the converted hyperlinks.</p>
<p>How I can achieve it using ASP.net C#?</p>
|
c# asp.net
|
[0, 9]
|
5,850,926
| 5,850,927
|
jQuery - Error: 'style' is null or not an object
|
<p>When I put jQuery on my page I get an error <code>Error: 'style' is null or not an object</code></p>
<p>All i did was add the following to the <code><head></code></p>
<pre><code><script type="text/javascript" src="js/jquery-1.5.js"></script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,099,660
| 5,099,661
|
image Url to base64encode?
|
<p>How convert image url into base64encode in jquery? For example image url convert to binary to pass another page </p>
|
javascript jquery
|
[3, 5]
|
1,606,568
| 1,606,569
|
Flexscroll not working in show/hide div
|
<pre><code><div class="right_tab_content_part1_s">
<a href="javascript:void(0)" class="active" id="classtabnew1" onclick="showHideDivforTabbingBeforeaward(1)">View Provider</a>
<a href="javascript:void(0)" class="" id="classtabnew2" onclick="showHideDivforTabbingBeforeaward(2)">View Message</a>
</div>
<div style="display:block;" id="divtabnewBeforeaward1"></div>
<div style="display:none;" id="divtabnewBeforeaward2"><div id="scroll2_msg" class="flexcroll"></div></div>
<script type="text/javascript">
function showHideDivforTabbingBeforeaward(id)
{
for(j=1;j<3;j++)
{
if(id==j)
{
document.getElementById('divtabnewBeforeaward'+j).style.display = 'block';
document.getElementById('classtabnew'+j).className = 'active';
}
else
{
document.getElementById('divtabnewBeforeaward'+j).style.display = 'none';
document.getElementById('classtabnew'+j).className = '';
}
}
}
</script>
</code></pre>
<p>Flexscroll is not working, even when i use the enter <code>fleXenv.initByClass ("a-class-name-of-your-choice");</code> or <code>fleXenv.fleXcrollMain (yourDivElement);</code></p>
|
javascript jquery
|
[3, 5]
|
969,314
| 969,315
|
Copy an attribute from one element to another with jQuery
|
<p>I have the following jQuery code which doesn't seem to be doing anything. When the link is clicked, I'm trying to get the value of its <code>url</code> attribute to be copied into the <code>iframe</code>'s <code>src</code> attribute. </p>
<p>Basically this is supposed to make links open up in an iframe (the content of the iframe is replaced every time a new link is clicked) instead of acting like normal links.</p>
<p>So what is wrong with my code?</p>
<pre><code>$('p.tweet a').click(function(){
var link = $(this).attr('url');
$('iframe').attr('src',link);
})
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,330,727
| 3,330,728
|
jQuery text to input?
|
<p>I have a simple layout with a textblock and one <code><a></code>, like:</p>
<blockquote>
<p>text1 <a href="/#">edit</a></p>
</blockquote>
<p>When I click on the <code><a></code>, I want this textblock to become text input. How is that possible with jQuery?</p>
|
javascript jquery
|
[3, 5]
|
4,299,546
| 4,299,547
|
Jquery count only numbers in a string
|
<p>My question is: How I can count only numbers from a string, for example if I have:
(55)-555-34 to get output 7, I mean to exclude the dashes and brackets for example. Cheers!</p>
|
php javascript jquery
|
[2, 3, 5]
|
4,300,199
| 4,300,200
|
How do I detect a postback in jQuery
|
<p>I have a form that I pre-populate with test data though jQuery.</p>
<pre><code>$('INPUT[name=subscription.FirstName]').val('Jef');
</code></pre>
<p>but I only want to do this before submit. What is the best way to test this?</p>
|
javascript jquery
|
[3, 5]
|
117,864
| 117,865
|
Android: keep alert in front, so that the user must respond
|
<p>My application shows an alert that the user must respond to before continuing to do other things. I'm trying to figure out the best way to implement this. Using an Activity for the alert isn't quite working.</p>
<p>In my current implementation, the alert is activity (A). When another activity from the same package is started and onStop is called, it starts itself again using FLAG_ACTIVITY_REORDER_TO_FRONT so that it's always at the top of the stack. This works as described, unless Activity A uses Theme.Dialog or Theme.Translucent.</p>
<p>Modified log:</p>
<pre><code>Activity A created
Activity A started
Activity A resumed
Activity A paused
Activity B created
Activity B started
Activity B resumed
Activity B gains window focus
Activity A stopped
Top activity in stack is Activity B, so Activity A relaunches itself
Activity B paused
Activity A started
Activity A resumed
</code></pre>
<p>The top activity in the stack should be Activity A, however Activity B remains in the foreground.</p>
<p>Another implementation detail: my application is not for a phone, so I'm not concerned with a back button finishing the activity or interactions with other apps. Still, I agree that on principle I should prevent such problems anyway, so in my code I check whether the activity that has come in front is from the same package (i.e. from our code base). This should work around the theoretical problem of interfering with other apps.</p>
<p>Is there a way to bring Activity A into focus? I understand that this is unusual behavior, but it is necessary for Activity A to remain in the foreground until it is deliberately finished.</p>
<p>I'm also open to suggestions about a completely different and better approach!</p>
<p>FWIW, I'm running 2.2.</p>
<p>(Cross-posted from <a href="http://groups.google.com/group/android-developers/browse_thread/thread/d46fd7d59abe15a0" rel="nofollow">http://groups.google.com/group/android-developers/browse_thread/thread/d46fd7d59abe15a0</a>, where we got no response.)</p>
|
java android
|
[1, 4]
|
4,771,549
| 4,771,550
|
How can I reference a non-global function with window[functionName]?
|
<p>I'm making something like a framework for JS. I want the users to be able to add functions to a specific action, just like in wordpress plugins:</p>
<pre><code>add_action("wp_head", "functionName");
</code></pre>
<p>I looked at other questions, and the most appreciated answer was</p>
<pre><code>window['functionName']
</code></pre>
<p>But how do I do it when the function "functionName" is <strong>not global</strong>, but sits within $(document).ready({}); for example? It throws an error Uncaught TypeError: Cannot call method 'call' of undefined</p>
<p>There is one more option, that is to pass the user's function as an argument to add_action (if we suppose that my function will be named add_action as well):</p>
<pre><code>add_action("some_event", functionName);
// in the framework's JS file:
function add_action(event, fn) {
fn();
}
</code></pre>
<p>But I have a hunch that this will be inefficient as hell and a wrong way to do it.</p>
|
javascript jquery
|
[3, 5]
|
2,768,438
| 2,768,439
|
How to get the selected value from a asp:DropdownList using jQuery
|
<p>I have the following code and it gives me the text but not the value. What is wrong and how do I fix it?</p>
<pre><code> function pageLoad() {
$('#<%=dpEmploymentStatus.ClientID%>').change(function() {
alert($('#<%=dpEmploymentStatus.ClientID%>' + ' option:selected').text());
}).change();
}
</code></pre>
|
asp.net jquery
|
[9, 5]
|
827,689
| 827,690
|
Can I override jQuery .val() for only some input elements?
|
<p>Suppose I'm using a "placeholder" jQuery plugin that reads the "placeholder" attribute from input elements and simulates it for browsers that don't yet support placeholders.</p>
<p>But I would still like $("input").val() to work properly -- that is, to return "" if the text in the textbox is the placeholder text. Is there anyway I can override .val() just for these inputs?</p>
|
javascript jquery
|
[3, 5]
|
3,947,972
| 3,947,973
|
jquery - traverse up tree and find elements with specified class
|
<p>I thought that the closer() function would do this for me, but seemingly not. I have the following markup and I want to add a class to all parent anchors with the class trigger:</p>
<pre><code> <ul>
<li class="selected">
<a class="trigger" href=""></a>
<a href=""></a>
<ul>
<li class="selected">
<a class="trigger" href=""></a>
<a href="" id = "my_target"></a>
</li>
</ul>
</li>
</ul>
</code></pre>
<p>I want to select my target - in this example, the deepest anchor, then add a class to each a.trigger in its ascendants. What would be the best way to do this? Thanks.</p>
|
javascript jquery
|
[3, 5]
|
4,890,911
| 4,890,912
|
script hash value, loss of one alphanumeric character
|
<p>I had to rename all of my .html files to .php so that I can use php gzip compression. Anyway the switch has broken one of my scripts. It's a script that loads in and animates content. It grabs the content from various pages and loads it into a container. That part of the script works fine.</p>
<p>When using the .html extension, the script will happily append the page being viewed to the URL, as in: www.site.com/#ABOUT</p>
<p>But now that I've renamed everything from .html to .php, there's always a missing letter, as in: www.site.com/#ABOU <--- missing a 'T'</p>
<p>Or, www.site.com/#CONTAC <--- missing a 'T'</p>
<p>www.site.com/#NEWSLETTE <--- missing an 'R'</p>
<p>Here's the part of the script that does this append function:</p>
<pre><code>var hash = window.location.hash.substr(1);
var href = $('#nav li a').each(function(){
var href = $(this).attr('href');
if(hash==href.substr(0,href.length-5)){
var toLoad = hash+'.php #content'; <--- .php (was: .html)
$('#content').load(toLoad)
}
});
</code></pre>
<p>What's up with this?</p>
|
javascript jquery
|
[3, 5]
|
4,414,601
| 4,414,602
|
Change Text color Onfocus Event OR when user types something
|
<p>I am having Form in which txt box already has some value which changes when some user clicks in inside the txt box.The Font color is slightly set to a light color. So when a user types something the Font Color Should change to a dark color and should remain dark. Is there any java script to do this. </p>
<pre><code><html>
<head>
<style type="text/css">
.formWrapper input[type="text"]{float:left; width:178px; height:28px; line-height:27px; padding-left:5px; color:#CACACA; font-size:13px; font-weight:bold;}
</style>
</head>
<body>
<div class="formWrapper">
<form name=form>
<Input type="text" name="name1" value="Eg : Flat-27,Block 4,Skyline" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;" size="30">
</form>
</div>
</body>
</code></pre>
|
javascript jquery
|
[3, 5]
|
301,100
| 301,101
|
Passing values between web pages
|
<p>I need to pass a dollar amount from one webpageto another webpage without letting the user modify the values when the values are passed between these pages.
ie Page 1 (entry page) to Page 2 (confirmation page)</p>
<p>What is the best way to do this?</p>
|
c# asp.net
|
[0, 9]
|
2,626,716
| 2,626,717
|
Error: function is not defined
|
<p>I have created a <code>js</code> file which has a function.<br>
When I call that function on <code>$(document).ready;</code> it is not working. </p>
<p>I checked through firebug, It is calling the function but not going into the function.</p>
<p>Here is my JavaScript code:</p>
<pre><code>function toggelEventButtons() {
var invoiceVal = $('#Invoice_Id').val(); //It is a textbox Id of aspx Page.
alert(invoiceVal);
if (invoiceVal > 0) {
$('#addEventInvoiceDetail').hide();
$('#editEventInvoiceDetail').show();
} else {
$('#addEventInvoiceDetail').show();
$('#editEventInvoiceDetail').hide();
}
}
</code></pre>
<p>I call the function from an <code>aspx</code> page like this:</p>
<pre><code>$(document).ready(toggelEventButtons);
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,618,232
| 3,618,233
|
ListFragment how to get the listView?
|
<p>I'm porting my app from AsyncTasks to Fragements.</p>
<p>But how can I access the listView (id: list) element within my fragment?</p>
<pre><code>class MyFragment extends ListFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.list_fragment, container, false);
ListView listView = getListView(); //EX:
listView.setTextFilterEnabled(true);
registerForContextMenu(listView);
return v;
}
}
</code></pre>
<p>xml:</p>
<pre><code> <ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</ListView>
</code></pre>
<p>Ex:</p>
<pre><code>Caused by: java.lang.IllegalStateException: Content view not yet created
</code></pre>
|
java android
|
[1, 4]
|
2,460,276
| 2,460,277
|
How to authenticate a user using OAuth in PHP
|
<p>How do I implement OAuth authentication to log in a user?</p>
<p>I am making a code where I am using OAuth authentication but I am not getting the satisfactory action.</p>
|
php javascript
|
[2, 3]
|
1,462,404
| 1,462,405
|
toggle/vertical slider with multiple Divs
|
<p>I have 2 div section one div containing video & other has tabular data. I would like to toggle them in horizontal direction i.e from right to left or vice verse. If video display table div is hide, and if table then video div will hide. </p>
<p>This is working fine in vertical direction.</p>
<pre><code><div class="option_list">
<p class="video_head">Video</p>
<div class="divVideo"> Video frame...</div>
<p class="table_head">table</p>
<div class="divtable"> table frame...</div>
</div>
</code></pre>
<p>script--</p>
<pre><code> <script type="text/javascript">
$(document).ready(function () {
$(".table_head").click(function () {
$(".divtable").slideToggle();
$(".divVideo").hide();
});
$(".video_head").click(function () {
$(".divVideo").slideToggle();
$(".divtable").hide();
});
});
</script>
</code></pre>
<p>How to toggle this horizontally? </p>
|
jquery asp.net
|
[5, 9]
|
1,412,522
| 1,412,523
|
run event once only
|
<p>i have code to check for browser and at the moment it is running each time i refresh page. is it possible to run only once on each visit so if i refresh or are taken to that page by link then the code is ignored. thanks</p>
<pre><code> <script type="text/javascript">
if($.browser.msie && $.browser.version=="8.0" || $.browser.msie && $.browser.version=="7.0")
alert("Please upgrade your browser to at least version 8.0 in order to use all the features of this site.\n\nThank you.");
</script>
</code></pre>
<p>updated code supplied by darin:</p>
<pre><code><script type="text/javascript">
var date = new Date(); date.setTime(date.getTime() + (30 * 60 * 1000)); $.cookie("explorer", "foo",{ expires: date });
var cookie = $.cookie('explorer');
if (cookie == null) {
// the cookie is not present => you may do the checks
if ($.browser.msie && $.browser.version == '8.0') {
// set the cookie so that the next time the user visits this page
// he doesn't get the alert message
$.cookie('explorer', 'true');
alert("Please upgrade your browser to at least version 8.0 in order to use all the features of this site.\n\nThank you.");
}
}
</script>
</code></pre>
<p>the alert is not firing though</p>
|
javascript jquery
|
[3, 5]
|
1,704,882
| 1,704,883
|
Is it possible to get harddisc size using php or java?
|
<p>I want to detect the harddisc size of my computer and if possible the the partitions informations(partition size, free memory, used etc).Is it possible in php/java?</p>
|
java php
|
[1, 2]
|
956,776
| 956,777
|
return from a function ajax
|
<p>I am having a problem here, if I have a data verification. More of the function $ ajax jquery not return value of true and false, know how I can fix this?</p>
<h3>Example code:</h3>
<pre><code>function ret(as){
....codes...
$.ajax({
type: "POST",
url: "../../03",
data: "as="+as,
success: function (msg) {
if(msg == 'true' ){
..codes..
return true;
}else{
..codes..
return false;
}
}
});
}
</code></pre>
<p>Example call:</p>
<pre><code>var check= ret("user");
if(check== true){
..run ..
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,003,888
| 5,003,889
|
Email Auto-Filtering
|
<p>I would like to use the masked edit box to let people type in input a valid email address,
What is the best mask i should use in MaskedEditExtender.Mask ?</p>
|
c# asp.net
|
[0, 9]
|
2,660,125
| 2,660,126
|
copy, drag & drop bug : item stops moving
|
<p>I'm trying to drag and drop items on a page, but insteads of moving the item itself, I create a copy of it.</p>
<p>Here is my code. "copyDragDrop" is a div at the bottom of the page. It remains empty until the user strats dragging something.</p>
<pre><code>function coordSouris()
{
return {
x:event.clientX + document.body.scrollLeft - document.body.clientLeft,
y:event.clientY + document.body.scrollTop - document.body.clientTop
};
}
function drag()
{
var pos = coordSouris(event);
copie = event.srcElement.cloneNode(true);
document.getElementById('copieDragDrop').appendChild(copie);
copie.style.position = 'absolute';
copie.style.display = 'block';
document.onmousemove = mouseMove;
document.onmouseup = drop;
}
function mouseMove()
{
if (copie != null)
{
var pos = coordSouris(event);
copie.style.left = pos.x;
copie.style.top = pos.y;
}
}
function drop()
{
var divCopie = document.getElementById('copieDragDrop');
if (divCopie.hasChildNodes() )
{
while ( divCopie.childNodes.length >= 1 )
{
divCopie.removeChild(divCopie.firstChild);
}
}
}
</code></pre>
<p>This code creates the copy, starts to move it, but after a few pixels, the copy stops following the mouse. If I release the mouse, "onmouseup" is not fired, but the copy starts to follow the mouse again ! I've tried the code on several items, the same bug occurs</p>
<p>I don't understand anything, any help is more than welcome.</p>
<p><strong>UPDATE :</strong> I juste realised that all elements I tried the code on had something in common : they contained or were included in an ASP.net hyperlink control. The same code works well on regular HTML elements. There must be some auto-generated javascript for links that interferes with my code.</p>
|
javascript asp.net
|
[3, 9]
|
1,077,922
| 1,077,923
|
Javascript Accordion
|
<p>I have a strange bug I cant quite figure out, I've built an accordion slider that shows short content intially and when clicked then shows the long content. </p>
<p>At any one time only 1 tab should be open but when 2 opens the short content dissapears. </p>
<p>ive attached a fiddle, can anybody see whats wrong? Is it because they all shgare the same class? </p>
<p><a href="http://jsfiddle.net/2v44c/" rel="nofollow">http://jsfiddle.net/2v44c/</a></p>
|
javascript jquery
|
[3, 5]
|
1,035,758
| 1,035,759
|
How to use jQuery to prevent the space key from entering a space?
|
<p>I thought it would be a simple thing to hijack the space key when in a form input so that it would function like a hyphen. Generally jQuery makes stuff like this really simple.</p>
<p>The code I tried is this:</p>
<pre><code> $("#StreamUrl").keydown(function (e) {
if (e.keyCode == 32) return 109;
});
</code></pre>
<p>But this has no effect whatsoever. I tried a more simple script:</p>
<pre><code> $("#StreamUrl").keydown(function (e) {
//if (e.keyCode == 32) return 109;
alert(e.keyCode);
});
</code></pre>
<p>This script correctly alerts 32 on space press and 109 on hyphen press. Also, I have no JavaScript errors.</p>
<p>Why wouldn't <code>if (e.keyCode == 32) return 109;</code> work? When I replace that line with <code>if (e.keyCode == 32) alert("space!!");</code> I get the alert correctly, so I know the <code>if</code> is returning <code>true</code> correctly.</p>
<p>What gives?</p>
<h2>Edit - Solution</h2>
<p>Thanks to @Nick for pointing out the copy-paste issue. I ended up with a little bit of a hybrid. Here's the code that I have gotten to work which is both smooth and handles Copy/Paste.</p>
<pre><code> $("#StreamUrl").keydown(function (e) {
if (e.keyCode == 32) {
$(this).val($(this).val() + "-"); // append '-' to input
return false; // return false to prevent space from being added
}
}).change(function (e) {
$(this).val(function (i, v) { return v.replace(/ /g, "-"); });
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,590,520
| 2,590,521
|
Java v/s PHP, how do this technology stack up for Web Application Development?
|
<p>I am new to Web Programming and I hear that there are many biggies like Java, .Net and PHP for Web Application Development. </p>
<p>I would certainly appreciate if I can get some insights on how this technology stack up in comparison and in what scenarios one would prefer one technology over the other. </p>
<p>Thanks for all guidance in advance. </p>
|
java php
|
[1, 2]
|
5,145,960
| 5,145,961
|
Changing a Typewriter jQuery Effect from letter by letter to word by word
|
<p>This jQuery function works great letter by letter, but I cannot seem to get it to go word by word.</p>
<p>Any ideas, here is the function:</p>
<pre><code>//Typewriter Effect
$.fn.Typewriter = function(opts){
var $this = this,
defaults = { animDelay: 50 },
settings = $.extend(defaults, opts);
$.each(settings.text, function(i, letter){
setTimeout(function(){
$this.html($this.html() + (letter!='\n'?letter:'<br />'));
}, settings.animDelay * i);
});
}
</code></pre>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
4,480,486
| 4,480,487
|
Services used to store user info and photo
|
<p>So recently i am building an app that will use some social functions such as users making friend request, and having a profile photo. The user will be able to create a profile and i need a service to use that will store the information of each unique user, and there photo. I am not sure how i will manage the users sending friend request just yet, or better yet how i will manage a specific users friends. Hmm...</p>
<p>Right now i am looking a service that will allow me to do this? I dont have a infrastructure of my own so it would be nice to find a service to use. I have heard of windows azure, Amazons web services such as simpleDB and DynamoDB. Has anyone had experience with building an app like this?</p>
<p>If so what is the best practices, and service to use?</p>
|
java android
|
[1, 4]
|
1,041,151
| 1,041,152
|
AJAX request confusion in jQuery
|
<p>I am unable to understand that why the jquery AJAX is not fetching data from the ajax page.
Can someone please help.</p>
<pre><code><script type="text/javascript">
$(function() {
$('#lms_id').change(function(){
if ($(this).val() != "") {
// alert("1");
} else {
// alert("0");
}
});
$('#lms_user_role_id').change(function(){
if (($(this).val() == "7" || $(this).val() == "8")) {
$('#t_lms_dealers').show();
} else {
$('#t_lms_dealers').hide();
}
});
});
function loadAjax(message)
{
//alert(message);
//$.get("<?php echo $App['wwwroot'].'er.php' ?>?activity="+message);
$.get("http://www.abc.loc/er.php");
}
</script>
</code></pre>
<p>In loadAjax function, alert is alerting fine, but only the AJAX part is not working.</p>
|
javascript jquery
|
[3, 5]
|
7,181
| 7,182
|
Why do I get NullReferenceException when loading controls using LoadControl(string VirtualPath)?
|
<p>I have a test project which is part of a solution that I am trying to unit test. One of the methods that I want to test loads custom controls using the method <code>TemplateControl.LoadControl(string virtualPath)</code> e.g. </p>
<pre><code>LoadControl(“~/CustomControl/Action/FitlerBox.ascx”)
</code></pre>
<p>My problem is when I call this method from the Test project, it always returns a <code>NullReferenceException</code>. This is because it never finds the path, I think. </p>
<p>Any suggestions on how to get this path?</p>
|
c# asp.net
|
[0, 9]
|
4,860,251
| 4,860,252
|
How to read String in java that was written using python's struct.pack method
|
<p>I have written information to a file in python using struct.pack
eg.</p>
<pre><code>out.write( struct.pack(">f", 1.1) );
out.write( struct.pack(">i", 12) );
out.write( struct.pack(">3s", "abc") );
</code></pre>
<p>Then I read it in java using <code>DataInputStream</code> and <code>readInt</code>, <code>readFloat</code> and <code>readUTF</code>.
Reading the numbers works but as soon as I call <code>readUTF()</code> I get <code>EOFException</code>.</p>
<p>I assume this is because of the differences in the format of the string being written and the way java reads it, or am I doing something wrong?</p>
<p>If they are incompatible, is there another way to read and write strings?</p>
|
java python
|
[1, 7]
|
3,460,526
| 3,460,527
|
Does Rhino have a future?
|
<p>I'm looking to add serious scripting into my Java app and JavaScript would be a great language choice. My concern though is the Rhino project and its future.</p>
<p>While Groovy/Jruby etc have seen constant updates, and engines like V8 and SpiderMonkey make continuous and significant performance boosts; Rhino languishes with its last release in March '09.</p>
<p>I've seen some work on hacking Rhino:</p>
<ul>
<li><a href="http://cr.openjdk.java.net/~jrose/pres/201009-ThunderingRhinos/pres.html">Great Thundering Rhinos!</a> presentation from Oracle</li>
<li><a href="http://www.google-melange.com/gsoc/project/google/gsoc2011/rohit_mullangi/37001">Explore and implement JDK7 InvokeDynamic</a> Google Summer of Code project</li>
</ul>
<p>But nothing solid about actually merging this code into the project and getting an active committer community around it.</p>
<p>What is the Rhino road map? For example, is there any plan to bring <code>invokedynamic</code> to the Rhino world?</p>
|
java javascript
|
[1, 3]
|
1,676,680
| 1,676,681
|
Exception Details: System.Data.SqlClient.SqlException: Invalid column name 'PRC0000001'
|
<p>i keep getting this error, i dont know why, im still new to c#. kindly help me figure this out please. i have two dropdownlist that would populate data based on first dropdownlist selected value.</p>
<p>when i select a value on the first dropdownlist, i get that error..</p>
<p>here is my code..</p>
<pre><code>protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//read sql server connection string from web.config file
string constring = ConfigurationManager.ConnectionStrings["AccreString"].ConnectionString;
SqlConnection conn = new SqlConnection(constring);
DataTable dt = new DataTable("emed_province");
using (conn)
{
conn.Open();
SqlCommand comm = new SqlCommand("SELECT * FROM emed_province ORDER BY PROVINCE_NAME ASC", conn);
SqlDataAdapter adptr = new SqlDataAdapter(comm);
adptr.Fill(dt);
}
ddlProvince.DataSource = dt;
ddlProvince.DataTextField = "PROVINCE_NAME";
ddlProvince.DataValueField = "PROVINCE_CODE";
ddlProvince.DataBind();
}
}
protected void ddlProvince_SelectedIndexChanged(object sender, EventArgs e)
{
string constring = ConfigurationManager.ConnectionStrings["AccreString"].ConnectionString;
SqlConnection conn = new SqlConnection(constring);
DataTable dt = new DataTable("emed_province");
using (conn)
{
conn.Open();
SqlCommand comm = new SqlCommand("SELECT CITY_NAME FROM emed_city WHERE PROVINCE_CODE ="+ddlProvince.SelectedValue, conn);
SqlDataAdapter adptr = new SqlDataAdapter(comm);
adptr.Fill(dt);
}
ddlCity.DataSource = dt;
ddlCity.DataTextField = "CITY_NAME";
ddlCity.DataValueField = "CITY_CODE";
ddlProvince.DataBind();
}
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
5,357,198
| 5,357,199
|
Equivalent verbatim operator for java
|
<p>Does java have an equivalent operator or language construct as the verbatim operator(@) in C#?</p>
|
c# java
|
[0, 1]
|
5,997,296
| 5,997,297
|
Find days between two dates Jquery/JS
|
<p>I have searched far and wide for this problem and so far none of the codes I have found failed to work and ones I have made also do the same, So I am starting to worry it isnt possible.</p>
<p>We have two dates in mm/dd/yy format not dd/mm/yy so 11/30/2012 for example</p>
<p>I then use the following script:</p>
<pre><code> if ( jQuery("#book_room_type").val() == "La Maison" ) {
Date.prototype.DaysBetween = function(){
var intMilDay = 24 * 60 * 60 * 1000;
var intMilDif = arguments[0] - this;
var intDays = Math.floor(intMilDif/intMilDay);
return intDays;
}
var d1 = new Date(jQuery("#dateto").val());
var d2 = new Date(jQuery("#datefrom").val());
alert("you only have".d1.DaysBetween(d2));
return false;
}
</code></pre>
<p>This however does not return the ammount of days between the dateto and datefrom fields, it is now driving me crazy, please any suggestions are appreciated.</p>
<p>Thanks, Simon</p>
<p>Ref to kalvins suggestion:</p>
<pre><code> if ( jQuery("#book_room_type").val() == "La Maison" ) {
alert("test");
var dategap = (jQuery("#dateto").val().getTime() - jQuery("#datefrom").getTime()) / (1000 * 60 * 60 * 24);
alert(dategap);
alert("test2");
return false;
}
</code></pre>
<p>This failed on the second alert and did not alert dates</p>
|
javascript jquery
|
[3, 5]
|
3,554,314
| 3,554,315
|
Lightbox with ability to open dialog at same time
|
<p>I have a photo gallery that I am working on and trying to do something that I can't figure out how to, or whether it is possible.</p>
<p>The page is at:
<a href="http://www.randykrohn.com/gallery/pictures.php?EventID=263" rel="nofollow">http://www.randykrohn.com/gallery/pictures.php?EventID=263</a></p>
<p>When you click a thumbnail it opens the large file in a Fancybox. In the bottom of the lightbox (the title, description area) there are icons to comment, share, or save the file options. I want to open a dialog box that someone can comment on the photo without having to close the lightbox if possible. Have tried several options to no avail. </p>
<p>I would be glad to take any suggestions on possible workarounds to get it to perform as desired without going to a java applet and or opening new windows.</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
570,583
| 570,584
|
JQuery scroll on hover or mousedown
|
<p>I have a gallery with thumbnails inside a container with <code>overflow:hidden</code> which I need to scroll. I already have it scrolling in steps on click, using <code>.scrollLeft()</code>. How to make it scroll smoothly on <code>mouseover</code>, or preferably on <code>mousedown</code> to the end of list? I'm looking for a way without plugins. </p>
<p>This is what I got for scroll on click.</p>
<pre><code>$("#slider").scrollLeft($("#slider").scrollLeft() + 200);
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,497,586
| 3,497,587
|
Bind ready event on javascript dom element creation
|
<p>i would like to know if we can bind a loaded or ready event on an item created by a script when the dom is loaded. I heard from live() but it's not something clickable, it's just an item which has to load.</p>
<p>Thanks for your help!</p>
|
javascript jquery
|
[3, 5]
|
254,875
| 254,876
|
jquery question regarding text change
|
<pre><code><script type="text/javascript">
$(function () {
var text3;
$('.HideButton').click(function () {
text3 = $('#MessageText').text;
var theButton = $(this);
$('#disclaimer').slideToggle('slow', function () {
theButton.val($(this).is(':visible') ? 'Hide' : 'Show');
});
$('<p>' + text3 + '</p>').addClass("new").insertAfter('#disclaimer');
return false;
});
});
</code></pre>
<p>updated...code above doesnt change the buttons text</p>
<p></p>
<pre><code><p id="disclaimer" > DDDDDDDDDDDDDDDDDDDDDDDDDD</p>
<asp:Button ID="Button1" CssClass="HideButton" runat="server" Text="Hide" />
</code></pre>
<p>I want the text of the button to change each time i press on it..But it doesnt</p>
<pre><code><p id="disclaimer" >
<input id="MessageText" type="text" />
</p>
<asp:Button ID="Button21" CssClass="HideButton" runat="server" Text="Hide" />
</code></pre>
<p>As message typed in the textbox..it should appear while "#disclaimer disappear</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
3,821,835
| 3,821,836
|
How to remove the duplicated part of string by comparing two string in Jquery or Javascript
|
<pre><code>$str1='<option value="AAA">AAA</option><option value="BBB">BBB</option><option value="CCC">CCC</option>';
$str2='<option value="CCC">CCC</option><option value="DDD">DDD</option>';
</code></pre>
<p>I would like the expected result as following. If some part of <code>$str2</code> which is duplicated with part of <code>$str1</code>, then removing the duplicated part of $str2.</p>
<p>Expected result:</p>
<pre><code>$expectedStr = '<option value="DDD">DDD</option>';
</code></pre>
<p>Can anyone help me?</p>
|
javascript jquery
|
[3, 5]
|
5,003,472
| 5,003,473
|
How to rewrite this Java snippet in C#
|
<p>This Java snippet apparently does what I want my C# snippet to do. I don't know Java well enough to get it to work. Could someone help me rewrite it in C#?</p>
<pre><code>int sum = 0, a[] = {2, 4, 6, 8};
for(int i: a) sum += i;
System.out.println("sum(a) = " + sum);
</code></pre>
|
c# java
|
[0, 1]
|
5,598,232
| 5,598,233
|
invalid argument jquery.js
|
<p>Webpage error details</p>
<p>Message: Invalid argument.
Line: 116
Char: 165
Code: 0
URI: /wp-includes/js/jquery/jquery.js?ver=1.4.2</p>
<p>I've searched everyhwere for answers. I've finally determined that this error is being caused by the php called in this page: <a href="http://pittsburghweddingphotographer.whsites.net/wedding-pricing/" rel="nofollow">http://pittsburghweddingphotographer.whsites.net/wedding-pricing/</a></p>
<p>This error comes up in IE8 and not Firefox.</p>
<p>The availability script (php code) was given to me by a friend. I simply replaced my info with his.</p>
<p>Would someone please assist me in working this out? Feel free to talk down to me, I'm not even a novice.</p>
|
javascript jquery
|
[3, 5]
|
2,594,952
| 2,594,953
|
Length of Number in JavaScript
|
<p>I'm looking to get the length of a number in javascript / jquery</p>
<p>I've tried <code>value.length</code> without any success, do I need to convert this to a string first?</p>
|
javascript jquery
|
[3, 5]
|
254,640
| 254,641
|
Replace issue in asp.net
|
<p>My string is Following:</p>
<pre><code>string mystring ="Test1234\r\ntest1234\r\ntest1234\r\ntest dhjfadhdfsfdsjfdf";
</code></pre>
<p>It comes from a database and I want to display it in a label as usual format. So, I want to replace <code>\r\n</code> to <code><br></code>.</p>
<p>I tried using <code>NewString= mystring .Replace('\r\n','<br>');</code>, but it didn't work. </p>
<p>I got the following error</p>
<blockquote>
<p>To many characters in character literal`.If this is not a correct way to do suggest.Thanks.</p>
</blockquote>
|
c# asp.net
|
[0, 9]
|
5,213,705
| 5,213,706
|
Best way to do a setting in ASP.net
|
<p>With settings, I've always had some const variable in a file somewhere. Is it possible to create a new config file with all my settings for my website? IE:</p>
<pre><code>CONST imagePrefixPath = "http://img.domain.com/"
</code></pre>
<p>Is the sort of thing I want to store and use all over my web code</p>
|
c# asp.net
|
[0, 9]
|
1,374,758
| 1,374,759
|
Dataset in an If condition
|
<p>I am still in the process of learning Asp.Net. I have a question . I was using an if condition in which i was checking dataset values. It is throwing me an exception whenever it is checking the condition as the dataset has not got any value. How to overcome this.
Code for this is here:</p>
<p>DataSet ds = merchant.getIsactiveIsconfirmedforcancelaccount(merchantID);</p>
<pre><code>if (_merchant.PackageID == (int)CommonHelper.Package.Free && _merchant.AccountStatus.Contains("Awaiting"))
{
spnMerchantActiveStatus.InnerHtml = ApplicationData.MSG_AWAITING_CONFIRMATION;
}
***else if ((ds.Tables[0].Rows[0]["IsConfirmed"]).ToString() == "True" && (ds.Tables[0].Rows[0]["Active"]).ToString() == "N")***
{
_merchant.AccountStatus = "Cancelled";
spnMerchantActiveStatus.InnerHtml = _merchant.AccountStatus;
}
else if(_merchant.PackageID != (int)CommonHelper.Package.Free && ds1.Tables[0].Rows.Count == 0 && (ds2.Tables[0].Rows[0]["ConfirmationSrc"]).ToString() == "Admin")
{
_merchant.AccountStatus = "Free Trial";
spnMerchantActiveStatus.InnerHtml = _merchant.AccountStatus;
}
else
spnMerchantActiveStatus.InnerHtml = _merchant.AccountStatus;
}
</code></pre>
<p>The exception here is "There is no row at position 0."</p>
|
c# asp.net
|
[0, 9]
|
4,813,392
| 4,813,393
|
Replace input value .val() with jQuery
|
<p>So basically here is my jsFiddle - <a href="http://jsfiddle.net/CmNFu/" rel="nofollow">http://jsfiddle.net/CmNFu/</a> .</p>
<p>And code also here -</p>
<p>HTML -</p>
<pre><code><b style="float: left; margin-right: 10px;">category 1</b><input type="checkbox" value="category1" style="float: left;" class="portfolio-category" /><br />
<b style="float: left; margin-right: 10px;">category 2</b><input type="checkbox" value="category2" style="float: left;" class="portfolio-category" /><br />
<br />
<br />
<input type="text" name="categories" id="portfolio-categories" />
</code></pre>
<p>jQuery -</p>
<pre><code>jQuery(document).ready(function() {
jQuery(".portfolio-category").click(function() {
if(jQuery(this).is(":checked")) {
jQuery("#portfolio-categories").val(jQuery("#portfolio-categories").val()+" "+jQuery(this).val());
}
else {
var portfolioCategories = jQuery("#portfolio-categories").val();
alert("before + "+portfolioCategories);
var currentElement = jQuery(this).val()+" ";
alert(currentElement);
portfolioCategories = portfolioCategories.replace(currentElement, "");
alert(portfolioCategories);
}
});
});
</code></pre>
<p>Well basically what I would like to achieve is, when user checks the checkbox, the value automatically adds inside input field (Done, it's working, whooray!), but the problem is when it unchecks the checkbox, the value should be removed from input box (the problem starts here), it doesn't remove anything. You can see I tried assigning val() function to variables, but also without success. Check my example on jsFiddle to see it live. </p>
<p>Any suggestions? I guess replace() is not working for val(), is it?</p>
<p>So, is there any other suggestions?</p>
|
javascript jquery
|
[3, 5]
|
2,958,012
| 2,958,013
|
jQuery multi level selector does not work but .children does
|
<p>I have this javascript code which works fine</p>
<pre><code>var QuestionID = panel.siblings('.QuestionIDWrapper').children('input[type=hidden]').val();
</code></pre>
<p>but if I convert it to use a multi level jQuery selector like this:</p>
<pre><code>var QuestionID = panel.siblings('.QuestionIDWrapper input[type=hidden]').val();
</code></pre>
<p>I don't get any value in QuestionID.</p>
|
javascript jquery
|
[3, 5]
|
4,223,366
| 4,223,367
|
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><script type="text/javascript">
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]
|
837,241
| 837,242
|
how do i assign value of php variable to javascript variable
|
<pre><code><html>
<head>
<?php
$bldg_number=-1;
?>
<script language="javascript" type="text/javascript">
var bldg=<?php echo $bldg_number; ?>
if( bldg < 0)
{
alert("me");
}
else
{
alert("hi");
}
</script>
</code></pre>
<p>
<strong>i was expecting the output a alert with message me but there is no output when i am running this page please tell me why the value of php variable is not passing to javscript variable</strong></p>
|
php javascript
|
[2, 3]
|
2,168,228
| 2,168,229
|
Page_ClientValidate() Question
|
<pre><code>function Subscribe() {
if (typeof (Page_ClientValidate) == 'function') {
Page_ClientValidate();
}
if (Page_IsValid) {
// do something
CheckUser();
}
}
</code></pre>
<p>The script is tied to an asp.net button with regular expression validators. I have another form on my page with a different validation group specified.</p>
<p>When I click on this button (with all conditions met). It fires an error on the other validationgroup. How and why is this happening? Is there a way to counter this?</p>
<p>Its as if Javascript is validating all fields irrespective of which group they are from/in</p>
|
javascript asp.net
|
[3, 9]
|
4,550,227
| 4,550,228
|
how to find element after some text with javascript?
|
<p>I have a HTML file with some text (like <code>'bla-bla'</code>) inside. I want to get a specific element (like <code><a href=...</code>) after this text node.</p>
<p>How can I do that with pure JavaScript or jQuery?</p>
<p>example html:</p>
<p><div>jdlgjalfad dfaldfdalf <strong>bla-bla</strong>
fdfadf afd <br/>
<table>...<td></td></table> <strong><a
href="some_link">here</a></strong></div></p>
|
javascript jquery
|
[3, 5]
|
4,768,236
| 4,768,237
|
adding functions to injected elements
|
<p>Okay how can i add function to injected elements(which that element dosent exist on first browser load). Please read through my example carefully , i hope you can understand.</p>
<p>For example:
i go to www.website.com , when it loads it loads up "functions.js" and "other.js" , inside "functions.js" there's a code that injects a new div with ID when user click on a button.</p>
<p>The injection code as shown below:(functions.js --jquery)</p>
<pre><code>$('a#button').click(function(){
$('a#button').after('<div id="new">New div<br><a href="#" id="newdivlink">Another link</a></div>');
});
</code></pre>
<p>However there's another on click functions loaded in another js file which is "other.js" (loaded same time as function.js load).</p>
<p>Inside "other.js" has the code for the onclick function when the new div's link (#newdivlink) is clicked.</p>
<p>other.js :</p>
<pre><code>$('a#newdivlink').click(function(){
alert('you clicked on new div's link yay?');
});
</code></pre>
<p>But the problem is , the onclick function for the new div's link(#newdivlink) cant be executed as the script can't find the div (as it is being injected after i loads).
Or is there some problems ?</p>
<p>P/S if you are asking why not combine both scripts , i don't want, as i want to try this technique out.</p>
|
javascript jquery
|
[3, 5]
|
360,705
| 360,706
|
Activate shortcut key on a link
|
<p>I want to activate a "ctrl+f1" shortcut key on a link? I am using scriptish! </p>
<p>i.e when I press "ctrl+f1" on a link it start to download, I want this action to take place automatically when the page is loaded?</p>
|
javascript jquery
|
[3, 5]
|
4,130,785
| 4,130,786
|
Prevent div inside of list item to slide up
|
<p>In my menu i have a list item with login fields : </p>
<pre><code> <li class='has-sub' onclick="LoginButtonClicked()" style="float: right">
<a href='#' id="notificationList">
<span>Log in2</span>
</a>
<ul class="loginBox" style="display: none; height: 300px; overflow-y: auto;">
<li>
<div id="Div1" style="background: #0fa1e0; padding: 4px;">
<input type="text" value="LoginName" />
<input type="text" value="Password" />
</div>
</li>
</ul>
</li>
</code></pre>
<p>when i click on li class LoginButtonClicked function gets fired and ul slides down: </p>
<pre><code>var loginUserMenuChoosen = false;
function LoginButtonClicked() {
console.log(loginUserMenuChoosen);
if (loginUserMenuChoosen == false) {
loginUserMenuChoosen = true;
$('.loginBox').slideDown(200);
//$('.masterPageNotifier').val("0");
}
else if (loginUserMenuChoosen == true) {
loginUserMenuChoosen = false;
$('.loginBox').slideUp(200);
}
}
</code></pre>
<p>The problem here is, that when i select text fields inside list item it also keep sliding up. how do i prevent this? </p>
<p>here is a fiddle <a href="http://jsfiddle.net/fAKzw/" rel="nofollow">http://jsfiddle.net/fAKzw/</a></p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
369,959
| 369,960
|
Input Boxes validation with JQuery
|
<p>Hello this is my second attempt to solve this problem with JQuery<br>
I need Check that a row of input must be minor than other one in the same row for a dinamic table of "n" rows, before send my form...I need check row by row using the input "ID" property...</p>
<p>Here my Code: <a href="http://jsfiddle.net/cespinoza/bQcu2/36/" rel="nofollow">http://jsfiddle.net/cespinoza/bQcu2/36/</a></p>
<pre><code> <form >
Line 1 Get <input type="val1" name="text1" id="desp" /> from <input type="val1" name="text1" id="cantidad" /><br>
Line 2 Get <input type="val2" name="text2" id="desp" /> from <input type="val2" name="text2" id="cantidad" /><br>
Line 3 Get <input type="val3" name="text3" id="desp" /> from <input type="val3" name="text3" id="cantidad" /><br>
<button type="submit">Submit</button>
</form>
</code></pre>
<p>Edited: Added the Original JS code</p>
<pre><code>$('#desp').change(function(){
if($('#desp').val() == $('#cantidad').val())
{
alert("First value is greater than second, sorry")
return False;
}
else
{
alert("All ok, push to database")
return True,
}
});
</code></pre>
<p>Thanks in Advance.<br>
Christian.</p>
|
javascript jquery
|
[3, 5]
|
1,026,885
| 1,026,886
|
Looking for better/elegant solution to this Jquery code
|
<p>To continue along my elegant solution series I am trying to figure out how to do this in a better way.</p>
<p>I am cycling through all the <code>a</code> tags and trying to modify the href.</p>
<p>This code works but seems sloppy and would love to know how to do this more efficiently.</p>
<pre><code>$('a').each(function(){
x=$(this).attr('href').replace(/mls\_number/i,'interior=yes&mls_number');
$(this).attr('href', x);
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,791,268
| 5,791,269
|
Creating a new file in the root of an ext2 file system
|
<p>I am creating an application for Android which enables users to create encrypted LUKS partitions and then mount them to given directories on external memory.
For the partition to be usable I create an ext2 file system using the Busybox mkfs.ext2 command. The problem occurs once a user tries to create a file/directory at the root of the partition. For some reason it is impossible to create a file through Java as the "File.mkdirs()" method fails. However, it is possible to create this file through the command-line. And this error occurs only when at the root of the partition (i.e if I create a folder through the command line I am then able to create files within that folder through Java). Also, I am able to create a file if I create a vfat file system instead of ext2.</p>
<p>Any help would be greatly appreciated.</p>
<p>Harry</p>
<p><strong>EDIT</strong></p>
<p>Fixed. I was mounting the file system as root</p>
|
java android
|
[1, 4]
|
986,269
| 986,270
|
Trying to pass an int between two classes on Android platform
|
<p>I'm trying to pass an int between two classes using a bundle. I have looked online and it seems like it should be easy to do, its just not working for me :( any help is much appreciated! I am trying to pass the int life from one page to another in a simple game.</p>
<p>here is the code for the first page where I am passing it from </p>
<pre><code>int life = 5;
....
if(input.equalsIgnoreCase(teststr))
{
Intent i = new Intent("com.name.PAGETWO");
i.putExtra("com.name.PAGETWO.life", life);
startActivity(i);
mpButtonClick.stop();
}
</code></pre>
<p>And on the second page, trying to receive the int </p>
<pre><code>Intent i = new Intent("com.name.PAGETWO");
Bundle extras = i.getExtras();
int temp2 = extras.getInt("life");
int life = temp2;
</code></pre>
<p>when i try to run it, it tries to go on to the second page and then just says the application has unexpectedly stopped, but when i comment out the code it continues running as normal, so i know i am definitely putting in the code here wrong somewhere. thanks in advance!</p>
|
java android
|
[1, 4]
|
3,428,462
| 3,428,463
|
What does '!!' do in Javascript?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/784929/what-is-the-operator-in-javascript">What is the !! operator in JavaScript?</a> </p>
</blockquote>
<p>Seen in jQuery's <a href="https://github.com/jquery/jquery/blob/master/src/ajax.js" rel="nofollow" title="ajax.js">ajax.js</a> file (look near the bottom).</p>
<pre><code>jQuery.support.ajax = !!jQuery.ajaxSettings.xhr();
</code></pre>
<p>What does <code>!!</code> do? Isn't a double negative useless?</p>
|
javascript jquery
|
[3, 5]
|
737,088
| 737,089
|
DHTML newbie question
|
<p>I have just started learning Javascript and I am absolutely overwhelmed with the number of technologies available especially on the browser side. Earlier I thought that just Javascript should suffice but now it appears that I need to understand JQuery, GWT, YUI and another dozen acronyms I do not even know the expansion for. Can somebody please tell me which are the most essential technologies one needs to be fluent with in this domain?</p>
|
javascript jquery
|
[3, 5]
|
4,437,555
| 4,437,556
|
Call a JavaScript function depending on the value of a PHP variable
|
<p>I am passing a variable via the URL as <code>var=5</code> to <code>urlrun.php</code> (like <code>urlrun.php?var=5</code>). There is a JavaScript function called <code>testrun</code> in <code>urlrun.php</code>.</p>
<p><strong>Is there a way to call that JavaScript function depending on the value of that variable (<code>var</code>) passed through the URL?</strong></p>
<p>For example, <code>if($_GET['var']==5)</code>, I need to call that JavaScript function.</p>
|
php javascript
|
[2, 3]
|
3,491,843
| 3,491,844
|
jQuery click event on 1000 divs, optimize approach?
|
<p>I'm building a system for selling tickets to events. Right now there are about 1000 diffrent seats to choose from as a visitor. Maby one day it will be up to 5000.</p>
<p>Right now I have a div for each spot and then some jQuery to reserv the spot with ajax. So that meens that I have about 1000 divs and more alarming my jQuery selector sets a click event on each div.</p>
<p>Is there a better approach on this? </p>
<p>I want to trigger ajax when a div is pressed, not reloading the page.</p>
|
javascript jquery
|
[3, 5]
|
123,983
| 123,984
|
Caching selectors in objects using jQuery
|
<p>I was writing a bit of simple UI stuff today and am only able to use jQuery for the project, no Backbone, KnockoutJS, etc...</p>
<p>So, basically I wrote some objects that look like this-ish...</p>
<pre><code>var UI = UI || {};
UI.login = (function($){
function Welcome(){
this.firstName = $("#firstName");
this.lastName = $("#lastName");
this.email = $("#email");
this.password = $("#password");
this.message = $("#message");
this.init();
}
Welcome.prototype.init = function(){
this.email.bind('blur', $.proxy(this.checkEmail, this));
// etc..etc...
};
Welcome.prototype.checkEmail = function(event){
var email = $(event.currentTarget).val();
if(!checkEmail(email)){
this.message.html('This email is invalid.')
.show();
}
};
function checkEmail(email){
// do dome validation
return isValid;
}
// etc.. etc...
return Welcome;
}(jQuery))
</code></pre>
<p>My question is... Is caching those selectors in the Welcome constructor a GOOD or BAD idea? Also, I'd like to maybe just get some feedback on this pattern...</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
1,411,046
| 1,411,047
|
jquery/javascript wait for a function to complete
|
<p>I have script that performs from DOM manipulation to change the way a div looks. The way the application is, when the page loads, the div is rendered in its original state, the function manipulates the DIV. The problem is it renders the original div before rendering the changed div.</p>
<p>I tried:</p>
<pre><code>//Make div invisible
//Call function to change the DIV
//Make div visible
</code></pre>
<p>This does not work</p>
|
javascript jquery
|
[3, 5]
|
1,202,787
| 1,202,788
|
how to bulk print using asp.net, c#
|
<p>when i enter roll no it displays name, marks obtained in all subjects and pass/fail of the student and i can print clicking on print button. But the problem is i want to print all students record continuously by clicking only one time on [Print] button.
I used loop like this</p>
<pre><code>for(int i=1;i<studentno.count;i++)
{
bindgrid(i); // i is the roll no of the student
Session["ctrl"] = Panel1;
ClientScript.RegisterStartupScript(this.GetType(), "onclick", "<script language=javascript>window.open('Print.aspx','PrintMe','height=300px,width=300px,scrollbars=1');</script>");
}
</code></pre>
<p>but it prints only the last one.</p>
|
c# asp.net
|
[0, 9]
|
3,319,392
| 3,319,393
|
Postback Error?
|
<p>I wonder why if anyone has idea of this error?
My ASP.Net page was working fine when publish on my Win7 IIS7 and on another Server 2008 IIS7, but today when I do the same one for another Server 2008, all the ajax postback gives this error:</p>
<pre><code>#Exception Message:
Exception of type 'System.Web.HttpUnhandledException' was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.office_desktop_wlogin_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\paradigmasp\77933d43\29398497\App_Web_npn2130s.2.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
</code></pre>
<p>I wonder what will be the possible reason for the error?</p>
<p>Thanks in advance...</p>
|
c# asp.net
|
[0, 9]
|
610,662
| 610,663
|
What does this mean?
|
<pre><code>function fkey(a) {
a || (a = {});
if (!a.fkey) a.fkey = $("input[name='fkey']").attr("value");
return a
}
</code></pre>
<p>I guess <code>a</code> is actually a function, but how to understand <code>(!a.fkey)</code> ?</p>
|
javascript jquery
|
[3, 5]
|
1,458,958
| 1,458,959
|
How to set <s:param> value of <s:url> tag dynamically using javascript in struts2
|
<p>I am new to Struts2.I unable to pass tag value dynamically through javascript.I have done this way </p>
<pre><code><s:url id="temId" action="updateProduct.action" var="productTag">
<s:param name="prodId"><s:property value="hdnId"/></s:param>
</s:url>
<s:hidden name="hdnId"/>
</code></pre>
<p>this hidden field value is populated through javascript function onclick on gridrow
This hidden field is storing value properly.But it is not showing inside of param tag.please give some possible solution</p>
|
java javascript
|
[1, 3]
|
4,935,924
| 4,935,925
|
Update json value if attempt is made to same key name
|
<p>I'm attempting to write a function which updates a json key value if an attempt is made to add a new key with same name</p>
<p>So in fiddle - <a href="http://jsfiddle.net/adrianjsfiddlenetuser/C6Ssa/57/" rel="nofollow">http://jsfiddle.net/adrianjsfiddlenetuser/C6Ssa/57/</a></p>
<p>When the button "Add" is clicked the jSon array toUpdate should be updated : </p>
<pre><code> name: "addThis2",
id : 10
</code></pre>
<p>should become </p>
<pre><code> name: "addThis2",
id : 11
</code></pre>
<p>This is not occuring ?</p>
<p>Sample JSON : </p>
<pre><code>{
"toAdd": [
{
"name": "addThis",
"id": 10
}
],
"toRemove": [
{
"name": "removeThis"
}
]
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,398,275
| 5,398,276
|
How to use jQuery/Javascript to fadein/out text after a while
|
<p>On <a href="http://envylabs.com/" rel="nofollow">Envylabs' site</a> they have a feature where, below the logo, some text keeps changing after a few seconds. </p>
<p>I'm trying to find out what kind of JS/jquery function would do that. Can someone point to a tutorial for this?</p>
|
javascript jquery
|
[3, 5]
|
1,039,227
| 1,039,228
|
click event is firing asynchronasly
|
<p>I have a click event attached to an anchor, and I'm using multiple anchors. The user may click these anchors randomly, and each anchor click creates a dynamic UL list. Everything is working fine except when the user clicks the anchors fast, creation of UL list is happening asynchronously. I want the events to be ordered synchronously. Any solution?</p>
|
jquery asp.net
|
[5, 9]
|
262,873
| 262,874
|
jQuery get context?
|
<p>Having this code : </p>
<pre><code> $(".toggle", '.Div1').on('click',function ()
{
alert("I was clicked becuase im .toggle is under the context of _________");
});
</code></pre>
<p>I need to get the context which the <code>$(this)</code> value is under.</p>
<p>How can I get the value of <code>_______</code> ? </p>
|
javascript jquery
|
[3, 5]
|
3,142,743
| 3,142,744
|
Manipulation of Input checkbox
|
<p>Is there anyone who can help me how can for this logic using jQuery?</p>
<p>I have two checkboxes in my form. Once I click the first checkbox, the second checkbox will also check and vice versa. I hope you can help me. Thank you!</p>
|
javascript jquery
|
[3, 5]
|
4,419,754
| 4,419,755
|
jquery form change
|
<p>In jQuery, is there a simple way to test if ANY of a forms elements have changed?</p>
<p><strong>EDIT:</strong> I should have added that I only need to check on a click() event.</p>
<p><strong>EDIT:</strong> Sorry I really should have been more specific! Say I have a form. And I have a button with the following:</p>
<pre><code>$('#mybutton').click(function() {
//here is where is need to test.
if( FORM has changed ) {
do something
}
});
</code></pre>
<p>how would I test if the form has changed since it was loaded?</p>
|
javascript jquery
|
[3, 5]
|
2,180,857
| 2,180,858
|
JQuery's .append() executes 6 times instead of 1
|
<p>Basically, what I'm trying to do is create a marquee type thing by scrolling vertically through the banners and then moving each to the bottom after it is out of view. I can't figure out why the banner is being appended six times. I realize that it's not quite complete so don't make a remark about that please. If you have a better suggestion, let me know. <a href="http://jsfiddle.net/vCuHc/2/" rel="nofollow">http://jsfiddle.net/vCuHc/2/</a></p>
<p><strong>EDIT:</strong> How can I append the top element to the bottom and then remove the top element also?</p>
|
javascript jquery
|
[3, 5]
|
3,640,194
| 3,640,195
|
Is it possible to play two audios simultaneously in one media player in android..?
|
<p>Im developing an app where i want to play two mp3 files simultaneously one as background music and add another mp3 in the middle of the background music. </p>
|
java android
|
[1, 4]
|
5,758,732
| 5,758,733
|
Using If Else in HTML page inside <%# %>tags
|
<p>I have to set image on the basis of fields value coming from db. I want it to achieve via. tags <%# %>. For example i have collection binded with grid. It has a Field called Online which is boolean. So if the value of Online is true then the green.png will be set as path of asp:image control else grey.png will be the path of the asp: image control.</p>
|
c# asp.net
|
[0, 9]
|
1,919,652
| 1,919,653
|
Javascript: parseInt() with trailing characters
|
<p><code>parseInt("7em", 10);</code> returns <code>7</code> in all browsers I tested [*]. But can I rely on this?</p>
<p>The reason I ask is, that I want to perform some calculations based on em, like</p>
<pre><code>/* elem1.style.top uses em units */
elem2.style.top = parseInt(elem1.style.top, 10) + 1 + "em";
</code></pre>
<p>I could do this with regular expressions, but parseInt is easier to use, and probably a bit faster. Or is there another solution (maybe using jQuery)?</p>
<p>[*] Tested so far on: IE 6, IE 8, Safari 4, Firefox 3.6, Opera 10.5</p>
|
javascript jquery
|
[3, 5]
|
5,388,151
| 5,388,152
|
Is it possible to bounce an image with jQuery
|
<p>Hi i trying to bounce a jpg with jquery but its not going anywhere you can check the code at</p>
<p><a href="http://jsfiddle.net/sethportman/WZumy/6/" rel="nofollow">http://jsfiddle.net/sethportman/WZumy/6/</a></p>
|
javascript jquery
|
[3, 5]
|
1,402,481
| 1,402,482
|
Final variables finding views in android
|
<p>why the vast majority of examples of android declares the return variable as final in methods like findViewById(id)? For example:</p>
<pre><code>@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_list_enc_disp);
final ListView listViewEncDisp = (ListView) findViewById(R.id.listViewEncDisp);
listViewEncDisp.setOnItemClickListener(this);
}
</code></pre>
<p>I know that a final variable can not be assigned again, however do not understand why you need this good habit.
Thanks in advance</p>
|
java android
|
[1, 4]
|
1,523,767
| 1,523,768
|
Why does jQuery complain about an "invalid left-hand assignment"?
|
<pre><code>function auditUpdate(newval) {
jQuery("#audit").val() = newval;
jQuery("#auditForm").submit();
}
</code></pre>
<p>Why do I get an error where I try to assign newval to the <code>#audit</code> value?</p>
|
javascript jquery
|
[3, 5]
|
588,111
| 588,112
|
jQuery: How does one use .live() on an existing event handler (Cloud Zoom Plugin)?
|
<p>Not sure how to phrase this properly, so please bear with me. I have a piece of jQuery that looks like the following:</p>
<pre><code>jQuery(document).ready(function() {
$('#main-image').live('mouseover', function() {
$(this).wrap(function() {
return '<a href=' + $(this).attr('src').replace(/\bproduct\b/, 'original') + ' class="cloud-zoom" id="zoom1" rel="adjustX: 10, adjustY:-4, position: \'inside\'">';
});
});
$('#main-image').live('mouseout', function() {
var link_element = $(this).closest('a');
link_element.parent().append($(this));
link_element.remove();
});
});
</code></pre>
<p>My HTML markup is straight forward as well:</p>
<pre><code><img alt="foo" id="main-image" src="/assets/products/1051/product/Perspective_View-0.jpeg?1290039436">
</code></pre>
<p>The problem I have is I'm trying to use the cloud zoom jQuery plugin: <a href="http://www.professorcloud.com/mainsite/cloud-zoom.htm" rel="nofollow">http://www.professorcloud.com/mainsite/cloud-zoom.htm</a> and it doesn't like the nature of the way I'm binding events here. If I predefine the anchor tag as the wrap() invocation does statically in my HTML, the plugin works perfectly. If I add the anchor tag dynamically to the DOM, cloud zoom does not work. The reason I cannot do it statically is I have a row of photos, and once you click on one of those photos, it goes to the main-image element where it is enlarged. At that point, I want cloud zoom to bind itself to the image. The JavaScript above works great at adding itself and removing itself dynamically around the img tag, however it doesn't bode well with cloud zoom as the event handler that's in cloud zoom is probably attaching itself to the anchor tags on DOM load, not any point after. </p>
<p>Is there anyway to go around fixing this, or will it require hacking the cloud zoom source to also include some kind of jQuery.live() functionality?</p>
|
javascript jquery
|
[3, 5]
|
4,679,281
| 4,679,282
|
Is it possible to add transparency to jpg in Java and Android
|
<p>I want to load some images to the cloud, but I want to add some protections when someone views the photos and saves the images; they will not see anything because of the transparency. </p>
<p>would the code be common for Java and Android? I would like to prototype it in Java first.</p>
<p>I have found some code that combines two files. One file is my main file the other is a transparent file. The combined file does not have a transparent overlay. </p>
<p>Do I need to use an image drawing order?
<a href="http://www.developer.nokia.com/document/Java_Developers_Library_v2/GUID-D3E35E6F-0C45-48ED-B09D-F716E14C1C02/javax/microedition/amms/control/imageeffect/OverlayControl.html" rel="nofollow">http://www.developer.nokia.com/document/Java_Developers_Library_v2/GUID-D3E35E6F-0C45-48ED-B09D-F716E14C1C02/javax/microedition/amms/control/imageeffect/OverlayControl.html</a></p>
<pre><code> BufferedImage image = ImageIO.read(new File("rose.jpg"));
BufferedImage overlay = ImageIO.read(new File("myimg1.gif"));
// create the new image, canvas size is the max. of both image sizes
int w = Math.max(image.getWidth(), overlay.getWidth());
int h = Math.max(image.getHeight(), overlay.getHeight());
BufferedImage combined = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
// paint both images, preserving the alpha channels
Graphics g = combined.getGraphics();
g.drawImage(image, 0, 0, null);
g.drawImage(overlay, 0, 0, null);
// Save as new image
ImageIO.write(combined, "PNG", new File("combined.png"));
</code></pre>
|
java android
|
[1, 4]
|
891,929
| 891,930
|
Variable from JavaScript to PHP
|
<p>Here is the code:</p>
<pre><code> $('#sousmenu a').click (function (){
startSlideshow(<?php echo json_encode(glob("photos-" .$_GET["folder"]. "/*.jpg"));?>);
return false;
});
</code></pre>
<p>The question is I like the HREF to change and get caught by PHP, now it doesn't do anything, but writing the <code>?folder=portraits</code> works.</p>
<p><a href="http://www.studioteknik.com/html2/photo-portfolio.php" rel="nofollow">Here is the page</a>.</p>
<p><em><strong></em> Simpler <em>*</em></strong>
Maybe I am not clear, it happens sometimes!</p>
<p>I want the link href to be send to this PHP function,</p>
<pre><code><?php echo json_encode(glob("photos-" .(i what the href link). "/*.jpg"));?>
</code></pre>
<p>so clicking on the link <code>animaux</code> will send <code>animaux</code> to the <code>glob()</code> PHP function and will get all the .jpg files in the <code>photos-animaux</code> folder.</p>
<p>Clicking on the portraits will send the photo-portraits, etc.</p>
|
php javascript jquery
|
[2, 3, 5]
|
1,524,634
| 1,524,635
|
3 layer design question, binding data to form
|
<p>I want to bind controls on form to a data from database, the binding happens in codebehind. </p>
<p>I want to use 3 layer pattern, DAL layer that will use Entity Framework, BLL that will use DAL to retrieve the data, and my form to display it.</p>
<p>Let's say there is an Entity object called Product with 3 properties: Name, Count, Price </p>
<p>I want to bind them to 3 text boxes on the from.</p>
<p>from code behind I call BLL's method that will call DAL method to retrieve the needed entity object...</p>
<p>Here is the problem, in order to bind data on the form, form must "know" about this entityObject that returned by BLL.</p>
<p>So I could do this: </p>
<pre><code>DataAccessLayer.Product product = BusinessLogicLayer.GetProduct(someid);
textbox1.text=product.name;
textbox2.text=product.price;
....
</code></pre>
<p>But this breaks the 3-layer pattern!!
How to be? Create a new object just to hold this data?</p>
|
c# asp.net
|
[0, 9]
|
4,746,408
| 4,746,409
|
How do I create my own confirm Dialog?
|
<p>The confirm box only has two options: ok and cancel.</p>
<p>I'd like to make one myself, so I can add a third button: save and continue. But the issue I currently don't know how to solve, is that: once the custom confirm dialog is up, how do I block the previously running script (or navigation) from running? and then how do I make the buttons return values for the confirmation?</p>
<p>my understanding of the confirm dialog box is this:
it's a visual boolean, that has the power to block navigation and scripts on a page. So, how do I emulate that?</p>
|
javascript jquery
|
[3, 5]
|
2,396,788
| 2,396,789
|
Inject Javascript from asp.net code behind files
|
<p>Am I injecting this correctly,</p>
<pre><code> string myScriptName = "EventScriptBlock";
string myScript = string.Empty;
//Verify script isn't already registered
if (!ClientScript.IsClientScriptBlockRegistered(myScriptName))
{
Response.Write('b');
myScript = "\n<script type=\"text/javascript\" language=\"Javascript\" id=\"EventScriptBlock\">\n";
myScript += "alert('hi');";
myScript += "\n\n </script>";
ClientScript.RegisterClientScriptBlock(this.GetType(), myScriptName, myScript);
}
</code></pre>
<p>This is in my page load, but I never see an alert and I have no Javascript errors either.</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
4,107,578
| 4,107,579
|
check the 'checked' value of all children checkboxes
|
<p>Sorry, my JS is not the best, I need some help on something I am sure is simple.</p>
<p>Basically I have my parent node (it can change, but that's okay, I'm getting the Parent correctly), but I now need to know if every child checkbox of that parent is checked (if so return 1) or if 1 or more child checkboxes is unchecked return 0.</p>
<p>Any help would be great!</p>
|
javascript jquery
|
[3, 5]
|
4,952,548
| 4,952,549
|
Calling Function in a forloop
|
<p>I am trying to call a function inside the FOR LOOP. Since the format is same except for names of the data passed.</p>
<pre><code>renderCharts(data1, axis1, 'mainchart1');
</code></pre>
<p>What i am doing</p>
<pre><code>var data1 = [12, 45, 30, 80];
var axis1 = ['15 Jan', '22 Jan', '29 Jan', '5 Feb'];
var data2 = [89, 45, 30, 80];
var axis2 = ['15 Jan', '22 Jan', '29 Jan', '5 Feb'];
for(var i = 1; i <= 2; i++){
renderCharts("data"+i, "data"+i, "mainchart"+i)
}
</code></pre>
<p>Some reason its not working.</p>
|
javascript jquery
|
[3, 5]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.