Unnamed: 0
int64 302
6.03M
| Id
int64 303
6.03M
| Title
stringlengths 12
149
| input
stringlengths 25
3.08k
| output
stringclasses 181
values | Tag_Number
stringclasses 181
values |
---|---|---|---|---|---|
1,931,276 | 1,931,277 |
Multiple and single choice test
|
<p>I am working on a Single choice and Multiple choice test.</p>
<p>I have couple of questions and 4 answers for each question.</p>
<p>I am shuffling the answers as each answer is assigned to radio button.
This is how i am shuffling the arraylist where Random is a arraylist with items and r1,r2,r3,r4 are radio buttons.</p>
<pre><code>random.add(val);
Collections.shuffle(random);
r1.setText(random.get(0));
r2.setText(random.get(1));
r3.setText(random.get(2));
r4.setText(random.get(3));
</code></pre>
<p>I am able to display the answers in jumbled way but when i select the answer i need to show that the answer is correct or wrong.</p>
<pre><code>Sample question and options.
1. which language is used for android programming?
A.PHP
B.JAVA
C.C
D.C++
</code></pre>
<p>Correct answer is B i need to display that correct answer is B.</p>
<p>How to acheive this.</p>
<p><strong>EDIT:</strong>
I have tried this:</p>
<p>Onclick of each radio button assign the value A and compare the value with xml value if its correct display correct but when i jumble its will not work.</p>
<p><strong>EDIT 2</strong>
xml</p>
<pre><code><Question no="1" text="Which Programming language is used in android develoment" type="SCA" noc="4" jumble="NO" correctans="PHP">
<choice a = "PHP" flag="A">
<choice b = "JAVA" flag="B">
<choice c = "C" flag="C">
<choice d = "C++" flag="D">
</code></pre>
|
java android
|
[1, 4]
|
170,305 | 170,306 |
add text box dynamically and capture data on button click
|
<p>I am adding text boxes dynamically and trying to capture data entered in text box on button click. but what is happening is , though I entered the data in the text box, when I clicked the button, the page is getting loaded and the control is getting created again. As a result , I am loosing the data in the text box. Can you tell me how can I capture this data entered to the dynamically created text boxes.
My sample code is as follows:</p>
<pre><code> protected void Page_Load(object sender, EventArgs e)
{
Table tblTextboxes = new Table();
for(int i=0;i<10;i++)
{
TableRow tr=new TableRow();
TableCell tc=new TableCell();
TextBox tb=new TextBox();
tb.ID=i.ToString();
tc.Controls.Add(tb);
tr.Cells.Add(tc);
TableCell tc1=new TableCell();
LinkButton lnk=new LinkButton();
lnk.ID=i.ToString()+tb.Text+"lnk";
lnk.Text = "Show";
lnk.Click+=new EventHandler(lnk_Click);
tc1.Controls.Add(lnk);
tr.Cells.Add(tc1);
tblTextboxes.Rows.Add(tr);
}
placeTest.Controls.Add(tblTextboxes);
}
void lnk_Click(object sender, EventArgs e)
{
LinkButton lnk=sender as LinkButton;
Label lbl=new Label();
lbl.Text="The text is"+lnk.ID;
placeTest.Controls.Add(lbl);
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
3,763,650 | 3,763,651 |
function sending a null value to php file
|
<p>I've got a function which sends the "id" value to a php file but all it's send is null.. can anyone spot why? </p>
<p>(the value of id is not null)</p>
<pre><code>function send(point, name, message, type, file, id, lat, lng) {
var html = "<b>" + name + "</b> <br/>" + message + '<IMG SRC=\"'+file+'\">' + ' <br> id = ' + id + "<a href=delete.php?id="+ <?php echo "\"".$nt['id']."\""?> +">Delete Entry</a>";
}
</code></pre>
|
php javascript
|
[2, 3]
|
4,035,501 | 4,035,502 |
Javascript triple greater than in PHP
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/3325640/php-shift-right">PHP shift right</a> </p>
</blockquote>
<p>What is the ability to get the same result of javascript's <a href="http://msdn.microsoft.com/en-us/library/342xfs5s%28v=vs.94%29.aspx" rel="nofollow">triple great than ( >>> )</a> in php ?</p>
|
php javascript
|
[2, 3]
|
3,512,386 | 3,512,387 |
Jquery modal dialog on all hyperlink clicks in a page
|
<p>In my project, I have a page where I need to show a modal dialog on the click of all the hyperlinks.</p>
<p>The popup has two buttons Images "Continue" and "GoBack". I wrote some jquery which I found on this Stackoverflow website. But there is a problem with code.</p>
<p>Suppose I have 5 hyperlinks in this page. When I click on the first link its opening the dialog and when I click on continue its opening the link properly.</p>
<p>But when I click on the second link its opening again the first link and the second link
two separate windows, Which is wrong it supposed to open only second link.</p>
<p>When I click on the third link again its opening first,second and third links in 3 windows.</p>
<p>I guess I am doing a small mistake in my code. If anyone help me fixing this I really appreciate.</p>
<p>Thanks for your help in advance. Here is my jquery code:</p>
<pre><code><script type="text/javascript">
<!-- Loading Modal Dialog Popup-->
$(document).ready(function() {
// $(".leaving-the-site-container").hide();
$(".linkdialog").click(function(e){
e.preventDefault();
var targetUrl = $(this).attr("href");
alert(targetUrl);
$(".leaving-the-site-container").dialog({
width:452,
// autoOpen:false,
// height:225,
modal:true,
closeOnEscape:false,
draggable:false,
scrollbars:false,
position: ["center", 240]
});
$("#btnContinue").click(function(){
window.open(targetUrl);
$(".leaving-the-site-container").dialog("close");
});
$("#btnTakeMeBack").click(function(){
$(".leaving-the-site-container").dialog("close");
});
});
});
</script>
</code></pre>
|
javascript jquery
|
[3, 5]
|
1,145,291 | 1,145,292 |
how to move text on mouse over in jquery?
|
<p>How to make a link moving to left when mouse over? I want the text move back when mouse out. Is it possible with jquery? Please help.</p>
<p>Thank You</p>
|
javascript jquery
|
[3, 5]
|
5,701,944 | 5,701,945 |
Enable button after writing file to response
|
<p>There is many similar questions but there is still no clear answer that is solving the problem taking some action after writing some stream to response.</p>
<p>I have a following situation:</p>
<p>On button click I am generating some excel file that I am going to write to response allowing user to download generated file. Imidietly after clicking the button, I am disabling it, to prevent double clicking this button. In Page-Load event handler I have following code:</p>
<pre><code> GenerateBTN.Attributes.Add("onclick", "this.disabled=true;" + ClientScript.GetPostBackEventReference(GenerateBTN, "").ToString());
</code></pre>
<p>After Page_Load eventhandler, GenerateBTN_Click handler executes the code needed for generating the file and at the end of this method (handler) I am response writing generated file with following code:</p>
<pre><code>Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + filename + "\"");
Response.WriteFile(@"C:\Reports\" + filename);
Response.End();
</code></pre>
<p>The Save As dialog appears and user can download the generated file, but the problem is that the disabled GenerateBTN remains disabled. How to enable it afer Writing generated file to response? I understand that afer clearing current response I can not continue with the initial Response, but is there any way to solve this problem?</p>
|
c# asp.net
|
[0, 9]
|
4,715,248 | 4,715,249 |
Having an issue with jquery functions not working properly
|
<p>I've been trying to get this little project I'm doing finished, but for some reason it is not properly working.</p>
<p>The issue is when I first visit the page and click the first link that appears in the main section it displays the popup box as wanted. Now when I click another day, for instance sunday and try to click the first link it doesn't do anything. And if I click back to Saturday the first link also doesn't do anything anymore.</p>
<p>It seems something is not properly activating or maybe a command is overwriting and not allowing it to work like it does when you first hit the landing page. I'm sorry if this is confusing but any help would be much appreciated.</p>
<p>The website is <a href="http://www.pouronline.com" rel="nofollow">pouronline.com</a>
that's where i do all my testing.</p>
<p>Thank you</p>
|
javascript jquery
|
[3, 5]
|
818,646 | 818,647 |
Workaround for passing parameter to jQuery ready()
|
<p>I have some code called on jQuery document.ready() which is used in multiple HTML files. Now the difference is each of these HTMLs uses a different div id.
I know one option is to just check for hardcode div ids inside $(document).ready() . But I wanted to write a generic code which would take the div Ids based on the currrent/calling HTML page?</p>
<p>So is there any way or workaround for passing parameter to jQuery ready() ?</p>
|
javascript jquery
|
[3, 5]
|
190,528 | 190,529 |
javascript formatting opinion: ' vs "
|
<p>In looking up jquery examples, I see that authors tend to go with ' or " to enclose, selectors, for example.</p>
<p>As in:</p>
<p>$('#tags').click ...</p>
<p>or </p>
<p>$("#tags").click</p>
<p>Is this a personal style thing, or is there a reason why one is better than the other?</p>
<p>In my brief experience, I find that ' is faster to type. Also, building up json parameters is easier with ' because you can easily escape " in strings.</p>
|
javascript jquery
|
[3, 5]
|
5,575,378 | 5,575,379 |
Filter items in JavaScript Array using jQuery
|
<p>I have a JavaScript array as below which I need to filter to get the correct child values from the test data below. </p>
<pre><code>var arrChildOptions2 = [
{Parent:'opt1',Value:'opt1',Text:'Parent1 - Child 1'},
{Parent:'opt2',Value:'opt1',Text:'Parent 2 - Child 1'},
{Parent:'opt2',Value:'opt2',Text:'Parent 2 - Child 2'}
];
</code></pre>
<p>The values are used to populate a dropdown based on the change event of a parent dropdown as below.</p>
<pre><code>$(function() {
$('#ddl1').change(function() {
$('#ddl2 option:gt(0)').remove();
$('#ddl2').addItems('#ddl2', arrChildOptions2[Parent=opt2]);
});
});
</code></pre>
<p>where additems is a function that loops through the array. Problem is I can't get it to filter by parent, I've tried using <strong>contains</strong> and the above <strong>arrChildOptions2[Parent=opt2]</strong> but I can't get it to filter, I'd prefer to find a neat solution rather than use a for loop? Any ideas, cheers</p>
|
javascript jquery
|
[3, 5]
|
2,561,177 | 2,561,178 |
table pagination and filtering with javascript and php
|
<p>Let's say that you have to generate and display a table after querying a database using PHP. The table might have a lot of rows. One must be able to filter the resulting table using different criteria (single or multiple selections), much like an Excel table.</p>
<p>example:</p>
<pre>
+----------------------------------------------------------------+
| id | name | type | description |
+----------------------------------------------------------------+
| input search | input search | drop down | drop down |
| by id field | by name field | type select | sort asc/desc |
+---------------+---------------+-------------+------------------+
| 1 | exampe_name | type 1 | bla bla |
+---------------+---------------+-------------+------------------+
| 2 | exampe_name 2 | type 2 | tra la la |
+---------------+---------------+-------------+------------------+
| ... | ... | ... | ... |
+---------------+---------------+-------------+------------------+
</pre>
<p>So, I imagined that there should be two pages: </p>
<ul>
<li>one that generates rows and apply selected filters($_GET) on request </li>
<li>a second page which displays the table, using some javascript stuff to keep track of the selected criteria, pagination, reload content on filter change and smooth display...</li>
</ul>
<p>Has anybody encountered such kind of tasks? If yes, please share your solution, thanks in advance.</p>
|
php javascript
|
[2, 3]
|
5,787,658 | 5,787,659 |
Close a dialog in jQuery
|
<p>I have a calendar in my page which have a <code>more info</code> button.</p>
<p>That button opens when clicked upon but do not close.</p>
<p>How can i close it?</p>
<p>Button:</p>
<pre><code>$('a.cmoreinf').live('click', function() {
$('.ccontent').each(function() {
$(this).css('display','none');
});
$(this).closest('.calsingleentry').find('.ccontent').css('display','block');
return false;
});
</code></pre>
<p><a href="http://tranceil.fm/?page_id=43" rel="nofollow">Calendar Page</a></p>
|
javascript jquery
|
[3, 5]
|
2,962,083 | 2,962,084 |
I want to make reply control on the Reply button click
|
<p>I wan to create reply control for the web site in which
if user click on the Reply button then he or she get textbox and button and after clicking on that button the textbox value is insert to the DataBase</p>
<p>I already write one script
the script is like this </p>
<p>
Click me!
</p>
<p>but this script give me textbox for the 2 to 3 second and after page post back the textbox and button is disappear </p>
<p>so some body help if its possible</p>
|
c# javascript
|
[0, 3]
|
5,091,816 | 5,091,817 |
jQuery.bind() events on plain Javascript objects
|
<p>Is it ok to bind jQuery events to plain, non-DOM Javascript objects:</p>
<pre><code>var myobject = {};
$(myobject).bind("foobar", function() { alert("daa"); });
$(myobject).trigger("foobar");
</code></pre>
<p>What are the implications for</p>
<ul>
<li><p>Garbage collection (no new references created preventing object to GC'ed)</p></li>
<li><p>Object attributes (new attributes assigned to the object)?</p></li>
<li><p>Performance</p></li>
</ul>
<p>Some things I have noted</p>
<ul>
<li>Event name must not conflict with a function name on the object, e.g. you cannot have function init and event named init and trigger it correclty</li>
</ul>
|
javascript jquery
|
[3, 5]
|
716,278 | 716,279 |
is it possible to show Loader image without setTimeout & ajax request?
|
<p>Just need to know if it is possible to load a loader without use of SetTimeout and ajax request?</p>
<p>For example:</p>
<pre><code>showLoader() ;
Function_that_process();
hideLoader();
</code></pre>
|
javascript jquery
|
[3, 5]
|
703,409 | 703,410 |
Getting web page title from setWebViewClient?
|
<p>i am using webview in my android app.
i want to get title of current page shown in webview.
i am using following code to do that</p>
<pre><code>webView.setWebViewClient(new WebViewClient()
{
public void onPageFinished(WebView view, String url) {
TextView t=(TextView)findViewById(R.id.title);
t.setText(view.getTitle());
}
}
</code></pre>
<p>This code works but not always.
Sometimes it doesn't show the title.
sometimes it shows title of previous page.
Whats wrong here??</p>
|
java android
|
[1, 4]
|
4,065,996 | 4,065,997 |
how to refresh a parent page when child window is closed.?
|
<p>hiii
how to refresh a parent page when child window is closed.</p>
|
c# asp.net
|
[0, 9]
|
5,655,788 | 5,655,789 |
Whether there is something similar to strip_tags in Java?
|
<p>We have a function <a href="http://php.net/manual/en/function.strip-tags.php" rel="nofollow"><code>strip_tags</code></a> in PHP which would strip all the tags and also you can exempt certain tags from being stripped out..</p>
<p>My question is whether there is anything similar in Java??</p>
|
java android
|
[1, 4]
|
2,964,676 | 2,964,677 |
How to show the non-selected options in a select form, after a previous form is submitted
|
<p>I have a form where im asking for name, surname, phone cellphone and at the end user has to check one or more options in a checkbox and then clicks submit.</p>
<p>After that in the "thank you page" i want to show the exact form but this time to show only the non-checked checkboxes.
Reason for this is that i want to say "We highly recommend you check all the options for better results, you can do so by simply clicking the submit button below"</p>
<p>And then below that i want to present the form as i said, but the remaining checkboxes (the oens that were not checked before) would be only the NON-checked options in the previous page. Makes sense?</p>
<p>Ive tried hard with php if states and switches but still cant get the result i want, it seems i have to define "false statements" in a way im not cabable of doing it.</p>
<p>Should i use php or jquery?</p>
<p>Can anyone help me? Im kinda lost.
Thanks a lot in advance</p>
|
php jquery
|
[2, 5]
|
2,546,287 | 2,546,288 |
Getting all HTML elements in the DOM where an attribute name starts with some-string
|
<p>I've stumbled upon a tricky one, that I haven't been able to find any references to (except one here on Stackoverflow, that was written quite inefficiently in Plain Old Javascript - where I would like it written in jQuery).</p>
<p><strong>Problem</strong></p>
<p>I need to retrieve all child-elements where the <strong>attribute-name</strong> (note: <strong>not</strong> the <em>attribute-value</em>) starts with a given string.</p>
<p>So if I have:</p>
<pre><code><a data-prefix-age="22">22</a>
<a data-prefix-weight="82">82</a>
<a href="#">meh</a>
</code></pre>
<p>My query would return a collection of two elements, which would be the first two with the <strong>data-prefix-</strong>-prefix</p>
<p>Any ideas on how to write up this query?</p>
<p>I was going for something like:</p>
<pre><code>$(document).find("[data-prefix-*]")
</code></pre>
<p>But of course that is not valid</p>
<p>Hopefully one of you has a more keen eye on how to resolve this.</p>
<p><strong>Solution</strong></p>
<p>(See accepted code example below)</p>
<p>There is <em>apparently</em> <strong>no direct way to query on partial attribute names</strong>. What you should do instead (this is just one possible solution) is </p>
<ol>
<li>select the smallest possible collection of elements you can</li>
<li>iterate over them</li>
<li>and then for each element iterate over the attributes of the element</li>
<li>When you find a hit, add it to a collection</li>
<li>then leave the loop and move on to the next element to be checked. </li>
</ol>
<p>You should end up with an array containing the elements you need.</p>
<p>Hope it helps :)</p>
|
javascript jquery
|
[3, 5]
|
3,233,605 | 3,233,606 |
dynamic DOM masonry jQuery plugin
|
<p>I am creating <code>dom</code> elements by parsing <code>tumblr</code>'s json file.<br/>
After the images are loaded, i would like to apply a <a href="http://masonry.desandro.com/docs/intro.html" rel="nofollow">jQuery plugin Masonry</a> to tighten up the image grid.<br/><br/>
Heres my attempt but it doesnt seem to be responding<br/>
Any help would be greatly appreciated, thank you.</p>
<pre><code>var container = $('#output');
$.getJSON("http://mydomain.tumblr.com/api/read/json?callback=?", function(data) {
$.each(data["posts"], function(i){
var img = data["posts"][i]["photo-url-400"];
container.append('<div class="box"><a href="temp.php?var='+i+'"><img src="'+img+'" alt="" /></a></div>');
});
});
//container.live('imagesLoaded', function(){
container.imagesLoaded( function(){
container.masonry({
itemSelector: '.box',
columnWidth : 400
});
});
</code></pre>
<p>or this</p>
<pre><code>var container = $('#output');
$.getJSON("http://mydomain.tumblr.com/api/read/json?callback=?", function(data) {
$.each(data["posts"], function(i){
var img = data["posts"][i]["photo-url-400"];
container.append('<div class="box"><a href="temp.php?var='+i+'"><img src="'+img+'" alt="" /></a></div>', function(){
container.imagesLoaded( function(){
container.masonry({
itemSelector: '.box',
columnWidth : 400
});
});
});
});
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,921,556 | 5,921,557 |
How can i access a js value in post response?
|
<p>I am making a jquery post request to obtain a part of the html code from server. There is a file on server get_info.php which prints html code for different requirements. I am using following code to do this :</p>
<pre><code>function check(inf_type) {
$.ajax({
type: 'POST',
url: "get_info.php",
data: { "sequence_no" : 1 },
success: function(data) {
// how can i use value of variable "inf_type" here.
// here, the variable "data" contains HTML code.
},
dataType: 'text'
});
}
</code></pre>
<p>the function check() accepts a parameter <strong>inf_type</strong> which contains random strings according to which, server recognize the html code to print. Now, i want handle the POST response according to this <strong>inf_type</strong>.
How can i access the value of <strong>inf_type</strong> variable in POST response function? The function check() is called more often, thats why i can not put the <strong>inf_type</strong> variable value in any global variable.
What can i do to achieve that?
Please guide me. thanks in advance.</p>
|
javascript jquery
|
[3, 5]
|
3,589,678 | 3,589,679 |
TimeZone.getAvailableIDs in Android and Java
|
<p>I am TimeZone.getAvailableIDs for List of TimeZone in android.It is behaving differently in android as compared to Java.</p>
<pre><code> String[] tzone = TimeZone.getAvailableIDs(-3 * 3600 * 1000);;
for (String string : tzone) {
do something
}
</code></pre>
<p>It skiping all those TimeZone which don't include "/" character in android.Can anybody tell me what is the problem when we are using TimeZone in android.</p>
|
java android
|
[1, 4]
|
3,158,516 | 3,158,517 |
keep the record of the number of clicks on an external link or internal link on the page
|
<p>I try to implement the following code:</p>
<pre><code> <a href = "http://www.google.com"/ id="external">go to google</a>
<span id="num1"></span>// to show the number of clicks so far.
<a href = "index.php" id="internal">go to home</a>
<span id="num2"></span>>// to show the number of clicks so far.
<script>
$(document).ready(function() {
var count1=0;
var count2=0;
$("#external").click(function(){
count1++;
});
$("#num1").html(count1);
$("#internal").click(function(){
count2++
});
$("#num2").html(count2);
});
</script>
</code></pre>
<p>I am not sure what I did above is right for the purpose of keeping track of the number of clicks on each link, and the problem is that when the page is loaded again, the count variable will be reset to 0, I wonder if I need to insert the count variable into database or is there even more efficient way to do this, any one could help me with that, any help will be greatly appreciated!</p>
|
php jquery
|
[2, 5]
|
1,030,351 | 1,030,352 |
find next element with conditions
|
<p>Hierarchical tree: </p>
<pre><code> mouse (depth:0, sequence:0)
* organ system (depth:1, sequence:1)
o visceral organ (depth:2, sequence:2)
urinary system (depth:3, sequence:3)
mesentery (depth:4, sequence:4)
* rest of mesentery (depth:5, sequence:5)
* urogenital mesentery (depth:5, sequence:6)
metanephros (depth:4, sequence:7)
* renal capsule (depth:5, sequence:8)
* nephrogenic zone (depth:5, sequence:9)
</code></pre>
<p>I have the following code which should retrieve the name of the the FIRST next node after the selected node, which has the same depth as the selected node and the sequence values should be greater than selected_node_sequence :</p>
<pre><code>/** node id has the same value as node_depth **/
var selected_node_depth = parseInt($j(element).attr('APO_DEPTH'));
var selected_node_sequence = parseInt($j(element).attr('APO_SEQUENCE'));
var first_next_node_with_same_depth = $j("#"+selected_node_depth).next().attr("name"); [where first_next_node_with_same_depth sequence value > selected_node_sequence]
</code></pre>
<p>For example, if 'selected_node' = mesentery, the 'first_next_node_with_same_depth' should be metanephros</p>
<p>Any suggestion on how to do that is most appreciated</p>
|
javascript jquery
|
[3, 5]
|
4,614,152 | 4,614,153 |
good book on Jquery and it's compatibility with asp.net
|
<p>Any recommendations? </p>
<p>I have used Jquery already but I would like to really delve into it and find out how I can use it with asp.net, specifically instead of updatepanel and ajax toolkit.</p>
<p>I use asp.net forms.</p>
|
asp.net jquery
|
[9, 5]
|
739,902 | 739,903 |
Accessing Dynamic Checkbox control's ClientID inside DataList control's OnItemCreated Event
|
<h2>ClientID property of Dynamic CheckBox</h2>
<h2>Problem: I need to attach some javascript function for each of checkboxes with uniqueID inside Datalist.</h2>
<p>When I'm trying to access ClientID inside <strong>OnItemCreated</strong> event in the code behind, it always resulting in the same ID which I've specified in design aspx page[It's not generating the unique ID]. Note: While It results in proper Unique ID generation when I access in <strong>OnItemDataBound</strong> command. Any reasons why?
Following is the Code...</p>
<pre><code>protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
CheckBox chk = (CheckBox)e.Item.FindControl("chkUID");
if (chk != null)
{
chk.Attributes.Add("OnClick", "javascript:selectDiv(" + chk.ClientID.ToString() + ");");
}
}
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
5,266,435 | 5,266,436 |
How can I write float value in python that can be read natively in Java?
|
<p>How can I write float value to file in python so that it can be later read in Java with <code>ObjectInputStream#readFloat</code>?</p>
<p>I need high read performance, so I'd like to avoid parsing the float from String.</p>
|
java python
|
[1, 7]
|
2,492,048 | 2,492,049 |
Can't transfer list<T> to web service?
|
<p>I have the same classes on my server and on my web service.
I have the following WebMethod:</p>
<pre><code>[WebMethod]
public int CreateOrder(List<Purchase> p, string username)
{
o.Add(new Order(p,username));
return o.Count;
}
</code></pre>
<p>However the following code, run at server:</p>
<pre><code>protected void CartRepeater_ItemCommand(object source, RepeaterCommandEventArgs e)
{
List<Purchase> l = ((List<Purchase>)Session["Cart"]);
if (e.CommandName == "Order")
{
localhost.ValidateService WS = new localhost.ValidateService();
WS.CreateOrder(l, Session["username"].ToString());
}
}
</code></pre>
<p>gives the following error: <code>Argument '1': cannot convert from 'System.Collections.Generic.List<Purchase>' to 'localhost.Purchase[]'</code>.</p>
<p>How can I transfer the <code>list<Purchase></code> object to the web service?</p>
<p>Thank you very much.</p>
|
c# asp.net
|
[0, 9]
|
2,577,215 | 2,577,216 |
What is this pattern in javaScript and where can I read more about it
|
<p>I have codes similar to the following:</p>
<pre><code> (function(MyHelper, $, undefined){
var selectedClass = "selected";
MyHelper.setImageSelector = function(selector) {
var container = $(selector);
setSelected(container, container.find("input:radio:checked"));
container.find("input:radio").hide().click(function() {
setSelected(container, $(this));
});
};
MyHelper.enableIeFix = function(selector) {
var container = $(selector);
container.find("img").click(function() {
$("#" + $(this).parents("label").attr("for")).click();
});
};
function setSelected(container, selected) {
container.find("label").removeClass(selectedClass);
selected.siblings("label").addClass(selectedClass);
}
}( window.MyHelper = window.MyHelper || {}, $))
</code></pre>
<p>I am new in JS and I am wondering if this is a specific pattern in javascript programming. I specfically wondering what is the meaning of last line:</p>
<pre><code> }( window.MyHelper = window.MyHelper || {}, $))
</code></pre>
<p>Is It Module pattern? </p>
|
javascript jquery
|
[3, 5]
|
2,214,469 | 2,214,470 |
Jquery bind click and hover, how to check if click
|
<p>I have combined function like this(simplified version):</p>
<pre><code>$('label').bind('click hover', function() {
$('label').removeClass("active");
$(this).addClass("active");
});
</code></pre>
<p>How can I add an <code>if</code> to check if it is a click?</p>
|
javascript jquery
|
[3, 5]
|
1,690,587 | 1,690,588 |
How to get the output of java apps in a php web script?
|
<p>I have written a Java application that runs from the command line. I want to allow users to access this via a simple PHP web interface - it'll just allow them to specify certain parameters, and then execute the java app and return the output.</p>
<p>For some reason, I'm getting a 'Permission Denied' error message when I try to do anything with Java, even something as simple as:</p>
<pre><code>shell_exec('/usr/bin/java -version 2>&1');
</code></pre>
<p>returns 'sh: /usr/bin/java: Permission denied ' when run through a browser.</p>
<p>If I give apache a shell account and log in as apache, I can execute this command fine.</p>
<p>Is there some kind of setting preventing the JVM running if there is no associated tty? How can I get this to work? I'm running PHP 5.3.2.</p>
<p>Thanks</p>
|
java php
|
[1, 2]
|
5,058,324 | 5,058,325 |
javascript form validation - positioning
|
<p>I have little snippet for validatin' my form. I need help to position the error messages, because now all message appear in the filed, so the user can't see it, and so its very annoying.</p>
<pre><code>$(document).ready(function() {
jQuery.validator.addMethod("lettersonly", function(value, element) {
return this.optional(element) || /^[a-zőöüóúéáűí ]+$/i.test(value);
}, "<?php echo $lettersonly; ?>");
$("#regval").validate({
rules: {
name: {
required: true,
minlength: 5,
maxlength:30,
lettersonly: true
},
nick: {
required: true,
minlength: 3,
maxlength:12
},
pass1: {
required: true,
minlength: 5
},
pass2: {
required: true,
minlength: 5,
equalTo: "#pass1"
},
messages: {
full: {
required: ".....",
minlength: "....",
maxlength: "...."
},
nick: {
required: "....",
minlength: "....",
maxlength: "...."
},
pass1: {
required: "....",
minlength: "..."
},
pass2: {
required: "....",
minlength: "....",
equalTo: "...."
},
});
});
</script>
</code></pre>
|
php javascript jquery
|
[2, 3, 5]
|
3,922,667 | 3,922,668 |
How to know if javac compiled cleanly using system() in python
|
<p>In python, how can I tell if a certain system() call is successful? In the program I am writing I need to know if a java program compiled correctly using javac, which is called using system() (in the python program). So I need to know if javac threw any exceptions, if there were any syntax problems with the java program, any problems at all at compile time for the java program. Essentially, the program asks the user for a dir, then asks for the java program name, then asks if it takes any arguments, then it compiles it with system('javac ' + str(javaFile) + '.java').</p>
|
java python
|
[1, 7]
|
689,444 | 689,445 |
Create element using JavaScript and jquery
|
<p>Suggest a better way to do the following in jquery . also give me the native js code to do it</p>
<pre><code>$('<div id="dialog-confirm" title="'+confirmbox.title+'"><p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>'+confirmbox.message+'</p></div>')
.appendTo('body');
</code></pre>
<p>Why the need. look at "Idiomatic Syntax for Creating Elements" section of this link <a href="http://stackoverflow.com/tags/jquery/info">http://stackoverflow.com/tags/jquery/info</a></p>
|
javascript jquery
|
[3, 5]
|
5,470,159 | 5,470,160 |
Encryption python/ Decryption android
|
<p>I made 2 codes one in python and the other in android (eclipse) for encryption and decryption.
Now I want to encrypt my data using python and sending it to the android to decrypt it.</p>
<p>How to make two different platforms to encrypt/decrypt the data?!
Each platform has its own way to do the encryption and decryption , so how can i make them talk to each other and sending data and android extract the exact information which was transmitted?</p>
<p>Help is needed!!</p>
|
android python
|
[4, 7]
|
5,041,015 | 5,041,016 |
Get the current radio element index?
|
<p>when i'm iterating a collection of inputs, how can I get the current radio index if the input is part of a group of radios?</p>
<pre><code>$('input').each(function(){
if($(this).is(':radio')){
// here get the index of the radio in the radio group,
// like 1, 2, 3 etc...
}
});
</code></pre>
<p>The index should be relative to the radio group, no the entire collection of input elements. </p>
<p>The group is determined by the input name (inputs having the same name).</p>
|
javascript jquery
|
[3, 5]
|
3,946,912 | 3,946,913 |
jquery listbox return what user selected
|
<p>i am using this demo:</p>
<p><a href="http://www.emblematiq.com/lab/niceforms/demo/v20/niceforms.html" rel="nofollow">http://www.emblematiq.com/lab/niceforms/demo/v20/niceforms.html</a></p>
<p>i would like to know which values the user has selected.</p>
<pre><code><select size="4" name="languages[]" id="languages" multiple="multiple">
<option value="English">English</option>
<option value="French">French</option>
<option value="Spanish">Spanish</option>
<option value="Italian">Italian</option>
<option value="Chinese">Chinese</option>
<option value="Japanese">Japanese</option>
<option value="Russian">Russian</option>
<option value="Esperanto">Esperanto</option>
</select>
</code></pre>
<p>the question is how do i return the values that were selected by the user?</p>
|
c# javascript jquery asp.net
|
[0, 3, 5, 9]
|
2,341,462 | 2,341,463 |
How to check whether a JavaScript is active or not via PHP?
|
<p>Is it possible to do checking and verification of JavaScript state in a browser ?</p>
|
php javascript
|
[2, 3]
|
4,418,600 | 4,418,601 |
Javascript not firing when expected
|
<p>I've got a site that is using javascript to resize images to a max width/height. I'm using javascript and not CSS to do this so it is backwards compatible with older browsers. My issue is that in Chrome it seems to not resize the image all the time. Sometimes on the first visit to a page the image is not resized, on reload and subsequent visits it is resized.</p>
<p><a href="http://justinzaun.com/Tree/people/@[email protected]" rel="nofollow">http://justinzaun.com/Tree/people/@[email protected]</a> for an example page but really any of the people pages on the site can show the same issue. I'm trying to resize in $(window).load() and $(documnet).ready() this is taking place in the familytree.js file.</p>
<p>The username/password is admin/pwd</p>
|
javascript jquery
|
[3, 5]
|
5,180,233 | 5,180,234 |
Best way to write a polling capable application
|
<p>I'm trying to build a basic application which will have 2 separate components which are:<br>
1. Continually poll an external process and store the results within a DB<br>
2. Grab the results from the DB and display it in a webpage</p>
<p>I'm looking to do this in .Net so I would normally say to do the first component in a Windows Service and the second in ASP.net with a relational dbms like sql server.</p>
<p>The problem with this is that i want to use webhosting to deploy this and they don't tend to allow Windows Services (unless you pay a fortune). So is it feasible to do the polling component in a seperate asp.net page, or maybe create a spawning worker thread within a single asp.net page that will do the polling for me?</p>
<p>Any opinions/input appreciated.<br>
Thanks :)</p>
|
c# asp.net
|
[0, 9]
|
3,819,794 | 3,819,795 |
How to limit number of checkboxes that can be checked?
|
<p>I have 4 checkboxes. I want user to select only two of them. How to set that limit?</p>
|
java android
|
[1, 4]
|
5,947,033 | 5,947,034 |
Run javascript/jquery after text change but before submit
|
<p>I have an input element on a form along with a submit button.</p>
<p>I want to run the change event on the input element all whenever a change occurs. The problem is if end user changes text and clicks submit button the code in the change event doesn't run.</p>
<p>Immediately after user clicks the submit button, the form submits (like the change is not getting time to run, the same occurs with blur or focus out).</p>
<p>My controls can be placed on any form, and I do not control the click event of the button.</p>
<p>Help please</p>
|
javascript jquery
|
[3, 5]
|
5,287,468 | 5,287,469 |
Android SDK and Java
|
<p>Android SDK Manager complains "WARNING: Java not found in your path".</p>
<p>Instead of using the information from Windows registry, the software tries to search Java in the default installation folders, and fails (I don't install software in program files because I don't like space characters in my paths). Of course I know how to modify the %PATH% environment variable. The question is — which Java does it need? </p>
<p>After installing the latest JDK, I’ve got 4 distinct versions of java.exe file, in the following 4 folders: system32, jre6\bin, jdk1.6.0_26\bin, and jdk1.6.0_26\jre\bin. Size ranges from 145184 to 171808. All of them print version “1.6.0_26” when launched with the “-version” argument. The one in system32 has .exe version “6.0.250.6”, the rest of them is “6.0.260.3”. All 4 files are different (I’ve calculated the MD5 checksums).</p>
<p>Q1. Which folder should I add to %PATH% to make the Android SDK happy?</p>
<p>Q2. Why does Oracle build that many variants of java.exe of the same version for the same platform?</p>
<p>Thanks in advance!</p>
<p>P.S. I'm using Windows 7 SP1 x64 home premium, and downloaded the 64-bit version of JDK, jdk-6u26-windows-x64.exe.</p>
|
java android
|
[1, 4]
|
1,438,863 | 1,438,864 |
Wrap a span around all children
|
<p>I am trying to get the contents of a div and wrap a span around it and append back to the div.</p>
<p>From this:</p>
<pre><code><div>
<a href="#">12</a>
Testing
</div>
</code></pre>
<p>To this:</p>
<pre><code><div>
<span>
<a href="#">Hehhehe</a>
Testing
</span>
</div>
</code></pre>
<p>So I tried this:</p>
<pre><code>var span = $(document.createElement('span'));
var contents = window.jQuery(this).children();
span.append(contents);
window.jQuery(this).append(span); // I am looping here but this is the div
</code></pre>
<p>However, the text "Testing" is always outside the span!</p>
<p>How can I get everything to be within the span?</p>
|
javascript jquery
|
[3, 5]
|
2,898,879 | 2,898,880 |
Can't find the file path which created by myself in android source code
|
<p>I am testing something.</p>
<p>I created <strong>assets</strong> folder in packages/apps/Camera/ and added the <strong>test.txt</strong> file in the folder.</p>
<p>But when I accessed the file in the <strong>onCreate()</strong> method according the following code fragment, I found I can't get the file.</p>
<pre><code> File file = new File("/assets/test.txt");
BufferedReader reader = null;
try {
Log.v("jerikc","read the file");
reader = new BufferedReader(new FileReader(file));
String tempString = null;
int line = 1;
while ((tempString = reader.readLine()) != null) {
Log.v("jerikc","line " + line + ": " + tempString);
line++;
}
reader.close();
} catch (IOException e) {
Log.v("jerikc","exception");
e.printStackTrace();
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException e1) {
}
}
}
</code></pre>
<p>The log were :</p>
<p><em>V/jerikc (3454): read the file</em></p>
<p><em>V/jerikc (3454): exception</em></p>
<p>I think I add the wrong path.("/assets/test.txt") .
So what's the right path?</p>
<p><strong>Some other informations:</strong></p>
<p>Where my real code is a Util Class, there isn't the context. If I add the context, the code structure will have a big change. </p>
<p>Thanks.</p>
|
java android
|
[1, 4]
|
3,494,398 | 3,494,399 |
Javascript and Php (MVC)
|
<p>i'm creating my own MVC Framework.
I have a basic form in my view </p>
<pre><code><form action="?" method="post" >
<input type="hidden" name="envoie" value="envoie" />
<?php dico('INSCRIPTION_NOM'); ?><input id="name" type="text" name="name" /><br />
<?php dico('INSCRIPTION_EMAIL'); ?><input id="email" type="text" name="email" /><br />
<?php dico('INSCRIPTION_PWD'); ?><input id="pwd" type="password" name="pwd" /><br />
<input type="button" value="<?php dico('INSCRIPTION_SINSCRIRE'); ?>" onclick="verifForm(document.getElementById('email').value);"/>
</form>
</code></pre>
<p>when I clock on the button they have a javascript function like that : </p>
<pre><code>function verifForm(email) {
var url ="?c=Inscription&a=VerifForm&email="+email;
$.get(url, function(data){
alert('resultat == '+data);
});
}
</code></pre>
<p>Inscription was my controllers and VerifForm an method of the controller. email was the value of a input.</p>
<p>The Php function was :</p>
<pre><code>public function actionVerifForm() {
echo "OK";
}
</code></pre>
<p>When i click on the button i have all the code of the page on my alert but i only want the message "OK".</p>
<p>Thanks for helping me</p>
|
php javascript jquery
|
[2, 3, 5]
|
2,415,455 | 2,415,456 |
Algorithm for determining changes between 2 lists as quicky as possible?
|
<p>I have Projects.</p>
<p>These projects are downloaded from Site A into my site via an API.</p>
<p>I download all Projects from Site A.</p>
<p>There are matching JSON objects on my side. What is important is I need to do this.</p>
<p>List A (My site) needs to be Synced with List B (Their site).</p>
<p>I have to manually sync due to their api limits.</p>
<p>So there are projects and attributes:</p>
<p>Given list A and List B. What would be a fast algorithm so that:</p>
<pre><code>If A is missing object from B, add it.
If B no longer contains an element found in A, remove it from A.
If an attribute in B is != an attribute in an object from A, update the object in A.
</code></pre>
<p>I feel like the only way to do a lot of this would be O (N^2). Is there a way to get better than O(N^2) on some of this?</p>
<p>Thanks</p>
|
c# asp.net
|
[0, 9]
|
413,440 | 413,441 |
jQuery: why does my live() handler declaration error out when the analogous click() one doesn't?
|
<p>I have the following in a javascript file (using jQuery as well):</p>
<pre><code>$(function(){
$('#mybutton').live('click',myObject.someMethod);
});
var myObject = {
someMethod: function() { //do stuff }
};
</code></pre>
<p>I get a js error on pageload that says "myObject isn't defined". However, when I change the event handler in the <code>doc.ready</code> function to:</p>
<pre><code>$('#mybutton').live('click', function(){ myObject.someMethod(); });
</code></pre>
<p>it works! I have code structured like the first example all over my codebase that works. W T F?? </p>
|
javascript jquery
|
[3, 5]
|
120,628 | 120,629 |
how can i get the value of hidden field in grid view?
|
<p>the order number of hidden field in grid view is 7. </p>
<p>when i click the button the line </p>
<pre><code>string sValue = ((HiddenField)GridView1.SelectedRow.Cells[7].FindControl("HiddenField1")).Value;
</code></pre>
<p>gives error which is "Object reference not set to an instance of an object."</p>
<pre><code> <asp:TemplateField>
<ItemTemplate>
<asp:HiddenField ID="HiddenField1" runat="server"
Value='<%#Eval("RSS_ID")%>'/>
</ItemTemplate>
</asp:TemplateField>
</code></pre>
<p>c# side</p>
<pre><code>else if (e.CommandName == "View")
{
string sValue = ((HiddenField)GridView1.SelectedRow.Cells[7].FindControl("HiddenField1")).Value;
}
</code></pre>
|
c# asp.net
|
[0, 9]
|
1,406,440 | 1,406,441 |
Java Script validation
|
<p>Am validating a form for empty check.</p>
<p>All fields works fine.</p>
<p>I have a dropdown when i select some value from dropdown some fields will be disabled. onchanging the dropdown value someother fields will be disabled. </p>
<p>Now am struck in validating the fields which are getting disabled and enabled.</p>
<pre><code>if((document.form1.varAuctionTime.disabled = false) && (document.form1.varAuctionTime.value == ""))
</code></pre>
<p>I used above code but it is enabling the fields.</p>
<p>can anybody help me out.</p>
|
php javascript
|
[2, 3]
|
348,485 | 348,486 |
hide gridview hyperlink in visible property of source rather then code behind
|
<p>Ive got a gridview with an itemtemplate that has a hyperlink control in it. I want to hide a hyperlink control if its item in the database returned null:</p>
<pre><code> <ItemTemplate>
<asp:HyperLink ID="hlSugar" Visible=<% DataBinder.Eval(Container, "DataItem.CaseID")==null %> ToolTip="View the issue in SugarCRM." Target="_blank" runat="server" NavigateUrl='<%# "http://myPath&record=" + DataBinder.Eval(Container, "DataItem.CaseID") %>' Text="Issue"></asp:HyperLink>
</ItemTemplate>
</code></pre>
<p>Not sure on the syntax can I do </p>
<pre><code>Visible = <% iif(databinder.eval(container, "dataItem.caseid")==null, false, true) %>
</code></pre>
<p>Not sure how to get the syntax correct. I basically want to check if my `DataItem.CaseID is null and hide this field if it is.</p>
|
c# asp.net
|
[0, 9]
|
2,302,684 | 2,302,685 |
Application class not initialising
|
<p>I have an Application class -it is included in the Manifest. It has onCreate and I have set a break point just inside the onCreate. When I debug (in Eclipse) the breakpoint doesnt trigger although the docs say that the Application class in initiated at startup.
Any ideas?</p>
|
java android
|
[1, 4]
|
5,267,149 | 5,267,150 |
jquery, change jqueryui dialog box content from a ajax call in the webpage
|
<p><a href="http://jqueryui.com/" rel="nofollow">jqueryui</a> is used to show a dialog box, then if there is a click the 'dialog_insider' on the dialog box ,not on the flat (correct wording?) webpage , an ajax call will be made. The file in the called through the ajax
html:</p>
<pre><code><div id="dialog" style="border:1px solid green; width:150px; margin:auto;">
<div class="dialog_insider">this is the dialog</div>
<!-- end of class dialog_insider-->
</div>
<!- end of id dialog-->
</code></pre>
<p>jquery:</p>
<pre><code><script type="text/javascript">
$(document).ready(function(){
$("#dialog").click(function(){
my_dialog = $(this).clone();
my_dialog.dialog();
$(".dialog_insider", my_dialog).click(function(){
alert("clicked");
$.post("replace.php",function(response){
});
});
});
});
</script>
</code></pre>
<p>the file replace.php contains:</p>
<pre><code><script type="text/javascript">
$(document).ready(function(){
alert("hi");
$("dialog_insider",my_dialog).html('4444444');
});
</script>
</code></pre>
<p>I don't get any functionality(i.e. no alert, no html changing) from the replace.php page</p>
<p>I tried with <code>$("opener.dialog_insider",my_dialog).html('4444444');</code>, but no result.</p>
<p>What is the solution?</p>
|
javascript jquery
|
[3, 5]
|
943,615 | 943,616 |
Fill in a textbox when other textbox get filled
|
<p>I have a form with a few textboxes which are used for calculations.
When I enter a value in one textbox, I want the other textboxes to get filled immediately when a value is entered. I want to use JavaScript for this. How can I do this when my textboxes are server-side?</p>
|
javascript asp.net
|
[3, 9]
|
1,823,909 | 1,823,910 |
Jquery Operators
|
<p>I am not sure how to use (OR) operator with JQUERY.</p>
<pre><code>$(document).ready(function(){
$('#selection1')||('#selection2')||('#selection3').click(function(e) {
$('#thecheckbox').removeAttr('disabled');
});
</code></pre>
<p>});</p>
<p>Is it possible with .click functionto use (||) operator, if possible HOW? Apearently not the way I did.</p>
|
javascript jquery
|
[3, 5]
|
3,827,310 | 3,827,311 |
What is the rule behind to divide this html in var tip?
|
<p>What is the rule behind to divide this html in var tip?</p>
<pre><code> var tip = "<p class='adobe-reader-download'>Most computers
will open PDF documents automatically, but you may need to download
<a title='Link to Adobe website-opens in a new window'";
tip += " href='http://www.adobe.com/products/acrobat/readstep2.html'
target='_blank'>Adobe Reader</a>.
</p>";
</code></pre>
<p>why this cannot be</p>
<pre><code> var tip = "<p class='adobe-reader-download'>Most computers will
open PDF documents automatically, but you may need to download
<a title='Link to Adobe website-opens in a new window'
href='http://www.adobe.com/products/acrobat/readstep2.html' target='_blank'>
Adobe Reader</a>.</p>";
</code></pre>
<p>and how to divide in HTML is longer than this?</p>
|
javascript jquery
|
[3, 5]
|
4,546,027 | 4,546,028 |
jquery multidimensional
|
<p>I am cloning the last row in table but i need unique multidimensional name for each input...</p>
<pre><code> <tr>
<td><input type="text" name='input[1][Name]'></input></td>
<td><input type="text" name='input[1][address]'></input></td>
<td><input type="text" name='input[1][contactInfo]'></input></td>
</tr>
</code></pre>
<p>next row should be</p>
<pre><code><tr>
<td><input type="text" name='input[2][Name]'></input></td>
<td><input type="text" name='input[2][address]'></input></td>
<td><input type="text" name='input[2][contactInfo]'></input></td>
</tr>
</code></pre>
<p>...........
jquery </p>
<pre><code> $(".alternativeRow").click(function(){
i=2;
$("table tr:last").clone().find("input").each(function() {
$(this).attr({
'id': function(_, id) { return id + i },
'name': function(_, name) { return name + i },
'value': ''
});
}).end().appendTo("table");
i++;
});
</code></pre>
|
php jquery
|
[2, 5]
|
1,286,132 | 1,286,133 |
Specified page remain selected on page reload
|
<p>I will post below html and javascript to make things clear... But before I do that, I will explain a bit what I am trying to accomplish.</p>
<p>Basically I want to make some pages to open without page reload. That was successfully done. Now, I cannot find any solution on how to make that page which is clicked, to remain opened on page load/reload.</p>
<pre><code><nav>
<a href="#home">Home</a>
<a href="#download">Download</a>
<a href="#about">About</a>
<a href="#contact">Contact</a>
</nav>
<div id="container">
<div id="home">
Home
</div>
<div id="download">
Download
</div>
<div id="about">
About
</div>
<div id="contact">
Contact
</div>
</div>
$(function(){
var $menuItems = $('nav a'),
$container = $("#container");
$menuItems.on('click', function(e) {
e.preventDefault();
$(this.hash, $container).delay(300).fadeIn(1000).siblings().fadeOut(1000);
});
});
</code></pre>
<p>Thanks to Marcus Ekwall for help on the javascript!</p>
<p>Now... I am really wondering how can I use these href's to load clicked menu page when page is reloaded and also how to load home page on first visit. Cause what I get is blank page (no content) until I click on one of menu items.</p>
<p>Cheers.</p>
|
javascript jquery
|
[3, 5]
|
3,615,661 | 3,615,662 |
Android version of code not working like desktop internet browsers
|
<p>I have website code that I have been testing on android, but when I compare it to the results from the desktop running the same code with the same parameters it shows that it isn't working on the android.</p>
<p>I have looked over the code with the change of results and have a timeframe where things go wrong. The options are either that the PHP runs incorrectly (which it would be nice to confirm, but this can't possibly be the problem because PHP runs server side meaning either both android and desktop would act the same) or the Javascript is not taking information from the fields on the page correctly.</p>
<p>If it is the second case, the information is being taken from <code><option value ="importantpart"></code> of a <code><select></code> and from input of an <code><input type="text"></code>.</p>
<p>Is there any specific way that I have to take information from those two places. Also, in a related but question, would there need to be a similar change for iOS browser or would the same change work.</p>
<p>Currently it is being obtained while the javascript runs in the form</p>
<pre><code>var whatever = $("#fieldID").val();
</code></pre>
|
php javascript android
|
[2, 3, 4]
|
2,407,529 | 2,407,530 |
Contextualization in ASP.NET C# or Javascript
|
<p>Wondering if anyone knows of any open source code about contextualization via JS (javascript) or ASP.NET ? That is, contextualization of content - determining "what" content is?</p>
<p>Its an interesting area and I cant seem to find any previous projects on it ?</p>
<p>Really appreciate any help ?</p>
|
c# asp.net
|
[0, 9]
|
2,318,288 | 2,318,289 |
How to Open a file in the same format in a frame?
|
<p>We have a web page which has two Frames(Left and Right) .I am displaying all the files in my directory in the Left frame. When a file in the Left frame is clicked,it should open in Right frame.(say we are opening a .doc/.docx file,it should open word ,if its .csv/.xls then it should open Excel in Right frame.) </p>
|
c# asp.net
|
[0, 9]
|
5,377,978 | 5,377,979 |
how to add the value from java into php?
|
<p>my java function</p>
<pre><code>private void adddataintophp(String title, String date, String time, String channel){
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
//http post
try{
nameValuePairs.add(new BasicNameValuePair("Title", title));
nameValuePairs.add(new BasicNameValuePair("Date", date));
nameValuePairs.add(new BasicNameValuePair("Time", time));
nameValuePairs.add(new BasicNameValuePair("Channel", channel));
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://10.0.2.2/insertprogram.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
}catch(Exception e){
Log.e("log_tag", "Error in http connection"+e.toString());
}
}
</code></pre>
<p>my php code</p>
<pre><code><?php
$title = $_POST['Title'];
$date = $_POST['Date'];
$time = $_POST['Time'];
$channel = $_POST['Channel'];
mysql_connect("localhost","root","");
mysql_select_db("imammuda");
$sql=mysql_query("insert into Program (ID, Title, Date, Time, Channel) values ('NULL', '$title', '$date', '$time', '$channel')");
mysql_close();
?>
</code></pre>
<p>when i execute it, then i go database there and see.</p>
<p>It was added but with null value.</p>
<p>So, my question is how to pass the value that get by edittext in java into php</p>
|
java php android
|
[1, 2, 4]
|
1,556,732 | 1,556,733 |
JQuery change generated css code using jquery
|
<p>I am running a script that creates a bunch of css code at runtime.</p>
<p>I can change the code with firebug so I was wandering on how I could change this example css code using jquery?</p>
<pre><code><table cellspacing="0" border="0" style="width: 100% !important; border: 3px solid #333 !important;padding: 1px !important; font-family: Arial, Helvetica, sans-serif !important; font-size: 11px !important;">
</code></pre>
|
javascript jquery
|
[3, 5]
|
5,701,352 | 5,701,353 |
What is the proper way of writing this statement
|
<p>I want to get a textbox value. In order to reach to the textbox i have written a series of children() function of JQuery which does not seem to be a proper way of achieving what i want here is my statement:</p>
<pre><code>$("#" + lnkBtn.id).parents("#tabContainer_tabInqQuotes_POProcessingInqQuotes1_gvLineDetails_ctl00__0").children().children("table").children("tbody").children("tr").children("td").children("input")[0].value;
</code></pre>
<p>what is an alternative to this statement?</p>
|
jquery asp.net
|
[5, 9]
|
630,435 | 630,436 |
Learning Java and Python
|
<p>I've been learning Java for a while now, however, I just found these lessons: <a href="http://www.udacity.com/" rel="nofollow">http://www.udacity.com/</a> . I don't know any Python, but I still want to learn it. however, I've been learning Java for the past month or so, so I'm not sure if I could learn two languages at once. These lessons just look like too good of an opportunity to pass up for free, and would it bee good to know both Python and Java. For instance, would developing be easier with knowing Java and Python, compared to just one. Also, will knowing Java transfer over into Python? Feedback is appreciated and I'm just looking for opinions, thanks.</p>
|
java python
|
[1, 7]
|
4,374,452 | 4,374,453 |
Prevent event handlers from queuing up
|
<p>I am using "One" to wire up a click handler.</p>
<p>Jquery's "one" method will wire up an event handler and detach it after it's first invocation, but it seems if you just click fast enough, more than one event handler may be queued up and cause the call back to run more than once. </p>
<p>Ex:</p>
<pre><code>$("#button").one("click", function () {
//run logic
});
</code></pre>
<p>How can I prevent this behavior. I am assuming "One" will detach the handler after running it the first time, but if you click the button while it's running the call back, is it reasonable to assume it will run a second time?</p>
|
javascript jquery asp.net
|
[3, 5, 9]
|
1,002,434 | 1,002,435 |
Making button click once
|
<p>EDIT**</p>
<p>In my game I want my button to disable after one click but for some reason all the ways I have looked at do not work.</p>
<p>Here is what I have at the moment..</p>
<pre><code>$('.minibutton').click(function() {
$(this).attr('disabled','disabled');
$('.minibutton').prop('disabled', false);
$('.picstyle').show();
$('td').removeClass('spellword');
var r = rndWord;
while (r == rndWord) {
rndWord = Math.floor(Math.random() * (listOfWords.length));
}
$('td[data-word="' + listOfWords[rndWord].name + '"]').addClass('spellword');
$('td[data-word=' + word + ']').removeClass('wordglow').removeClass('wordglow4').removeClass('wordglow3').css('color', 'transparent');
var noExist = $('td[data-word=' + listOfWords[rndWord].name + ']').hasClass('wordglow2');
if (noExist) {
$('.minibutton').click();
} else {
$("#mysoundclip").attr('src', listOfWords[rndWord].audio);
audio.play();
$("#mypic").attr('src', listOfWords[rndWord].pic);
jQuery(pic).show();
}
}).trigger("click");
</code></pre>
<p>I have tried changing the click function to..</p>
<pre><code>$('.minibutton').one("click", function() {
</code></pre>
<p>I have also tried to bind and unbind it but it will not work</p>
<p>fiddle <a href="http://jsfiddle.net/7Y7A5/9/" rel="nofollow">http://jsfiddle.net/7Y7A5/9/</a></p>
<p>You spell the highlighted word, using the picture as a clue. If you get the word wrong 3 times you are given the opportunity to move on because "minibutton" appears. At this point I only want the user to be able to click it once before it disappears again.</p>
|
javascript jquery
|
[3, 5]
|
2,134,339 | 2,134,340 |
User control with viewstate enabled but placed inside page with viewstate disabled.How can i access?
|
<p>I have a user control, with viewstate enabled. i am using it on a page with viewstate disabled.How can I access viewsate info?</p>
|
c# asp.net
|
[0, 9]
|
2,567,156 | 2,567,157 |
Use Javascript to copy Text from Label
|
<p>Label1 (asp.net control) is located inside Panel1 of my webpage and I have a button called bt. What is the Javascript to copy the Text from Label1 to the clipboard?</p>
<p>Thanks,</p>
<p>@ artlung, I placed the below code just outside of my form but inside the body. The last line of code I placed inside Panel1 of my form. Anything wrong with this code because nothing happens when I click the Copy to Clipboard button.</p>
<pre><code><script language="JavaScript">
var clip = new ZeroClipboard.Client();
clip.addEventListener( 'mouseDown', function(client) {
// set text to copy here
clip.setText( document.getElementById('form1.Label1').value );
// alert("mouse down");
} );
clip.glue( 'd_clip_button' );
</script>
</code></pre>
<p>The next line of code is above the script tags but inside Panel1 in my form</p>
<pre><code><div id="d_clip_button">Copy To Clipboard</div>
</code></pre>
|
asp.net javascript
|
[9, 3]
|
2,815,012 | 2,815,013 |
PHP While Loop and jQuery
|
<p>I have created a while loop that selects random images from from my server and posts it. Now I want to add some jquery code and allow me to click on one of the images and run the slideUp() function in jQuery. Here is my problem. I can click on the first image produced in the while loop but when I click on the second image nothing happens. The slideUp() function does not work. I don't know what to do. Here is the code below.</p>
<pre><code><script src="http://code.jquery.com/jquery-latest.js"></script>
<?php
$num_dresses = dress_count ();
$i=0;
while ($i < 2){
?>
<style>
div:hover { border:2px solid #021a40; cursor:pointer;}
</style>
<script>
$("div").click(function () {
$(this).slideUp();
});
</script>
<?php
$rand_id = rand(1, $num_dresses);
$dress_feed_data = clothing_data($rand_id, 'file_name', 'user_defined_name', 'user_defined_place' , 'user_who_uploaded', 'match_1');
$new_file_name = $dress_feed_data['file_name'];
if (file_exists('fashion_images/' . $new_file_name)){
echo str_replace("|", " ", $dress_feed_data['user_defined_name']);
?>
<br>
<div>
<img src=" fashion_images/<?php echo $new_file_name;?> " width="50" height="50" />
<div>
<br><br>
<?php
echo str_replace("|", " ", $dress_feed_data['user_defined_place']);
?>
<br><br>
<?php
}
$i++;
}
?>
</code></pre>
|
php jquery
|
[2, 5]
|
5,832,331 | 5,832,332 |
How to find out where the event is prevented from bubbling up?
|
<p>I have a form and I try to submit it but nothing happens. I can see $('#myform').submit() gets called but then nothing happens. I'm guessing that somewhere the submit event is getting caught 'silenced'. Is there a way for me to find out where this event gets caught? </p>
<p><strong>update</strong> Darin Dimitrov suggestion helped me to figure out where exactly submit is handled. I was able log handlers for submit events. Then I set break points inside of the handlers and stepped through code to figure out where my submit process was being 'cancelled'. p.s. I'm looking at log and debugging in firebug of course. </p>
<p><img src="http://i.stack.imgur.com/x6smv.png" alt="enter image description here"></p>
|
javascript jquery
|
[3, 5]
|
4,096,116 | 4,096,117 |
Creating User Control works with AJAX
|
<p>I need to create a user control with 3 images: like, dislike and comment buttons. I want to like and dislike button to save some info to the database (liked user and liked object). But i want to work them without reloading the page. </p>
<p>Example scenario: </p>
<ul>
<li>Like button shows like count if the post has any</li>
<li>User likes a blog post.</li>
<li>Save like process to the DB</li>
<li>Disable like button.</li>
</ul>
<p>I want to implement this operation via AJAX call to the page in which the control is used, inside of the control. I don't want to implement them separately. When another developer wanted to use this, he/she must use the control just by instantiating. Also, it must be used more than once in a page.</p>
<p>Regards.</p>
|
c# asp.net
|
[0, 9]
|
3,440,872 | 3,440,873 |
JQuery - Wrap divs in groups of 50 after sorting
|
<p>I have the following html :</p>
<pre><code><div class="backpack_all"> //wrapper for all on screen content
...
<div class="backpack"> //main content to display
<div class="item1">
<div class="item2">
<div class="item3">
...etc
</code></pre>
<p>I will have anywhere from 200-500 items in this format. I'm also actively sorting this data by various attributes on these items. When unsorted, they are partitioned in sets of 50 by a class="backpack_partition" which wraps around 50 items. To sort them I have to unwrap all items from their respective partitions. How can I use jquery/javascript to rewrap them? </p>
|
javascript jquery
|
[3, 5]
|
90,923 | 90,924 |
get device ip address from service provider ip address
|
<p>I need get the local machine ip address of my website visited users for that i used below code </p>
<pre><code> string ipAddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (!string.IsNullOrEmpty(ipAddress))
{
string[] addresses = ipAddress.Split(',');
if (addresses.Length != 0)
{
stradd = addresses[0];
}
else
{
stradd = ipAddress;
}
}
else
{
stradd = Request.ServerVariables["REMOTE_ADDR"].ToString();
}
hostName = Dns.GetHostByAddress(stradd).HostName;
</code></pre>
<p>this is giving the ip address of the service provider & name of the service provider but i don't want this i wanted user device(local) ip address, is it possible to get local ip address? please help me. </p>
|
c# javascript asp.net
|
[0, 3, 9]
|
1,273,518 | 1,273,519 |
WSDL to java Conversion for android
|
<p>Is there any way to convert wsdl to java and same can be used in Android?</p>
<p>Thanks in advance.</p>
<p>--
Ramu</p>
|
java android
|
[1, 4]
|
3,746,982 | 3,746,983 |
How to copy formatting from the selected text?
|
<p>Here's one usecase that has been baffling me. When I select some text and paste it in any of Google's applications like docs or notebook, it somehow manages to paste the text with its original formatting and sometimes images itself. Can someone tell me how to do this using javascript/jquery? </p>
<p><strong>Edit:</strong>
One more scenario that I am looking at is say designing a server-based copy/paste mechanism.</p>
|
javascript jquery
|
[3, 5]
|
86,484 | 86,485 |
Removing the div child in jquery
|
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/5062916/replace-div-with-another-div">Replace Div with another Div</a> </p>
</blockquote>
<pre><code><div id='test'>
<span></span>
<p></p>
<button></button>
<h1></h1>
</div>
</code></pre>
<p><strong>My question is</strong> , how we can remove the <code>button</code> element and insert someother on the same position in jquery?</p>
|
javascript jquery
|
[3, 5]
|
5,681,449 | 5,681,450 |
javascript function that accepts (#id).val() returns wrong value
|
<p>I have a button with the id="kill".</p>
<p>Here is my JavaScript:</p>
<pre><code>$("#kill").click(function(){
getImage($(this).val());
});
function getImage(code){
var code,
imgstr;
imgstr="mypath/"+code+".png";
return imgstr;
}
</code></pre>
<p>Unfortunately, the wrong value is getting returned. But if I assign the value inside the function getImage, like this:</p>
<pre><code>$("#kill").click(function(){
getImage($(this).val());
});
function getImage(code){
var code="12",
imgstr;
imgstr="mypath/"+code+".png";
return imgstr;
}
</code></pre>
<p>Then it returns the correct value. How can I fix this?</p>
|
javascript jquery
|
[3, 5]
|
4,974,656 | 4,974,657 |
How to access the parent page elements of an Iframe
|
<p>How to access the parent page elements of an Iframe.
e.g. If i have a page index.htm and another page in an IFrame in index.htm and want to access the elements of index.htm from that IFrame.</p>
|
asp.net javascript jquery
|
[9, 3, 5]
|
5,523,572 | 5,523,573 |
How to check if document is ready?
|
<p>How to check if document is ready (all js files loaded, DOM is ready) through jQuery?
Is there any flag?</p>
<p>Facing issues if some of the files are not downloaded completely, and the event is raised by user. I want to check inside event handler.</p>
<p>I am using jQuery, asp.net</p>
|
asp.net jquery
|
[9, 5]
|
5,528,079 | 5,528,080 |
Find grid control inside grid without its rowbound event
|
<p>I have a grid of list of companies & below its branches(subgrid within company grid). I have checkbox for each binding with their id's(Companyid & branchid).I have one button to add those selcted values from either company or branch & show all selected record in another grid.Add button is outside of gridview so on click of add button i have to find branch gridview here i can find its parent grid.I wrote following code to find control inside onclick event of add button but its not finding that control:</p>
<blockquote>
<p><code>GridView gvbranch= (GridView)gvcompany.FindControl("gvbranch");</code></p>
</blockquote>
<p>So please help me how i can find that child control in add click event?
Thanks</p>
|
c# asp.net
|
[0, 9]
|
969,131 | 969,132 |
getElementById is not working in asp.net
|
<p>In my application i just want to alert the value in the text box using javascript .</p>
<p>aspx page code</p>
<pre><code><%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
alert("hi");
alert(document.getElementById('<%=textbox1.ClientID%>').value);
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox runat="server" ID="textbox1" Text="asdsad">
</asp:TextBox>
</div>
</form>
</body>
</html>
</code></pre>
<p>I only get alert 'hi' ..after that i get an error " object required" . whats the reason?</p>
|
javascript asp.net
|
[3, 9]
|
5,929,404 | 5,929,405 |
Javascript.. problem with value by reference possibly
|
<p>The problem here is that page at alert has the final value of i.. any solution to this?</p>
<pre><code> for(var i=start;i<=end;i++)
{
num=pageNumber.clone();
num.click(function(event)
{
event.preventDefault();
var page=i;
alert(page);
// drawPager();
});
num.find("span").text(i);
if(i==curPage) {
num.find("span").addClass("current");
num=num.find("span");
}
$("#pager>div").append(num);
}
</code></pre>
|
javascript jquery
|
[3, 5]
|
3,152,974 | 3,152,975 |
jQuery not register $
|
<p>I am using prototype + jquery on a site. Now the prototype plugins use $. I do not want jQuery to use $. How do I make jQuery not register the $. Also, how do I then call jQuery functions. </p>
<p>Thank you for your time.</p>
|
javascript jquery
|
[3, 5]
|
631,315 | 631,316 |
Android TextBox
|
<p>I want to return the value of latitude and longitude into my textboxes, I ve been able to do it using a Toast but not achieved it through the textbox. Kindly help</p>
<pre><code> // EditText latEditText = (EditText)findViewById(R.id.lat);
//EditText lngEditText = (EditText)findViewById(R.id.lng);
protected void showCurrentLocation(){
Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
if (location != null){
String message = String.format(
"Current Location \n Longitude: %1$s \n Latitude: %2$s",
location.getLongitude(), location.getLatitude()
);
Toast.makeText(LayActivity.this, message,
Toast.LENGTH_LONG).show();
//latEditText.setText(nf.format(location.getLatitude()).toString());
//lngEditText.setText(nf.format(location.getLongitude()).toString());
}
}
private class MyLocationListener implements LocationListener{
@Override
public void onLocationChanged(Location location) {
// TODO Auto-generated method stub
String message = String.format(
"New Location \n Longitude: %1$s \n Latitude: %2$s",
location.getLongitude(), location.getLatitude()
);
Toast.makeText(LayActivity.this, message, Toast.LENGTH_LONG).show();
//latEditText.setText((int) location.getLatitude());
//lngEditText.setText((int) location.getLongitude());
}
</code></pre>
|
java android
|
[1, 4]
|
2,587,781 | 2,587,782 |
Really need guidance for an Android app, How should i make my app structure?
|
<p>I'm making an Android App for searching data from webservice. My App will show a location on google map where I use my App for searching the data, the searching result and google map will appear on Main screen of my App. Also both of them will be saved on database and user can see on History screen on my App. </p>
<p>In conclusion, my App can search and show the data and location on Main screen also save all activity(searched data and location) on History screen. My questions are:</p>
<ul>
<li><p>What should my App structure look like?</p></li>
<li><p>How many activity or fragment should I use?</p></li>
</ul>
<p>I'm a beginner.
Appreciate in every guidance.</p>
|
java android
|
[1, 4]
|
5,593,582 | 5,593,583 |
undo / go back in history with jQuery
|
<p>I'm working on a customizations website completely on jQuery (I'm completely new to coding and because that's the only coding I know as of now). Here is the link to the project I'm working on for a friend <a href="http://hybridimaginations.com/lambada/test.html" rel="nofollow">here is the link to it</a>. I want to get the undo button that's on the top right corner to work.</p>
<p>The user clicks on color, then clicks on the bag part and that areas color changes. The undo button should undo the current color applied and return to the previous color step by step.</p>
<p>I'm also stuck at creating a summary for the colors present on the bag part it just shows all the colors I have selected rather than the colors that's present on the bag.</p>
<p>It would be a great help if some one could help me out with this 2 things. I have been researching an developing this for the past 3 months.</p>
|
javascript jquery
|
[3, 5]
|
736,553 | 736,554 |
How do I use jQuery timeago to live update?
|
<p>I have a value <code>011-04-29T14:55:33.000Z</code> this value gets push into a jQuery template. I used timeago to convert the date to elapsed time but after being written to the template it has no way of updating as more time passes. </p>
<p>How would I implement something that would automatically update?</p>
|
javascript jquery
|
[3, 5]
|
3,219,933 | 3,219,934 |
using php to check is a javascript file has been loaded?
|
<p>Can I use a script to check if a JS file is loaded? </p>
<p>I have a function, which places a form on a page with javascript controls. I don't know where the user will use this form, and it might be loaded several times into a page. It strikes me as the best way to handle things if the form itself loads the script, so it doesn't load if not needed, but this leads me to need to check if the script is already loaded to avoid reloading and adding to page load times and bandwidth use.</p>
|
php javascript
|
[2, 3]
|
9,102 | 9,103 |
make refresh without refreshing the all page
|
<p>I made 2 dropdownlists which are filled from my database. In the first drop are countries and in the second are cities. When a user selects a country automatically in the second drop down appears all the cities from that country. The problem is that when I select another country all the page is refreshing and I want just that 2 drop down lists to do the refresh. I'm using Javascript and PHP. Here are the codes:</p>
<pre><code>@$cat=$_GET['cat'];
$quer2=mysql_query("SELECT DISTINCT category,cat_id FROM category order by category");
if(isset($cat) and strlen($cat) > 0){
$quer=mysql_query("SELECT DISTINCT subcategory FROM subcategory where cat_id=$cat order by subcategory");
}else{$quer=mysql_query("SELECT DISTINCT subcategory FROM subcategory order by subcategory"); }
echo "<select name='cat' onchange=\"reload(this.form)\"><option value=''>Select one</option>";
while($noticia2 = mysql_fetch_array($quer2)) {
if($noticia2['cat_id']==@$cat){echo "<option selected value='$noticia2[category]'>$noticia2[category]</option>"."<BR>";}
else{echo "<option value='$noticia2[cat_id]'>$noticia2[category]</option>";}
}
echo "</select>";
echo "&nbsp&nbsp";
echo "<select name='subcat'><option value=''></option>";
while($noticia = mysql_fetch_array($quer)) {
echo "<option value='$noticia[subcategory]'>$noticia[subcategory]</option>";
}
echo "</select>";
</code></pre>
<p>and this is the Javascript code:</p>
<pre><code>function reload(form)
{
var val=form.cat.options[form.cat.options.selectedIndex].value;
self.location='index.php?cat=' + val ;
}
</code></pre>
<p>I want that when I change the country the all page doesn't refresh only those 2 drop down lists. Any help will be much appreciated. </p>
|
php javascript
|
[2, 3]
|
4,120,597 | 4,120,598 |
Persist Textbox in cookie/session automaticly
|
<p>I am attempting to persist what the users enters into a textbox without them clicking save. It would simply save what the user entered into the textbox so when they navigate away and then back to the page it will be reloaded. once they are click "done" the session will be removed.</p>
<p>I have been trying to do this with Jquery but I have been struggling as I am fairly new to JavaScript, can anyone point me in the right direction? </p>
|
c# jquery
|
[0, 5]
|
4,370,575 | 4,370,576 |
Jumping to external url from gridview template field
|
<p>I need to jump from existing location to some other location. Like if my application is running on localhost, and i want to jump to Youtube.
Scenario:</p>
<p>I have a grid in which template field is asp:hyperlink. I need to add a image and on on that image click, i will get moved to youtube.</p>
<pre><code><a id="Download" href='<%#ResolveUrl(Eval("Path").ToString()) %>'
title="Download>>" style="color: #FFFFFF; font-size: 9pt">
<img src="~/images/dl.gif" style="border:0px; height:22px; width:22px"
alt="Download" runat="server"/></a>
<asp:HyperLink runat="server" ID="HyperLink1"
NavigateUrl='<%# ResolveUrl(Eval("YouTubeUrl").ToString()) %>'>
<img src="~/images/yt.gif" style="border:0px; height:22px; width:22px"
alt="Play on You tube" runat="server" /></asp:HyperLink>
</code></pre>
<p>I want to navigate some other location outside the current location from the current location.</p>
|
c# asp.net
|
[0, 9]
|
2,199,159 | 2,199,160 |
Can't access value of checkbox on button click c#
|
<p>I am binding data to a gridview in Page_Load and then in the same Page_Load I am adding a column of check boxes which are not part of the databinding.</p>
<p>Then when a button is pressed I want to check to see if any of the boxes are checked. However, when I look for the checkboxes in my button_click method the checkboxes seem to have disappeared entirely.</p>
<p>I am looking for them with </p>
<pre><code>foreach (GridViewRow gvr in GridView1.Rows)
{
CheckBox cb = (CheckBox)gvr.FindControl("check" + gvr.Cells[2].Text);
...
}
</code></pre>
<p>I have a hunch they might be getting destroyed on postback but I'm not sure how to make sure this doesnt happen.</p>
<p>Everything in my Page_Load method is contained in a if(!IsPostBack) statement.</p>
<p>some asked for my page_load:</p>
<p><code>
foreach (GridViewRow gvr in GridView1.Rows)
{</p>
<pre><code> TableCell tc = new TableCell();
CheckBox cb = new CheckBox();
cb.ID = "check" + gvr.Cells[2].Text;
tc.Controls.AddAt(0, cb);
gvr.Cells.AddAt(0, tc);
}
</code></pre>
<p></code></p>
<p>I think is the relevant part.</p>
|
c# asp.net
|
[0, 9]
|
3,631,314 | 3,631,315 |
Javascript - Regx to check for characters
|
<p>All,</p>
<p>I am looking for a JavaScript function that checks for the following characters (without commas) in a string. If they are present, it would return false, else returns true</p>
<pre><code><,>,(,),#,"",',:,::
</code></pre>
<p>Thanks</p>
|
javascript jquery
|
[3, 5]
|
5,134,019 | 5,134,020 |
How to open a new window not in the same new window?
|
<p>How to open a new window not in the same new window?</p>
<p>The following code can open a new window However after pressing button again
the content will be replaced. How to open the next or next next content in a new window not in the same new window</p>
<pre><code>string strPop = "<script language='javascript'>" +
"window.open('viewpage.aspx?type=3&start=" + txtStartDate.Text + "&end=" + txtEndDate.Text + "','Report');" +
"</script>";
Page.RegisterStartupScript("Pop", strPop);
</code></pre>
|
c# javascript
|
[0, 3]
|
2,677,574 | 2,677,575 |
disable a textbox editor if it has a value
|
<p>I am trying to stop a user from editing a textbox if the text box has value coming from database. </p>
<p>If text box value is null, I want to allow editing the text box.</p>
|
c# asp.net
|
[0, 9]
|
1,121,630 | 1,121,631 |
Ajax calendar and dropdownlist display issue
|
<p>I have a ajax calender extender and dropdown placed just below it, problem is in IE whenever calendar control pops up it pops up beneath drop drown. I tried z-index but doesnot works</p>
|
c# asp.net
|
[0, 9]
|
5,136,175 | 5,136,176 |
Why can I use == in JavaScript but not in Java?
|
<p>I have two string in Java: </p>
<pre><code>String a = "ab";
String b = "ab";
</code></pre>
<p>And I test them with the <code>string.equals()</code> method because the <code>==</code> operator only checks whether the references to the objects are equal.</p>
<p>Why can I use <code>==</code> in JavaScript?</p>
|
java javascript
|
[1, 3]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.