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 |
---|---|---|---|---|---|
1,677,071 | 1,677,072 |
How to prevent a button to submit?
|
<p>I am new to jquery/javascript so maybe I am taking a complete wrong path here.</p>
<p>I have a button within my form, and its job is just doing some DOM manipulation. Certainly not submitting the form.</p>
<pre><code><button id="add_deals_button" class="btn btn-success"></button>
</code></pre>
<p>In my js file I have written the following:</p>
<pre><code>$(document).ready(function () {
$("#add_deals_button").click(add_deals)
});
</code></pre>
<p>When I click the button, it does the DOM manipulation, but also it sends a POST, hence submits the form. How do I prevent the button from submitting anything?</p>
<p><strong>UPDATE:</strong></p>
<pre><code>function add_deals(e){
$('#hidden_deals').clone().attr({'class':'none'}).appendTo('#deal_status tbody')
}
</code></pre>
<p>Thanks,</p>
|
javascript jquery
|
[3, 5]
|
4,365,653 | 4,365,654 |
Active links don't show the class name added when the page is refreshed or when the same link is clicked from another page
|
<p>Script:</p>
<pre><code>$(".classname li a").each(function() {
var hreflink = $(this).attr("href");
if (hreflink == location.href) {
$(this).addClass("active");
} else {
$(this).removeClass("active");
}
});
</code></pre>
<p>CSS:</p>
<pre><code>.classname li a.active{color:#ef9223;}
</code></pre>
<p>Whenever I do a page refresh, if the same link is on a different page, the active class is no longer applied to that link.</p>
<p>Actual exmple
i have the following Navigation links A B C D E F G H .... Z. And the same Navigation is in the main page(header section).. so when i click on any one link .. it needs to be active on when i arrive to any one A B C D E..or Z pages. And even on page refresh it needs to retain the active link. Hope that explains...and helps :)</p>
<p>Any help, inputs, solution would be much appreciated.</p>
|
javascript jquery
|
[3, 5]
|
5,323,814 | 5,323,815 |
Search Engine Optimization (SEO) & Friendly URLs using ASP.Net
|
<p>please tell me best to achieve Search Engine Optimization (SEO) & Friendly URLs using ASP.Net</p>
|
c# asp.net
|
[0, 9]
|
1,037,443 | 1,037,444 |
How to properly hide selected dropdown?
|
<p>I'm trying to achieve something similar to the bootstrap button drop downs (<a href="http://twitter.github.io/bootstrap/components.html#buttonDropdowns" rel="nofollow">http://twitter.github.io/bootstrap/components.html#buttonDropdowns</a>) but need something lightweight. Basic functionality is more or less this:</p>
<ul>
<li>On clicking the link, corresponding dropdown div opens (works)</li>
<li>On clicking another link, the previous dropdown closes as well as the css class is removed (works)</li>
<li>On clicking on the link of the opened dropdown, close the dropdown (does not work (closes and reopens))</li>
<li>On clicking anywhere in the body (so outside the link and dropdown), close the dropdown (does not work)</li>
</ul>
<p>What should be the logic behind this?</p>
<p><strong>Demo:</strong> <a href="http://jsfiddle.net/fU2BZ/" rel="nofollow">http://jsfiddle.net/fU2BZ/</a></p>
<p>Does the code below make sense?</p>
<pre><code>$(document).click( function(){
$('.dropdownbox').hide(0);
$('.dropdown').removeClass('active');
});
$('.dropdown').click( function(event){
event.stopPropagation();
$('.dropdown').removeClass('active');
$('.dropdownbox').hide();
$(this).addClass('active').find('.dropdownbox').slideToggle(200);
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
513,289 | 513,290 |
how to play a sound in asp.net web page?
|
<p>I want to play some sounds in my web page once I click a button .
this is my code but it shows an error.</p>
<pre><code>SoundPlayer x = new SoundPlayer();
x.SoundLocation = "WindowsBalloon.wav";
//x.Play();
x.PlaySync();
</code></pre>
<p>error: Please be sure a sound file exists at the specified location.</p>
<p>but the file exists in my project .and I'm sure that the address is correct.</p>
|
c# asp.net
|
[0, 9]
|
5,267,095 | 5,267,096 |
link jquery from google code?
|
<p>could one link the latest jquery from google code instead of having a local copy?</p>
<p>if yes, could someone provide me the link for it so i can link it in from javascript.</p>
<p>thanks!</p>
|
javascript jquery
|
[3, 5]
|
1,676,248 | 1,676,249 |
Get hidden input value with JavaScript
|
<pre><code>function GetWidth(){
var TBL_width = document.getElementById('wrap_tbl').offsetWidth;
return TBL_width;
}
var w = GetWidth();
<input type="hidden" id="tbl" value= w />
</code></pre>
<p>Is this possible?</p>
<p>I want to store a JavaScript variable in value attribute of a hidden input element. Please guide me how to do this </p>
|
javascript jquery
|
[3, 5]
|
2,724,202 | 2,724,203 |
Fade in Words from a Word Cloud Randomly
|
<p>I have build the a word cloud (you can check it out at <a href="http://www.cybernetiksolutions.com/wordcloud" rel="nofollow">http://www.cybernetiksolutions.com/wordcloud</a> )</p>
<p>Currently the cloud fades every word in all at one time. I would like to have the words fade in randomly from top to bottom. The idea was inspired by www.vudu.com and <a href="http://wonderwall.msn.com" rel="nofollow">http://wonderwall.msn.com</a> . I figure in the right direction on how I can make this happen would be greatly appreciated. </p>
|
javascript jquery
|
[3, 5]
|
1,674,130 | 1,674,131 |
How to add points for each unclicked button?
|
<p>So, I have 16 buttons, and when user clicks on a button I setText to it from db. He now has guess final answer from these term. I need to add him a point for each button that he did not clicked in his game. I tried:</p>
<pre><code>if(!button.isPressed){
points = points + 1;
}
</code></pre>
<p>This did not work.</p>
|
java android
|
[1, 4]
|
862,721 | 862,722 |
Use a variable from a php function in another php function
|
<p>I am using two php functions:</p>
<pre><code>jQuery(document).ready(function(){
$('#nombre').autocomplete({source:'search_Pacient.php', minLength:1});
$('#concepto').autocomplete({source:'search_Study.php', minLength:1});
});
</code></pre>
<p>Now, in my search_Pacient.php I have a query that returns multiple values from an mysql db..
I need to obtain a value from that query, and use it in another query from my search_Study.php ..
Hope someone could help me!</p>
|
javascript jquery
|
[3, 5]
|
3,544,305 | 3,544,306 |
jquery tabs ajax problem
|
<p>This my javascript :-</p>
<pre><code><script type ="text/javascript">
$(function()
{
$("#tabs").tabs({ cache: true ,fx: { opacity: 'toggle' }});
});
</script>
</code></pre>
<p>And this is my html which loads php file using ajax :-</p>
<pre><code> <ul>
<li><a href="#tab1">General</a></li>
<li><a href="<?php echo base_url() . 'Admin/Messages.php' ?>">Messages</a></li>
<li><a href="<?php echo base_url() . 'Admin/Pics.php' ?>">Pics</a></li>
<li><a href="<?php echo base_url() . 'Admin/Facilities.php' ?>">Facilities</a></li>
</ul>
</code></pre>
<p>The question i want to know is when <code>Messages.php</code> is loaded does the javascript onload event fire? I want to know because i want to take my <code>textarea</code> and convert it into editor. However i am not able to capture <code>window.onload</code> event :-</p>
<pre><code> window.onload = function(){
alert('hello');
}
</code></pre>
<p>and further if i write something in :-</p>
<pre><code> $(function(){
}
</code></pre>
<p>It works in Opera and IE but sometimes doesn't work sometimes. To sum, how do i capture window.onload in the above situation?</p>
<p><strong>EDIT</strong></p>
<p>Looks like <code>$(function(){ }</code> seems to be working, the problem is with <code>fx: { opacity: 'toggle' }</code>. When i remove effect, it works fine.</p>
<p>Thanks in advance :)</p>
|
javascript jquery
|
[3, 5]
|
5,982,354 | 5,982,355 |
Updating Data in the gridview
|
<p>I have a gridview in VS 2005. The grid is displayed in textboxes, so the user can edit. </p>
<pre><code> <asp:TemplateField ItemStyle-Width="50">
<ItemTemplate>
<asp:TextBox ID="txtSmall" runat="server" Width="45px" Text='<%#DataBinder.Eval(Container.DataItem,"Small") %>' OnTextChanged="TxtSmallChanged"> </asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="50">
<ItemTemplate>
<asp:TextBox ID="txtMedium" runat="server" Width="45px" Text='<%#DataBinder.Eval(Container.DataItem,"Medium") %>' OnTextChanged="TxtMediumChanged"> </asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width = "50">
<ItemTemplate>
<asp:TextBox ID="txtTotal" runat="server" Width="45px" Text='<%#DataBinder.Eval(Container.DataItem,"Total") %>'> </asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</code></pre>
<p>Whenever the textbox txtsmall or txtmedium changes(numbers), the Textbox txttotal has to get updated as total of both in txtSmall and txtmedium. I am using a function TxtSmallChanged when text in it is changed. How do i write the codebehind function to update the txtTotal. I hope i am clear. Thank you so much!!</p>
|
c# asp.net
|
[0, 9]
|
4,662,160 | 4,662,161 |
Javascript/Jquery beginner question
|
<p>I am learning some jQuery basics with this great book: <a href="http://jqfundamentals.com/book/" rel="nofollow">http://jqfundamentals.com/book/</a></p>
<p>There is an example that doesn't return the right result.</p>
<p>Here is the code:</p>
<pre><code> var myName = 'the global object',
sayHello = function () {
console.log('Hi! My name is ' + this.myName);
},
myObject = {
myName : 'Rebecca'
};
var myObjectHello = sayHello.bind(myObject);
sayHello(); // logs 'Hi! My name is the global object'
myObjectHello(); // logs 'Hi! My name is Rebecca'
</code></pre>
<p>The log returns <code>undefined</code> instead of <code>the global object</code> for <code>sayHello();</code> and I'd like to know why...</p>
|
javascript jquery
|
[3, 5]
|
3,012,609 | 3,012,610 |
double alert on a click naviganting index array
|
<p>I get 2 alert when I click on the sub menu, the pop up first says 1 and then a second pop up gives me 2. I would like the alert to be 0,1,2,3 etc in correct sequence as per navigating an array. Is it not the sub menu item just the following item in an array?</p>
<pre><code><ul id="menu">
<li><a href="page1">Item 1</a></li>
<li><a href="page2">Item 2</a>
<ul id="sub-menu">
<li><a href="page3">Item 3</a></li>
</ul>
</li>
<li><a href="page4">Item 4</a></li>
</ul>
</code></pre>
<p>Jquery:</p>
<pre><code>jQuery (function($) {
$("#menu .menu li").each(function (index) {
var item = $(this);
$("a", item).click(function (e) {
e.preventDefault();
alert(index);
});
});
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,016,453 | 4,016,454 |
file photo upload with cyrilic characters
|
<p>Im facing a problem. On my site users can upload photos and then see them on it. Problem is that if user sends photo with name containing cyrylic characters server cant see it :/</p>
<p>It behaves as if there is no such a file. Is there any solution for that ?</p>
<p>thanks for any help,</p>
|
c# asp.net
|
[0, 9]
|
1,923,896 | 1,923,897 |
Get IP address of user computer in C#
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/735350/how-to-get-a-users-client-ip-address-in-asp-net">How to get a user's client IP address in ASP.NET?</a> </p>
</blockquote>
<p>I have a application in which i have to get IP address of user who accessing my site.
My site is hosted on Go Daddy hosting server.
I have tried several codes(which are listed below) but it seems they are not working.</p>
<pre><code>HttpContext.Current.Request.UserHostAddress.ToString();
Request.UserHostAddress.ToString();
Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
Request.ServerVariables["REMOTE_ADDR"];
HttpContext.Current.Request. Server Variables["HTTP_X_FORWARDED_FOR"];
</code></pre>
<p>I have been working on this since last 3 days but i could not find any good solution.
Any good solution for this.</p>
<p>Please help me to do this.</p>
<p>Thank you.</p>
|
c# asp.net
|
[0, 9]
|
360,064 | 360,065 |
post method in php
|
<p>I am trying to send data through post method in android . But how I can receive data in server. My server is in php. I found a method in php $_post[]. how can i use it?
my client code is </p>
<pre><code>client=new DefaultHttpClient();
HttpPost request=new HttpPost("http://10.0.2.2/php_server/index.php");
HttpEntity entity;
try
{
StringEntity string=new StringEntity("I am android");
entity=string;
request.setEntity(entity);
HttpResponse response=client.execute(request);
}
catch(Exception e)
{
Log.e("socket connection", e.toString());
}
</code></pre>
|
php android
|
[2, 4]
|
3,253,946 | 3,253,947 |
passing C++ string to Python
|
<p>How could I pass a string from C++ to my Python function? I would like to get the string in my C++ application and parse it in Python</p>
|
c++ python
|
[6, 7]
|
3,306,207 | 3,306,208 |
ASP.Net List box iPhone/Android mobile issue
|
<p>This might be an issue with the way Safari and Android browsers render a list box, but is there a way around it? We have a listbox control that shows available times for events. The times are dynamically shown from a database and fed to the listbox.</p>
<p>Android and iPhones make the scrollable listbox a drop list box. You know the one with the arrow on the right and shows everything from the droplist. Or in the HTML it renders a list box as a select box with <code><option></code> tags.</p>
<p>Is there a way to override that issue.
CSS, Javascript, anything?</p>
|
iphone asp.net
|
[8, 9]
|
3,018,696 | 3,018,697 |
301 error and search engine
|
<p>I want to know about 301 Error for website, I Binged about it and got the some overview about 301 Redirect Error.</p>
<p>I also got the code for ASP.NET redirect,</p>
<pre><code><script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-url.com");
}
</script>
</code></pre>
|
c# asp.net
|
[0, 9]
|
352,797 | 352,798 |
jquery code for replacing words
|
<p>I met some trouble with my code,</p>
<p>In fact I would like to replace words abreviation by their expressions, but it does not work.</p>
<p>I have done the following code:</p>
<pre><code><script>
$('#suivi').keyup(function (e) {
var code = e.which ? e.which : e.keyCode;
var input = this.value;
console.log(input);
<?php
$rqt = "SELECT * FROM `glossaire` WHERE `id_company` ='".$societe['id']."'";
$result = mysql_query($rqt);
while ($data = mysql_fetch_assoc($result)) {
?>
if (input == "<?php echo ($data['libelle']) ; ?>") {
this.value = "<?php echo ($data['texte']) ; ?>"
};
<?php
}
?>
});
</script>
</code></pre>
<p>jquery 1.8 is set up on my page.</p>
<p>This script works fine on the following jsfiddle: </p>
<p><a href="http://jsfiddle.net/3z3sP/1/" rel="nofollow">http://jsfiddle.net/3z3sP/1/</a></p>
<p>But not in my page. However it is the same.</p>
<p>I have no mistakes in the console of javascript.</p>
<p>Any kind of help will be much appreciated.</p>
<p>Kind regards.</p>
<p>SP.</p>
|
php javascript jquery
|
[2, 3, 5]
|
4,021,634 | 4,021,635 |
How to control system volume using java script
|
<p>I would like to control system volume(if possible per process also), using java script.
I googled but coudn't able to find a way to do this, please advice.</p>
<p>I am targeting to write platform independent code , is it possible through java, if yes then how can I put this to work from my existing C++ code.</p>
|
java javascript
|
[1, 3]
|
3,454,833 | 3,454,834 |
Submitting ajax from external site?
|
<p>I have a site that submits a form through ajax, is there a way for me to submit another website to the first one, to then be sent through through ajax?</p>
<p>Example:</p>
<pre><code>Site A(html form/js) on Submit -> Ajax -> Example.php
</code></pre>
<p>And what I'd like to do:</p>
<pre><code>Site B -> Site A(html form/js) Submit -> Ajax -> Example.php
</code></pre>
|
php javascript jquery
|
[2, 3, 5]
|
5,945,837 | 5,945,838 |
Is it possible to send an arraylist as a response to jquery?
|
<p>Is it possible to send an arraylist as a response(from action class) to jquery?If so please give sample code</p>
|
java jquery
|
[1, 5]
|
964,062 | 964,063 |
Why can I not define functions in jQuery's document.ready()?
|
<p>Functions come up as undefined if I place them in the document.ready() function:</p>
<pre><code>$(document).ready(function(){
function foo()
{
alert('Bar');
}
});
foo(); // Undefined
</code></pre>
<p>Why does this happen? I'm sure I'm just in need of some simple understanding :)</p>
|
javascript jquery
|
[3, 5]
|
3,738,104 | 3,738,105 |
Learning C++ or Java for future lower level programming?
|
<p>I know Ruby and PHP and want to start learning a lower level programming.</p>
<p>I'm having a hard time choosing between C++ and Java, and coming from only dynamic languages I don't know exactly what I can do with C++ and not Java, and vice versa.</p>
<p>Could someone explain what the benefits (focused on features) are for each of them?</p>
|
java c++
|
[1, 6]
|
2,517,206 | 2,517,207 |
OnTouchListener doesn't work with relative layout
|
<p>I have a <code>RelativeLayout</code> in which I am adding many <code>TextViews</code> dynamically. The problem I am facing is, whenever I apply an onTouch listener to <code>TextViews</code> individually, it detects touches but when i add touch to my relative layout, it never responds.</p>
<p>This code detects touch events just fine:</p>
<pre><code>TextView tv = new TextView(this);
tv.setText(values[i]);
Drawable d = getResources().getDrawable(R.drawable.level_small_corners);
tv.setClickable(true);
tv.setId(i+1);
tv.setTextSize(18);
tv.setOnTouchListener(cellTouch);
</code></pre>
<p>But when I add all these TextViews in myRelativeLayout:</p>
<pre><code>myRelativeLayout.setOnTouchListener(cellTouch);
</code></pre>
<p>Now, the onTouchListener never gets called. Why is that so?</p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/black"
>
.
.
.
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/levelFirstLayout"
android:layout_marginBottom="70dp"
>
<RelativeLayout
android:id="@+id/wordsRelativeLayout"
android:layout_width="fill_parent"
android:clickable="true"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:focusableInTouchMode="true"
>
</RelativeLayout>
</ScrollView>
.
.
.
</RelativeLayout>
</code></pre>
|
java android
|
[1, 4]
|
5,321,433 | 5,321,434 |
evalJSON is not a function
|
<p>following is my code.</p>
<pre><code>$("document").ready(function () {
var dataName = new Array();
$.get('<%=request.getContextPath()%>/empBox/ajaxToGetCodes.do', function (responseText) {
var JSONcustomers = $.evalJSON(responseText);
var total = JSONcustomers["arrayObj1"].length;
var index = 0;
});
</code></pre>
<p>Although i'm getting the response text. But its not able to convert it to json.
Giving the following error.</p>
<p><code>$.evalJSON is not a function.</code></p>
<p>Am adding all the necessary library to it.
jquery-json.js
and jquery.js</p>
<p>Any idea, what may be the problem??</p>
|
javascript jquery
|
[3, 5]
|
3,797,677 | 3,797,678 |
Difference between C++ reference type argument passing and C#'s ref?
|
<p>I always thought they were about the same thing but someone pointed me out in one of my answers that such ain't quite true.</p>
<p>Edit: <a href="http://stackoverflow.com/questions/838117/ref-keyword-and-appdomains/838152#838152">Here</a> is what I said and the comment I got.
Edit2:
What's the difference between C++'s:</p>
<pre><code>public: void foo(int& bar);
</code></pre>
<p>and C#'s</p>
<pre><code>public void foo(ref int bar){
}
</code></pre>
|
c# c++
|
[0, 6]
|
736,780 | 736,781 |
string method replace is not working properly
|
<p>I am using <code>replace</code> method of string,</p>
<pre><code> var text = this ex is not working.;
text = text.replace(" ", "+");
alert(text);
</code></pre>
<p>and got alert :</p>
<pre><code> this+ex is not working.
</code></pre>
<p>Whats the problem here?</p>
|
javascript jquery
|
[3, 5]
|
1,311,883 | 1,311,884 |
Trigger an click event with parameters
|
<p>I have an click function and want to trigger it outside of the function with params.</p>
<pre><code><div id="menubar">
<a id="menu_file_open">File Open</a>
<a id="menu_file_save">Save File</a>
</div>
$("#menubar a").click(function(event){
var menu_item = $(this).attr('id');
var $context = $(this);
switch(menu_item){
case 'menu_file_open':
//Do menu file open dialog
break;
case 'menu_file_save': break;
}
});
$('#menubar a').trigger('click'); //not working (ID,context not defined);
</code></pre>
<p>How would I pass in the ID and the context of the div as it was actually clicked.</p>
|
javascript jquery
|
[3, 5]
|
3,974,643 | 3,974,644 |
How can i use regular expression check in jsvalidate?
|
<p>I am using jsvalidate.js for my form validation. i need to eliminate addition of quotes inside my textbox by using jsvalidate.js. If anyone knows help me in advance...</p>
|
javascript jquery
|
[3, 5]
|
3,584,751 | 3,584,752 |
How to check minimum thai words on jquery
|
<p>I have problem with detecting minimum words using jquery.validation.js. As i got a script for uses this on english:</p>
<pre><code>jQuery.validator.addMethod('minWords', function(value, element, params) {
return !$(element).val() || $(element).val().match(/\b\w+\b/g).length >= params;
}, 'Please enter at least {0} words.');
</code></pre>
<p>This script <strong>NOT WORK</strong> on thai specific language. Can anybody help me? </p>
<p>Thanks</p>
<hr>
<p>It's work now. Thanks All</p>
|
javascript jquery
|
[3, 5]
|
3,143,752 | 3,143,753 |
Inducing a function after session is destroyed
|
<p>I'd like to induce a function after the session is destroyed (i.e. user closes the browser). This function would change a value in my database from true to false. Is that possible?</p>
|
php javascript
|
[2, 3]
|
2,458,156 | 2,458,157 |
jQuery .change() not firing
|
<p>Just working on some small pages to be elements of a much larger project and am completely confused at my current problem here is my code:</p>
<pre><code><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<STYLE TYPE="text/css">
.questionBlock { font-size: x-large; color: red }
</STYLE>
<script type="text/javascript">
$(document).ready(function() {
alert("sdsd")
$("input[@name='questionType']").change(function(){
alert("dfdfdf");
var selected = $("form input:radio:checked").val();
alert(selected);
})
});
</script>
<form action="">
<input type="radio" name="questionType" value="closed" /> Closed Endeded<br />
<input type="radio" name="questionType" value="matrix" /> Matrix Question<br />
<input type="radio" name="questionType" value="open" /> Open Ended
</form>
<div class="questionBlock" id="closed">lol</div>
<div class="questionBlock" id="open">rol</div>
<div class="questionBlock" id="matrix">bol</div>
</code></pre>
<p>But the change event never fires, regardless of browser, I've tried using bind as well but it's driving me up the wall!</p>
|
javascript jquery
|
[3, 5]
|
2,363,872 | 2,363,873 |
Displaying the text of <a> element from database in Asp.Net
|
<p>I am using <code>Asp.Net/C#</code> in my application.I have a menu on my <code>master page</code> which displays all pre-defined menu items(static way) like </p>
<ol>
<li>Home</li>
<li>Contact Us</li>
<li>About Us</li>
</ol>
<p>What I would like to accomplish is, I want the text of <code><a></code> element to be displayed from database , which will be the name of the logged-in user.</p>
<p>Can anybody suggest me as to how I can go about doing this.
Thanks</p>
|
c# asp.net
|
[0, 9]
|
2,716,854 | 2,716,855 |
how can I intercept a click for all img's ? I have a bunch of images, each needs to reply to a click.
|
<p>I would like to present images to my users, where they can select them. I need them to select a limited number, say 5, so:
The images are shown in a matrix, and the user can click them.
I thought:</p>
<pre><code>function boom()
{
this.css('background-color','#fff');
this.data('clicked','yes');
// I should also make checks here to see how many were clicked already
}
$('img').click(boom);
</code></pre>
<p>// I thought this would connect all img's that were clicked upon to this function, where I can call the 'this' with the css function... </p>
<p>But it doesn't work as I thought it would...</p>
<p>Any help would do, thanks !</p>
|
javascript jquery
|
[3, 5]
|
3,170,221 | 3,170,222 |
How much is the negative affect on performance due to loading and using jQuery?
|
<p>I do a little bit of third party javascript work for a company where I am able to enter my javascript snippets into the CMS and have it run in the customer facing sites.
I have the option to switch on <code>JQuery 1.7.1</code> in the header of the site and I usually choose to do this or not depending on how much more complicated it would make my code if I didn't.</p>
<p>I have often wondered how much difference it would make if I just turned it on in all cases so even simple things like:</p>
<pre><code>document.getElementById('myElement');
</code></pre>
<p>became</p>
<pre><code>$('#myElement');
</code></pre>
<p>Where would the 'breakpoint' be in deciding it was better / more efficient / easier to switch on JQuery?</p>
<p>Today's example that made me think of this was as follows (both regular javascript followed by the JQuery equivalent ):</p>
<p><strong>Javascript:</strong></p>
<pre><code>if (document.getElementById('myElement')!== null) {
var oldText = document.getElementById('myElement').innerHTML,
newText = oldText.replace(/one/i,'two');
document.getElementById('myElement').innerHTML = newText;
}
</code></pre>
<p><strong>jQuery:</strong></p>
<pre><code>if ($('#myElement').length !== 0) {
var oldText = $('#myElement').html(),
newText = oldText.replace('one','two');
$('#myElement').html(newText);
}
</code></pre>
<p>And How much is the negative affect on forcing the clients to download jQuery?</p>
|
javascript jquery
|
[3, 5]
|
177,029 | 177,030 |
Unhandled Exception: System.ArgumentException: Destination array was not long enough?
|
<p>I have this scheduled task that runs every day on the server, the task was working perfectly for 1 year. After a server change (moved the task to a new server), the task started crashing with this execption:</p>
<pre><code>Unhandled Exception: System.ArgumentException: Destination array was not long enough.
Check destIndex and length, and the array's lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray,
Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.ArrayList.ToArray()
at Directory.MessageVector.findMessageById(Int32 msgId)
at Directory.Connection.ReaderThread.Run()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
</code></pre>
<p>I looked on the internet for this error but all I found relateed to multithreading, parallel programming and locking mechanisms. BUT my task doesn't use any of that, it does not use parallel programming or locking mechanisms, it a simple task that retrieves data from databases and send emails and it was perfectly running before the server change.</p>
<p>ANY IDEAS ????
thank's.</p>
|
c# asp.net
|
[0, 9]
|
2,396,696 | 2,396,697 |
jQuery flying notifier
|
<p>I have long page. I want show some info, so when user scroll page, this info will follow by the user.</p>
<p>Is any plugin?</p>
|
javascript jquery
|
[3, 5]
|
964,456 | 964,457 |
update variable in module pattern
|
<p>I'm trying to set the value of a private variable through a module pattern.
So what I'm saying is set $content to the value I'm passing to person.content. But this doesn't seem to work because when I do an alert on the value it gives me an undefined error.</p>
<pre><code>$(document).ready(function(){
person.content = $('#content');
person.getContent();
});
// Person Module
var person = ( function(){
var $content;
function getContent(){
alert( 'content = '+$content.find(':first h2').text());
}
return {
content: $content,
getContent : getContent,
}
}( ) );
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,116,579 | 2,116,580 |
How to convert DB2 timestamp to datetime?
|
<p>How do I convert a timestamp returned from DB2 ISeries to DateTime datatype in c#?</p>
<pre><code>2012-07-06 09:52:50.926145
</code></pre>
<p>This did not worked for me</p>
<pre><code>myEmployee.LastModified = Convert.ToDateTime(myRecord.GetString(myRecord.GetOrdinal("LASTMODIFIED")));
</code></pre>
|
c# asp.net
|
[0, 9]
|
3,628,442 | 3,628,443 |
[android]Java script to Java native Bindings & vice versa
|
<p>I am a working on developing web applications where we are trying to access Native functionality in the phone using Java script APIs.</p>
<p>Android Web view supports "AddJavascript" interface for Java script to Java (native) bindings as in below link</p>
<p><a href="http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object" rel="nofollow">http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object</a>, java.lang.String)</p>
<p>BUT if I need to pass data back to Java script there is no API or mechanism to do so in Android.
Could any please let me know if there is a way out, tried hard using JSON as below by we cannot pass all kinds of values using JSON</p>
<p>HTML with JS</p>
<pre><code><script id="source" language="javascript" type="text/javascript">
function OnClick(){
var nativeStr = window.native.getValue();
window.native.callBack();
}
function JScallback(data) {
}
</script>
WebView wv = (WebView) findViewById(R.id.MyWebView);
NativeClass myNative = new NativeClass (wv);
wv.getSettings().setJavaScriptEnabled(true);
wv.addJavascriptInterface(myNative, "native");
wv.loadUrl("file:///html/test.html");
public class NativeClass{
private WebView mWebView;
public NativeClass (WebView appView) {
this.mWebView = appView;
}
public String getValue() {
return "Native Value";
}
public void callBack() {
JSONArray arr = new JSONArray();
JSONObject result = new JSONObject();
try {
result.put("Name", "Android Dev");
arr.put(result);
} catch (Exception ex) {
}
mWebView.loadUrl("javascript:JScallback(" + arr.toString() + ")");
}
</code></pre>
<p>Thanks in advance,
Android Dev.</p>
|
javascript android
|
[3, 4]
|
3,094,357 | 3,094,358 |
Access RadiobuttonList control in Javascript
|
<p>I need to access ASP.net radiobuttonlist control options in .js file.
I try all previous links but it does't work.</p>
<p>Here I m looking to pass client id to js function and use that to access value associated with that radiobuttonlist.</p>
<p>thanks</p>
|
javascript asp.net
|
[3, 9]
|
2,536,805 | 2,536,806 |
Insert an element before and after substring
|
<p>How would you insert substrings between elements using regular expressions or an alternative form in javascript/jQuery?</p>
<p>For example I have the following string:</p>
<blockquote>
<p><code>This is a string 015 with numbers 1486453 randomly 10 inserted
between words 0954</code></p>
</blockquote>
<p>If my regex is to find all numbers, the result would be the following:</p>
<blockquote>
<p><code>This is a string <span>015</span> with numbers <span>1486453</span>
randomly <span>10</span> inserted between words <span>0954</span></code></p>
</blockquote>
|
javascript jquery
|
[3, 5]
|
2,048,399 | 2,048,400 |
how to check the valid Youtube url using jquery
|
<p>In Jquery i want to check the specific url from youtube alone and show success status and others i want to skip by stating it as not valid url</p>
<pre><code>var _videoUrl = "youtube.com/watch?v=FhnMNwiGg5M";
if (_videoUrl.contains("youtube.com"))
{
alert('Valid');
}
else
{
alert('Not Valid');
}
</code></pre>
<p>how to check with contains. or any other option to check the valid youtube url alone.</p>
|
javascript jquery
|
[3, 5]
|
1,919,418 | 1,919,419 |
What is the equivalent code of `Response.Redirect("~/abc.aspx") in java script?
|
<p>What is the equivalent code of <code>Response.Redirect(~/Account/Login.aspx");</code> in javascript?</p>
<p>I tried : <code>window.location="~/Account/Login.aspx"</code> but the <code>~</code> is not accepted in javascript. so, what is the alternative code?</p>
<p>Note: the javascript script is made in the server side in the <code>Page_Load</code> method by using <code>ClientScript.RegisterClientScriptBlock</code>.</p>
|
javascript asp.net
|
[3, 9]
|
1,213,451 | 1,213,452 |
Android: Odd behaviour when screen is turned off?
|
<p>I'm working on a game and use a WakeLock to keep the screen from going to sleep while the user is playing. However, I'm encountering some weird behavior when the screen is manually put to sleep..</p>
<p>My current approach is to store away the game info in OnPause() and load them back up when OnCreate() is called. This works fine if I hit the home button and start my app back up. However, turning the screen off seems to call OnPause() a couple times..in addition to some other funky behavior. Can anyone offer an explanation of why turning the screen off is different than hitting home?</p>
<p>According to Logcat, here's the sequence of events.</p>
<p>When Screen is turned off-OnPause is called; OnCreate is called; OnResume is called; OnPause is called again</p>
<p>When screen is turned back on- OnResume is called (before phone is even unlocked)</p>
|
java android
|
[1, 4]
|
4,062,543 | 4,062,544 |
Validating a date range client side
|
<p>I have 2 TextBoxes that expect a date in the format <code>mm/dd/yyyy</code>
Ex:</p>
<pre><code>03/20/2013
</code></pre>
<p>Before I even bother to make the ajax call, I want to try and turn these into JS Dates. How could I check if:</p>
<pre><code>Both Dates are in the mm/dd/yyyy format and if they are, then From must be less than to.
</code></pre>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
1,781,997 | 1,781,998 |
closing other sub-menus
|
<p>i have menu like this</p>
<pre><code><ul>
<li>
<a href="#">Home</a>
<ul class="sub">
<li>Text</li>
<li>Test</li>
</ul>
</li>
<li>
<a href="#">About</a>
<ul class="sub">
<li>Text</li>
<li>Test</li>
</ul>
</li>
<li>
<a href="#">Contact</a>
<ul class="sub">
<li>Text</li>
<li>Test</li>
</ul>
</li>
</ul>
</code></pre>
<p>I am using hoverIntent plugin that cause the sub-menu to remain opened for 3 seconds. But i want to close the other opened sub-menu on hovering a main menu. How to close other sub-menus?</p>
<p>here is js code</p>
<pre><code>$('ul > li').hoverIntent({
over: function(){
$(this).children('ul').slideDown('slow');
},
timeout: 3000,
out: function(){
$(this).children('ul').slideUp();
}
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
888,461 | 888,462 |
user session tracking in javascript?
|
<p>I have an app in phonegap (pure js, html, css) where user signs in and then it has access to some aditional sites. My question is how to save his personal data or his session. There is no php involved for sending cookie or handling sessions. Everything need to be saved in JS (jQuery). How can I do this?</p>
|
javascript jquery
|
[3, 5]
|
3,937,285 | 3,937,286 |
JQuery Selector Selecting Selectively
|
<p>I have the following HTML</p>
<pre><code><i class="up_icon" id="1" />
<p class="position">1</p>
<i class="down_icon" id="1" />
</code></pre>
<p>I can select <code>.up_icon#1</code> but not <code>.down_icon#1</code></p>
<pre><code>var u = $(".up_icon#1"); //= [<i class="up_icon" id="1"></i>]
var d = $(".down_icon#1"); //= []
</code></pre>
<p>What am I missing here?</p>
|
javascript jquery
|
[3, 5]
|
4,720,281 | 4,720,282 |
Include a c# file in aspx page
|
<p>I have an aspx page that has a @Page directive which points to a c# class. e.g.</p>
<pre><code><@ Page Language="C#" EnableSessionState="true" ValidateRequest="False" Inherits="MyClass" %>
</code></pre>
<p>MyClass extends Page, which is the code behind class for that aspx page.</p>
<p>Now I want to add another class to the aspx page. This class does some processing and will redirect the user to another page if certain conditions are met. It will be called before the above directive. I tried adding another @Page directive, but gotten an unknown error (literally). I'm thinking that there can only be one code behind class per aspx page so I got the error when I added another one. Googling such question didnt really help me with the answer.</p>
<p>So, how do I add another c# class to the same aspx page?</p>
<p>Thanks.</p>
|
c# asp.net
|
[0, 9]
|
4,396,777 | 4,396,778 |
Is there any method to escape '>' to '>' in JavaScript?
|
<p>i want to escape some HTML in JavaScript. How can I do that?</p>
|
javascript jquery
|
[3, 5]
|
5,906,949 | 5,906,950 |
Can't find how to use HttpContent
|
<p>I am trying to use the below code, but I am not having any luck finding the DLL when I do References/Add Reference.</p>
<pre><code>HttpContent myContent = HttpContent.Create(SOME_JSON);
</code></pre>
<p>I am trying to add <code>Microsoft.Http</code> but it is not in the list. I also tried adding <code>System.Net</code> but same thing, when I do <code>System.Net.Http</code> there is no <code>HttpContent</code> to be used. I would appreciate if anyone could advise me on how I can use the <code>HttpContent</code> functionality.</p>
|
c# asp.net
|
[0, 9]
|
5,414,259 | 5,414,260 |
Populate drop down from XML - code executing in wrong order
|
<p>I am trying to populate a drop down box from an XML file using jQuery. When the code is ran it appears to execute in order.</p>
<p>jQuery:</p>
<pre><code> $("#filterButton").click(function() {
var dropdown = new Array();
$.get('../restaurants.xml', function (xmlFile) {
$(xmlFile).find('restaurant').each(function () {
var found = false;
var $restaurant = $(this);
var type = $restaurant.attr("type");
dropdown.forEach(function(arrayValue){
if(arrayValue == type){
found = true;
}
});
if(found == false){
dropdown.push(type);
}
});
});
$('#potentialRestaruants').append('<select>');
dropdown.forEach(function(arrayValue){
$('#potentialRestaruants').append('<option value="' + arrayValue + '">' + arrayValue + '</option>' );
});
$('#potentialRestaruants').append('</select>');
});
</code></pre>
<p>However the code is being run in this order:</p>
<pre><code> $("#filterButton").click(function() {
var dropdown = new Array();
</code></pre>
<p>then</p>
<pre><code>$('#potentialRestaruants').append('<select>');
dropdown.forEach(function(arrayValue){
$('#potentialRestaruants').append('<option value="' + arrayValue + '">' + arrayValue + '</option>' );
});
$('#potentialRestaruants').append('</select>');
});
</code></pre>
<p>then </p>
<pre><code>$.get('../restaurants.xml', function (xmlFile) {
$(xmlFile).find('restaurant').each(function () {
var found = false;
var $restaurant = $(this);
var type = $restaurant.attr("type");
dropdown.forEach(function(arrayValue){
if(arrayValue == type){
found = true;
}
});
if(found == false){
dropdown.push(type);
}
});
});
</code></pre>
<p>Why is the code being ran in this order and how can I get to run in the order I need?</p>
|
javascript jquery
|
[3, 5]
|
3,600,322 | 3,600,323 |
Android - Update a notification every time that changes the value of the variable
|
<p>I have a small notification application which view a variable "int a" into status notification. At the time when I start the application, the value of the variable is taken and displayed in the status bar. Since this variable varies continuously (approximately every 1-2 minutes), can you tell me how can I do so that the status bar automatically updates the value of this variable to avoid having to reload each time the application?
I hope I was clear.
thanks
A.</p>
|
java android
|
[1, 4]
|
574,129 | 574,130 |
How could I accomplish a popup modal window (Example included)?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3616709/how-to-open-new-browser-window-using-javascript">How to open new browser window using javascript?</a> </p>
</blockquote>
<p>For example: <a href="http://www.nowness.com/" rel="nofollow">http://www.nowness.com/</a> > Click "Twitter"</p>
<p>I'm not asking about the Twitter API, just a generic window that I want to open up. jQuery can be used.</p>
|
javascript jquery
|
[3, 5]
|
4,212,833 | 4,212,834 |
Rebooting a computer from an ASP.Net page hosted on the computer
|
<p>I have a computer A which hosts different kind of things:</p>
<ul>
<li>A website (is developped using <code>C#</code> and <code>ASP.Net</code>)</li>
<li>Applications</li>
</ul>
<p>Our customers have access to the website and sometimes, they will want to reboot the computer A (knowing that it will cut the website during the reboot).</p>
<p>My question is simple : does it exist a way of :</p>
<ul>
<li>Rebooting a computer by simply clicking a button on an <code>ASP.Net</code> page ? How would I manage to do so ?</li>
<li>The same way, is it possible to execute some batch script (executes on the Computer A) when clicking on a button on an <code>ASP.Net</code> page ?</li>
</ul>
<p>Thanks for your help!</p>
|
c# asp.net
|
[0, 9]
|
5,855,310 | 5,855,311 |
Can't find element with jquery
|
<p>I have a list of <code>p</code> tags on the page with id's like:</p>
<pre><code>item_1
item_2
item_3
etc.
</code></pre>
<p>In jquery function I build string for id and than I want to change some value on it but it seams that jquery can't find element with this id, but it's there on the page:</p>
<pre><code>...
var itemId = '#item_' + itemId;
if ($(itemId).length > 0) {
alert("exist");
}
...
</code></pre>
<p>Id is fine in itemId variable. Am I doing something wrong here maybe my approach is wrong?
Markup</p>
<pre><code><div>
<a href="#"><p id="item_283">Counter</p></a>
</div>
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,197,276 | 1,197,277 |
while using maskededitextender all links in master page will disabled in asp.net
|
<p>I have a text box in my content page of asp.net webapplication. I masked the text box with maskededitextender with date format dd/MM/yyyy. I use custom validator to validate the text box. While entering wrong date format in text box like MM/dd/yyyy(12/23/2011) it will throw validation message "Incorrect date format". During this time it disables all other links in Master page. </p>
<p>How to overcome this problem. Can anyone help me with this? </p>
<p>Thanks.,</p>
|
c# asp.net
|
[0, 9]
|
4,170,664 | 4,170,665 |
How to reorder divs based on class names using Javascript
|
<p>Here is my HTML</p>
<pre><code><div id="subscriptionContainer">
<div class="subscription">
<div class="subs-btn">
<div class="subscribed">Subscribed</div>
</div>
</div>
<div class="subscription">
<div class="subs-btn">
<div class="btnGetit">Get It</div>
</div>
</div>
<div class="subscription">
<div class="subs-btn">
<div class="subscribed">Subscribed</div>
</div>
</div>
<div class="subscription">
<div class="subs-btn">
<div class="btnGetit">Get It</div>
</div>
</div>
<div class="subscription">
<div class="subs-btn">
<div class="subscribed">Subscribed</div>
</div>
</div>
<div class="subscription">
<div class="subs-btn">
<div class="btnGetit">Get It</div>
</div>
</div>
</div>
</code></pre>
<p>Now I want to rearrange the "subscription" divs withing the "subscriptionContainer" such that the divs that have class = "subscribed" should be moved to bottom and the divs having class = "btnGetit" should all be moved up. Please give solutions in Javascript or JQuery.</p>
|
javascript jquery
|
[3, 5]
|
2,735,235 | 2,735,236 |
how to retrieve the class from pagemethod in javascript
|
<p>I would like to use Pagemethod to return the class to javascript. Does it need to create the same construction of the class on the both sides, client and server sides?</p>
|
javascript asp.net
|
[3, 9]
|
5,327,219 | 5,327,220 |
Selecting an asp label control using jquery
|
<p>I am currently selecting an </p>
<pre><code><asp:Label id="lblLoginusername"..../>
</code></pre>
<p>So I am trying to get a reference to it (to later on change its value) by writing the following in my google chrome browser:</p>
<pre><code>$("#<%= lblLoginUsername.ClientID%>")
</code></pre>
<p>I DO have jquery (1.7.2.min) in my page, but unfortunately I am getting:</p>
<pre><code>[Exception: Error: Syntax error, unrecognized expression: >]
</code></pre>
<p>Can anyone guide me as to where I have a silly mistake?</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
5,051,105 | 5,051,106 |
save base64 image from javascript
|
<p>I have a variable in JavaScript name as <code>myImage</code> which holds the <code>base64</code> encoded string of an image like <code>data:image/png;base64,iVBORw0KGgoAAAANSUhE......</code> Now I want to save this image on folder at server side. Please Help</p>
<p>Thanks in Advance</p>
|
php javascript
|
[2, 3]
|
5,491,532 | 5,491,533 |
unable to add imageviews in linearlayout dynamically
|
<p>I have a problem that I am generating ImageViews dynamically and adding those in Linearlayout. But the problem is that first time it works nicely means added all image views in LinearLayout but when we run the same code second time the it adds only one image. I don't know why? Please suggest me the solution regarding the same.</p>
<p><strong>Code:</strong></p>
<pre><code>protected void callAfterEff() {
layout_Pagination.removeAllViews();
img_Pagination = new ImageView[Overview_Years.size()];
paramsPagination = new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
//params.weight = 0.5f;
paramsPagination.gravity= Gravity.CENTER_VERTICAL;
paramsPagination.setMargins(10, 2, 0, 0);
// TODO Auto-generated method stub
for(int i=0;i<overviewYears.getYears().size();i++)
{
img_Pagination[i] = new ImageView(Overview.this);
img_Pagination[i].setLayoutParams(paramsPagination);
/*if(count==i)
{
img_Pagination[count].setBackgroundResource(R.drawable.pagination_selected);
}
else
{*/
img_Pagination[i].setBackgroundResource(R.drawable.pagination_unselected);
//}
layout_Pagination.addView(img_Pagination[i]);
}
}
</code></pre>
|
java android
|
[1, 4]
|
434,669 | 434,670 |
Modelpopup not showing in ie9
|
<p>Help me I used the <code>.show()</code> method to show a modal popup. In ie9 this is not working:</p>
<pre class="lang-xml prettyprint-override"><code><AjaxControlToolkit:ModalPopupExtender
ID="mpeChangePassword"
runat="server"
TargetControlID="lbtnChangePassword"
CancelControlID="lbtnCancel"
PopupControlID="divChangePassword"
BackgroundCssClass="modalBackground"
RepositionMode="RepositionOnWindowResizeAndScroll">
</AjaxControlToolkit:ModalPopupExtender>
<asp:LinkButton ID="lbtnChangePassword" runat="server" Text=""></asp:LinkButton>
</code></pre>
<p>javascript:</p>
<pre><code>function OnPasswordChangeClick() {
$("#<%= PopupMessageLabel.ClientID %>").text('');
$find("#<%=mpeChangePassword.ClientID %>").show();
}
</code></pre>
|
c# jquery
|
[0, 5]
|
5,566,797 | 5,566,798 |
C++ for C# Developers
|
<p>I know C# pretty well (self-taught, sadly) and need to do some C++ programming for a Windows application. I have been able to find a ton of information for C++ developers learning C# but haven't been able to find much on learning C++ when you already know C#. Has anyone come across a good rundown of the basics? </p>
<p><a href="http://msdn.microsoft.com/en-us/library/yyaad03b.aspx">MSDN has a comparison</a> but it is not very in-depth.</p>
<p>I can piece together several sources but figured something was out there - I just can't find it. Thanks for your help.</p>
|
c# c++
|
[0, 6]
|
557 | 558 |
Capture printStackTrace() output in Android
|
<p>I'm debugging an existing library that was not coded explicitly for Android.
It works, but contains lots of <code>ex.printStackTrace()</code> calls.
In Android, these are not written to the logcat by default.</p>
<p>My question is: without the possibility to modify the code, is it possible to somehow see the stack traces generated by <code>printStackTrace()</code> calls?</p>
|
java android
|
[1, 4]
|
92,516 | 92,517 |
Javascript multidimensioned isset()
|
<p>When running:</p>
<pre><code>if (data.custaccount.webaddress) {
alert('found it');
}
</code></pre>
<p>I get the error </p>
<pre><code>data.custaccount is undefined
</code></pre>
<p>The only way i can get around it seems to be with multiple IFs like so:</p>
<pre><code>if (undefined != data && undefined != data.custaccount && undefined != data.custaccount.webaddress) {
alert('found it');
}
</code></pre>
<p>Is there any way i could do this more simply? </p>
<p>In php we'd normally use the isset(data.custaccount.webaddress) and that worked quite well. is there an equivalent in javascript (or jquery)?</p>
<p>We have used try / catch, but found that to slow down performance of the script considerably.</p>
<p>I've seen someone else asking something similar on <a href="http://verens.com/2005/07/25/isset-for-javascript/" rel="nofollow">http://verens.com/2005/07/25/isset-for-javascript/</a> without any success, but am hoping that stackoverflow will do it's normal job of saving the day :)</p>
<p>Thanks!!!</p>
<p>Justin</p>
|
javascript jquery
|
[3, 5]
|
999,201 | 999,202 |
how to calculate row-wise sum of values in grid-view and display it in grid view?
|
<p>I have a grid view which displays some values. now i have to calculate row wise sum of those values for each row and then display against them.</p>
<p><strong>i tried this code but i am getting error as Input String Was not in Correct Format.</strong></p>
<pre><code>public void gv_RowCreated(Object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
int total = Convert.ToInt32(e.Row.Cells[1].Text) + Convert.ToInt32(e.Row.Cells[2].Text) + Convert.ToInt32(e.Row.Cells[3].Text) + Convert.ToInt32(e.Row.Cells[4].Text) + Convert.ToInt32(e.Row.Cells[5].Text) + Convert.ToInt32(e.Row.Cells[6].Text) + Convert.ToInt32(e.Row.Cells[7].Text);
((Label)gv.FindControl("Label8")).Text = Convert.ToString(total);
}
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
2,349,295 | 2,349,296 |
'Source Not Found' error - attempting to implement simple Activity-Fragment Android application
|
<p>I am attempting to add a fragment to my main activity, this is the main.xml:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<fragment android:name="wj.tweetTab.Titles"
android:layout_width="300dp"
android:layout_height="match_parent" />
</LinearLayout>
</code></pre>
<p>The class <code>wj.tweetTab.Titles</code> is an extension of the Fragment class which only overrides <code>onCreateView</code> to inflate it's xml layour resource:</p>
<pre><code>package wj.tweetTab;
import android.app.Fragment;
public class Titles extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(wj.tweetTab.R.layout.titles, container);
}
}
</code></pre>
<p>This is the <code>titles.xml</code> layout for the titles fragment, it is simply a linear layout with a text view:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textSize="16sp"
android:text="TEXTTEXTTEXT!!!">
</TextView>
</LinearLayout>
</code></pre>
<p>When I try to run the application on my physical android tab I get a <code>Source not found</code> error. If I remove the fragment xml from the <code>main.xml</code> file the application runs.</p>
<p>Any ideas why this may be happening?</p>
|
java android
|
[1, 4]
|
4,213,363 | 4,213,364 |
What's causing "hanging" JavaScript
|
<p>I find that my script is "hanging" after clicking around afew times</p>
<p><a href="http://jsfiddle.net/Zn7br/4/" rel="nofollow">http://jsfiddle.net/Zn7br/4/</a></p>
<p>or </p>
<p>video <a href="http://screenr.com/6g6" rel="nofollow">http://screenr.com/6g6</a></p>
|
javascript jquery
|
[3, 5]
|
2,879,479 | 2,879,480 |
Get next date and day
|
<p>I have a table to which i dynamically add rows. The number of days is equal to the date difference of the dates inserted by user. On the dynamic rows i want to add three fields. The first two are date and day filed. For that I need to know the next date and the corresponding day. For example user enters 10-2-2012. I need to insert The next dates like 17-2-2012,18-2-2012... and corresponding days like Wednesday, Thursday..etc
I have used the following function to get next date</p>
<pre><code>function getTomorrow(d,offset)
{
if (!offset)
{
offset = 1
}
return new Date(new Date().setDate(d.getDate() + offset));
}
</code></pre>
<p>But it shows error 16-2-2012 has no getDate() function. Am not able to find next date and the corresponding day. Is there any way to get it?</p>
|
javascript jquery
|
[3, 5]
|
670,780 | 670,781 |
How to Add options to select box based from an array?
|
<p>I am stuck with this issue. What I want to do is to create the option values in a select box on the fly with the use of jquery javascript.</p>
<p>For example, if I have a question like what are your favourite fruits? So users should be able to select an answer from the default select box e.g. "Apple, Orange, Pear, Banana". Then they can click on a click "Add more fruits" and a second select box will appear with the same array of selection.</p>
<p>Basically with reference to <a href="http://stackoverflow.com/questions/170986/what-is-the-best-way-to-add-options-to-a-select-from-an-array-with-jquery">the previous stack overflow question from another member</a>, I could only piece up the information till here. But I could not have the option values printed out from the array, aside from the default "Select Fruit" option, at runtime.</p>
<pre><code>$(function() {
// set the array
var fruit = new Array("Apple", "Orange", "Pear", "Banana");
function addFruit() {
$.each(fruit, function(key, value) {
$('#fruit')
.append($('<option>', { value : key })
.text(value));
});
}
var i = $("li").size() + 1;
$("a#addmore").click(function() {
$("#addmore_row").append('<li>' +
'<select name="fruit[]" id="fruit">' +
'<option value="">Select Fruit:</option>' +
addFruit()
+ '</select>' +
'</li>');
return false;
});
});
</code></pre>
<p>Can anyone please help me out with this? Thank you very much.</p>
|
javascript jquery
|
[3, 5]
|
4,643,839 | 4,643,840 |
Are jQuery utility functions preferable to ordinary function definitions?
|
<p><a href="http://www.codeschool.com/courses/jquery-air-captains-log" rel="nofollow">This jQuery course</a> recommends defining your own jQuery utility functions as a good way to organise your code. </p>
<p>But it doesn't really explain why. So, why is writing code like: </p>
<pre><code>$.highlightResults = function(seats) {
//
}
$.highlightResults('/.seating-chart a');
</code></pre>
<p>preferable to simply:</p>
<pre><code>function highlightResults(seats) {
//
}
highlightResults('/.seating-chart a');
</code></pre>
<p>Is the course wrong, or is there a good reason to write it this way?</p>
|
javascript jquery
|
[3, 5]
|
1,786,077 | 1,786,078 |
Stop jQuery Typewriter animation onclick
|
<p>I'm wondering how I might stop the following typewriter script when I - for instance - click a link. I don't want to do anything fancy, simply stop the animation as soon as the link is clicked.</p>
<pre><code>$(function () {
var ch = 0;
var item = 0;
var items = $('.headline_origin li').length;
var time = 1000;
var delay = 40;
var wait = 6000;
var tagOpen = false;
function tickInterval() {
if(item < items) {
var text = $('.headline_origin li:eq('+item+')').html();
type(text);
text = null;
var tick = setTimeout(tickInterval, time);
} else {
clearTimeout(tick);
}
}
function type(text) {
time = delay;
ch++;
if(text.substr((ch - 1), 1) == '<') {
if(text.substr(ch, 1) == '/') {
tagOpen = false;
}
var tag = '';
while(text.substr((ch - 1), 1) != '>') {
tag += text.substr((ch - 1), 1);
ch++;
}
ch++;
tag += '>';
var html = /\<[a-z]+/i.exec(tag);
if(html !== null) {
html = html[0].replace('<', '</') + '>';
tagOpen = html;
}
}
if(tagOpen !== false) {
var t = text.substr(0, ch);
} else {
var t = text.substr(0, ch);
}
$('h1 span.origin').html(t);
if(ch > text.length) {
item++;
ch = 0;
time = wait;
}
}
var tick = setTimeout(tickInterval, time);
});
</code></pre>
<p>Thanks in advance!</p>
<p>@rrfive</p>
|
javascript jquery
|
[3, 5]
|
1,592,550 | 1,592,551 |
Using hoverIntent with .on or delgate
|
<p>How would you use hoverIntent with this:</p>
<pre><code> $mainNav.on('mouseenter', '.hEvent', function () {
//Do stuff
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,717,768 | 3,717,769 |
DataGrid Row checkbox filed Not updated in asp.net
|
<p>hi i m having one datagrid...that have one check box field...whenever i check the check box that time that row will be inserted in database...but check box value is not set true value...it always return false value...i m using C# asp.net 2003 version..please help me...</p>
|
c# asp.net
|
[0, 9]
|
649,449 | 649,450 |
Best way to send http requests at same time
|
<p>Hey guys should be an easy question im wanting to send two http requests at identical times without much care in what is being returned. My goal is to have packet a and packet b arrive at destination at exact times ignoring latency. Im familiar with pythin and c# but no expert. Does anyone know software (irc, nettools) etc that could do this or if easily done in c, ive asked about doing in python but everything seems asynchronous. Thanks everyone!</p>
|
c# java
|
[0, 1]
|
5,168,576 | 5,168,577 |
what does assembly mean in c#
|
<p>i just read about the <code>Public</code> Access Modifier.</p>
<p>Its access levels are </p>
<ol>
<li><p>Within the derived classes of that class available within the same assembly.</p></li>
<li><p>Outside the class within the same assembly.</p></li>
<li><p>Within the derived classes of that class available outside the assembly.</p></li>
<li><p>Outside the class outside the assembly. </p></li>
</ol>
<p>What does assembly mean here?Can any one give any example</p>
|
c# asp.net
|
[0, 9]
|
1,215,920 | 1,215,921 |
How to read JSON data from ashx file
|
<p>from my client side i send json data to data.ashx file but i am not being able to read data from <strong>ProcessRequest</strong> method of ashx file. just can not understand why i am getting null</p>
<p>this way i am sending data from client side to ashx file</p>
<pre><code> var FeedCrd = {};
FeedCrd["Name"] = $("input[id*='txtName']").val();
FeedCrd["Subject"] = $("input[id*='txtSubject']").val();
FeedCrd["Email"] = $("input[id*='txtFEmail']").val();
FeedCrd["Details"] = $("textarea[id*='txtDetails']").val();
$.ajax({
type: "POST",
url: urlToHandler + "?ac=send",
data: JSON.stringify(FeedCrd),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
if (data == "SUCCESS");
{
//
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus);
}
});
</code></pre>
<p>here is my ashx file code for <strong>ProcessRequest</strong></p>
<pre><code> public void ProcessRequest(HttpContext context)
{
string outputToReturn = "";
context.Response.ContentType = "text/html";
if (context.Request.QueryString["ac"] == "send")
{
string sName = context.Request["Name"];
string sSubject = context.Request["Subject"];
outputToReturn = "SUCCESS";
}
context.Response.Write(outputToReturn);
}
</code></pre>
<p>i have also seen how data is going to server side using firebig. here is the data
<strong>{"Name":"cvv","Subject":"fdsfd","Email":"dsdsa@xx.com","Details":"wow"}</strong></p>
<p>so please help me how to read data from ashx file when json send from client side. please tell me where i made mistake. please guide me. thanks</p>
|
jquery asp.net
|
[5, 9]
|
1,139,867 | 1,139,868 |
Call a Java app with a parameter but never wait for the answer
|
<p>What I want to do is when an user logs in to call a Java app from the PHP server. The app to index some content and process it and save it to a database. But what I want to really do, is to call it and nevermind what it does and never wait for the answer. Like a cronjob on demand. Is this possible?</p>
<p>UPDATE:</p>
<p>Is shell_exec a solution?
$res = shell_exec('java Myprogram'); </p>
|
java php
|
[1, 2]
|
3,703,607 | 3,703,608 |
Member turns to undefined
|
<p>I've developed a jQuery plugin which has default options:</p>
<pre><code>$.fn.incromentor.defaults = {
max : 65355,
min : 0
};
</code></pre>
<p>In the initialization of the plugin, I merge the user options with plugin default options using <code>$.extend</code></p>
<pre><code>function init( $elm, options )
{
this.$element = $elm;
this.options = $.extend( {}, $.fn.incromentor.defaults, options );
}
</code></pre>
<p>So the problem is, if user sets <code>min</code>or <code>max</code> to <code>0</code>, that property turns to undefined!<br>
Why is this and how can I store a simple 0?</p>
<p>Here a jsFiddle: <a href="http://jsfiddle.net/KDXa6/2/" rel="nofollow">http://jsfiddle.net/KDXa6/2/</a></p>
<p><strong>Edit</strong><br>
After linting the code in JSLint, the error dissapeared so I suspect there was an obscure error in my typing.</p>
|
javascript jquery
|
[3, 5]
|
3,661,864 | 3,661,865 |
keyup only works one time
|
<pre><code>$("#hi").keypress(function() {
$(".hi").html("Writing...");
});
$('#hi').keyup(function() {
$(".hi").delay(1000).queue(function() {
$(this).html("");
});
});
</code></pre>
<p>When I type like "Hello" in a textbox (#hi) the keyup only works for the first letter and then it won't disappear.</p>
|
javascript jquery
|
[3, 5]
|
1,948,974 | 1,948,975 |
Easy - Select only elements of this link
|
<p>How do I change only elements inside of the link that is clicked?</p>
<p>I thought children of this would work but no luck.</p>
<pre><code>$('.sort').click(function () {
$(this).children('i').toggleClass('icon-arrow-up-12');
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,211,559 | 2,211,560 |
Any tutorials or books that teach C# the way I learned java (commandline, without intelliSense or VS)?
|
<p>I'm a good java programmer and want to learn C# (seems fun, delegates, linq, lambda expressions, access to native dlls and unmanged code etc).</p>
<p>Every tutorial, book seems to teach C# with Visual Studio. But at the learning state I want to write everything manually without intelliSense or project/solution etc and compile it at command prompt, the way anyone learns java.</p>
<p>Is there a good resource or book that teaches C# and .net this way?</p>
|
c# java
|
[0, 1]
|
810,879 | 810,880 |
jQuery hide and show multiple divs
|
<p>I got an html form with 3 questions, each question inside a div:</p>
<pre><code><div id="question1">
question1
</div>
<div id="question2">
question2
</div>
<div id="question3">
question3
</div>
</code></pre>
<p>and a button at the very end:</p>
<pre><code><button id="next">Next question</button>
</code></pre>
<p>What i want - only 1st div shown at first. I press the button -> 2nd div loads, 1st div hides. I press the button one more time -> 2nd div hides, 3rd div shows up.</p>
<p>Here is how i tried:</p>
<pre><code><script>
$('#question2').hide();
$('#question3').hide();
$("#next").click(function (e) {
event.preventDefault();
$('#question1').hide();
$('#question2').show();
});
</script>
</code></pre>
<p>I dont know how to load the 3rd div.</p>
|
javascript jquery
|
[3, 5]
|
5,107,858 | 5,107,859 |
How do I retrieve the textnode of a element without getting descending elements textnodes using Jquery?
|
<p><code>
<a href="#">Domain name<span class="value">2</span></a>
</code></p>
<p>I would like to retrieve only the text "Domain name".</p>
<p>I have tried using $('a').text() but that will also get the text inside the descending SPAN tag. Is there a way to select only the first text node inside the A tag somehow?</p>
<p>I can't figure out how.</p>
<p>.contents('not:(span)') do not work either.</p>
|
javascript jquery
|
[3, 5]
|
876,810 | 876,811 |
JQuery flyout menu pointer
|
<p><a href="http://jsfiddle.net/6Jhaw/" rel="nofollow">This (JSFiddle)</a> is that code I have now. I want to animate a pointer so that when the user clicks the list item the pointer slides to the right/left and stays in the middle of the sub list items. How I thought of doing it was to find the amount of pixels to the left of the main list item and then width/2 and add them. Does this sound right? or should I do something different. Thank you.</p>
<pre><code> (function(){
var closetimer = 0;
var menuitem = 0;
var arr_position = 0;
function arrow () {
var ele = $('.a'); <----// how can I make this a variable
// according to which link I select?
var pos = ele.position();
var width = ele.width()/2;
var left = pos.left;
}
function flyout_open(event)
{
flyout_close();
var submenu = $(this).find('ul');
var arr = $('.arrow');
if(submenu){
menuitem = submenu.fadeIn(200);
return false;
}
return true;
}
function flyout_close()
{ if(menuitem) menuitem.fadeOut(200);}
$(document).ready(function()
{ $('#flyout li').bind('click', flyout_open);
});
document.onclick = flyout_close;
</code></pre>
<p>})();</p>
|
javascript jquery
|
[3, 5]
|
312,383 | 312,384 |
Drawable.createFromStream and getResources().getDrawable, why their outputs are different?
|
<p>I've an image of 32x32, which I have put in drawable folder and the same image application downloads from server. But downloaded one looks bigger(more like 48x48) and pixelated.</p>
<p>Server Code ( C# )</p>
<pre><code> MemoryStream tms = new MemoryStream();
image.Save(tms, System.Drawing.Imaging.ImageFormat.Png);
byte[] imageData = tms.ToArray();
//send data to phone
</code></pre>
<p>Application Code ( Java )</p>
<pre><code> ByteArrayInputStream memStream = new ByteArrayInputStream(imageData);
Drawable image = Drawable.createFromStream(memStream, ""); //big image and pixelated
memStream.close();
</code></pre>
<p>but if I load same file from Resource, its always smaller</p>
<pre><code>Drawable image = getResources().getDrawable(R.drawable.image);
</code></pre>
<p>ImageView xml</p>
<pre><code><ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:focusable="false"
android:scaleType="center" />
</code></pre>
<p>Edit :</p>
<p>Finally, setting the TargetDensity of BitmapDrawable worked!</p>
<pre><code>Bitmap bmp = BitmapFactory.decodeByteArray(imageData, 0,
imageData.length);
BitmapDrawable image = new BitmapDrawable(bmp);
image.setTargetDensity(bmp.getDensity());
</code></pre>
|
c# java android
|
[0, 1, 4]
|
1,134,116 | 1,134,117 |
jQuery Image fadeIn Upon Scroll Inside DIV
|
<p>I can't get the actually LazyLoad plugin to work for me so I am trying to write my own with. Currently I have a list of images loading inside of a DIV. They are pulled by a PHP query to the mysql database. The DIV scroll is set to auto. The code I am using is:</p>
<pre><code><div id="b1" style="overflow:auto;">
<?PHP $result = mysql_query("SELECT * FROM images");
while($row = mysql_fetch_assoc($result)) {
echo "<img src='$row[photo]' style='display:none'> <br>";
}
</div>
<script type="text/javascript">
function imgCheck() {
var position = $("img").offset().top;
var scrollCheck = $("#b1").scrollTop() + $("#b1").height();
if ( scrollCheck > position) {
$("img").fadeIn("fast");
}
$("#b1").scroll( function() { imgCheck() } );
</script>
</code></pre>
<p>Although this is not quite working for me. Could anyone help me out or shoot out some suggestions?</p>
|
javascript jquery
|
[3, 5]
|
2,995,113 | 2,995,114 |
Running js file only once
|
<p>I have a small intro with fadein's etc.. But i would only like this to run once. I dont want to run the intro every time the user returns to the home page. Is there a way to run a js file once?</p>
|
javascript jquery
|
[3, 5]
|
4,820,172 | 4,820,173 |
How can get Full string from container?
|
<p>I want to search specific string from div and find out whole(full) string</p>
<p>I.e :</p>
<pre><code> <div id='MSO_ContentTable'>
[Rotator(Cat=Marketing,Top=5,AutoRotate=true)]
[Rotator(sg=dummy,Bottom=5,Autosb=true)]
blah blah blah .......
</div>
</code></pre>
<p>This <code>div</code> contains many data but I want to just find full string only using <code>Rotator</code> character in Div content.</p>
<pre><code> $("div[id*='MSO_ContentTable']:contains('[Rotator')").each(function()
{
// find out div but not getting full string.
//.In div also contains another html some thing like
//<table>,<div> etc. i want to just find string which contain(Rotator)
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,733,146 | 3,733,147 |
Save image to user machine
|
<p>I am trying to do something like Facebook's "Download" Photo link when viewing an album photo. Trying to avoid opening popups.
Any Javascript/jQuery/PHP method to do it?
I am aware of this: <a href="http://www.jtricks.com/bits/content_disposition.html" rel="nofollow">http://www.jtricks.com/bits/content_disposition.html</a>
But I don't have control over the server configuration to do so.
Please let me know what is the best way to achieve this.</p>
|
php javascript jquery
|
[2, 3, 5]
|
4,267,493 | 4,267,494 |
Select data using arrow keys,from ajax suggestion text box
|
<p>I am having a input text box, in which user enters some data and presses enter key. Then some suggestion are shown ,then the user should be able to select values from these suggestions using arrow keys. Then he selects a data from suggestions using enter key and this selected value should be shown in the input text field.
I am able perform all this using mouse, but now i want to do this using arrow keys. This is how i implemented enter key event using jquery.</p>
<pre><code> $('#dishes').keydown(function (e){
if(e.keyCode == 13){
menusearch('dishes','<?=$user_id?>') ;
}
})
</code></pre>
<p>I am looking something along these lines.</p>
|
php javascript jquery
|
[2, 3, 5]
|
1,896,344 | 1,896,345 |
Can this be written much more simplistically using a foreach?
|
<pre><code>function GetDiagrams(componentID) {
$.getJSON("../PlanView/GetDiagrams", { ComponentID: componentID }, function (diagrams) {
for (var i = 0; i < diagrams.length; i++) {
PaintDiagram(diagrams[i]);
}
});
}
</code></pre>
<p>All I am doing is calling PaintDiagram on each element returned. I tried Googling for a bit because I am pretty confident this is easily reducible, but was not able to pull up a quick example.</p>
<p>Is this function a candidate for any more refactoring?</p>
|
javascript jquery
|
[3, 5]
|
4,240,569 | 4,240,570 |
Run JS function on page load if condition
|
<p>I have the following link which opens a dom window...</p>
<pre><code><a href='#inlineContent' class='defaultDOMWindow'>(edit interests)</a><br /><br />";?>
<script type='text/javascript'>
$('.defaultDOMWindow').openDOMWindow({
eventType:'click',
loader:1,
loaderImagePath:'animationProcessing.gif',
loaderHeight:16,
loaderWidth:17
});
</script>
<div id='inlineContent' style='display: none;'>
<h1 class='login-hdr'>Your Interests!</h1>
</code></pre>
<p>What I need to do is if a user visits a certain url eg, www.mysite.com#DOMwindow the DOM window would then load without the user having to click the link, but if he visits the url normally with www.mysite.com the window would not load, im not sure if this is possible but thought id ask...</p>
|
javascript jquery
|
[3, 5]
|
5,036,617 | 5,036,618 |
Forms Authentication update user status after specific user session ends
|
<p>Hi I'm using Forms Authentication for authentication users in my asp.net c# application. How can I update user status after specific user session ends (automatically) or browser close?</p>
<p>Thank you</p>
|
c# asp.net
|
[0, 9]
|
4,144,229 | 4,144,230 |
jQuery .val() not working when setting a variable
|
<p>If i have an input like so:</p>
<pre><code><input type="text" id="textvalue" />
</code></pre>
<p>the following code will change its value:</p>
<pre><code>$(document).ready(function() {
$('#textvalue').val("hello");
});
</code></pre>
<p>however the following will not work:</p>
<pre><code>$(document).ready(function() {
var = "hello";
$('#textvalue').val(var);
});
</code></pre>
<p>Why does the second one not work? I need to be able to change the value of the textbox to the value of a variable</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.