Unnamed: 0
int64 302
6.03M
| Id
int64 303
6.03M
| Title
stringlengths 12
149
| input
stringlengths 25
3.08k
| output
stringclasses 181
values | Tag_Number
stringclasses 181
values |
---|---|---|---|---|---|
4,831,407 | 4,831,408 |
Possible to generate sequential numbers without database table?
|
<p>I'm writing a simple web form for a client in ASP.NET. The form sends an e-mail when submitted. One of the requirements is that each e-mail should have a sequential ticket number.</p>
<p>The two options I've come up with for accomplishing this involve writing the last number to a database, then selecting it out and incrementing it, or doing a similar operation with a text file. </p>
<p>I'd like to avoid an external dependency if possible, and creating a database table for a single value seems like overkill. The text file approach is really hacky, though, and prone to failure if the text file got deleted or overwritten. </p>
<p>Are there any other options I might consider?</p>
|
c# asp.net
|
[0, 9]
|
312,652 | 312,653 |
unable to use integer string as pixel value?
|
<p>In the code below, I'm trying to get the string <code>(40*(parseInt($('#2-cat').attr('id')))+1)</code> to be the pixel height for moving a div. But it is just not working, and I don't really see why - I've put in two other test lines of code, and the server seems to accept that this string is an integer... but it doesn't want to let me use it for the height of the div.</p>
<pre><code>$(document).ready(function() {
$('p').click(function(){
//$('p').html(40*(parseInt($('#2-cat').attr('id')))+5)
//$("#line").animate({"top":"80px"});
$("#line").animate({"top":"(40*(parseInt($('#2-cat').attr('id')))+1)px"});
});
});
</code></pre>
<p>HTML:</p>
<pre><code><div id='line' style='height:100px; width:100px; background-color:red;position:relative'></div>
<div id='2-cat'>hello</div>
<p>hellos</p>
</code></pre>
<p>All can be viewed at <a href="http://jsfiddle.net/platypus117/XyLNG/1/" rel="nofollow">http://jsfiddle.net/platypus117/XyLNG/1/</a></p>
|
javascript jquery
|
[3, 5]
|
2,593,782 | 2,593,783 |
query action with php
|
<p>I have a command that get data in mysql with php and have the follow command to remove a div (can have multiples removes):</p>
<pre><code>echo "<div id='".$experience['index_of_form']."'>";
echo "<a href='#remove' id='remove' name='".$experience['index_of_form']."' style='text-align: right; text-decoration: underline;'>Remove</a>
echo "</div>";
</code></pre>
<p>When I see the output the name is experience1 (example), or experience2. So far so good.</p>
<p>To remove I have this jquery function:</p>
<pre><code>$('#remove').live("click", function() {
var name_of_experience = $('#remove').attr("name");
$('#'+name_of_experience+'').remove();
});
</code></pre>
<p>The problem is if I have a remove link with name experience2 he will remove the div with the name experience1! I dont know why, because when I see in the output, the name of the link is experience2 and not experience1.</p>
|
php jquery
|
[2, 5]
|
3,114,242 | 3,114,243 |
How to pass javascript var to server side on asp.net
|
<p>I'm trying to pass a textarea value to the server side. The textarea cant be runat=server though.
heres my code:</p>
<pre><code><script type="text/javascript">
function replace() {
//Replace < and > on textarea
var obj = document.getElementById('recipient_list');
var str = obj.value;
str = str.replace(/</i, "(");
str = str.replace(/>/i, ")");
obj.value = str;
alert("rec_lst.value: " + document.getElementById('recipient_list').value);
//Pass value to server.
alert("passing to server");
document.getElementById("ctl00$ContentPlaceHolder1$txtEmails").value = str;
alert("Passed to server");
alert("txtEmails.value: " + document.getElementById("ctl00$ContentPlaceHolder1$txtEmails").value);
}
</script>
</code></pre>
<p>This isn't working though... Any ideas how to fix or better implement this??..</p>
|
javascript asp.net
|
[3, 9]
|
163,141 | 163,142 |
How to compare the attribue value
|
<p>Is it possible to compare the attribute value in jQuery?</p>
<p>example </p>
<pre><code>if( $(this).[ attribute value ] == "0")
{}
else
{}
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,327,265 | 1,327,266 |
Jquery function to javascript function
|
<p>I have functlion which is working perfactly. Now the client’s requirement is that he doesn’t want to use any other file for js, so I have change this function to be pure JavaScript, i.e. without jQuery. I am confused where to start.</p>
<p>Can you guys tell me a JavaScript function similar to jQuery’s <code>.size</code> method?</p>
<p><a href="http://jsfiddle.net/CgDS6/8/" rel="nofollow">http://jsfiddle.net/CgDS6/8/</a></p>
<pre><code> <div class="wrap">
<ul>
<li>
<div class="first">
<div class="second"></div>
</div>
</li>
<li>
<div class="first">
<div class="active"></div>
</div>
</li>
<li>
<div class="first">
<div class="second"></div>
</div>
</li>
</ul>
<a href="#" id="next">Next</a>
</div>
var $firstSecond = $('.second').eq(0);
$('#next').click(function() {
var $active = $('.active');
var $nextSecond = $active.closest('li').next().find('.second');
$active.toggleClass('active second');
if ($nextSecond.size() != 0) {
$nextSecond.toggleClass('second active');
} else {
$firstSecond.toggleClass('second active');
}
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
4,211,659 | 4,211,660 |
Load file once into an ASP.NET application
|
<p>I'm working on a web based app which in the core is an expert system, and I need to load the rules file to the app only once .. so I need an equivalent to public <code>static void main() {}</code> in ASP.NET site to load the file in it .. what is this equivalent and is it exist .. any suggestions are highly welcome </p>
|
c# asp.net
|
[0, 9]
|
4,650,690 | 4,650,691 |
Jquery Collapsible panel - post back issue
|
<p>I need some modification in the script but could not do it as i am not so friendly with jquery</p>
<p>When the page postback i want to maintain the state of the panels. Right now if i refresh the page all the panels are collapsed,</p>
<p>i am using the below code </p>
<pre><code>$(document).ready(function() {
$(“DIV.ContainerPanel > DIV.collapsePanelHeader > DIV.ArrowExpand”).toggle(function() {
$(this).parent().next(“div.Content”).show(“slow”);
$(this).attr(“class”, “ArrowClose”);
},function() {
$(this).parent().next(“div.Content”).hide(“slow”);
$(this).attr(“class”, “ArrowExpand”);
});
});
</code></pre>
<p>Please help</p>
|
jquery asp.net
|
[5, 9]
|
1,263,349 | 1,263,350 |
How to find control in formview item template
|
<p><em>I have tried this -</em></p>
<pre><code>if (FormView1.CurrentMode == FormViewMode.ReadOnly)
{
DropDownList ddlexpense = (DropDownList)FormView1.Row.FindControl("ddle");
}
</code></pre>
<p>on FormView1 DataBound ,Init,ItemCreated and a seperate Function ,but i always get the same error - System.NullReferenceException: Object reference not set to an instance of an object</p>
|
c# asp.net
|
[0, 9]
|
5,409,149 | 5,409,150 |
Why my 'else' do not work?
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/2076988/why-does-id-return-true-if-id-doesnt-exist">Why does $(‘#id’) return true if id doesn’t exist?</a> </p>
</blockquote>
<p>I have a very simple js function:</p>
<pre><code>function refresh(ltr) {
if (board.find('p:contains("' + ltr + '")')) {
board.find('p:contains("' + ltr + '")').show();
} else {
alert('Hello.');
}
}
</code></pre>
<p>Obviously I pass a string to ltr, it works fine if it contains the string but if not it do not fire the alert... </p>
<p>Do you know why?</p>
|
javascript jquery
|
[3, 5]
|
2,893,155 | 2,893,156 |
Using .attr() with .get() Issues
|
<p>I am trying to store an array of objects in an array by going through each paragraph element in a <code>div</code> container with the .<code>get()</code> method. I try to access the attribute with .<code>attr()</code> but it doesn't seem to work. How would I modify this code in order to be able to access the 'id' attribute of each message?</p>
<pre><code> var messages = $("#message_container p").get();
var idstest = [];
for (int i = 0; i < messages.length; i++){
idstest.push(messages[i].attr("id"));
}
</code></pre>
<p>I think it has to do with some fundamental incompatibility with .<code>get()</code> and .<code>attr()</code>. When I 'alert' the objects provided by .<code>get()</code> I get <code>[object HTML---]</code>. I'm assuming that is not the form necessary in order to use .<code>attr</code>?</p>
|
javascript jquery
|
[3, 5]
|
4,576,691 | 4,576,692 |
Android Toast.makeText() not showing up
|
<p>When the user presses a button, I'd like a small <code>Toast.makeText()</code> message show up saying something like <code>Contacting server...</code> while the app gets some information from my web server.</p>
<p>The problem is that Java's HttpClient.Execute() method is synchronous, so it blocks the Toast from showing up until the request has completed.</p>
<p>Is there way to have the Toast show up while the request is being sent?</p>
<p>e.g.</p>
<pre><code>Toast.makeText(myContext, "Contacting server...", Toast.LENGTH_SHORT).show();
String result = WebServer.Contact("www.mywebsite.com"); //A wrapper method
Toast.makeText(myContext, "Result: " + result, Toast.LENGTH_SHORT).show();
</code></pre>
<p>This code simply flashes the first Toast really fast <strong>after</strong> the request completes and then it shows the second Toast.</p>
|
java android
|
[1, 4]
|
1,762,431 | 1,762,432 |
Nice, subtle, temporary highlighting technique using jQuery
|
<p>I'm looking for a technique that isn't obnoxious like most that I've seen, that will temporarily raise attention to a small notification passage.</p>
<p>I've been clunking around with adding and taking away classes and wrapper divs, without much success thus far.</p>
<p>Suggestions appreciated.</p>
|
javascript jquery
|
[3, 5]
|
3,926,251 | 3,926,252 |
text from divs into array for sorting
|
<p>I'm trying to get all the text of a particular class into an array. </p>
<p>The below works theoretically, but it puts them into an object, not an array, and .map apparently is widely unsupported in most versions of IE :(</p>
<pre><code>var valuesArr = $('.'+sort_column);
var valuesArr = valuesArr.map(function(){return $(this).text().trim();});
</code></pre>
<p>Is there any way to get all the values into a plain and simple array that I'm just missing?</p>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
2,983,693 | 2,983,694 |
Trigger div on pageload
|
<p>I have been trying to set the scroll of my page to a certain div. Kindly let me know how can i do that. Following is my code in which each each option in li moves to certain div . I tried this $("#header3").click(); in doucument.ready function but it didnot work.</p>
<p>Kindly help!</p>
<pre><code><ul id="navigation">
<LI><A class="home selected-lice"href="#header">Home</A></LI>
<LI><A href="#header4">Partners</A></LI>
<LI><A class="about" href="#header5">About Us</A></LI>
<LI><A class="contact" href="#header6">Contact Us</A></LI>
</ul><!-- end of #navigation -->
</code></pre>
|
javascript jquery
|
[3, 5]
|
895,417 | 895,418 |
use jquery to modify class attribute
|
<pre><code><ul>
<li><a class="selected">A</a></li>
<li><a>B</a></li>
<li><a>C</a></li>
</ul>
</code></pre>
<p>How can I remove the attribute selected from all <code><li>'s</code> when one of the element is clicked and set the one being clicked to selected?</p>
<p>I'm learning jquery.</p>
<p><strong>Updated the code</strong></p>
|
javascript jquery
|
[3, 5]
|
5,372,119 | 5,372,120 |
Disable button inside a GridView TemplateField
|
<p>I have the following gridview control </p>
<pre><code><asp:Panel runat="server" ID="pnlBeforeSave" Visible="true">
<asp:GridView ID="gvP" runat="server" AutoGenerateColumns="false" AllowPaging="false"
AllowSorting="false" CssClass="list-table" HeaderStyle-CssClass="header">
<Columns>
<asp:TemplateField HeaderText="Action" ItemStyle-Width="20%" HeaderStyle-HorizontalAlign="Center"
ItemStyle-CssClass="unsortable">
<ItemTemplate>
<input id="btnPay" type="button" onclick="javascript:OpenEditPaymentItemDialogPage('<%# Eval("PmtId") %>');"
value="Edit" class="button save" style="width: 80px" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>
</code></pre>
<p>After I save the griview dataset to Database I have to disable the griview.
but btnPay still enabled. I need to do it from code behind
Any idea?</p>
|
c# asp.net
|
[0, 9]
|
188,466 | 188,467 |
Confirm function in codebehind
|
<p>I my application i am using ajax(Updatepanel).I am using the following code to show confirmation dialog box after finishing some update process in database. but it is not working for me.</p>
<p>Problem:</p>
<p>Confirmation box is not displaying.</p>
<p>code:</p>
<pre><code> protected void imbtnUpdate_Click(object sender, ImageClickEventArgs e)
{
// Database process
string javaScript = "<script language=JavaScript>\n " + "if(confirm('Do you want to update
the files?'))window.location.href = \"Upload.aspx?ID=" + ID +
"&pt=Gm&page=Gms\"; else return false;\n" + "</script>";
RegisterStartupScript("imbtnUpdate_Click", javaScript);
}
</code></pre>
|
c# asp.net javascript
|
[0, 9, 3]
|
2,621,687 | 2,621,688 |
use javascript to test if server is reachable
|
<p>I have a javascript application that loads data asynchronously from a server within my company's firewall. We sometimes need to show this application outside of the firewall but it is not always possible to get on the VPN. For this reason, we configured the firewall to allow public requests for this data on a specific port. The catch: when I am inside the corporate network, I can only load data using the server's DNS name due to a peculiar configuration of the firewall. Outside of the corp network, I have to use the server's public IP address..</p>
<p>Currently we distribute two versions of the javascript application -- one which works within the firewall and one that works outside of it. We would like to distribute one app -- one that tests the URLs and then, depending on which is reachable, continue to use that address to load data. </p>
<p>I have been using jQuery's <code>$.ajax()</code> call to load the data and I noticed there is a <code>timeout</code> parameter. I thought I could use a short timeout to determine which server is unreachable.. However, this "countdown" doesn't seem to start until the initial connection to the server is made.</p>
<p>Any thoughts on how to determine, in javascript, which of two servers is reachable?</p>
|
javascript jquery
|
[3, 5]
|
5,084,929 | 5,084,930 |
Connecting App with PHP and mysql
|
<p>I am trying to access a database through a simple PHP code. But the constraints are that it is a remote database, accessed by a remote server from a real device.</p>
<p>here is a snippet of the code:-</p>
<pre><code>ArrayList<NameValuePair> postParameters = new ArrayList<NameValuePair>();
postParameters.add(new BasicNameValuePair("username", un.getText().toString()));
postParameters.add(new BasicNameValuePair("password", pw.getText().toString()));
String response = null;
try {
response = CustomHttpClient.executeHttpPost("http://WebsiteName.com/check.php", postParameters);
String res=response.toString();
res= res.replaceAll("\\s+","");
if(res.equals("1"))
error.setText("Correct Username or Password");
else
error.setText("Sorry!! Incorrect Username or Password");
} catch (Exception e) {
un.setText(e.toString());
}
</code></pre>
<p>The PHP is <a href="http://pastebin.com/EiXSQVRG" rel="nofollow">here</a>. Most probably there is no problem with the PHP code because it works locally.</p>
<p>One of the most important things I want to clarify is where to keep the PHP code in the server. I have it directly under the root directory. When i execute it from the browser (say by typing website.com/check.php), i get the required response.
Unfortunately many people who have given a tutorial on this, has mentioned about local server and local database more than remote ones. Is there something more I should do for getting it done with a real device?</p>
<p>PS: The app works fine when connected to an emulator and local database with local webserver.</p>
<p>===UPDATE===</p>
<p>I am pretty sure that the phone is not contacting the web server. I verified by making the webserver give a positive response always, which also failed. Any hints on where I should look at? I can't think of anything other than the online server...which is working (when checked from browser). Any way of cross checking it? Thanks.</p>
|
php android
|
[2, 4]
|
1,531,663 | 1,531,664 |
jquery and javascript conflict
|
<p>I am using jquery in the master page and javascript in the content page. When Jquery is used alone it works fine. But when I use the javascript(content page) along with jquery(master page) then jquery in master page stops working.</p>
<p><strong>master page script</strong></p>
<pre><code>$(document).ready(function() {
// set up the accordion
$("#accordion>h3").click(function() {
$(this).next("div").slideToggle(500).siblings("div").slideUp(500);
});
// show active menu section
setTimeout('$("#accordion>div.activesec").slideToggle(800)', 100);
</code></pre>
<p>});</p>
<p><strong>content page script</strong></p>
<pre><code>$('slideshow').style.display = 'none';
$('wrapper').style.display = 'block';
var slideshow = new TINY.slideshow("slideshow");
window.onload = function () {
slideshow.auto = true;
slideshow.speed = 5;
slideshow.link = "linkhover";
slideshow.info = "information";
slideshow.thumbs = "slider";
slideshow.left = "slideleft";
slideshow.right = "slideright";
slideshow.scrollSpeed = 4;
slideshow.spacing = 5;
slideshow.active = "#fff";
slideshow.init("slideshow", "image", "imgprev", "imgnext", "imglink");
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,636,003 | 3,636,004 |
Run a JavaScript function from a php if statement
|
<p>I am using php conditions and want to know if I can run a JavaScript funtion without some one have to click on it using JavaScript: </p>
<pre><code>if($value == 1)
{
javascript to run the function
}
</code></pre>
<p>How would I do that?</p>
|
php javascript
|
[2, 3]
|
1,210,305 | 1,210,306 |
how can i show string one activity to another activity on a 9*9 sudoku grid?
|
<p>i want to show string one activity to another activity another activity is the sudoku game class and want to show the string like a sudoku puzzle on the sudoku screen board on the sudoku game class.sudoku grid is 9*9.</p>
|
java android
|
[1, 4]
|
264,641 | 264,642 |
Derived Custom Control to Inherit Base Control Skin
|
<p>Is it possible for a derived controls to inherit his base control skin.</p>
<p>Say I am deriving a control from TextBox, is it possible for the derived control to inherit the skin settings for Textbox or do they need to be defined again?</p>
<p>I am applying the default skins to all controls through the styleSheetTheme Page property</p>
<p>I am using the Devexpress asp.net controls if that makes any difference.</p>
|
c# asp.net
|
[0, 9]
|
2,288,074 | 2,288,075 |
Class calling in android development
|
<p>i'm new to android development, how can i call a class to be performed when my application starts. Is there something i should put on the onCreate part to call a class? any tips for this? thanks in advance.</p>
|
java android
|
[1, 4]
|
5,969,840 | 5,969,841 |
Dropdownlist onselectedindexchanged problem
|
<p>I have a dropdownlist like this</p>
<pre><code><asp:dropdownlist runat="server" autopostback="true" onselecteditemindexchanged="fire_event" ID="DDL"/>
</code></pre>
<p>and on codebehind i m doing this</p>
<pre><code>page_load : if(!page.postback)I m binding data into dropdownlist
fire_event: I am redirecting page to itemselected value.
</code></pre>
<p>So I am able to do most of the part everything is working perfectly except..</p>
<p>when i select item in dropdown it redirects me to the page I wanted..but when i click back it remains at the same item selected value .I want it to be like that it loads again when i click back for e.g. </p>
<p>if my dropdown is like state <code>A</code>
and other items </p>
<pre><code>A
B
C
D
</code></pre>
<p>when I select <code>D</code> it takes me to page <code>D</code> and when i click back
it is at state <code>D</code> i want it to show <code>A</code> instead of <code>D</code></p>
|
c# asp.net
|
[0, 9]
|
1,425,980 | 1,425,981 |
JQuery .get function vars
|
<p>Once again having problems being a new to javascript. I want to get the reply from my PHP script using JQuery's get. Here's my function</p>
<pre><code>function getNext(){
var returnData = null;
$.get("get.php", {task:'next'}, function(responseText){
returnData = responseText; }, "text");
return returnData;
}
</code></pre>
<p>Now obviously the function returns null even though the request was successful. Why?
Thanks for your help in advance.</p>
|
javascript jquery
|
[3, 5]
|
425,398 | 425,399 |
Unsuccessfully calling a function defined in JS file 2 from a function in JS file 1 AFTER the page has loaded/on-click event
|
<p>I have two Javascript files, that I will significantly streamline to simplify the issue in hand.</p>
<p><code>form.js</code></p>
<pre><code>function open_action_dialog(){
// code to open the dialog..
// If [Return] is pressed when focus is on the #action field, call the action confirmation function defined in the second javascript file.
$('#action').keypress(function(e){
var fn_name = "action_confirm";
if(e.which == 13)
window[fn_name]();
});
}
</code></pre>
<p><code>blog.form.js</code></p>
<pre><code>$(function (){
$("#dialog_action_open").click(function() {
open_action_dialog();
});
function action_confirm(){
alert('action confirmed');
return;
}
});
</code></pre>
<p>So on my page I have a button with id <code>dialog_action_open</code> when clicked opens the action dialog; this is a function from the second file successfully calling a function from the first file.</p>
<p>Inside the dialog, there's an input text field with id <code>action</code> where I've set it so that if the user presses <code>[Return]</code> when their cursor is focused on the field, it should call the <code>action_confirm()</code> function defined in the second file. It does pickup the keypress event, but does not call the function from the second file; inside Google's code inspector, the error is:</p>
<blockquote>
<p>Uncaught TypeError: Property 'action_confirm' of object [object Window] is not a function</p>
</blockquote>
<p>So, my question is what do I need to do to be able to successfully call the function from the second file from inside a function in the first file? Keeping in mind, I'm aware you can't immediately call a function defined later. But, even though my action_confirm() function is defined after the function calling it from the first file, isn't this technicality moot considering the call is occurring AFTER the page has loaded, and more specifically AFTER a click event on the page?</p>
<p>I would appreciate being enlightened.</p>
<p>Many thanks.</p>
|
javascript jquery
|
[3, 5]
|
5,066,333 | 5,066,334 |
How to retrieve a variable of php file with using java?
|
<p>I am triying to get a variable from php file with using java code. How can I do that?
Thank u all...</p>
|
java php
|
[1, 2]
|
2,602,901 | 2,602,902 |
call to a function that changes picture every 2 seconds
|
<p>i have a picture and i want to change it every 2 seconds when my mouse is on it.
so i write:</p>
<pre><code>$("#profilePic").mouseover(function() {
var t = setTimeout("pictureChanger()",2000);
});
</code></pre>
<p>and this is the function:</p>
<pre><code>function pictureChanger() {
currentPicture++;
currentPicture = currentPicture % NUM_PICTURES;
$("#profilePic").src = pictures[currentPicture];
}
</code></pre>
<p>it doesn't work.. however when i write <code>$("#profilePic").src = pictures[currentPicture];</code> inside the function of <code>mouseover</code> it does replace the picture. so i guess the problem is with the function <code>pictureChanger</code>..
how to i fix it so that the function will replace my pictures?</p>
<p>thank you! </p>
|
javascript jquery
|
[3, 5]
|
244,280 | 244,281 |
Setting a max height onResize
|
<p>I have a script that uses this function to resize images onLoad and onResize:</p>
<pre><code>/**
* Calculates the display width of an image depending on its display height when it is resized.
* @param displayHeight the resized height of the image
* @param originalHeight the original height of the image
* @param originalWidth the original width of the image
* @return the display width
*/
function getDisplayWidth(displayHeight, originalHeight, originalWidth){
var ratio = originalHeight/displayHeight,
res = Math.round(originalWidth/ratio) || 1000;
return res;
}
</code></pre>
<p>.. but I do NOT want to the image height to exceed 800px, infact it can even be a fixed at 800×530px size. I tried to return a fixed value to <code>res</code> but it doesn't seem to work.</p>
<p>Thanks!</p>
|
php javascript jquery
|
[2, 3, 5]
|
1,059,263 | 1,059,264 |
subtype and covariant return type
|
<p>I found an explanation <a href="http://stackoverflow.com/questions/1882584/what-is-a-covariant-return-type">What is a covariant return type?</a> but I am no smart to understand it all.</p>
<p>I think Covariant return type theoritically is the type returned by a function that has the same signature with a built-in base class function whose return type is different.</p>
<pre><code>class Base{
TypeX func( int i ){return typex;} // builtin function
};
class Derived:Base{
TypeY func(int i){return typey;}
}
</code></pre>
<p>Is my understanding of this so-called covariant return type correct ? [the term really confuses me.]</p>
|
c# java
|
[0, 1]
|
3,897,602 | 3,897,603 |
.height() only making DIV scrollable after window resize
|
<p>The intent of this script is to make a DIV that is 100% of the page height minus the top section.</p>
<p>Here's the page:</p>
<p><a href="http://nerdi.net/playground/kev/indexNEW.html" rel="nofollow">http://nerdi.net/playground/kev/indexNEW.html</a></p>
<p>Here it is stripped down on jsFiddle, where it appears to be working. </p>
<p><a href="http://jsfiddle.net/JVKbR/94/" rel="nofollow">http://jsfiddle.net/JVKbR/94/</a></p>
<p>For me, (on Chrome and FF) the scrollable div (.mid-col-main) only becomes scrollable upon resizing the window (Maximize, drag from corner, etc)</p>
<p>Any idea what I'm doing wrong?</p>
<p><strong>EDIT: Jasper and Davin's solution both work. Thank you.</strong></p>
|
javascript jquery
|
[3, 5]
|
4,574,534 | 4,574,535 |
Input fields not registering focus event
|
<p>I am confused as to why this is not doing anything (no errors):</p>
<pre><code><div id="vehicle_form">
<input class="dField" type="email" name="email" value="Email"><br/>
<input class="dField" type="text" name="firstname" value="First Name"><br/>
<input class="dField" type="text" name="lastname" value="Last Name"><br/>
<button type="submit">Submit</button>
</div>
$('.dField').focusin(function(){
console.log('focus');
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
317,340 | 317,341 |
Call ASP.NET Function From Javascript?
|
<p>I'm writing a web page in ASP.NET. I have some Javascript, and I have a submit button with an onClick event. </p>
<p>Is it possible to call a method I created in ASP with Javascript's onClick event?</p>
|
c# asp.net javascript
|
[0, 9, 3]
|
2,472,085 | 2,472,086 |
Using "~" in a path resolves as C:\
|
<p>I'm trying to implement a server control that frobs a couple of files inside the web directory of an ASP.NET site. I'm using VS Web Dev Express 2008 as my IDE. When I call <code>HttpContext.Current.Request.ApplicationPath</code> to get a path to the web root so I can find those files, it returns C:. What the heck?</p>
<p>Absolute paths work just fine, but I'd like to be able to feed the server control a relative directory and just let it do it's thing. What have I done wrong?</p>
<pre><code>public String Target
{
get { return _target; }
set
{
if (value.StartsWith("~"))
{
// WTF? Gives me C:\? Why?
_target = HttpContext.Current.Request.ApplicationPath +
value.Substring(1);
}
else
{
_target = value;
}
}
}
private String _target;
protected override void Render(HtmlTextWriter writer)
{
HtmlControl wrapper = new HtmlGenericControl("div");
int fileCount = 0;
try
{
DirectoryInfo dir = new DirectoryInfo(_target);
foreach (FileInfo f in dir.GetFiles())
{
fileCount++;
a = new HtmlAnchor();
a.Attributes.Add("href", f.FullName);
a.InnerHtml = f.Name;
wrapper.Controls.Add(a);
}
}
catch (IOException e)
{
throw e;
}
Controls.Add(wrapper);
base.Render(writer);
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
5,400,859 | 5,400,860 |
How to render images in real-time
|
<p>I am looking for a solution\software that I can use in order to render buttons in real time.
That is, I have an image and text, and I want them to be an image altogether in realtime.</p>
<p>Thank you</p>
|
c# javascript
|
[0, 3]
|
2,107,283 | 2,107,284 |
Android WebView - It would be possible to make the page is loaded in a given time
|
<p>I'm still starting. I wonder if it is possible to constantly reload the page within a time interval.
The idea is to create a chat, where the webview carries a link that updates over a period of time for the user to read what was written.
I thought about doing the following ...</p>
<pre><code>webview.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(webview, "http://example/page.htm");
webview.loadUrl("http://example/page.htm");
}
});
</code></pre>
<p>But the following code does not work.</p>
|
java android
|
[1, 4]
|
4,365,950 | 4,365,951 |
How to hard code 7 int positions?
|
<p>I am using this method to retrieve some images.</p>
<p>The only problem is is where </p>
<pre><code>aURL = new URL(myRemoteImages[position]);
</code></pre>
<p>Position is i dont know how to get the position for each image in order to set the tag in my code.</p>
<pre><code> i.setTag(mImageURLs[position]);
</code></pre>
<p>As you see myRemoteimages has 7 strings and thats all. How can i hard code. the int Position to just have 7 positions?</p>
<pre><code>public void RetrieveImages() {
ImageView i = new ImageView(this);
String[] mImageURLs = {
urlImage1, urlImage2, urlImage3, urlImage4, urlImage5, urlImage6,
urlImage7};
String[] myRemoteImages = {
imageUrl, imageUrl2, imageUrl3, imageUrl4,
imageUrl5, imageUrl6, imageUrl7};
URL aURL = null;
try {
aURL = new URL(myRemoteImages[position]);
} catch (MalformedURLException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
}
Log.v("ImageLoader", "Remote images set");
i.setTag(mImageURLs[position]);
URI imageUri = null;
SharedPreferences myPrefs = getSharedPreferences("imageUri", 0);
SharedPreferences.Editor myPrefsEdit = myPrefs.edit();
// Setting the Uri of aURL to imageUri.
try {
imageUri = aURL.toURI();
myPrefsEdit.putString("uris", imageUri.toString());
myPrefsEdit.commit();
} catch (URISyntaxException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
</code></pre>
|
java android
|
[1, 4]
|
5,764,972 | 5,764,973 |
Jquery accordion prevent menu collaspe after postback
|
<p>I have a menu that is a nested ListView Control that is on my master page. I use the Jquery below to turn this ListView into a accordion. The problem is when I click on the Menu titles it will cause a postback. So the submenu flashes and ones the post back is complete it reloads the page and the menu(closing the Active submenu). </p>
<pre><code> $('.head').each(function () {
var $content = $(this).closest('li').find('.content');
$(this).click(function (e) {
// e.preventDefault();
$content.not(':animated').slideToggle();
});
});
</code></pre>
|
c# jquery asp.net
|
[0, 5, 9]
|
2,236,165 | 2,236,166 |
Executing JavaScript function in Code behind -- How to Get the Return Value in Code Behind
|
<p>I have following JavaScript function, Which call Jquery JSON function and get the DateTime with respect to timezone. This works fine.</p>
<pre><code> <script type="text/javascript">
function JSFunctionName() {
$(document).ready(function () {
var timezone = "US/Central";
$.getJSON("http://json-time.appspot.com/time.json?tz=" + timezone + "&callback=?",
function (data) {
if (data.hour < 12) {
//alert(data.hour + ':' + data.minute); // want to return this value data.hour + data.minute
//document.getElementById('<%=HiddenField1.ClientID %>').value = data.hour + ':' + data.minute;// this does not work
}
})
});
}
</script>
</code></pre>
<p>Now I am calling this Javascription function in Code behind on onclick of button</p>
<pre><code><asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
</code></pre>
<p><strong>Code behind</strong></p>
<pre><code>protected void Button1_Click(object sender, EventArgs e)
{
Page.ClientScript.RegisterStartupScript(this.GetType(),
"alert", "JSFunctionName();", true);
// here I need the DateTime value that is get from JSON
//Response.Write(HiddenField1.Value);
}
</code></pre>
<p>How can I return the value from Javascript to code behind immediate after call of <code>Page.ClientScript.RegisterStartupScript</code></p>
<p>Please note I have try to set the value in HiddenField, but its not working. you can see in the comment.</p>
<p>Any idea or alternative solution will be appreciated.</p>
<p>Thanks</p>
|
c# javascript jquery asp.net
|
[0, 3, 5, 9]
|
5,956,119 | 5,956,120 |
Error: 'keyCode' is null or not an object
|
<p>I am getting this error when i run this function</p>
<pre><code><script language="javascript" type="text/javascript">
//function for check digit
function check_no(e)
{
if (!((e.keyCode >= 48) && (e.keyCode <= 53)))
{
alert("Solo valores entre 0 y 5 pueden ser ingresados");
e.keyCode = 0;
}
}
</script>
</code></pre>
<p>I call the function in my load page in c#</p>
<pre><code>foreach (GridViewRow grdrow in DGPlanilla.Rows)
{
TextBox tb1 = (TextBox)grdrow.FindControl("TextBox1");
if (tb1 != null)
{
tb1.Attributes.Add("Onkeypress", "check_no()");
}
}
</code></pre>
|
c# javascript
|
[0, 3]
|
2,480,633 | 2,480,634 |
How set focus to text fields in android browsers?
|
<p>I need to set focus on the text fields in android browsers. jquery function focus() don't work. html5 attribute autofocus also don't working. May be need to remove this restriction in android os?</p>
|
javascript android
|
[3, 4]
|
3,064,712 | 3,064,713 |
disabling default button or enter key in asp.et c#
|
<p>I have a form where users scan in a barcode, the barcode reader automatically enters a carriage return in the value causing the form to submit since the browser chooses the first button as the default. How can I disable anything from happening when the enter key is pressed when entring a value in that textbox?</p>
|
c# asp.net javascript
|
[0, 9, 3]
|
667,061 | 667,062 |
Open a new link in a pop up is failing with unexpected T_STRING
|
<p>Is it possible to pop up window from a json line.</p>
<p>Example, this link works fine:</p>
<pre><code>$json['msg'] = 'Welcome. Please, <a href="http://mylink/?chat_session='.$rows['id'].'">click here</a>!';
</code></pre>
<p>But when I tried to create a pop up for it, it says errors T string parsing, things like that.</p>
<p>For my pop up I tried using:</p>
<pre><code><script language="javascript" type="text/javascript"><!--function mbetter(url) {
newwindow=window.open(url,'name','height=600,width=550');
if (window.focus) {newwindow.focus()}
return false;}// --></script>
</code></pre>
<p>and for link</p>
<pre><code>$json['msg'] = 'Welcome. Please, <a href="#" onClick="return mbetter('http://mylink/?chat_session='.$rows['id'].'')">click here</a>!';
</code></pre>
<p>What could be causing this issue?</p>
|
php javascript
|
[2, 3]
|
71,274 | 71,275 |
How To replace the sequence \/ in android?
|
<p>Issue in UI Is:</p>
<p><img src="http://i.stack.imgur.com/dA8wK.png" alt="enter image description here"></p>
<p>How to replace the sequence <code>\/</code> in android?</p>
<p>I Use below replace method but it show invalid escape sequences.</p>
<pre><code>tempLabelForListView[i].replaceAll("\/", "")
</code></pre>
|
java android
|
[1, 4]
|
5,499,951 | 5,499,952 |
aspx submit form error
|
<p>Im working with asp.net framework 4.0 and I have this code:</p>
<p>form id="form1" runat="server" method="get" action="Profile.aspx"</p>
<pre><code> // some code
</code></pre>
<p>asp:Button runat="server" ID="SubmitButton" Text="Submit"</p>
<p>Each time i click the submit button i get this error:</p>
<p><strong>Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.</strong> </p>
<p>any idea how to fix it ???</p>
|
c# asp.net
|
[0, 9]
|
632,007 | 632,008 |
What is 'Draw Something' Built with?
|
<p>I googled this and I found very little information. Anyone knows what framework (Flash?) that is used to create "Draw Something"</p>
<p>Is it native?</p>
<p><strong>For the thumbs down and those who voted to close</strong></p>
<p>I know that this is not a programming question. However, I think this could be categorized as a software development question. </p>
<p>I am asking this because I am very impressed with the performance and the flow of the App. I almost felt like this app was built using Flash because the original app is a facebook app built with flash. However, I cannot be sure and I am somewhat skeptical with Flash's performance on mobile devices. </p>
<p>IF my questions are not clear enough. I am wondering whether this app is built native or using some kind of frameworks that are already available out there. I am sure you all know that there are open source game dev frameworks for mobile development (cocos2d, libgdx, etc etc).</p>
|
android iphone
|
[4, 8]
|
5,590,365 | 5,590,366 |
focus() not working - why?
|
<p>I have nested body elements and iframes. One from my html page, and one from the TinyMce. To the body of the tinymce I append div with many textboxes. Their ids are hi1, hi2 etc.</p>
<p>This code:</p>
<pre><code>$($('#petko_ifr').focus().contents()).find('#dishComments').find('#' + e.target.id)
</code></pre>
<p>returns the correct input element (textbox) and it has a focus method. But this:</p>
<pre><code>$($('#petko_ifr').focus().contents()).find('#myDiv').find('#hi1').focus()
</code></pre>
<p>doesn't focus! This:</p>
<pre><code>$($('#petko_ifr').focus().contents()).find('#myDiv').find('#hi1').val('somethingg')
</code></pre>
<p>works fine. Why is this happening and how to solve this?</p>
<p>In Chrome, when I inspect the element (click in the html code and when I click visually on the textbox it is clicked. But when I'm not inspecting the element the click isn't working.</p>
|
javascript jquery
|
[3, 5]
|
397,470 | 397,471 |
Find and move an object in javascript array by id of an objects
|
<p>I have 2 arrays of objects. Each object has an Id property. Now, if I have a 3rd array of just Ids, what is the better and faster way of finding objects from array1 based on those Ids and moving them to array2.</p>
<p>Thanks a lot for answering..</p>
<p>Sample code:</p>
<pre><code>Person = function(id, fn, ln) {
this.id = id,
this.firstName = fn,
this.lastName = ln
}
array1 = new Array();
// add 500 new Person objects to this array
array2 = new Array();
// add some other new Person objects to this array
function moveArrayItems(ids) {
// ids is an array of ids e.g. [1,2,3,4,5,6,...]
// Now I want to find all the person objects from array1 whose ids
// match with the ids array passed into this method. Then move them to array2.
// What is the best way to achive this?
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,615,794 | 5,615,795 |
How to write JS inside PHP code
|
<p>I have code like this:</p>
<pre><code> <?php if($key['caffe_id'] == echo "<script>$("#caffe").text()</script>") ?>
</code></pre>
<p>How to write this in correct manner?</p>
<p>Code for explanation:</p>
<pre><code><select name="caffe" id="caffe">
<?php foreach($caffe as $key) : ?>
<option value="<?php echo $key['id_caffe'] ?>"><?php echo $key['name'] ?></option>
<?php endforeach; ?>
</select>
<div id="gll_select">
<?php if (isset($gallery)) : ?>
<select name="gll" id="gll">
<?php foreach ($gallery as $key) : ?>
<?php if($key['caffe_id'] == echo "<script>$('#caffe').text()</script>") : ?>
<option value="<?php echo $key['id_gallery'] . " " . $key['name'] ?>"><?php echo $key['name'] ?></option>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</code></pre>
<p>The first select will determine what data will be written in second one. I need to make default case when page is loaded and when first select (#caffe) is being changed.</p>
|
php javascript jquery
|
[2, 3, 5]
|
969,210 | 969,211 |
AsyncTaskDelegate Reference missing Asp.Net 4.0
|
<p>I'm trying to implement "PageAsyncTask" in asp.net 4.0.When i tried to declare "AsyncTaskDelegate" it showed a design time error.I checked the library reference.System.Web and Remoting are referenced but im still not able to figure out why it's missing.</p>
<p>And </p>
<p>AsyncMethodCaller caller = new AsyncMethodCaller(someMethod);
When i tried to invoke "caller.BeginInvoke" , Intellisense did not show me BeginInvoke nor EndInvoke.Am i missing any other library reference in my project?</p>
|
c# asp.net
|
[0, 9]
|
1,912,323 | 1,912,324 |
Compile XCode Projects online
|
<p>I'm using the mosync library for develop iPhone applications. It generates the Xcode project ,
now I need to compile it to make it run on a iphone. So for that I need a mac. </p>
<p>do anybody know somewhere online to find online compiler which do that with a web based interface?</p>
<p>--thanks in advance--</p>
|
iphone c++
|
[8, 6]
|
178,519 | 178,520 |
Sending text box values from my website to gmail to login into the gmail
|
<p>I have two text boxes in my webpage as username and submit button.</p>
<p>1)Firstly user needs to give username,password,then presses the submit button.</p>
<p>2)After pressing submit button,I want to send those username and password values to gmail website for logging into gmail..</p>
<p>3) Means,user will be logging into gmail without visiting gmail login page...</p>
|
php javascript
|
[2, 3]
|
4,662,099 | 4,662,100 |
How to block form submission when the enter key or return key is pressed?
|
<p>I have a form that I use JQuery, I don't think I need to put code in this post, the question is pretty basic.</p>
<p>But I would like to block the form from submitting when people press the Enter Key or the Return Key.</p>
<p>At the same time, I have textareas, where the user will need to be able to press the Enter / Return keys.</p>
|
javascript jquery
|
[3, 5]
|
5,166,696 | 5,166,697 |
JQuery selector for (ASP.NET) ButtonField in GridView
|
<p>I have a couple of ButtonFields in my gridview, corresponding to "Edit" and "Delete".</p>
<p>I'd like to use JQuery in my code for a delete confirmation popup.</p>
<p>ButtonField renders as "a href"'s in HTML, but I'm at a loss in forming a JQuery selector that targets only the "Delete" link, since ButtonField doesn't accept ID nor Name. I'm considering using TemplateField instead, but I'd like to check for other alternatives as I'd like to keep my OnRowCommand attribute in the GridView tag.</p>
|
asp.net jquery
|
[9, 5]
|
974,655 | 974,656 |
Random Text From jQuery Array
|
<p>I am trying to make an array of strings and then pluck a random string and place it in a div with class "quote". Below is my current code.</p>
<pre><code>$(document).ready(function() {
var quotes = new Array("foo", "bar", "baz", "chuck");
var randno = Math.floor ( Math.random() * quotes.length );
$('.quote').add(quotes[randno]);
});
</code></pre>
<p>What am I doing incorrectly?</p>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
666,961 | 666,962 |
How to use jQuery to submit a form and then reload the page
|
<p>I'm trying to figure out if this is possible.</p>
<p>I have Page-A that has Form-Foo with an action to Bar in a new window.</p>
<p>Upon clicking submit, I'd like the form to submit AND Page-A to reload.</p>
<p>So far I can only get one or the other to work...any pointers would be appreciated.</p>
<p>In addition to DudeSolutions solution...I tried this:</p>
<pre><code>$(document).ready(function() {
$('#foo').submit(function() {
$.post('bar.asp', $(#foo).serialize(), function(data) {
window.location.reload();
});
});
});
</code></pre>
<p>Same results...I can get the form to submit and a new tab opens...but Page-A does not reload.</p>
|
javascript jquery
|
[3, 5]
|
4,392,344 | 4,392,345 |
One time processings of usercontrol when it is wrapped inside updatepanel
|
<p>Traditional way of initializing controls with the values from session state as below -</p>
<pre><code>if (!IsPostBack)
{
if (Session["sessionId"] != null)
{
//initialize controls
}
}
</code></pre>
<p>Exhibits unexpected behavior when <strong>user control is wrapped inside update panel</strong>.</p>
<p>I need to populate usercontrol textBox values first time from session state. And subsequent loading of these controls values should be populated from viewState.</p>
<p>How do you handle this scenario. Do you think <strong>Page.IsAsync</strong> will be helpful for this ?</p>
|
c# asp.net
|
[0, 9]
|
4,057,801 | 4,057,802 |
how to grab the Ctl from a linkbutton
|
<p>I have a gridview which is pulling it data from a stored procedure. In the column title, I have used a Linkbutton. I would like to grab the Ctl ID and store it in a variable when it is clicked. I am not sure what is happening, but I get a few strings going through. Below is my code and this is similar to my previous post.</p>
<p>ASP.NET</p>
<pre><code><asp:TemplateField HeaderText="ID">
<ItemTemplate>
<asp:LinkButton ID="lnkID" runat="server" OnClick="lblClick1"
Text='<%#Eval("ID") %>'>
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</code></pre>
<p>C#:</p>
<pre><code> GridViewRow row = gv2.SelectedRow;
string controlId = ((LinkButton)row.FindControl("lnkID")).ID;
lblshow.Text = controlId;
</code></pre>
<p>Can someone help me get up and running. Thanks.</p>
|
c# asp.net
|
[0, 9]
|
2,376,376 | 2,376,377 |
Programmatically find Android system info
|
<p>I am trying to programatically find the system info for Android devices, specifically:</p>
<ul>
<li>RAM</li>
<li>CPU speed</li>
<li># cores, architecture, etc.</li>
</ul>
<p>Are there any Android classes that specify this information. I have been using the android.board library, but it doesn't seem to have everything that I want.</p>
|
java android
|
[1, 4]
|
4,670,291 | 4,670,292 |
Javascript file - change source at runtime from web.config
|
<p>I have this in my code:</p>
<pre><code><script type="text/javascript"
src="path?key=1234567890">
</script>
</code></pre>
<p>I added this in web.config:</p>
<pre><code><appSettings>
<add key="key" value="1234567890"/>
</code></pre>
<p></p>
<p>How to implement it in the above code?</p>
|
javascript asp.net
|
[3, 9]
|
1,623,254 | 1,623,255 |
Javascript Validation
|
<p>I was just trying to submit a simple form to the same page but when it is submitted it will call PHP funtion on the same page. However I was trying to do some javascript validation before submission. So I want to know what the difference between using onSubmit call js function in the form tag and onClick call js function with button.... This is what I am currently trying to do.</p>
<pre><code><?php
function tobecalled()
{
echo "This was run";
}
?>
<html>
<head><title>Testing</title>
<script type="text/javascript">
function testResults (form)
{
var TestVar = form.inputboxname.value;
if(TestVar == '')
return false;
else
return true;
}
</script>
</head>
<body>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="POST" onSubmit="return testResults(this);">
<input type="text" name="inputboxname" />
<input type="submit" value="Save" name="submit" />
<?php
if(isset($_POST['submit']))
tobecalled();
?>
</form>
</body
</html>
</code></pre>
<p>It works..</p>
<p>But if I make (Submit Via JS)</p>
<pre><code><form action="<?php $_SERVER['PHP_SELF'] ?>" method="POST">
...
<input type="submit" value="Save" name="submit" onClick="return testResults(this);"/>
...
</code></pre>
<p>Its still calls the PHP function <code>tobecalled()</code>--Why? I am expecting it not call. How do it work?</p>
|
php javascript
|
[2, 3]
|
5,398,905 | 5,398,906 |
get text area and text field data - jquery
|
<p>I have 2 text areas in my page as;</p>
<pre><code><input type="text" id="a1"/>
<textarea id="b2"></textarea>
<a id="button">button</a>
</code></pre>
<p>When user click the button link, I want to <code>alert</code> the data entered in <code>a1</code> and <code>b2</code>.</p>
<p>How can I do this?? Here is there <strong><a href="http://jsfiddle.net/k9kYR/" rel="nofollow">demo</a></strong></p>
<p>Thanks in advance...<code>:)</code></p>
<p>blasteralfred</p>
|
javascript jquery
|
[3, 5]
|
1,240,284 | 1,240,285 |
How do I refer to the values in this string in javascript
|
<p>I have an object with one String value in it in javascript. I believe it should be a key value pair but something is changing it so that this doesn't work:</p>
<pre><code>$.each(object, function(index, element) {
if (element.key) {
//do something with element.key and element.value
}
}
</code></pre>
<p>The value of element when inspecting with firebug is:</p>
<pre><code>[Object { STRING="1=stringValue"}]
</code></pre>
<p>How do I process this object?</p>
|
javascript jquery
|
[3, 5]
|
1,582,607 | 1,582,608 |
asp.net OnClientClick not rendered for initially disabled Button
|
<p>I have a disabled asp.Button, which I enable later with JavaScript. Like this</p>
<pre><code><asp:Button ID="btnSave" runat="server" Text="Save" Enabled="false" OnClientClick="; return ValidateFields();" OnClick="btnSave_Clicked" />
</code></pre>
<p>However, the "onclick" method is not rendered as html when the control is disabled. My work around is to add the following code in PageLoad.</p>
<pre><code>btnSave.Attributes["onclick"] = "return ValidateFields();";
</code></pre>
<p>Is there a more convenient work around for this?</p>
<p>Thanks</p>
|
c# javascript asp.net
|
[0, 3, 9]
|
1,579,955 | 1,579,956 |
how to get text width in pixel javascript or jquery?
|
<p>I want to get textarea text width. How to get text width in pixel.
I do not want text length. </p>
|
javascript jquery
|
[3, 5]
|
3,127,860 | 3,127,861 |
Python for C++ Developers
|
<p>I'm a long time C++/Java developer trying to get into Python and am looking for the stereotypical "Python for C++ Developers" article, but coming up blank. I've seen these sort of things for C#, Java, etc, and they're incredibly useful for getting up to speed on language features and noteworthy differences. Anyone have any references?</p>
<p>As a secondary bonus question, what open source Python program would you suggest looking at for clean design, commenting, and use of the language as a point of reference for study?</p>
<p>Thanks in advance.</p>
|
c++ python
|
[6, 7]
|
5,915,675 | 5,915,676 |
Load changed content via jQuery inside page
|
<p>i Have this:</p>
<pre><code><div style='display:none' id='myDiv'>
<input type='text' value='' id='text1'>
<input type='text' value='' id='text2'>
<div>
<ul>
<li> <a href="#" onClick="$('#text1').val('Hello1');
$('#text2').val('Hello2');">Load content</a>
<span id='divLoader'></span>
</li>
</ul>
</code></pre>
<p>And I Want to load into <code>#divLoader</code>, content from Div <code>#myDiv</code> , but with <code>#text1</code> and <code>#text2</code> displayed and if i had more <code>a links</code> it will change equal.</p>
<p>Thanks in advance. </p>
|
javascript jquery
|
[3, 5]
|
5,001,402 | 5,001,403 |
ASP.NET Multiple Field Validation
|
<p>In ASP.NET 2, I've used Field Validators, and RequiredField validators, but I'm unsure of how to handle a case like this.
<br>
I have two check boxes on a page, and I need to be sure that at least one of them is set. So, if you look at in binary, it can be 01, 10 or 11, but it can not be 00. My question is, what the best way to do this with checkboxes?</p>
<p><p>
Can the normal ASP Validators handle this, or would I need to create an integer value like mentioned above, hidden somewhere and use a RangeValidator do a test to make sure THAT value is never zero?</p>
|
c# asp.net
|
[0, 9]
|
5,865,719 | 5,865,720 |
Jquery menu transition
|
<p>I just started learning Jquery and am making an div sliding menu, this is what I have so far.</p>
<p><a href="http://jsfiddle.net/HfdXY/494/" rel="nofollow">http://jsfiddle.net/HfdXY/494/</a></p>
<p>I'm not sure i'm doing this correct, so any suggestions about how I can improve this code would be appreciated.</p>
<p>but right now the problem is when I click A then B, how can I make it so that menu from B transitions from B to A, and not below it like it currently is?</p>
|
javascript jquery
|
[3, 5]
|
3,412,770 | 3,412,771 |
How to catch asp.net textbox1.text via jquery
|
<p>net textbox control. so I try to catch via jquery. but I cant. How can I do this. Thanks...</p>
|
javascript jquery
|
[3, 5]
|
176,028 | 176,029 |
Capture image via Android camera from browser using PHP
|
<p>Is it possible to capture an image using Android camera via browser with PHP or another Library for PHP? I know it can be done by phone gap, but I'm trying to do it with PHP. Because my other Project using PHP too. </p>
<p>Can Anyone help me to find the solution?</p>
|
php android
|
[2, 4]
|
4,445,795 | 4,445,796 |
How to track redirection time in ASP.NET
|
<p>I am developing a comparison shopping system website which will display Amazon products. I have a functionality in it to generate url for any product and we can put that url for advertisement and when someone click on that advertisement control will first come to my website and then it will redirected to amazon project detail page. Now i want to track total time between reaching and leaving of control on my website. I want to track redirection time.</p>
<p>Please help me, sorry about my bad english.</p>
|
c# asp.net
|
[0, 9]
|
3,827,773 | 3,827,774 |
click gets detected when function is called
|
<p>I have a function that looks like this:</p>
<pre><code>function reset_all_lightbox_assets()
{
$(document).one("click", function () {
$("#lightbox-asset-wrapdiv .category-asset-div-tileview").css({"background-color": "#f9f9f9"});
$("#lightbox-asset-wrapdiv .category-asset-table-td-category,#lightbox-asset-wrapdiv .category-asset-table-td-id").css("color", "#777777");
$("#lightbox-asset-wrapdiv .category-asset-table-td-name").css("color", "#999999");
});
}
</code></pre>
<p>When this function is called I want to be able to click the document once and execute the code.</p>
<p>The problem is that when the function is called, it also immediately detects the click. So how can I call the function so the click becomes enabled but only gets executed when I actually click again?</p>
|
javascript jquery
|
[3, 5]
|
3,261,283 | 3,261,284 |
Where it is better to initialize field?
|
<p>Where it is better to initialize fields? In <strong>constructor (var.1)</strong> or on <strong>declaration (var.2)</strong>?</p>
<p><strong>var. 1</strong></p>
<pre><code>public class UtilWebLoading {
private int data;
private Context context;
public UtilWebLoading(Context context) {
this.context = context;
data = 100;
}
...
}
</code></pre>
<p><strong>var. 2</strong></p>
<pre><code>public class UtilWebLoading {
private int data = 100;
private Context context;
public UtilWebLoading(Context context) {
this.context = context;
}
...
}
</code></pre>
|
java android
|
[1, 4]
|
2,153,772 | 2,153,773 |
jwysiwyg to php
|
<p>I am using this jQuery based jWysiwyg.<br>
<a href="http://code.google.com/p/jwysiwyg" rel="nofollow">http://code.google.com/p/jwysiwyg</a></p>
<p>How do I pass the value of <code>$('#wysiwyg').val()</code> to php script. For example to show the value of jwysiwyg in an alert box, I am using</p>
<pre><code><form name="form1" method="post" action="sendmail.php">
<textarea name="wysiwyg" id="wysiwyg" rows="5" cols="103"></textarea>
<input type="submit" name="Submit" value="Login"></input>
<input type="button" value="Alert HTML" onclick="alert($('#wysiwyg').val());" />
</form>
</code></pre>
<p>What I need is how to pass value of jwysiwyg's value in submit control and how do I call "logout.php" on pressing of a button?</p>
|
php jquery
|
[2, 5]
|
5,184,012 | 5,184,013 |
How to route requests to a method in a class in WebForms?
|
<p>In MVC one can write a custom route that points to a method on a controller, i would like to achieve the same functionality with WebForms.</p>
<p>If i have a route like;</p>
<pre><code>Admin/{Controller}/{Action}
</code></pre>
<p>I would like to user a Url like the one below to invoke the Register method on a User class/controller.</p>
<pre><code>http://[domain]/Admin/User/Register
</code></pre>
<p>How do i go about doing something like this.</p>
<p><strong>NOTE</strong> </p>
<p>I've found an answer to my question elsewhere;<br>
<a href="http://www.west-wind.com/weblog/posts/2011/Mar/28/Custom-ASPNET-Routing-to-an-HttpHandler" rel="nofollow">http://www.west-wind.com/weblog/posts/2011/Mar/28/Custom-ASPNET-Routing-to-an-HttpHandler</a></p>
<p>Basically, i am using WebForms to develop an app, however wanted the controller concept of the MVC - the ability to execute methods that exist on a controller. I've been able to achieve my goal, thanks to that article.</p>
|
c# asp.net
|
[0, 9]
|
2,559,604 | 2,559,605 |
I am trying to redirect after someone shares a link on facebook but is not working
|
<p>Here is what i've tried: <a href="http://jsfiddle.net/trefu/qNDJB/1/" rel="nofollow">http://jsfiddle.net/trefu/qNDJB/1/</a> but even on direct link share i get error.
I was wondering if it is possible to reveal a hidden div after user shares a link on facebook or even a redirect will be useful.</p>
<pre><code> <div id='fb-root'></div>
<a target="_blanck" href="https://www.facebook.com/dialog/feed?app_id=458358780877780&link=https://developers.facebook.com/docs/reference/dialogs/&picture=http://fbrell.com/f8.jpg&name=Facebook%20Dialogs&caption=Reference%20Documentation&description=Using%20Dialogs%20to%20interact%20with%20users.&redirect_uri=https://google.com/">Share</a>
<p><a onclick='postToFeed(); return false;'>Post to Feed</a></p>
<p id='msg'>sss</p>
FB.init({appId: "437410746335629", status: true, cookie: true});
function postToFeed() {
// calling the API ...
var obj = {
method: 'feed',
redirect_uri: 'http://google.ro',
link: 'https://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
name: 'Facebook Dialogs',
caption: 'Reference Documentation',
description: 'Using Dialogs to interact with users.'
};
function callback(response) {
document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
}
FB.ui(obj, callback);
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,896,714 | 3,896,715 |
do datatype choices affect performance?
|
<p>I have an object model that I use to fill results from a query and that I then pass along to a gridview.</p>
<p>Something like this:</p>
<pre><code>public class MyObjectModel
{
public int Variable1 {get;set;}
public int VariableN {get;set;}
}
</code></pre>
<p>Let's say variable1 holds the value of a count and I know that the count will never get to become very large (ie. number of upcoming appointments for a certain day). For now, I've put these data types as int. Let's say it's safe to say that someone will book less than 255 appointments per day. Will changing the datatype from int to byte affect performance much? Is it worth the trouble?</p>
<p>Thanks</p>
|
c# asp.net
|
[0, 9]
|
5,241,814 | 5,241,815 |
How to get the number of lines in a textarea?
|
<p>What I would like is to count the number of lines in a textarea, e.g:</p>
<pre><code>line 1
line 2
line 3
line 4
</code></pre>
<p>should count up to 4 lines. Basically pressing enter once would transfer you to the next line</p>
<p>The following code isn't working:</p>
<pre><code>var text = $("#myTextArea").val();
var lines = text.split("\r");
var count = lines.length;
console.log(count);
</code></pre>
<p>It always gives '1' no matter how many lines.</p>
|
javascript jquery
|
[3, 5]
|
1,526,933 | 1,526,934 |
Select an option of select box using the value
|
<p>I have a dropdown box and I want to select the option based on value. Somehow I am getting handle to value say <code>3</code>. Now I want to manually select the option which has got value <code>3</code>. </p>
<p>I have tried something like this </p>
<pre><code>selectBoxElement.options[selectedValues].selected = true;
</code></pre>
<p>where <code>selectedValue = 3</code>, but it is not working.</p>
|
javascript jquery
|
[3, 5]
|
1,366,270 | 1,366,271 |
converting function to jquery click() call
|
<p>Here is the code that I'm trying to convert:</p>
<pre><code><script>
function fsomething(rowid) {
window.location = "/somewhere/" + rowid;
}
</script>
<tr>
<td>
<button onClick="fsomething('{{rowid}}')">row 1L</button>
</td>
<td>
<button onClick="fsomething('{{rowid}}')">row 2L</button>
</td>
</tr>
</code></pre>
<p>How can I convert this to:</p>
<pre><code>$('button').click(function() { .... } );
</code></pre>
<p>where <code>{{rowid}}</code> is dynamically generated, and unique to each row?</p>
|
javascript jquery
|
[3, 5]
|
4,509,268 | 4,509,269 |
can we use static string in web application?
|
<p>can we use static string in web application?</p>
<p>Is there any data switching between users who are all logged in same session?</p>
|
c# asp.net
|
[0, 9]
|
3,479,379 | 3,479,380 |
jquery show/hide being ignored
|
<p>I have a page where a user can 'like' an article.</p>
<p>When the page first loads I want to show if they've already liked an article.</p>
<p>The code I'm using to add html to the DOM is:</p>
<pre><code>html += '<div class="gl_like">';
html += '<a href="#" class="like" id="'+image.article_id+'"><div class="bLike" title="Like this article"></div></a>';
html += '<a href="#" class="unlike" id="'+image.article_id+'"><div class="bUnlike" title="Unlike this article"></div></a>';
html += '</div>';
</code></pre>
<p>Now I'm checking what the API throws back as to whether a user has already liked an article</p>
<pre><code>if(image.numLikes<1){
$('.like').show();
$('.unlike').hide();
html += 'wooo'; // to test the code works, it does
} else {
$('.like').hide();
$('.unlike').show();
}
</code></pre>
<p>The "wooo" is added to the html but the show/hide functions are being ignored. The ".like" class is shown on every article.</p>
<p>What I want to happen is the ".like" class shows if user hasn't liked an article and ".unlike" class shows if they have.</p>
<p>Am I missing something here?</p>
|
javascript jquery
|
[3, 5]
|
4,215,010 | 4,215,011 |
Get hostname of client pc via javascript or jquery
|
<p>I have an intranet app that needs to know where to print some labels. We have multiple workstations setup. I need a way to retrieve the host name of the client so that when they print something it comes out of the correct printer. Right now I have this being set at login but was curious if I could actually pull the host name on the client side, then on the server side i could easily parse the hostname to set the printer. The solves the problem of a user being logged into two workstations at once. Granted it shouldn't happen but users will be users.</p>
<p>The application is printing labels to a zebra printer so the printing occurs on the server but the print job is sent to the label printer that is next to the workstation being used.</p>
<p>TIA!</p>
|
javascript jquery
|
[3, 5]
|
3,217,039 | 3,217,040 |
jQuery click event handlers don't work after loading html page with load()
|
<p>Hi I am loading several html pages on an index page depending on what link was clicked.I have a problem with the links that have asocietted click event handlers.It seems that after the jQuery loads the html file the links in that html do not have there click event handlers binded to them.
Here is my code:</p>
<p>This is the html for one of the links that does not work:</p>
<pre><code><a href="#" id="NavContactPage" data-sectionId="Skills">skills</a>
</code></pre>
<p>This is the jquery code asocieted with it:</p>
<pre><code>$("nav a , a.first_anchor , a#NavContactPage").click(function(){
var id = $(this).attr("data-sectionId");
var link = "load/" + id + ".html";
$("div#Content").load(link , function(){
$("section#" + id).fadeIn();
if(id === "Portfolio"){
$('div.slide').cycle('fade');
}
if(id === "Home"){
$("#jcycleslider").cycle({
fx: mtransition,
easing: easing,
before: onBefore,
after: onAfter,
speed: mpace,
timeout: mnext,
sync: msync,
randomizeEffects:0,
pager:'#jslider_nav'
})
$("#jslider_nav a").text("");
}
})
return false;
})
</code></pre>
<p>How can I solve this problem?</p>
|
javascript jquery
|
[3, 5]
|
5,752,196 | 5,752,197 |
How to populate the page via JQuery after I have the json returned
|
<p>Ok so i have the json object returned back from my script and I have all the data but how do I put it on the page. Here is what i have so far </p>
<p>I have a php page which has a loop like this</p>
<pre><code><div class="main-blue">
<div class="blue-items">
<?php foreach ($related as $row_r) { ?>
<div class="item-blue">
<div class="image left">
<img src="<?php print $row_r['image'] == "" ? "css/images/blue-png2.png" : "css/images/{$row_r['image']}" ?>" alt="" />
</code></pre>
<p>As you can see the Php loop is looping through the array $related which has lots of products. I have an ajax call that can change the data in this array and regenerate the page. I have the new data from a getjson call</p>
<pre><code> $.getJSON('function.php?type=piz&count=5', function(data) {
$(data).each(function(key, value) {
console.log(value);
});
});
</code></pre>
<p>How do i recreate the page using the new data</p>
|
php jquery
|
[2, 5]
|
2,544,321 | 2,544,322 |
Changing 3 lines of code to php from c#
|
<p>Can any give me some idea on how to write the following code in PHP because the below code is in C#</p>
<pre><code>var response = HttpContext.Current.Response;
response.Clear();
response.AppendCookie(new HttpCookie("fileDownloadToken", downloadTokenValue);
response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}",
desiredFileName));
response.Flush();
</code></pre>
<p>Thanks in advance</p>
|
c# php
|
[0, 2]
|
1,792,181 | 1,792,182 |
Auto click a hyperlink
|
<p>How do I automatically click a Hyerlink or LinkButton using jQuery</p>
<pre><code><asp:Hyperlink id="ttt" PostBackUrl="Hut.htm">Click</asp:Hyperlink>or<asp:LinkButton id="ttt" PostBackUrl="Hut.htm">Click</asp:LinkButton>
</code></pre>
|
asp.net jquery
|
[9, 5]
|
2,725,906 | 2,725,907 |
How to validate at least one Checkbox is checked using JQuery?
|
<p>Hear is my code:</p>
<pre><code><div class="reminderDiv">
<input type="checkbox" class="require-one" id="lmrText" name="lmrText"><label>Text Message</label>&nbsp;&nbsp;&nbsp;
<input type="checkbox" class="require-one" id="lmrPhone" name="lmrPhone"><label>Phone</label>
<input type="checkbox" class="require-one" id="lmrEmail" name="lmrEmail"><label>Email</label>
</div>
</code></pre>
<p>Using JQuery, how can I determine if at least one checkbox is selected?</p>
|
javascript jquery
|
[3, 5]
|
605,410 | 605,411 |
jQuery select option elements by value
|
<p>I have a select element wrapped by a span element. I am not allowed to use the select id but I am allowed to use the span id.
I am trying to write a javascript/jquery function in which the input is a number i, which is one of the values of the select's options. The function will turn the relevant option to selected.</p>
<pre><code><span id="span_id">
<select id="h273yrjdfhgsfyiruwyiywer" multiple="multiple">
<option value="1">cleaning</option>
<option value="2">food-2</option>
<option value="3">toilet</option>
<option value="4">baby</option>
<option value="6">knick-knacks</option>
<option value="9">junk-2</option>
<option value="10">cosmetics</option>
</select>
</span>
</code></pre>
<p>I wrote something as follows (this does not completely work, which is why I am posting this question):</p>
<pre><code>function select_option(i) {
options = $('#span_id').children('select').children('option');
//alert(options.length); //7
//alert(options[0]); //[object HTMLOptionElement]
//alert(options[0].val()); //not a jquery element
//alert(options[0].value); //1
//the following does not seem to work since the elements of options are DOM ones not jquery's
option = options.find("[value='" + i + "']");
//alert(option.attr("value")); //undefined
option.attr('selected', 'selected');
}
</code></pre>
<p>Thanks!</p>
|
javascript jquery
|
[3, 5]
|
2,162,079 | 2,162,080 |
How do I tell which element a jquery click occurred on?
|
<p>I am handling a click on a list item with jquery:</p>
<pre><code>$("#some_list li").click(function(event) {
// magic happens here
}
</code></pre>
<p>The list items look like:</p>
<pre><code><li><input type='checkbox'>Some text<span class='info'>(?)</span></li>
</code></pre>
<p>I want to have different behaviours depending on whether the user clicks within the (?), or anywhere else in the list. How can I detect which element the user clicked on? </p>
|
javascript jquery
|
[3, 5]
|
1,645,432 | 1,645,433 |
jQuery cartTotal result
|
<p>For some reason my website is displaying the word "El product(s)" instead "0 product(s)"</p>
<p>Here my actual script with jquery: </p>
<pre><code>cartSummary : function(){
if (jQuery('#catCartSummary .cartSummaryItem').html() != 'Shopping cart is empty.') {
var summary = jQuery('#catCartSummary .cartSummaryItem').text().split(" ");
// url = $('#user-options .cart a').attr('href');
jQuery("span.cartTotal").text(summary[0]);
}else{
jQuery("span.cartTotal").text("0 ");
}
}, //cartSummary
checkOutBtn : function(){
var cartTotal = jQuery("span.cartTotal").text();
if(cartTotal > 0){
jQuery("a.view-cart").css('background-position','0 -26px');
}
}, // checkOutBtn
</code></pre>
<p>My HTML code:</p>
<pre><code><strong><span class="cart-info"><span class="cartTotal"></span> product(s) </span></strong>&nbsp;<a class="view-cart" href="/OrderRetrievev2.aspx">View cart</a>
</code></pre>
|
javascript jquery
|
[3, 5]
|
2,153,164 | 2,153,165 |
jquery reset conditional filter
|
<p>I have 2 dropdown lists on my webform and using jquery trying to filter/reset filter 2nd dropdown elements based on 1st dropdown selection.</p>
<pre><code>$(document).ready(function()
{
$('#dropdown1').change(function(e)
{
switch ($(this).val())
{
case "4":
//this removal works
$('#dropdown2').filter(function()
{
return ($(this).val() == 16);
}).remove();
break;
.................
default:
//how would I restore filter here?
}
}
});
</code></pre>
<p>Removing part works, so it filters item with no problem, but I have difficulty restoring the filter on dropdown 2 if something else is chosen in dropdown 1. I was trying to use <code>.hide()</code> and <code>.show()</code> instead of <code>.remove()</code> but it doesn't seem to work on IE6 at least.</p>
|
asp.net jquery
|
[9, 5]
|
3,077,372 | 3,077,373 |
run php from java
|
<p>Is there a way to run php server**(remote)** scripts from a java program (with secured/encrypted connection).</p>
|
java php
|
[1, 2]
|
5,273,394 | 5,273,395 |
ASPx set Cookie Domain
|
<p>I have a code as follows:</p>
<pre><code> this.Response.Cookies.Add(new HttpCookie("COOKIENAME",'test'));
</code></pre>
<p>I want to add the domain ".test.com" for this cookie. How do I do so? I tried the standard:</p>
<pre><code> this.Response.Cookies["COOKIENAME"].Domain = ".test.co.uk";
</code></pre>
<p>But the cookie is not being set for the whole domain. Any suggestions?</p>
<p>The following is not working either:</p>
<pre><code>HttpCookie MyCookie = new HttpCookie("COOKIENAME");
MyCookie.Value = 'test';
MyCookie.Domain = ".test.co.uk";
this.Response.Cookies.Add(MyCookie);
</code></pre>
|
c# asp.net
|
[0, 9]
|
4,549,649 | 4,549,650 |
How to avoid @SuppressWarnings with anonymous inner classes in Java?
|
<p>I'm struggling with smarter coding style in usage of anonymous classes.</p>
<p>How can I use anonymous inner class WITHOUT
@SuppressWarnings
in the case below?</p>
<p>When using anonymous classes like this way:</p>
<pre><code>someMethod( new Y(){
// non-overriding public method
public void echo1(){
// do some stuff
}
} );
...
public abstract class Y
{
// use me as an anonymous class,
// and define any methods when defining me
}
</code></pre>
<p>This code makes warning.</p>
<p>public method "echo1" needs to be annotated
@SuppressWarnings("unused")
.</p>
<p>If I code additionally echo2, echo3, echo4,... all methods needs to be annotated one by one.</p>
<p>In order to avoid writing annotations frequently,
I tried to code this way for propagating annotation effects over all child classes:</p>
<pre><code>@Inherited // <- This is what I want this annotation to be!
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface SuppressWarningsPropagate extends SuppressWarnings
{
}
</code></pre>
<p>then I tried to annotate class Y with this annotation.
This would be useful and simple enough to annotate only one base class.</p>
<p>...and I found myself stupid. </p>
<p>Annotations like
SuppressWarnings
can't be "extended" nor "implemented".</p>
<p>Instead, this code works and has no warnings, because SuppressWarnings goes well for this only one concrete class:</p>
<pre><code>@SuppressWarnings("unused")
public class X
{
private int i;
private int j;
}
</code></pre>
<p>In summary, how can I...</p>
<ul>
<li>use anonymous inner class (for good readability of code)</li>
<li>and also defining public methods on
new
(must be public, for the matter of addJavascriptInterface() of Android SDK)</li>
<li>and also avoid writing @SuppressWarnings("unused") for all the methods one by one (for good writability)</li>
</ul>
<p>...possible? or am I just daydreaming?</p>
<p>Thanks a lot in advance.</p>
|
java android
|
[1, 4]
|
2,375,876 | 2,375,877 |
dynamically adding check box asp.net( csharp) and retain its value on postback
|
<p>I need to add dynamically checkboxlist to a section of web page.
I also need to retain its value on post back.
How this should be done?</p>
|
c# asp.net
|
[0, 9]
|
5,183,459 | 5,183,460 |
Dynamically populate checkboxlist in Asp.Net C#
|
<p>In my project, in the database view I have the USERs list with their descriptions and what Type of USers are they.
For Eg. Some USer Type are : DE, Some others are : admin etc etc etc.</p>
<p>So now I want to populate the CheckBoxList on PageLoad.</p>
<ul>
<li>If CheckBoxList1 = "DE" then all the UsersNames of Type "DE" will the displayed.</li>
<li>If CheckBoxList2 = "admin" then all the UsersNames of Type "admin" will the displayed.</li>
<li>If CheckBoxList3 = "Coord" then all the UsersNames of Type "Coord" will the displayed.</li>
<li>etc etc</li>
</ul>
<p>then I will select whether I should give permission to the whole group or only to a particular user.</p>
<p>I couldn't Bind the Checkboxlist and populate the UsersName according to the UserType.</p>
|
c# asp.net
|
[0, 9]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.