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
5,861,849
5,861,850
Scripting equivalent of Document.Write()
<p>I want to use the C# Scripting language on ASP.net. And I also want to manipulate my html page by using document.write, and I can't find the option in C#. I also edit my code straight to the html code and not on the .aspx.cs file. So is there any same function of document.write to the c#?</p>
c# asp.net
[0, 9]
3,387,338
3,387,339
android: create click listener programmatically with anonymous class
<p>I see a few examples of making a TextView clickable by setting onClick="clickHandler" and clickable="true". Is there a way to use an anonymous class instead of hard coding a "clickhandler" method inside the activity.</p>
java android
[1, 4]
4,344,730
4,344,731
jQuery, JavaScript - How to create function that checks if form is submitted
<p>I have this code:</p> <pre><code>if($('input[name=id]').length == 1 &amp;&amp; $('input[name=submitted]').length != 1 ) { var id = $('input[name=id]').val(), name = $('input[name=staro_ime]').val(); img_upload(name, id); } </code></pre> <p>When form is submitted, hidden input field with name <strong>submitted</strong> is created. How can I check when form is submitted and then disable code from above?(This function is outside <strong>submit_event</strong>).</p>
javascript jquery
[3, 5]
4,476,032
4,476,033
jquery unbind click event on img element
<p>I couldn't bind a click event after an unbind. Can anyone solve this problem? Here is a sample of my code:</p> <pre><code>if(condition for radio button) jQuery('#txtEffectiveBeginDate'). next('.ui-datepicker-trigger'). unbind('click'). css({ 'opacity': .50 }). css('cursor', 'text'); else jQuery('#txtEffectiveBeginDate'). next('.ui-datepicker-trigger'). bind('click'). css({ 'opacity': 1 }). css('cursor', 'pointer'); </code></pre>
javascript jquery
[3, 5]
1,715,685
1,715,686
using closest().find().text()
<p>Hi guys i previously asked a question and got a good solution. here is the question:</p> <p><a href="http://stackoverflow.com/questions/2536892/jquery-how-to-find-an-element-which-is-comming-2-elements-before-current-element">http://stackoverflow.com/questions/2536892/jquery-how-to-find-an-element-which-is-comming-2-elements-before-current-element</a></p> <p>when im using the solution which i got :</p> <pre><code>paragrafheading.push($(this).closest('&gt; h3').find('&gt; h3').text()); </code></pre> <p>im getting only [object Object] instead of the element text</p>
javascript jquery
[3, 5]
4,285,502
4,285,503
Android pick 2 random int from a specified range
<p>In my Android app, I need to pick two random integers from a specified range. The below code works, but it's not really picking a random integer, it's shuffling the ints. And the thing that bugs me is that I have to specify the max int as one less than is actually the max value because of the <code>randomNum2= (int)it.next();</code> bit in the code. If I put the correct number (currently 127) as the max, then I get the error <code>java.util.NoSuchElementException</code> because it's looking for 128 as the next iteration. Before I was using <code>rand = new Random(); randomNum1 = rand.nextInt(max - min + 1) + min; randomNum2 = rand.nextInt(max - min + 1) + min;</code> But the problem there is the two random ints may end up being the same, and I need them to be unique. So can anyone suggest a better method for getting TWO random numbers from a min/max interger range? Here's my code:</p> <pre><code> int min = 1; int max = 126; int randomNum1; int randomNum2; List&lt;Integer&gt; choicesL; public void randomTwo() { choicesL = new LinkedList&lt;Integer&gt;(); for (int i = min; i &lt;= max; i++) { choicesL.add(i); } Collections.shuffle(choicesL); Iterator&lt;Integer&gt; it = choicesL.iterator(); while (it.hasNext()) { randomNum1= (int)it.next(); randomNum2= (int)it.next(); } } </code></pre>
java android
[1, 4]
4,959,717
4,959,718
Populate Html.DropDownList with jquery or JS
<p>Here is what I have:</p> <pre><code>for (i = 0; i &lt; data.length; i++) { $("#myDropDownLisTId").find('tbody') .append($('&lt;option&gt;').attr('value', data[i].id).attr('name', data[i].name) ); } </code></pre> <p>But the dropdown list always remains the same. Why is this not working? the data variable has beautiful values. Also, I would like before the for loop to empty the dropdown list/ How to do it?</p> <p>Here is my drop down list in the view:</p> <pre><code>&lt;%= Html.DropDownList("myDropDownLisTId")%&gt; </code></pre>
javascript jquery
[3, 5]
3,015,918
3,015,919
Does Javascript SetTimeOut Affect Page Performance?
<p>I am writing an AJAX script that basically calls a PHP page and requests some information. The PHP page queries a database. I want to set the page to make the call every 5 minutes, but the only way I know how to do so is by using the settimeout function. I am wondering if this settimeout function is constantly running is this going to be harsh on the page's performance? is there another way to go about this?</p>
javascript jquery
[3, 5]
1,712,156
1,712,157
how to show text area on button click?
<pre><code>&lt;/html&gt; &lt;head&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $("#popup").click(function(){ // pop up a text area and I want to store value of textarea in a variable. }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form&gt; &lt;textarea rows="2" cols="20" id="area" style="display:none"&gt;&lt;/textarea&gt; &lt;input type="submit" id="popup" value="OK"&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>How to POPUP a text area on a button click?</p>
javascript jquery
[3, 5]
1,015,945
1,015,946
image embedded in a Custom Server Control
<p>How to use image in Custom Server Control ?</p>
c# asp.net
[0, 9]
765,318
765,319
Use a PHP variable in JQuery
<p>Is there anyway I can use a php variable in the JQuery script?</p> <p>Example:</p> <ul> <li>PHP variable: <code>$sr2</code></li> <li>Excerpt of JQuery script (with variable): <code>$('#a2_bottom_$sr2')</code></li> </ul> <p>How can I make it so the variable is valid in that JQuery part?</p> <p>Thanks</p>
php jquery
[2, 5]
1,339,992
1,339,993
PHP can't get raw data sent as multipart/form-data
<p>This is client code (C#) :</p> <pre class="lang-c# prettyprint-override"><code>string boundary = "--ABC"; try { WebRequest request = WebRequest.Create(url); request.Method = "POST"; request.ContentType = "multipart/form-data;boundary="+boundary; using (var requestStream = request.GetRequestStream()) using (var writer = new StreamWriter(requestStream)) { writer.WriteLine(boundary); writer.WriteLine("Content-Disposition: form-data; name=\"data\""); writer.WriteLine(); writer.WriteLine("abcdefg"); writer.WriteLine(boundary + "--"); writer.Flush(); } string responseData = string.Empty; using (var response = request.GetResponse()) using (var responseStream = response.GetResponseStream()) using (var reader = new StreamReader(responseStream)) { responseData=reader.ReadToEnd(); } </code></pre> <p>and this is the server code (php):</p> <pre><code>print file_get_contents("php://input"); </code></pre> <p>or:</p> <pre><code>print $_POST["data"]; </code></pre> <p>or:</p> <pre><code>print $http_raw_post_data; </code></pre> <p>or:</p> <pre><code>$fp=fopen("php://output","rb"); $contents=fread($fp,5); fclose($fp); print $contents; </code></pre> <p>Non of these code working, all print empty.<br> Could any one help please?</p>
c# php
[0, 2]
2,408,652
2,408,653
How to display Updated records in Gridview first row
<p>I am santhosha, actually am developing a sample web application using asp.net and c# which includes a sample CRUD operation, here i want to display updated record to first row of the gridview. I am new to Asp.net and C#, can anyone please get me out of this.</p> <p>Advance Thanks.</p> <p>With Regards,</p> <p>Santhosha h P</p>
c# asp.net
[0, 9]
4,941,096
4,941,097
asp.net saving string to SQL including line breaks for formating
<p>I want to be able to store strings in the DB but some are long and i want to format them such that when i copy them out of SQL and past them into notepad they have line breaks to break up the otherwise single line that runs on forever and hard to read.</p> <p>lets say i am storing a string of all the session variables like this, how do i include line breaks in here?</p> <pre><code>StringBuilder theBody = new StringBuilder(); theBody.Append("Session Values: " + "\n"); foreach (string s in Session.Keys) theBody.Append(s + ":" + Session[s] + "\n"); </code></pre>
c# asp.net
[0, 9]
3,905,068
3,905,069
Warn User When Navigating from Page with Unsaved Changes
<p>I'm creating an ASP.NET website and I want to implement logic to warn the user when they are navigating away from a page they've edited.</p> <p>I found quite a bit of info on the web, although most of it seems quite outdated. Note that I still have a lot to learn about jQuery.</p> <p>The following code displays the message as expected.</p> <pre><code>window.onbeforeunload = function () { return 'You have unsaved changes!'; } </code></pre> <p>However, the following code--which is supposed to be equal to the code above only when a change is made--does not work. No warning is ever displayed.</p> <pre><code>$('input').change(function () { window.onbeforeunload = function () { return "Your changes have not been saved?" }; }); </code></pre> <p>Can someone say why the second snippet doesn't work? Or perhaps you can point me to a reference that is more recent.</p>
javascript jquery
[3, 5]
2,408,187
2,408,188
javascript jQuery get object key
<p>I have the following code:</p> <pre><code>!function($){ $.keys = { backspace: 8, tab: 9, enter: 13, escape: 27, space: 32, pageUp: 33, pageDown: 34, end: 35, home: 36, left: 37, up: 38, right: 39, down: 40, delete: 46, numpadEnter: 108, comma: 188 }; }(window.jQuery); </code></pre> <p>And I want to build a function that returns a string of a key code for example:</p> <pre><code>$.keys.toString = function(key){ switch(key){ case $.keys.backspace: return 'backspace'; } }; </code></pre> <p>The list would ofcourse be bigger, and support all the keys of the $.keys object. But is there a possibility that the $.keys.toString function actually uses the $.keys array to convert the int to string, so I don't have to make a switch statement.</p> <p>Something like getKeyFromObjectValue?</p> <p>Thanks for help :)</p>
javascript jquery
[3, 5]
3,840,873
3,840,874
Put together tiles in android sdk and use as background
<p>In a feeble attempt to learn some Android development am I stuck at graphics. My aim here is pretty simple:</p> <ol> <li>Take n small images and build a random image, larger than the screen with possibility to scroll around.</li> <li>Have an animated object move around on it</li> </ol> <p>I have looked at the SDK examples, Lunar Lander especially but there are a few things I utterly fail to wrap my head around. I've got a birds view plan (which in my head seems reasonably sane):</p> <p>How do I merge the tiles into one large image? The background is static so I figure I should do like this:</p> <ol> <li>Make a 2d array with refs to the tiles</li> <li>Make a large Drawable and draw the tiles on it </li> <li>At init draw this big image as the background</li> <li>At each onDraw redraw the background of the previous spot of the moving object, and the moving object at its new location </li> </ol> <p>The problem is the hands on things. I load the small images with "Bitmap img1 = BitmapFactory.decodeResource (res, R.drawable.img1)", but then what? Should I make a canvas and draw the images on it with "canvas.drawBitmap (img1, x, y, null);"? If so how to get a Drawable/Bitmap from that?</p> <p>I'm totally lost here, and would really appreciate some hands on help (I would of course be grateful for general hints as well, but I'm primarily trying to understand the Graphics objects). To make you, dear reader, see my level of confusion will I add my last desperate try:</p> <pre><code>Drawable drawable; Canvas canvas = new Canvas (); Bitmap img1 = BitmapFactory.decodeResource (res, R.drawable.img1); // 50 x 100 px image Bitmap img2 = BitmapFactory.decodeResource (res, R.drawable.img2); // 50 x 100 px image canvas.drawBitmap (img1, 0, 0, null); canvas.drawBitmap (img2, 50, 0, null); drawable.draw (canvas); // obviously wrong as draw == null this.setBackground (drawable); </code></pre> <p>Thanks in advance</p>
java android
[1, 4]
5,999,133
5,999,134
run c# code in java
<p>I have a code which is written in c#, how can I run it in java code??</p> <p>Thanks</p>
c# java
[0, 1]
1,785,217
1,785,218
Want to extract .js link from webpage
<p>I want to extract .js link from a webpage . How can I find the link of a javascript page from the source code of web page.</p> <p>I want my answer in java prospective.</p>
java javascript
[1, 3]
894,681
894,682
select previously focused input before blur
<p>I have this auto suggest menu with my input fields and as there are multiple fields I need to select the field that was in focus just before the li was clicked and blurred the input, so it knows which input to select. is there a way to get the last input field focused before the blur? Thanks</p> <pre><code>function fill(thisValue) { if(thisValue === undefined){ $('#suggestions').fadeOut(); } else { $("input *//input in focus before blur//* .val(thisValue); setTimeout("$('#suggestions').fadeOut();", 600); $('.email').addClass('load'); } } </code></pre>
javascript jquery
[3, 5]
421,707
421,708
using this in javascript function
<p>I have code like this </p> <pre><code>&lt;img onclick="getTitle();" title="myimg" &gt; function getTitle() { alert(jQuery(this).attr("title"); } </code></pre> <p>and its not working. Can somebody explain how to do this right. And what is wrong with this code. </p>
javascript jquery
[3, 5]
2,093,880
2,093,881
Call jQuery function from JavaScript
<p>I have some jQuery code:</p> <pre><code>$(function(){ function someFunc(){ /*do something*/ }; ............. }); </code></pre> <p>And now I want call someFunc from JavaScript like below:</p> <pre><code>function test(){ $.fn.someFunc(); } </code></pre> <p>But it doesn't work! I've seen an article <a href="http://stackoverflow.com/questions/8533439/how-to-call-function-in-jquery-from-javascript">how to call function in jquery from javascript</a>. Is it possible? </p>
javascript jquery
[3, 5]
1,553,320
1,553,321
Array inside a static instance of an Object is destroyed
<p>I made a class:</p> <pre><code>public class Msg { int[] Data; } </code></pre> <p>In the program startup I create the class and create the array:</p> <pre><code>static Msg rMessage; rMessage = new Msg(); rMessage.Data = new int[8]; </code></pre> <p>The problem is that if I want to use the array later in the program it is destroyed. In the startup I can see the array in the debugger, but later in the code it changes to <code>null</code>. The other properties of the class are still set to the right value.</p> <p>Am I missing something?</p>
java android
[1, 4]
5,735,594
5,735,595
Declaration function inside ( )
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/5020479/what-advantages-does-using-functionwindow-document-undefined-windo">What advantages does using (function(window, document, undefined) { … })(window, document) confer?</a><br> <a href="http://stackoverflow.com/questions/9053842/advanced-javascript-why-is-this-function-wrapped-in-parentheses">Advanced Javascript: Why is this function wrapped in parentheses?</a> </p> </blockquote> <p>I just checked how jquery is written, then in the first line of it i see this:</p> <pre><code>(function( window, undefined ) { }); </code></pre> <p>My question is what is the meaning or reason the declaration of function is inside the <code>(</code> and <code>)</code>?</p>
javascript jquery
[3, 5]
802,853
802,854
menu is disordered when javascript executes
<p>I am working on a ASP.NET application using .NET framework 4.0</p> <p>I want to display javascript alerts when some code on the server finishes executing.</p> <p>for example:</p> <pre><code>protected void Button1_Click(object sender, EventArgs e) { NewAllocation.getSettings(); NewAllocation.populateParentFundTable(FundNameTextBox.Text, RemarksTextBox.Text, Decimal.Parse(AmountTextBox.Text), DateTime.Parse(DateTextBox.Text), Decimal.Parse(SurplusTextBox.Text)); ClientScript.RegisterStartupScript(GetType(),"key","alert(\"New fund allocation successful\");",true); } </code></pre> <p>I am calling the javascript code like this because <strong>the javascript alert should only execute after the c# code in the button handler completes</strong>.</p> <p>The problem is, when the javascript alert executes, my menu gets disordered.</p> <p><img src="http://i.stack.imgur.com/nBXja.png" alt="enter image description here"></p> <p>Whereas before clicking the button it was like this:<br /><br /></p> <p><img src="http://i.stack.imgur.com/NFDJR.png" alt="enter image description here"></p> <p><br /><br /><br /><strong>My menu was designed in a master page using ASP.NET menu controls.</strong></p> <p>How to solve the menu disorder problem?</p>
javascript asp.net
[3, 9]
789,297
789,298
loading a whole series of images using jquery
<p>I am using this library:</p> <p><a href="http://blog.stableflow.com/jquery-plugins/360-degrees-product-view/" rel="nofollow">http://blog.stableflow.com/jquery-plugins/360-degrees-product-view/</a></p> <p>and what I want to do is to dynamically load the entire series of images in to an elenent:</p> <pre> &lt;div id="product" style="width: 640px; height: 300px; overflow: hidden;"&gt; /* These images are loaded and appended to the div element dynamically &lt;img src="images/01.jpg" alt="" /&gt; &lt;img src="images/02.jpg" alt="" /&gt; &lt;img src="images/03.jpg" alt="" /&gt; &lt;img src="images/04.jpg" alt="" /&gt; &lt;img src="images/05.jpg" alt="" /&gt; &lt;img src="images/06.jpg" alt="" /&gt; /* &lt;/div&gt </pre> <p>and then call the j360 library to set it up:</p> <pre><code> jQuery(document).ready(function() { jQuery('#product').j360(); }); </code></pre> <p>after the images have been loaded.</p> <p>I have only seen tutorials where one image is loaded - <a href="http://jqueryfordesigners.com/image-loading/" rel="nofollow">http://jqueryfordesigners.com/image-loading/</a> .... Are there any techniques for loading and appending a bunch of images in order?</p> <p>thanks in advance</p>
javascript jquery
[3, 5]
5,246,577
5,246,578
Access Server Side DataTable to javascript in asp.net MVC 3.0
<p>How can I access the DataTable created server side in mvc 3.0 in javascript. I want the data in jqgrid so i need the DataTable in javascript.</p>
javascript asp.net
[3, 9]
1,241,769
1,241,770
How to interfere other windows program (with C#, C++ or Java)
<p>Sorry for the unclear title,but my english is not good enough to describes my question in one line.<br/></p> <p><strong>For example</strong>, i have a udp gaming program called <strong>Garena</strong>,its halt user for 5s after every <br/>attemp to join room (by some client-code i guess),therefor i downloaded another program which called <strong>Garena Auto-joiner</strong>(C++) ,this program bypass 5sec waiting and attemp to join room every second,ultil succeed.<br/> <strong>For example</strong> Warcraft III do not have manabar show on top of heroes(nomally just have Hpbar),but when i download <strong>Manabar</strong> and run it after in game, it even render a manabar below Hpbar<br/></p> <p>What i want to ask is: "how can it do that?","is it related with cracking in anyway?","Can a Java program achieve similar use?".<br/> Thank for your supports!</p>
c# java c++
[0, 1, 6]
1,832,249
1,832,250
Using Javascript/jQuery to crop image
<p>I have a page showing several thumbnail images. When the user mouseovers these images, a modal window showing the full image will appear.</p> <p><strong>Problem:</strong> In order to save space, I want to just store 1 version (the original version) of the image on the server, and create the thumbnail "dynamically" on the client side, probably doing a crop (no resize necessary) using javascript/jquery. Is this possible?</p> <p><em>I have seen (but not tried) those jquery cropping plugins, which seem to have many features like a interactive cropping tool. I dont need these features, just want to crop using javascript. Most likely cropping with gravity in the center of the image.</em></p>
javascript jquery
[3, 5]
3,755,413
3,755,414
jQuery $.get() Memory Usage
<p>This is the jQuery method that I have at my webpage, it refreshes a image every 5 seconds by loading the same page and replacing the image.</p> <pre><code>$(document).ready(function () { var refreshId = setInterval(function () { $.get('default.aspx', function (data) { var page = data; var image = $(page).find("img"); var fecha = $(page).find("div #fecha"); $("#Chart1").attr("src", image.attr("src")); $("#fecha").text(fecha.text()); }); }, 5000); }); </code></pre> <p>I saw that everytime it loads the img, the data get stored somewhere in the browser and it doesnt cleans.. And when I open the task manager, I can see the memory usage growing up..</p> <p>and heres a screenshot of the image axd..</p> <p>Should I worry about freeing memory? Or everything is working as its supposed to..</p> <p><img src="http://i.stack.imgur.com/N6Y8I.png" alt="enter image description here"></p>
javascript jquery asp.net
[3, 5, 9]
2,287,897
2,287,898
The difference between using a self invoking function and document ready
<p>How come this doesn't work in loading header content...</p> <pre><code>(function ($) { var mheaderwrapper = '&lt;div id="header"&gt;&lt;/div&gt;&lt;div class="header-menu"&gt;&lt;/div&gt;'; var mheadercontent = '/shop/Pages/global_header.html'; var mmenucontent = '/shop/Pages/global_megamenu.html'; var mjqueryhover = 'js/jquery.hoverIntent.minified.js'; var mjquerymenu = 'js/jquery.custom-menu.js'; $('#wrapper').prepend(mheaderwrapper); $('#header').load(mheadercontent); $('.header-menu').load(mmenucontent, function(){ $.getScript(mjqueryhover); $.getScript(mjquerymenu); }); })(jQuery); </code></pre> <p>but this does...</p> <pre><code> $.mheader = function() { var mheaderwrapper = '&lt;div id="header"&gt;&lt;/div&gt;&lt;div class="header-menu"&gt;&lt;/div&gt;'; var mheadercontent = '/shop/Pages/global_header.html'; var mmenucontent = '/shop/Pages/global_megamenu.html'; var mjqueryhover = 'js/jquery.hoverIntent.minified.js'; var mjquerymenu = 'js/jquery.custom-menu.js'; $('#wrapper').prepend(mheaderwrapper); $('#header').load(mheadercontent); $('.header-menu').load(mmenucontent, function(){ $.getScript(mjqueryhover); $.getScript(mjquerymenu); }); } $(function() { $.mheader(); }); </code></pre>
javascript jquery
[3, 5]
5,344,184
5,344,185
jQuery: Returning the text from first-child or self
<p>I am trying to get the text inside an element and I only want to get the text if it's inside the first-child of a placehoder div or if there are no childrent and it's only text inside.<br /> So the two scenarios are:</p> <pre><code>&lt;div id="wrap"&gt;text1&lt;/div&gt; </code></pre> <p>and</p> <pre><code>&lt;div id="wrap"&gt;&lt;b&gt;text1&lt;/b&gt;&lt;b&gt;text2&lt;/b&gt;&lt;/div&gt; </code></pre> <p>So In both cases I want to get back <code>"text1"</code><br /> I know how to do it with 2 different queries but I am trying to unite them into one </p> <pre><code>$("#wrap :first-child").text() $("#wrap").text() </code></pre>
javascript jquery
[3, 5]
3,145,646
3,145,647
loading, scrolling , zoom in and zoom out the images like google map
<p>I am working on a web application. i just wanna know the way to do it. its just like a map application, but not the map.</p> <p>i need to display 100 images on the webpage inside a div from mysql database. each image would display on a specific predefine tile. i wants the following functionalists. </p> <ol> <li>loading of the images(not the all image)</li> <li>zoom in and zoom out. update the images like a map.</li> <li>scrolling. update the images like a map.</li> </ol> <p>a. my div can only displays 25 images. i wants to load only 25 images in that area. remaining images should load on scroll or zoom in and out.</p> <p>b. if user clicks on "zoom in" then it should load and shows the next layer of big images like in google map and if i click on zoom out then it shows the previous layer of small images.</p> <p>can anyone give me the idea how to build this application. I have checked OpenLayers, geo server and ajax-zoom already. i dont wants to go for geo-server as its not the mapping application. but i need the same functionality of map. shall i use jquery plugins to do this.</p> <p>Please help</p> <p>Regards, Asif Hameed</p>
php javascript jquery
[2, 3, 5]
176,144
176,145
asp.net get filename of a file inside the specific folder
<p>Good morning!</p> <p>I would like to ask some help from you guys on how do i do this problem. I'm using asp.net and my problem is on getting the list of filename inside the folder. Is there a function on this? I tried this on console apps there's a function like GetFileName. Hope somebody could help me on this.</p> <p>Thank you so much.</p> <p>Regards,</p>
c# asp.net
[0, 9]
477,643
477,644
C# Switch on enums
<p>I have an enum:</p> <pre><code>public enum Status { Incomplete = 1, Complete = 2, Cancelled = 3, Deleted = 4 } </code></pre> <p>Now on a certain page I wish to list this enum in a checkboxlist. This would be fine except that I want the text of each checkbox to display different text than the enum. </p> <p>i.e the check boxes should say:</p> <p>"Not Processed" instead of "Incomplete"</p> <p>"Processed" instead of "Complete"</p> <p>"Void" instead of "Cancelled"</p> <p>Is it possible to put this enum in a foreach and then switch on the status and update the text. Like so:</p> <pre><code>var statuses = Enum.GetNames(typeof(Status)); foreach (var status in statuses))) { switch (status) { case Status.Complete.ToString(): status = "Processed"; break; ...etc } } </code></pre> <p>Any ideas would be greatly appreciated.</p>
c# asp.net
[0, 9]
1,500,075
1,500,076
how to get the prefect url from html encoded url
<p>Folderpath\0\Microsoft%202007\chapter1\images</p> <p>how can i remove %20 from this url path.</p>
c# asp.net
[0, 9]
791,447
791,448
How do I call a function on selected element?
<p>Warning: stupid question! But I have tried looking this up and I can't figure out what to search for or what I am doing wrong. I am trying to make an image fade in, here is my code:</p> <pre><code>$('.Middle-Tennessee').show().showNice(this); </code></pre> <p>and later I have my function:</p> <pre><code>function showNice(x){ x.css('opacity', '0'); x.animate({ opacity: 1, }, 5000); } </code></pre> <p>Thanks!!</p>
javascript jquery
[3, 5]
5,852,245
5,852,246
Code in External jquery file does not get fired without an alert
<p>I have an external js file that needs to get fired when a certain element is clicked. This code is inside the ready function. When I have an alert statement inside the ready function everything works fine. but when I remove the alert, the ready function is not getting called. What could possibly be the reason for this strange behavior?</p> <pre><code>alert() $(".monthChanger span").click(function (event) { event.stopPropagation(); $(".monthChanger span ul").show(); }); </code></pre> <p>without this alert call the above code does not get fired. This code is inside the ready() function</p>
jquery asp.net
[5, 9]
5,224,105
5,224,106
finding the location , temp , city , country and nearest places using server
<p>i am passing my lat ad logi value from the android to server. On the server side i am using php . Now i want to show some information regarding that values . </p> <p>Information may contain </p> <ol> <li>Location name </li> <li>temperature </li> <li>city </li> <li>country </li> <li>Nearest places</li> </ol> <p>Please if anybody knows about any point to get then let me know . Thanks </p>
php android
[2, 4]
3,636,326
3,636,327
PHP Session Clash With JavaScript Cookies
<p>I'm trying to maintain the position of the vertical scroll bar so user need not to scroll to where they were when the page auto-refresh. This is the first time I'm using JavaScript so I haven't written anything yet to make the scroll bar function work but tried to test using cookies tutorial on the Internet like simple cookies tutorial to ask for your name and then the page will display our your name on the alert box. </p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; &lt;!-- function WriteCookie() { if( document.myform.customer.value == "" ){ alert("Enter some value!"); return; } cookievalue= escape(document.myform.customer.value) + ";"; document.cookie="name=" + cookievalue; alert("Setting Cookies : " + "name=" + cookievalue ); } function ReadCookie() { var allcookies = document.cookie; alert("All Cookies : " + allcookies ); // Get all the cookies pairs in an array cookiearray = allcookies.split(';'); // Now take key value pair out of this array for(var i=0; i&lt;cookiearray.length; i++){ name = cookiearray[i].split('=')[0]; value = cookiearray[i].split('=')[1]; alert("Key is : " + name + " and Value is : " + value); } } //--&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form name="myform" action=""&gt; Enter name: &lt;input type="text" name="customer"/&gt; &lt;input type="button" value="Set Cookie" onclick="WriteCookie();"/&gt; &lt;input type="button" value="Get Cookie" onclick="ReadCookie()"/&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>When I click on "Get Cookie" button, the alert will list out PHPSESID value and some other cookies value that I've tested earlier using a different. So I use print_r to display out the $_COOKIE array and discovered the JavaScript cookies are added to PHP's cookies as well. Is there anyway to create cookies using JavaScript without having to affect PHP's cookies? </p>
php javascript
[2, 3]
3,891,860
3,891,861
Javascript: Get div inside of div
<p>I have two divs nested like so:</p> <pre><code>&lt;div id="upper"&gt; &lt;div id="lower" name="moo"&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>How would I, using jQuery or JavaScript alone, can I get the name of that lower nested div?</p>
javascript jquery
[3, 5]
1,784,271
1,784,272
Jquery "THIS".myFuntionName is unavailable when in ajax Success? but ok before
<p>can anyone help, i have an issue with the keyword this.. before entering the ajax call its available but when entering Success. my "this" is available but doesn't contain the same info i.e. a method i wish to call.. This example shows what i mean..</p> <p>I would appreciate any help, this.isoDateReviver is available before doing ajax.. and then when success arives .. this.isoDateReiver is UNDEFINED</p> <pre><code> var data = new Object(); data.year = this.today = new Date().getFullYear(); this.isoDateReviver("yes","yes"); //// THIS WORKS HERE $.ajax({ type: "POST", url: "MyService.aspx/GetHolidays", data: JSON.stringify(data), contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { var holidays = JSON.parse(msg.d, this.isoDateReviver); // THIS DOES NOT WORK its undefined Calendar.initalizeHolidays(holidays); }, error: function(msg) { alert(error); } }); </code></pre>
javascript jquery
[3, 5]
1,831,155
1,831,156
JQuery: replace and close open tags
<p>I want to divide the content of an element in divs. The delimiter is <code>&lt;hr/&gt;</code> and all open tags should be closed before the closing-div and (if needed) reopened after the reopened div tag. My naive idea was to traverse with jQuery through an elements children, replace all occurrences of <code>&lt;hr/&gt;</code> with <code>&lt;/div&gt;&lt;div&gt;</code> and close all open tags (up to a certain level) before that. I don't know how to reopen them though.</p> <p>Example:</p> <pre><code>&lt;div id="content"&gt; &lt;p&gt;Bla some text &lt;hr/&gt; Some more text &lt;/p&gt; &lt;/div&gt; </code></pre> <p>will become:</p> <pre><code>&lt;div id="content"&gt; &lt;div&gt; &lt;p&gt;Bla some text &lt;/p&gt; &lt;/div&gt;&lt;div&gt; &lt;p&gt;Some more text &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>What I had in mind was to simply visit each tag in their order of appearance, add them to a stack when they open, remove them when they're closed again, if I find a delimiter, close all tags in the stack (but don't remove them), insert the <code>&lt;div/&gt;</code> tag, reopen all tags on the stack in reverse order. continue until end and close all still open tags.</p> <p>The purpose of this is to chunk a text into predefined parts. It is for a text pagination and the divs are the pages. I want the user to be able to manually specify the break, even inside of ul's, p's and so on.</p> <p>Any help is appreciated.</p>
javascript jquery
[3, 5]
5,007,249
5,007,250
can i change printer_write in another language?
<p>I am trying to print a page. I use <code>printer_select_font</code> to change the font and then I use <code>printer_draw_text</code> to print, but it is slow.</p> <p>So my questions is, can I change <code>printer_write</code> in another language? Thanks in advance. </p> <p>I use this code:</p> <pre><code>$handle = printer_open(); printer_start_doc($handle, "My Document"); $handle = printer_open(); printer_set_option($handle,PRINTER_FORMAT_CUSTOM,'2x2'); $handle = printer_open(); printer_start_doc($handle, "My Document"); printer_start_page($handle); $font = printer_create_font("Saumil_guj2", 15, 9, 100, false, false, false, 0); printer_select_font($handle, $font); $dyna=10; if($_SESSION['slip_setting']['soc_name']=="full") { printer_draw_text($handle, $_SESSION['society_info']['soc_name_eng'], 10, $dyna); $tot=$dyna+15; } </code></pre>
php jquery
[2, 5]
2,743,271
2,743,272
how to select text naturally with jquery?
<p>Due to copyright laws and licensing agreements, I'm unable to allow copy+paste on certain parts of text we're displaying. So selecting is disabled and right click is disabled. It sucks, I know, but unfortunately its part of playing the game and remaining in business.</p> <p>With jquery, I've been able to allow the user to select text line by line -- that is, they mouseover a line of text, it gets highlighted and if they click it, then it permamently gets selected which causes a 'copy' button to appear. </p> <p>I want to this but allow partial lines to be selected. So if the user only wants to copy two words from the line, they can. More like the natural selection process. </p> <p>I'm having difficulty doing this. In my whole line solution, I add divs around each line. But this doesn't seem efficient for partial lines? Would I have to have spans around each word? </p> <p>Any other ideas?</p>
javascript jquery
[3, 5]
813,636
813,637
JQuery issue by IE
<p>I get an error by following code:</p> <pre><code>jQuery.post('/user/result/generate',{ 'id': getHidden() }, function(html) { $('#result').html(html); }); </code></pre> <p>error: </p> <pre><code>TypeError object doesn't support this property or method </code></pre> <p>this code works fine in FireFox, but not in IE.</p> <p>How can I fix this?</p> <p>p.s</p> <p>the function getHidden() wil return a selected item id, it works very fine. I can see that this work! </p> <p>I put alert() in this function... like this:</p> <pre><code>jQuery.post('/user/result/generate',{ 'id': getHidden() }, function(html) { alert(html); $('#result').html(html); }); function getHidden(){ alert($("#selectId").val()); return $("#selectId").val(); </code></pre> <p>}</p> <p>and I get the selectId well! but not html, so this function stops by function(html), thus by the response! I put try catch in this function, get error: TypeError object doesn't support this property or method</p> <p>but this function works fine after refresh the page by press F5.... so I do not understand why this function works not directly but after refresh...</p>
javascript jquery
[3, 5]
902,732
902,733
Android: How do you play a sound at a volume unaffected by any of the Android system volumes (ringtone, media, etc)?
<p>I'd like to play a sound from a (ringtone) URI in my Android application. However, I would like to play this sound at an arbitrary volume and not have system volumes, such as Media and Ringtone volume, affect playback.</p> <p>I've been paging through the API docs, but I'm at a loss. Is this possible with Android and if so, how would I do it?</p>
java android
[1, 4]
4,286,416
4,286,417
Is there a way to add Apple remote support to a website using Javascript?
<p>I like how you can use the Apple remote in front row and i know other apps on the mac support it. I am wondering if Web Apps could support it via Javascript? I had a idea for a tv type interface. I would have it understand the Apple remote and also understand up down left right enter back. I know from working on a slideshow app before that left and right keys have a number that is passed when pressed. Does the Apple Remote pass anything or how could i make web apps understand it?</p>
javascript jquery
[3, 5]
5,118,542
5,118,543
How do I get the output CLASS file names after compiling Java files in C#?
<p>So, when you compile Java (<em>.java) into a class file (</em>.class), the name of the file can change, as well as the extension of the file. If I have a piece of code in C# that compiles the java code into class files, how would I then get the names of those output class files in C#?</p>
c# java
[0, 1]
353,967
353,968
How to get one login page for multiple systems?
<p>I have four systems running on the same server. I want to let the users to log in once for all the systems. I made one user-management system to create users and edit them.</p> <p>I tried to save in the session but it didn't help. </p> <p>Any suggestions? I am working on asp.net.</p>
c# asp.net
[0, 9]
5,149,738
5,149,739
jQuery .css() not working in IE 6,7,8 and Firefox, but works in Chrome, Safari, Opera
<p>UPDATE: THIS HAS BEEN SOLVED.</p> <p>I'm trying to change the default style of an Assistly site through JavaScript, because the stylesheet is not editable by me. It's working fine in Chrome, Safari, Opera, and IE9; but not in IE 6,7,8 or any Firefox.</p> <p>In the code below the first two lines that are setting an h2 and an image are working across all browsers, but the .css() lines are not. Why would .css() not work in certain browsers?</p> <p>Here is the code.</p> <pre><code>&lt;script type="text/javascript"&gt; jQuery(document).ready(function(){ $("#support-header .wrapper h2").first().html('&lt;h2&gt;Real Estate Help&lt;/h2&gt;'); $("#company-header .wrapper").html('&lt;a href="http://help.mysite.com/"&gt;&lt;img src="http://www.mysite.com/logo-red.png" /&gt;&lt;/a&gt;'); $("body").css({'background': '#FFFFFF !important'}); $("#company-header").css({'background': 'none !important'}); $("#support-header").css({'background': 'none !important', 'border-bottom': 'none', 'padding': '0'}); $("#company-support-portal").css({'background-image': 'url(http://www.mysite.com/container-bg2.jpg) !important', 'background-repeat': 'repeat-x', 'margin-top': '10px'}); }); &lt;/script&gt; </code></pre>
javascript jquery
[3, 5]
4,020,319
4,020,320
How can i achieve this animation effect with just jquery?
<p>I would like to have <a href="http://i.imgur.com/vXQnX.png" rel="nofollow">this</a> effect as shown <a href="http://codecanyon.net/item/hoveralls-v13/full_screen_preview/1367456" rel="nofollow">here</a> using jQuery but without the offered plugin. </p> <p>Is it possible with just jQuery anf if so how?</p>
javascript jquery
[3, 5]
3,559,629
3,559,630
jQuery - Trying to come up with a good strategy
<p>I have some very old hand coded JavaScript which is not scalable. There are loops and loops inside of each other. So I am trying to figure out how to upgrade it into jQuery.</p> <p>Here is how it works:</p> <ul> <li><p>PHP outputs 2 things - a checkbox and a drop down select box (in some cases 2 drop downs)</p></li> <li><p>The count of checkbox and selectboxes varies. Sometimes there is only 1 and sometimes there are 5 or 7 or 10. </p></li> </ul> <p>Here is how the javascript works:</p> <ol> <li><p>If a user selects something from the dropdown or 2 drop downs and clicks on Submit, then the checkbox next to it is automatically checked before submitting the form.</p></li> <li><p>If a user selects the checkbox but the dropdown is not selected or the default (first value) is selected, then it calls the validation plugin. </p></li> <li><p>If a user selects the check and selects only one of 2 dropdowns, then it calls the validation.</p></li> </ol> <p>I have been able to figure out how to count the checkboxes in a div like this:</p> <pre><code>total = 0; $("#branches_checkboxes input[type=checkbox]").each(function () { total++; } </code></pre> <p>The checkbox usually have a name such as <code>optionadd_id[2]</code> or <code>optionadd_id[3]</code> or <code>optionadd_id[4]</code></p> <p>And the dropdown next to them have the name, respectively, <code>optionsselectid[2][2]</code> or <code>optionsselectid[3][2]</code> or <code>optionsselectid[4][2]</code></p> <p>I am not looking for someone to code the entire thing for me. I just need some guidance on how to get started on this.</p> <p>Thanks!</p>
javascript jquery
[3, 5]
2,071,567
2,071,568
What does ver=3.1.2 at the end of ajax.js or filename.js?ver=3.1.2 mean?
<p>I am having some conflicting jquery issues on a website and as I was trying to figure it out, I have noticed the following suffixes in my head files:</p> <pre><code>ajax.js?ver=3.1.2'&gt;&lt;/script&gt; jquery.prettyPhoto.js?ver=3.1.2'&gt;&lt;/script&gt; jquery.cycle.all.2.72.js?ver=3.1.2'&gt;&lt;/script&gt; jcarousellite_1.0.1.min.js?ver=3.1.2'&gt;&lt;/script&gt; jquery.kwicks-1.5.1.pack.js?ver=3.1.2'&gt;&lt;/script&gt; ddsmoothmenu.js?ver=3.1.2'&gt;&lt;/script&gt; js.js?ver=3.1.2'&gt;&lt;/script&gt; </code></pre> <p>obviously the 3.1.2 is probably some type of "latest update" or something. How does it work? How do you synch theme or balance them out?</p> <p>Would these other files be failing because of mixed versions? Here the rest of it:</p> <pre><code>.css?ver=20110325' type='text/css' media='all' /&gt; .css?ver=3.1.2' type='text/css' media='all' /&gt; l10n.js?ver=20101110'&gt;&lt;/script&gt; jquery.js?ver=1.4.2'&gt;&lt;/script&gt; all.js?ver=3.1.2#xfbml=1'&gt;&lt;/script&gt; comment-reply.js?ver=20090102'&gt;&lt;/script&gt; </code></pre> <p>Not sure if this is the way I should post on Stackoverflow so feel free to edit as it should.</p>
javascript jquery
[3, 5]
5,605,719
5,605,720
AsyncFileUpload Change Request Size
<p>I am currently working on an ASP.net C# web app. I am using the AjaxControlToolkit ASyncFileUpload, however, when I upload a certain file I get the error message Maximum Request Length Exceeded. Is there a way that I can increase the size limit for file uploads.</p> <p>Thanks for any help you can provide. </p>
c# asp.net
[0, 9]
3,291,696
3,291,697
What's a good JQuery library where I can click the button, and a box (DIV) drops down , for options?
<p>Just a regular box, not too big not too small.</p>
javascript jquery
[3, 5]
2,052,272
2,052,273
can you use jquery to see if a target contains a <b> tag?
<p>so, i have something like this.</p> <pre><code> var $list = $("div#item"); </code></pre> <p>I was looking at :contains in the selector, but i wasnt sure if that applied to markup or if i should do something like:</p> <pre><code> if($list.find("&lt;b&gt;"))return 1; else return 0; </code></pre> <p>Reasoning: Adding functionality to a program which uses inline tags, and want to maintain structure.</p> <p>Goal: if(item contains an inline b, u, i tags) return 1; else return 0;</p>
javascript jquery
[3, 5]
1,587,064
1,587,065
How to apply the fore color and bold in message text using c#..net
<p>i am displaying the one confirm box after saving the values like this</p> <pre><code>showalert("Quote has been saved successfully. Your Submission Number is:" + SaveValue ); </code></pre> <p>now i have display the savevalue bold and underline and some fore color, how to apply(using any format and html styles also)</p>
c# asp.net
[0, 9]
328,216
328,217
Javascript - How to get number of characters in textbox and use substring to delete
<p>I want to get the number of characters in a textbox and use substring to remove characters if the number of characters is >= 255</p> <p>I have the following javascript:</p> <pre><code>&lt;script language="javascript" type="text/javascript"&gt; function CheckMaxLength(Object, MaxLen) { if (Object.value.length &gt;= MaxLen) { //find textbox and use substring } return (Object.value.length &lt;= MaxLen); } &lt;/script&gt; </code></pre> <p>What javascript should I use?</p>
javascript asp.net
[3, 9]
1,692,800
1,692,801
how to use link to read from database in asp.net?
<p>I am using link in aspx page ,If i give in <code>&lt;a href="http://google.com"&gt;&lt;/a&gt;</code> it was working, Suppose if i save in database it was not working , can anyone suggest me how to use it?.</p> <p>I am new to Dnn.</p> <pre><code>&lt;a href='&lt;%# DataBinder.Eval(Container.DataItem, "ImageLink") %&gt;'&gt;&lt;/a&gt; </code></pre>
c# asp.net
[0, 9]
2,473,740
2,473,741
How to read/write file on client side in ASP.NET
<p>How to read file form local file system(client side) in asp.net , is there any activeX require to do this or it can be done with out it</p>
c# asp.net
[0, 9]
2,599,961
2,599,962
jQuery .each() not iterating over array of strings as expected
<p>Doing:</p> <pre><code>var tags = ["foobar", "hello", "world"]; $.each(tags, function(tag) { console.log(tag); }); </code></pre> <p>Gives me an output of </p> <pre><code>0 1 2 </code></pre> <p>Why is my output not </p> <pre><code>foobar hello world </code></pre> <p><a href="http://jsfiddle.net/JLzfS/1/" rel="nofollow">JSFiddle</a></p>
javascript jquery
[3, 5]
104,246
104,247
File created on sdcard but not accessible on PC
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/10643476/sdcard-content-exist-but-cant-see-them">SDCard content exist but cant see them</a> </p> </blockquote> <p>I'm learning to develop apps on Android. </p> <p>I managed to create and write to a file on sdcard. I can see this file and it's contents on my phone through File Manager, however, when I connect my phone to PC, I cannot see this file I just created. </p> <p>Has anyone encountered this before? I can't seem to find a explanation for this.</p> <p>Thanks in advance.</p>
java android
[1, 4]
5,749,463
5,749,464
How to use jquery to change css depending on a condition on dates?
<p>In my web page, I have a table of dates (my date format is dd-mm-yyyy)</p> <pre><code>&lt;tr&gt; &lt;td&gt;05-03-2012&lt;/td&gt; &lt;td name="expiration"&gt;09-07-2012&lt;/td&gt; &lt;td&gt;08-10-2012&lt;/td&gt; &lt;tr&gt; </code></pre> <p>What I want is to put in red color expiration dates when their value is > current date, using Jquery.</p> <p>So, I think I am going to use something like :</p> <pre><code>&lt;script&gt; //don't know how to retrieve the expiration date and check if it is after the //current date $('td[name=expiration]').css({"color":"red"}); &lt;/script&gt; </code></pre>
javascript jquery
[3, 5]
4,335,328
4,335,329
How to split text from select dropdown to use for multiplication using Jquery/Javascript
<p>I have a select dropdown to choose a product size which also tells you the price for each sizing.</p> <p>I want to display the total cost as well has how many hectares it will cover. 1kg = 1hectare</p> <p>The value is the ID for the sizes and is used when adding to the cart.</p> <pre><code>&lt;select class="productChoice"&gt; &lt;option value=""&gt;-- Please select --&lt;/option&gt; &lt;option value="2317474"&gt;1KG $180&lt;/option&gt; &lt;option value="2317475"&gt;5KG $100&lt;/option&gt; &lt;option value="2317476"&gt;10KG $200&lt;/option&gt; &lt;option value="2317477"&gt;50KG $900&lt;/option&gt; &lt;/select&gt; &lt;input type="text" id="Units_5183442" class="productTextInput" value="0"&gt; &lt;label id="hectares_5183442"&gt;&lt;/label&gt; Hectares &lt;label id="total_5183442"&gt;&lt;/label&gt; </code></pre> <p>So you choose your product size, then how many of that size you want to purchase. From there I want to display the two different values in the respective labels.</p> <p>I'm struggling separating the option text to do what I need. Can't get past the NaN.</p> <p>What I've got so far is:</p> <pre><code>$('#Units_5183442').keyup(multiply); $('select.productChoice').change(multiply); function multiply() { var quantity = parseFloat($('#Units_5183442').val()); var dollars = cantfigureouthowtodothis var size = cantfigureouthowtodothis $('#total_5183442').text('$'+(quantity * dollars )); $('#hectares_5183442').text((quantity * size)); } </code></pre>
javascript jquery
[3, 5]
4,580,840
4,580,841
&nbsp suddenly coming all over the aspx. file
<p>Suddenly i noticed <code>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.....</code> suddenly showing up in my .aspx file. Everything seems to be working fine but i have no idea where this is coming from?</p> <p>These lines appear everywhere inside my validator control where the display="dynamic".</p> <p>The debugger shows 0 warnings and 0 errors. What is the cause of this most wierd occurence?</p>
c# asp.net
[0, 9]
1,155,523
1,155,524
JQUERY - fade out specifc div, wait, fade div back in
<p>I currently have this working fiddle - <a href="http://jsfiddle.net/B8Abd/" rel="nofollow">http://jsfiddle.net/B8Abd/</a></p> <p>I would like to use jquerys fade out then fade in during the function. The code at the moment is this:</p> <pre><code> function changetoYellow() { //change the color of the div createGradientV([0, 0, 0], [255, 255, 0], 7, 200); } </code></pre> <p>I would like to have something like this:</p> <pre><code> function changetoYellow() { //fade to black: $("#fadeBandsV").fadeOut(1000); //change the color of the div createGradientV([0, 0, 0], [255, 255, 0], 7, 200); //fade from black: $("#fadeBandsV").fadeIn(1000); } </code></pre> <p>Thank you.</p>
javascript jquery
[3, 5]
4,821,621
4,821,622
What is the 'html-in-font' page called?
<p>Simple enough question.</p> <p>What is the 'aspx' or 'ascx' page called? I need the correct term to properly search google or define a question on here that should be fairly simple to answer, but I'm sure I'm not using the correct vocabulary so my question and google searches are not netting me anything.</p> <p>To be clear, the 'code-behind' page is written in c#, I want to know what the page that would contain HTML and &lt;% %> tags would be called.</p> <p>I'm asking because another question of mine was answered very poorly and then ignored by everyone else and I think it's because I'm not sure how to name that page correctly. Going round the houses slightly but once I got my terms correct I can move to the next stage of solving my problem.</p>
c# asp.net
[0, 9]
173,942
173,943
Get readonly to all textfield with the same ID
<p>Im trying to Enable/Disable read-only property of textboxes in a colum with the same ID by clicking only one button but my code doesnt seem to work. Im still not familiar on how PHP works</p> <p>code in PHP:</p> <pre><code>&lt;input type='text' name='nTotal[$i]' value='$row-&gt;Total' size='5' readonly='true' id='ntotal[$i]'&gt; </code></pre> <p>code in javascript:</p> <pre><code>var a = document.getElementById(ntotal); //ntotal[$i] is the ID name of textbox in PHP for (var i=0;i&lt;a.length;i++){ if (a[i].readonly == 'false' ) { a[i].readonly = 'true'; } else if(a[i].readonly == 'true'){ a[i].readonly = 'false'; } } } </code></pre> <p>Can anyone give me a hint on why it doesnt work? Ive tried using name instead of ID but same outcome.</p>
php javascript
[2, 3]
5,229,512
5,229,513
ASP.Net reporting framework
<p>I am looking for an easy way to develop a reporting website which creates professional looking tables from linq to sql queries. I have some obvious bare bones asp.net sites running which just bind datatables to query results which generally works, but with the many new varieties of ASP.Net out (MVC, Web Apps, Ajax, Templates etc) I was wondering if there was a better way, or perhaps a place to look for simple templates to fill in.</p>
c# asp.net
[0, 9]
5,141,421
5,141,422
jQuery Easing Issue
<p>I've got an Unordered List setup, I would like to apply the simple elastic property used in jQuery. When running the script, I keep getting an JavaScript Error : </p> <blockquote> <p>Error: D.easing[this.options.easing || (D.easing.swing ? "swing" : "linear")] is not a function Source File: jquery-pack.js?1296815924</p> </blockquote> <p>The Java is working but it is not creating the desired effect. My jQuery Code is :</p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function(){ //When mouse rolls over $("li").mouseover(function(){ $(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: "easeOutElastic"}) }); $("li").mouseout(function(){ $(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: "easeInBounce"}) }); }); &lt;/script&gt; </code></pre> <p>I had taken this script from a tutorial, so would have expected it to work. It seems that the easing is not being passed from page to the script? </p> <p>Any help appreciated.</p>
javascript jquery
[3, 5]
1,569,642
1,569,643
Is it possible to access java script data from the code behind in a different page?
<p>I am trying to export some data that I have in some Backbone collections to a csv file. </p> <p>So far I am opening a new export page using java script like so </p> <pre><code> var href = []; href.push('ExportAnalysis.aspx?'); href.push('ParamSet=' + this.document.analysisParameterSetView.selectedParamSet + '&amp;'); href.push('Start=' + start Date + '&amp;'); href.push('Finish=' + endDate + '&amp;'); frames["exportIFrame"].location.href = href.join(''); </code></pre> <p>And then in the code behind of exportAalysis.aspx, i am grabing the variables from the query string getting the data, building up the csv file and return the file like so. </p> <pre><code> // Get the export parmaters from the query string var paramSet = Request["ParamSet"]; var startUnix = int.Parse(Request["Start"]); var finishUnix = int.Parse(Request["Finish"]); var start = DateTime.Parse("1970-01-01").AddSeconds(startUnix); var finish = DateTime.Parse("1970-01-01").AddSeconds(finishUnix); // GET DATA using Parameters var filename = "analysisExport"; var content = "1,2"; Response.Clear(); Response.ContentType = "application/x-unknown"; Response.AddHeader("Content-Disposition", "attachment;filename=" + filename); Response.Write(content); Response.End(); } </code></pre> <p>This works OK, but it seems a little inefficient, as I am having to get the data I need twice. Once for the main page and again for the export page. </p> <p>Its a bit of a long shot But is it possible to get the data from the first page from the code behind of the export page? If it was all client side I could use window.opener.document to get the opener page, Can I do something similar in asp.net</p> <p>Or am I completely off track, and there is a much better way to achieve this. </p>
javascript asp.net
[3, 9]
1,051,542
1,051,543
jquery animation freaks out in background
<p>I have made a little animation that resembles the coverflow itunes uses as a screensaver on mac. It fetches a list with filenames using ajax and starts looping over them to randomly fill divs with them.</p> <p>Demo code: <a href="http://jsfiddle.net/FQmXK/4/" rel="nofollow">http://jsfiddle.net/FQmXK/4/</a></p> <p>All of this works great but the problem starts when you minimize the browser or go to a different tab on google chrome. The animation seems to queue up a bunch of cycles and tries to execute them all when the window is opened up again. This is causing all sorts of problems, images being undefined, all kinds of flashing on the screen...</p> <p>I was wondering if there is any established solution for this queueing behavior? Can I force it to execute all animation even if its not visible?</p>
javascript jquery
[3, 5]
2,246,806
2,246,807
jQuery Pagination plugin with ASP.NET gridview
<p>Can we implement pagination for an asp:gridview which has 'n' number of records retrieved from a database using a <a href="http://en.wikipedia.org/wiki/JQuery" rel="nofollow">jQuery</a> pagination plug-in. If so how can we implement it?</p>
c# asp.net
[0, 9]
4,820,917
4,820,918
file explorer in android
<p>I made a program for simple database with the database name "employee.db" but i'm not finding the file explorer where i can see that if database is created or not. while running the code i'm getting this :- [2011-09-09 14:52:19 - DatabaseExample] Failed to install DatabaseExample.apk on device 'emulator-5554': null [2011-09-09 14:52:19 - DatabaseExample] com.android.ddmlib.InstallException [2011-09-09 14:52:19 - DatabaseExample] Launch canceled!</p>
java android
[1, 4]
5,524,519
5,524,520
Call a Javascript function within an inline statement
<p>Quick question: It's kind of tough to describe so let me just show an example.</p> <p>Is there anyway to do this: (I'm using jQuery but this is a general javascript question)</p> <p>$('div.element').offset().x;</p> <p>$('div.element').offset() by itself will return {'x' : 30, 'y' : 180}, so I'm just wondering if there is any compact way of doing this without creating an extra variable.</p> <p>Thanks! Matt</p>
javascript jquery
[3, 5]
5,633,621
5,633,622
Stop page execution like the alert() function
<p>When I write <code>alert('Hello')</code>, the page execution stops and waits for approval to continue.</p> <p>I have <strong>div</strong> setup to display as a fake alert, using HTML - this div has an 'OK' button.</p> <p>I want the page to stop its execution (just like as in a real alert) until the user presses 'OK'.</p> <p>I don't want to use jQuery.</p>
javascript jquery
[3, 5]
4,021,953
4,021,954
What's the equivalent of PHP's " .= " in Javascript, to add something to a variable..?
<p>In PHP you can do:</p> <pre><code>$myvar = "Hello"; $myvar .= " world!"; echo $myvar; </code></pre> <p>The output is: Hello world!</p> <p>How can I do this in Javascript/jQuery..?</p>
php javascript jquery
[2, 3, 5]
397,627
397,628
jQuery each() doesn't iterate on all elements
<p>I have stared too long on this apparently not working little piece of code. Why doesn't select box rel attribute get alerted?</p> <p>HTML:</p> <pre><code>&lt;select rel="prop216" name="prop[]"&gt; &lt;option value=""&gt;- none&lt;/option&gt; &lt;option value="12"&gt;Opt 1&lt;/option&gt; &lt;option value="13"&gt;Opt 2&lt;/option&gt; &lt;/select&gt; &lt;select rel="prop217" name="prop[]"&gt; &lt;option value=""&gt;- none&lt;/option&gt; &lt;option value="12"&gt;Opt 1&lt;/option&gt; &lt;option value="13"&gt;Opt 2&lt;/option&gt; &lt;/select&gt; </code></pre> <p>jQuery:</p> <pre><code>$("select").change(function() { var i = 0; var alteredSelects = []; $("select").each(function() { if ( $(this).val() !== "" ) { alteredSelects[i][0] = $(this).attr('rel'); alteredSelects[i][1] = $(this).val(); alert ($(this).attr('rel')); i++; } }); }); </code></pre> <p>See also my jSfiddle: <a href="http://jsfiddle.net/ft6Bd/1/" rel="nofollow">http://jsfiddle.net/ft6Bd/1/</a> </p> <p>I get an error in Firefox </p> <blockquote> <p>TypeError: can't convert undefined to object </p> </blockquote> <p>on the line <code>alteredSelects[i][0] = $(this).attr('rel');</code></p> <p>But can't seem to realize why.</p>
javascript jquery
[3, 5]
3,930,746
3,930,747
Find value from one UserControl to anoter Usercontrol
<p>I have a page in that Page I have <strong>2 usercontrols uc1 and uc2</strong> I have one property <strong>PageID</strong> on the <strong>Usercontrol uc1</strong>, now I have a button on uc1 on that button's click event I am doing some database process and that will return the PageID, now I want to access this PageID on another Usercontrol uc2.</p> <p>any one please help me to find out the PageID on another usercontrol</p>
c# asp.net
[0, 9]
1,488,764
1,488,765
Differences between detach(), hide() and remove() - jQuery
<p>What is the functional difference between these three <code>jQuery</code> methods:</p> <ul> <li>detach()</li> <li>hide()</li> <li>remove()</li> </ul>
javascript jquery
[3, 5]
1,179,233
1,179,234
Andriond send event from first activity and receive on the second
<p>I have two activities. The first activity display list of the users with short info. And after select some user I go to the second activity for display full info about this user. For send event I used <code>startActivityForResult();</code> for receive event in socond activity and added <code>public void onActivityResult(int requestCode, int resultCode, Intent data)</code>. After start project I send intend from first activity and I do not receive in the second :(. How I can receive sent event in second activity? Thank you...</p>
java android
[1, 4]
3,323,662
3,323,663
Get attr form <a href>
<p>ive got a problem with getting attr from <code>&lt;a href&gt;</code>.</p> <p>Got something likte this</p> <pre><code>&lt;a href="#callback" realurl="callback.aspx"&gt;Callback&lt;/a&gt; </code></pre> <p>And jQuery</p> <pre><code>$('#callback').bind('pageAnimationEnd', function (e, info) { var realurl = $(this).attr('realurl'); if (!$(this).data('loaded')) { $(this).append($('&lt;table border=0 width="100%" height="100%"&gt;&lt;tr width="100%" height="100%"&gt;&lt;td&gt;Wczytuję...&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;'). load(realurl, function () { $(this).parent().data('loaded', true); $('#ParentTest').html("test"); })); } }); </code></pre> <p>And im getting all the time undefined from $(this).attr('realurl').</p>
javascript jquery asp.net
[3, 5, 9]
599,559
599,560
how we can use url rewrite to generate and get url like google provide cutome website url
<p>I need to make dynamic website like google provide services of develop and design on line website, I have completed all things of database and design, but how could i get the url at loading time of the web application if page not found then 404 error acre</p> <p>in google</p> <p>the website url would be www.website.google.com/ourlwebsitename here ourlwebsitename is as a example of user created name. same thing I want to do.</p> <p>www.mywebsite.com/userchiceaname</p>
c# asp.net
[0, 9]
2,824,707
2,824,708
share session through socket?
<p>friends,</p> <p>We have an application developed by others in C#/ASP.NET. We now would like to do some modification. Here is the problem.</p> <p>There are Host application and Client application, which are connected by socket. Each side will load a webpage by using. The webpage loaded by both sides are the same.</p> <pre><code>private System.Windows.Forms.WebBrowser webBrowser1; </code></pre> <p>The socket is connected by:</p> <pre><code>string portStr = "3232"; int port = System.Convert.ToInt32(portStr); // Create the listening socket... m_mainSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPEndPoint ipLocal = new IPEndPoint(IPAddress.Any, port); // Bind to local IP Address... m_mainSocket.Bind(ipLocal); // Start listening... m_mainSocket.Listen(4); // Create the call back for any client connections... m_mainSocket.BeginAccept(new AsyncCallback(OnClientConnect), null); </code></pre> <p>On some webpage, we would like to show images in different orders for two sides. So we propose to add a value to the Session of website.</p> <p>So the url loaded is like: ('order' value is different for Host and Client)</p> <pre><code>http://127.0.0.1/home.aspx?order=1_2_3 </code></pre> <p>The home.aspx.cs page source is like:</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { AjaxPro.Utility.RegisterTypeForAjax(typeof(home)); if (Request.QueryString["random"] != null) { String order = Request.QueryString["random"].ToString(); Session["order"] = order; } } </code></pre> <p>We expect that the Client and Host will maintain different session, so they would have different 'order' values in session.</p> <p>But the fact is, they are keeping ONE session! But for one of our another program, this approach works. So I am wondering maybe because somewhere the socket connection can specify some parameters, something like "share session or not". Could anybody please help us explain the reason or give some pointers? </p> <p>Any help is appreciated. Thanks.</p>
c# asp.net
[0, 9]
4,034,583
4,034,584
Hide a div based on a select input box
<p>I was helped with some code <a href="http://jsfiddle.net/K9zGP/13/" rel="nofollow">here</a>. I tweaked it to try and hide a whole div instead of an element. It was only a small tweak but I seem to have done something to stop it working.</p> <p>HTML</p> <pre><code>&lt;input type="text" name="text-708" value="" class="wpcf7-validates-as-required" size="40"&gt; &lt;div id="added_fields"&gt; &lt;select name="menu-168" class="wpcf7-validates-as-required"&gt; &lt;option value="Residential"&gt;Residential&lt;/option&gt; &lt;option value="Commercial"&gt;Commercial&lt;/option&gt; &lt;/select&gt; &lt;/div&gt; </code></pre> <p>JS</p> <pre><code>if ($("select[name='menu-168']").val() == "Commercial") { $("#added_fields").addClass("hidden"); }​ </code></pre> <p>Would someone be kind enough to tell me where I have gone wrong?</p>
javascript jquery
[3, 5]
417,408
417,409
Displaying real time
<p>I am currently displaying date/time on my webpage using the date function PHP provides. However, using this function, the date/time will only be updated when reloading the page. I wish to have the date/time updated every second instead.</p> <p>I assume I have to use either javascript or jQuery/ajax for this, however I have no clue on how to do this. I was hoping anyone here could give me some advice.</p> <p>Thanks in advance.</p>
php javascript jquery
[2, 3, 5]
1,784,887
1,784,888
Server.UrlEncode & Server.UrlDecode
<p>i dont know, why do we use Server.UrlEncode() &amp; Server.UrlDecode()?! in QueryString we see anything in URL, so why do we want encode or decode them?</p>
c# asp.net
[0, 9]
2,734,483
2,734,484
Insert bullet and newline into database
<p>is there a way, using gridview let users to input newlines and bullets in a cell? Since there's no Bullet key on the keyboard, probably I can assign shortcut?</p> <p>Another way I'm thinking is allowing users to insert asteriks, but when I'm going to build report, I'm going to replace asteriks with asci bullet.</p> <p>Any suggestions on how to do that?</p> <p>using asp.net, gridview, sql server 2008 r2</p>
c# asp.net
[0, 9]
2,519,112
2,519,113
How to reset image positions
<p>I am making a game and I am trying to create a game end function. How would I go about resetting all images to their starting positions?</p>
javascript jquery
[3, 5]
3,207,907
3,207,908
How can I get tooltip to hover on top of texboxes?
<p>Hello again dearest Experts, I am still having issues getting tooltips to work correctly.</p> <p>The code below works correctly as far displaying the tooltips.</p> <p>The big issue is that it expands the textbox, making other textboxes lose alignment.</p> <p>What we would like to is to have the message in the tooltop hover on top of the textbox but not obscure it. This way, users can still type into it.</p> <p>Can the code I have below be modified to help me accomplish this?</p> <p>Many thanks.</p> <p>THe css</p> <pre><code>&lt;style type="text/css"&gt; div.activeToolTip { display:block; visibility:visible; background-color:#A1D40A; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 0.75em; line-height: 1.50em; font-weight:bold; color: #fff; border:1px solid black; filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135); width:200px; height:70px; } div.idleToolTip { display:none; visibility:hidden; } </code></pre> <p></p> <p>Then textbox and tooltip.</p> <pre><code> &lt;asp:TableCell&gt;&lt;asp:TextBox ID="instruct" onmouseover="document.getElementById('toolTipDiv').className='activeToolTip'" onmouseout="document.getElementById('toolTipDiv').className='idleToolTip'" runat="server" Width="75px"&gt;&lt;/asp:TextBox&gt; &lt;div id="toolTipDiv" class="idleToolTip"&gt;My instructions go here.&lt;/div&gt; </code></pre>
javascript asp.net
[3, 9]
2,329,729
2,329,730
Javascript not reloading DIV's contents correctly
<p>I have been looking online for a tutorial on how to create a Checkbox form which would cause a DIV where I show my items from a MYSQL table to reload based on the filter selected in the Checkbox.</p> <p>This is my code so far, but it doesn't seem to work...</p> <p>Any suggestions?</p> <p>Thanks!</p> <pre><code>&lt;script&gt; $(document).ready(function() { $("#colors").change(function() { console.log("changed..."); var data = $(this).serialize(); console.log(data); $("#indexMain").load("index.php?data="+data) }); }) &lt;/script&gt; &lt;div class="colors"&gt; &lt;form method="post" action="index.php"&gt; &lt;?php $colors = mysql_query("SELECT DISTINCT color_base1 FROM item_descr ORDER BY color_base1"); while ($colorBoxes = mysql_fetch_array($colors)) { echo "&lt;input type='checkbox' name='color' value='".$colorBoxes[color_base1]."' /&gt; ".$colorBoxes[color_base1]."&lt;br /&gt;"; } ?&gt; &lt;input type="submit" onclick="document.formName.submit();" /&gt; &lt;/form&gt; &lt;/div&gt; </code></pre> <p>and I get the value in my div as follows:</p> <pre><code>$color = $_POST['color']; if ($selectedColor == '') { $items = mysql_query("SELECT * FROM item_descr"); } else { $items = mysql_query("SELECT * FROM item_descr ORDER BY $color"); } </code></pre>
php javascript jquery
[2, 3, 5]
4,932,158
4,932,159
why I am not receiving any firebug console response stuff?
<p>I have this ajax call in my external javascript file, and I am not getting any stuff from the firebug console, here's my code</p> <pre><code> $.ajax({ type: "POST", url: "classes/ajax.registerpopup.php", timeout: 8000, data: "userid="+userid+"&amp;resumetitle="+resumetitle+"&amp;resumeintro="+resumeintro+ "&amp;name="+name+"&amp;dob="+dob+"&amp;contacttel1="+contacttel1+"&amp;contacttel1type="+contacttel1type+ "&amp;contacttel2="+contacttel2+"&amp;contacttel2type="+contacttel2type+"&amp;contacttel3="+contacttel3+ "&amp;contacttel3type="+contacttel3type+"&amp;primaryemail="+primaryemail+"&amp;secondaryemail="+secondaryemail+ "&amp;skype="+skype+"&amp;facebook="+facebook+"&amp;linkedin="+linkedin+"&amp;twitter="+twitter+ "&amp;messenger="+messenger+"&amp;yahoo="+yahoo+"&amp;aol="+aol+"&amp;summaryofpositionsought="+ summaryofpositionsought+"&amp;summaryofskills="+summaryofskills+"&amp;gender="+gender, success: function(msg){ if(msg == "success"){ alert(msg); $('form#wsrecruitcvhead').fadeOut("normal",function(){ $('div.successpost').fadeIn(1000); }); } else { alert(msg); } }, }); return false; } </code></pre> <p>here's my php code</p> <pre><code>$sql = "INSERT INTO wsrecruitcvhead VALUES($userid,NULL,NULL,'$resumetitle','$resumeintro','$name','$dob','$contacttel1','$contacttel1type', '$contacttel2','$contacttel2type','$contacttel3','$contacttel3type','$primaryemail','$secondaryemail','$skype','$facebook','$linkedin','$twitter', '$messenger','$yahoo','$aol','$summaryofpositionsought','$summaryofskills','$gender',NOW(),NULL)"; if(mysql_query($result)){ echo "success"; } else { echo "error".mysql_error(); } </code></pre>
php jquery
[2, 5]
4,522,219
4,522,220
Binary to decimal
<pre><code>int rem, count = 0; long int n=0, b, i; count &lt;&lt; "Enter the Binary value to convert in Decimal = "; cin &gt;&gt; b; i = b; while (b &gt; 0) { rem = b % 10; n = n + rem * pow(2, count); count++; b = b / 10; } cout &lt;&lt; "The decimal value of Binary no. = " &lt;&lt; i &lt;&lt; " = " &lt;&lt; n; getch(); </code></pre> <p>I made this simple program in C++ and now I want to implement it in C# but I couldn't do so because I don't know how to implement the logic which I used in the loop. Because in C++ the keyword <code>pow</code> is used to multiply the value of <code>2</code> so I don't know how to do it in C#.</p>
c# c++
[0, 6]
1,137,286
1,137,287
Simple way to show the current week using jquery
<p>I need to have a script on a page which dynamically changes the current week. I need to have the show "Week of February 15, 2010.</p> <p>After next Sunday, I'd like the page to say "Week of February 22, 2010". I picked Monday for the display day but it could easily be Sunday.</p> <p>Any suggestions are much appreciated!.</p>
javascript jquery
[3, 5]
3,721,457
3,721,458
Running a Java (.jar) app inside a C# app
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/512124/use-a-jar-java-library-api-in-c">Use a .jar java library API in C#?</a> </p> </blockquote> <p>I have a jar file I want to run in a C# application, is there anyway to do this?</p>
c# java
[0, 1]
1,541,811
1,541,812
Dynamically populating a dropdownlist based on selected value in another dropdown list
<p>I have two dropdown lists, where one is populated on page load and the other should only be populated when a value is selected in the first one. The first dropdown list is defined as:</p> <pre><code>&lt;asp:DropDownList ID = "base_ddl" runat="server" ToolTip="Base" OnSelectedIndexChanged = "BaseSelected"&gt; // snip... &lt;/asp:DropDownList&gt; </code></pre> <p>Then, the second dropdown list (<code>secondary_ddl</code>) is populated in the <code>OnSelectedIndexChanged</code> method, <code>BaseSelected</code>.</p> <pre><code> public void BaseSelected(object sender, EventArgs e) { if (base_ddl.SelectedValue == "-1") { secondary_ddl.Visible = false; } else { secondary_ddl.Items.Clear(); // extract information to populate dropdown here // snip. IList&lt;InfoContainer&gt; info = getInfoBasedOnSelected(base_ddl.Value); foreach (InfoContainer i in info) { secondary_ddl.Items.Add(new ListItem(i.name, i.value)); } } } </code></pre> <p>This doesn't work, which leads to this question: why? How can I dynamically update that dropdown from the <code>OnSelectedIndexChanged</code> function for the other dropdown?</p>
c# asp.net
[0, 9]
747,921
747,922
set Timeout before redirrect page in C#
<p>How to implement timeout in this code:</p> <pre><code>Response.Write(@"&lt;script language='javascript'&gt;alert('some alert');&lt;/script&gt;"); Response.Redirect(Request.ApplicationPath); </code></pre> <p>I want to show to user message, and after redirect. But in my solution operations occurs very fast, and alert is not shown.</p> <p>thanks</p>
c# asp.net
[0, 9]
4,130,409
4,130,410
Can I do Android Programming in C++, C?
<p>Can I do Android programming in C++, C? If the answer is "yes" then please tell how? And what's the procedure to set up?</p> <p>I don't know Obj-C, Java, but well-versed in C, C++, Flash AS3, SDK released by Google.</p> <p>Please do not tell about NVDIA SDK it's not fully developed :)</p>
c++ android
[6, 4]
2,710,860
2,710,861
Modify tag value using JavaScript
<p>I have this tag on a webpage </p> <pre><code>&lt;input type="hidden" name="ctl00_ed3327f9_e1db_40db_9d66_15946cead7ae_STATEFIELD" id="ctl00_0g_ed3327f9_e1db_40db_9d66_15946cead7ae__STATEFIELD" value="0" /&gt; </code></pre> <p>I want to modify its value, i.e. from <code>value="0"</code> to <code>value="1"</code> using JavaScript. I have tried:</p> <pre><code>document.getElementById("ctl00_0g_ed3327f9_e1db_40db_9d66_15946cead7ae__STATEFIELD"); </code></pre> <p>but it returns <code>null</code>. I guess that's because it is a hidden field </p>
javascript jquery
[3, 5]