Unnamed: 0
int64 302
6.03M
| Id
int64 303
6.03M
| Title
stringlengths 12
149
| input
stringlengths 25
3.08k
| output
stringclasses 181
values | Tag_Number
stringclasses 181
values |
---|---|---|---|---|---|
5,320,065 | 5,320,066 | How to check if a file exists on the web server | <p>I have a file stored on the server and the web page I am populating depends on the fatc that the file exists or not.</p>
<p>How do I test if the file is available on the server?
The file comes on the web page as:
<a href="http://main.server.com/PGT/Reports/ObjectsReport.xml" rel="nofollow">http://main.server.com/PGT/Reports/ObjectsReport.xml</a></p>
<p>I have to test the existence of this file and if it is available I will display a link otherwise I want to hide the link.</p>
<p>The actual path to the server is
//main.server.com/inetpub/wwwroot/PGT/Reports/ObjectsReport.xml
but I don't have access to the server (and therefore to the file) on the network. I can only access it using the web page. Is there a way to test that the server has the file or not display the link? (hlObjectsReport.Visible = false;)</p>
<p>I have tried to use the following:</p>
<p>Uri validatedUri;
Uri.TryCreate(uri, UriKind.RelativeOrAbsolute, out validatedUri);</p>
<p>But it returns a valid address even if the file is not there.</p>
<p>Thanks
Tony.</p>
| c# asp.net | [0, 9] |
5,261,694 | 5,261,695 | JavaScript alert boxes combined with PHP | <pre><code>echo "<td><a href='delete.php?id=$row[id]&&category=$a' onclick='return confirm(\'are you sure you wish to delete this record\');'>delete</a></td>";
</code></pre>
<p>Above is the code I am trying to use. Every time it does nothing and I cannot see how I can use 'proper' JavaScript methods. What is the reason?</p>
| php javascript | [2, 3] |
3,219,586 | 3,219,587 | Associate a control with a resource key in code behind | <p>Is there any way to associate a control such as a <code>nameLabel</code> with a local resource key from code behind.</p>
<p>I usually do this from <em>html</em> using the <code>meta:resourcekey</code> property like the following:</p>
<pre><code><asp:Label ID="nameLabel" runat="server"
meta:resourcekey="nameLabel" />
</code></pre>
<p>Thanx :)</p>
| c# asp.net | [0, 9] |
2,721,638 | 2,721,639 | C#, ASP.net application which calls executable to create output file | <p>We are developing a web application in ASP.Net and C#. The requirement here is to interact with a third party exe which is developed in Fortran77. This third party exe produces an output file after being provided with some inputs and shuts down.In windows desktop single user application this is easily possible by using System.Diagnostics.Process and the events provided therein. But in web there will be multi-user environment, and many calls will be made to this exe. What are the best possible ways to handle such an exe in web application? </p>
<ol>
<li>Is it fine if we invoke exe on each user request as the exe shuts down after generating output file? Or</li>
<li>Is it possible to use windows service? Or</li>
<li>Any other approach?</li>
</ol>
<p>Thanks in advance.
-Prasad</p>
| c# asp.net | [0, 9] |
3,656,305 | 3,656,306 | Merge repeated variables in javascript | <pre><code>var some1 = false;
var some2 = false;
var some3 = false;
var some4 = null;
var some5 = null;
var some6 = null;
</code></pre>
<p>Is it possible to merge variables by comma?</p>
<p>What is a true way to do this in javascript? </p>
| javascript jquery | [3, 5] |
2,972,514 | 2,972,515 | Possible to sort rendered images based on class of parent div? | <p>I have some images that are wrapped within containers like this:</p>
<pre><code><div id="swatchcontainer">
<div class="swatchimgouter">
<div class="swatchimginner">
<img src="whatever1.jpg" alt="some text" title="some text too"/>
</div>
</div>
<div class="swatchimgouter">
<div class="swatchimginner swatchdisabled">
<img src="whatever2.jpg" alt="some text" title="some text too"/>
</div>
</div>
<div class="swatchimgouter">
<div class="swatchimginner">
<img src="whatever3.jpg" alt="some text" title="some text too"/>
</div>
</div>
etc., etc.
</div>
</code></pre>
<p>It's not mission critical, but I got to thinking that it's probably possible to sort these images fairly easy using JQuery. I would like to place all images that are wrapped in the "swatchdisabled" class at the end.</p>
<p>There could be a couple of dozen of these images. They're all styled with <code>float:left</code> and so they display horizontally in rows. Even if there are a couple of dozen, there are only 2 rows. Each of these images is 30 pixels by 30 pixels.</p>
<p>It's just a UI consideration. Makes it a lot easier to keep track of which items are disabled and which are enabled by placing all disabled images at the end.</p>
<p>If it's fairly simple to do this, I'll also need to keep their inner div classes with them.</p>
| javascript jquery | [3, 5] |
1,585,510 | 1,585,511 | .click() in a <div> in a <div> does not work | <pre><code>$('#A').click(function () {
$('#A1').prepend('<div class="AcL" id=' + i + '>Hello<span class="RmMe" id="' + i + '" style="margin-left:20px; cursor:pointer;">X</span></div>');
i++;
});
$('.RmMe').click(function () {
alert("OK");
});
<div id="A1"></div>
</code></pre>
<p>Any idea why the click is not working?</p>
| javascript jquery | [3, 5] |
2,751,886 | 2,751,887 | how do i refer to the subject $(this) from a jquery plugin? | <p>I'm using <a href="http://colorpowered.com/colorbox/" rel="nofollow">colorbox</a>, i just get undefined as my get values?</p>
<pre><code>$('.banner').colorbox({
opacity: 0.4,
href: 'dialogs/ban_add_edit.php?banner_to_edit='+$(this).attr('id')+'&typeofbanner='+$(this).attr('rel')
})
</code></pre>
| javascript jquery | [3, 5] |
5,966,861 | 5,966,862 | getting the email from contacts | <p>I am able to select one contact and get its respective phone number.
code:</p>
<pre><code>@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (requestCode == PICK_CONTACT_REQUEST) {
if (resultCode == RESULT_OK) {
Uri contactUri = data.getData();
String[] projection = { Phone.NUMBER };
Cursor cursor = getContentResolver()
.query(contactUri, projection, null, null, null);
cursor.moveToFirst();
int column = cursor.getColumnIndex(Phone.NUMBER);
String number = cursor.getString(column);
editText3 = (EditText) findViewById(R.id.editText3);
editText3.setText(number);
}
</code></pre>
<p>How do i get the email of the same contact at the same time?</p>
| java android | [1, 4] |
1,675,421 | 1,675,422 | JQuery: How to calculate the number of rows to show within a container | <p>kinda hard to explain, but let me try:<br>
I'd like to put a table inside a container . this container has a fixed height, say 500px, and the table is rather long, say 2100 and each row's height can be different. </p>
<p>When the table is created, all the rows are invisible, now I want to do a calculation based on container's height to find out how many rows should appear inside the container. it could be first 15 rows, or first 17 rows (because some row's height is bigger).</p>
<p>After I do that, I let those rows stay there for some time, and hide them again, and do another calculation to fetch next page, and so on... Now the hard part it how do I do the calculation using jquery?</p>
| javascript jquery | [3, 5] |
1,878,293 | 1,878,294 | alternative of onbeforeunload any idea | <p>I want to update database when user leave the site. I am using php for my site. I am using javascript function onbeforeunload and call php through ajax to update database. </p>
<p>Now the problem is that the function onbeforeunload is not supported by Opera and Safari, and so the entry should be deleted from database is still over their and affect my database and site.</p>
<p>Any idea or suggestion what i can do?</p>
| php javascript | [2, 3] |
222,024 | 222,025 | Does logging slow down a production Android app? | <p>Before releasing my Android app to the marketplace, should I comment out all logs?</p>
<pre><code>Log.d(tag, "example of a log")
</code></pre>
<p>If I leave them there, will the app run slower?</p>
| java android | [1, 4] |
2,924,330 | 2,924,331 | Serializing an image as android | <p>Good friends of the forum, Please have a look at my question.</p>
<p>What happens, I take several days esque looking to serialize an image in android and get results in a String with the serialization code.
I have searched far and the only thing I have found are methods to convert other objects to physical objects on the hard drive ...</p>
<p>Please if anyone knows how to do this procedure, I would appreciate a lot :)</p>
<p>salu2</p>
| java android | [1, 4] |
1,340,346 | 1,340,347 | how to write basic jquery if statement based on url | <p>I don't know why this doesnt work. Although im sure its something to do with the way im handling the url in the if statement. My Jquery / javascript knowledge if basic.</p>
<pre><code>var url = $(location).attr('href');
if (url == 'http://www.website.com/test/index.html')
{
$('#HomeButton').bind('click', HomeButton);
}
function HomeButton(e) {
e.preventDefault();
doSomething....
};
</code></pre>
| javascript jquery | [3, 5] |
3,063,322 | 3,063,323 | jquery, extract number value from name tag | <p>I have this being created by my perl script.</p>
<pre><code> print qq|
\$('textarea[name=category$row[0]]').keydown(function(event)
{
\$("input[value=$row[0]]").attr('checked', true);
});
|;
</code></pre>
<p>Somewhere later, I have this, I want to reextract the $row[0] value but I am not sure how in jquery.</p>
<pre><code>print qq|
<script>
\$('#display_category').change(function() {
var text = \$(this).val();
\$('textarea[name^="category"]').each(function() {
var foundvalue = \$(this).val();
if (text == foundvalue)
{
alert("FOUND HERE " + foundvalue);
}
});
});
</script>
|;
</code></pre>
<p>how do i reextract the \d+ from category and use it in my if condition?</p>
| javascript jquery | [3, 5] |
869,788 | 869,789 | Changing the URL with jQuery without reloading the page | <p>How do I change the URL with jQuery without reloading the page?</p>
| javascript jquery | [3, 5] |
4,103,543 | 4,103,544 | How do I focus on a javascript radio button or any other items on specific jquery tabs? | <p>I have javascript validation that validates items such as textboxes, radio buttons etc. How do I use focus() on the text box or other item located in a specific tab governed by tags? </p>
<p>Sample of the javascript code:</p>
<pre><code>if (theForm.radbtnProg.checked && theForm.ddlProg.selectedIndex == 0) {
alert("Please select Institution Name from the list.");
theForm.ddlProg.focus();
}
</code></pre>
<p>Above example theForm.radbtnProg.checked and theForm.ddlProg.selectedIndex are the radio button and drop down list that I want to validate. How do I refer to them according to specific tabs? </p>
<pre><code>$('#tabs').tabs(theForm.radbtnProg.checked)?
</code></pre>
<p><strong>Edited:</strong>
Answered by @nnnnnn and I modified the code:</p>
<pre><code>if (theForm.radProg.checked && theForm.ddlProg.selectedIndex == 0) {
alert("Please select Program Name from the list.");
$('#tabs').tabs("select", 0);
$("#ddlProg").focus();
return false;
}
</code></pre>
| javascript jquery | [3, 5] |
4,615,896 | 4,615,897 | dynamically show n hide table rows using jquery :gt | <p>I was wondering how to use jQuery's <code>:gt()</code> in an inclusive way. I am trying to show/hide table rows dynamically.</p>
<pre><code>$('#' + tbodyId + ' > tr:gt(' + newRowStart + '):lt(' + rowsToShow + ')').show();
</code></pre>
<p>If i try to show the first 5 rows say, <code>newRowStart = 0</code> and <code>rowsToShow = 5</code>. This will not show the first row. Setting it to -1 doesn't work either. It would be very helpful if there was an inclusive method like <code>:gt()</code>. Does anyone know how to do this?</p>
| javascript jquery | [3, 5] |
4,033,030 | 4,033,031 | Display elements of a <ul> in two columns | <p>Someone please help me to change current function to display elements in two columns,</p>
<pre><code> function nextCode(flag)
{
var code = codes[flag];
$('.headers').html(''+code[0]+'');
var sum;for(var j=1;j<=code.length;j++)
{
sum+="<li>"+code[j]+"</li>";
}
sum="<ul>"+sum+"</ul>";
$('.options').html(''+sum+'');
}
</code></pre>
<p>This is generating a list in single column, But i want to display them in two columns..<br>
Please help me on this. </p>
| javascript jquery | [3, 5] |
2,633,897 | 2,633,898 | Remove space on textbox but not between words | <p>I want to remove spaces on the beginning of text on textbox on keyup event but will not remove spaces if it is between text. how can i do that?</p>
| javascript jquery | [3, 5] |
2,542,361 | 2,542,362 | jquery source code, classname with linefeeds? | <p>Today I looked at the source code of the jQuery function removeClass:<br>
There is the following line: </p>
<pre><code>className = (" " + elem.className + " ").replace( rclass, " " );
</code></pre>
<p>rclass: </p>
<pre><code>rclass = /[\n\t\r]/g,
</code></pre>
<p>In the book "JavaScript The Definitve Guide" from David Flanagan, 6th Edition, on page 438 there are the following sentence: </p>
<blockquote>
<p>..., so the HTML class attribute is available to JavaScript code using
the name className. ... and the class attribute holds a
space-separated list of class names.</p>
</blockquote>
<p>Why the jQuery coders assume that the class names can also be separated by tabs and line feeds?</p>
| javascript jquery | [3, 5] |
4,169,765 | 4,169,766 | How to find the Jquery selector of the selected element | <p>How to find the Jquery selector of the selected element if it is not having any id or class like below</p>
<pre><code>$(".someSelectedElementParentClass > div:eq(1) > ul:eq(0) > li:eq(0) > a:eq(0)").css({"position":"relative", "left":-114, "top":-114});
</code></pre>
<p>Source is from <a href="https://www.optimizely.com/" rel="nofollow">https://www.optimizely.com/</a> done. How can I do this using Jquery.</p>
<p>Here what I have is to get the element selector. I don't why this much down votes. After so much research found that there is Jquery plugin (getfullpath) to get the path of the selector.</p>
<p>Sorry for the grammer mistakes if any.</p>
| javascript jquery | [3, 5] |
1,887,761 | 1,887,762 | control duplicate contents in Application_BeginRequest Asp.net | <p>My ASP.net website returns page content with or without a trailing slash on the URLs.
I want to resolve this problem in Application_BeginRequest
for example :
I want to redirect <a href="http://www.portalsaz.com/" rel="nofollow">http://www.portalsaz.com/</a> to <a href="http://www.portalsaz.com" rel="nofollow">http://www.portalsaz.com</a>
Any Idea?
Thanks, Majid.</p>
| c# asp.net | [0, 9] |
2,782,145 | 2,782,146 | working with tabindex and multiple forms | <p>I want to change the order in which certain checkboxes are tabbed to. The problem is, my application can have multiple tabs open, each with the same form. In addition, I have other fields before the checkboxes. How can I change the tab-index of those specific checkboxes without affecting the rest of the inputs in the DOM?</p>
<p><strong>EDIT:</strong></p>
<p>Here's the form I'm using.</p>
<p><img src="http://i.stack.imgur.com/OnYr1.jpg" alt=""></p>
<p>The form will start by being focused on the first input (the one with "the last book" as it's value) and should tab normally till you get to the grades. Then it should tab DOWN. Same with the subjects. As you can see, there can be multiple tabs containing this form.</p>
| javascript jquery | [3, 5] |
4,496,095 | 4,496,096 | pageShow event in javascript | <p>I have a following code:</p>
<pre><code><html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script type="text/javascript" language="javascript">
$( function() {
window.onload = function () {
alert('This page was just hidden:');
}
});
</script>
</head>
<body pageshow="alert('Done');">
<div id="mypage" data-role="page" data-theme="b">
<div data-role="header">
<h1>Page 2</h1>
</div>
<div data-role="content">
<p>This is page 2.</p>
</div>
</div>
</body>
</html>
</code></pre>
<p>But the <code>pageShow</code> event is not firing in IE. Any idea why?</p>
| javascript jquery | [3, 5] |
13,674 | 13,675 | Preview uploaded files (documents & photos | <p>I have a files library that contains documents (pdf, doc, xls) and photos. I need a method to help me preview files before I download them using google docs (for pdf & doc.) and simple integration code for photos.<br>
I was using fancybox using this code:<br></p>
<pre><code>if ($document->get_preview() == "document"){
?>
<script type="text/javascript" language="javascript">
<!--
<?php
echo("
jQuery(document).ready(function() {
jQuery(\"a[class*=document-$doc_id]\").fancybox({
'width' : '75%',
'height' : '75%',
'href' : '$link',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
});
");
?>
// -->
</script>
<?php } else {?>
<script type="text/javascript" language="javascript">
<!--
<?php
echo("
jQuery(document).ready(function() {
jQuery(\"a[class*=url_img-$doc_id]\").fancybox({
'overlayOpacity' : 0.7,
'overlayColor' : '#000000',
'href' : '$link',
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'easingIn' : 'easeOutBack',
'easingOut' : 'easeInBack',
'speedIn' : '700',
'centerOnScroll' : true
});
});
");
?>
// -->
</script>
<?php }?>
</code></pre>
<p><code>get_preview()</code> is a function that verifies if the file is a document or photo using extensions.</p>
<p>In the previous code the job is repeated for every file so it cause slow page loading. Is there any alternative to this solution?</p>
| php javascript | [2, 3] |
3,859,965 | 3,859,966 | How to reduce gap between 2 tables in Javascript | <p>I am using Javascript for my ascx control. I have 2 tables, one below the other. My code written is like </p>
<pre><code> </tr>
</table>
<table style="border-spacing: 15px;">
</code></pre>
<p>But when i execute, it shows almost 2 inch space between them. Can some help me out?</p>
<p>Thank you!!</p>
| javascript asp.net | [3, 9] |
230,576 | 230,577 | Get all checked checkboxes in certain div by click | <p>I have a custom asp.net control which contains some checkBoxes. I know how to get the checkBox, that was clicked</p>
<pre><code>$('#customer-category-control input:checkbox').click(function(event)
{
var el = $(this).attr('name');
};
</code></pre>
<p>Suggest me, please, how to get only all checked checkBoxes by click and make a JSON object from their names.</p>
| javascript jquery | [3, 5] |
3,397,005 | 3,397,006 | Disable notification after user logout in Android | <p>I am working on an android App similar to Line/Whats app i.e. basically instant messenger. The problem I face is that even after the user logs out, The notifications are still displayed. </p>
<p>In other words, there is no way to disable the notifications once the user log outs. Instead, the notification are never disabled and keep on reoccurring even after log out making the app highly unusable.</p>
<p>Any advice would be greatly appreciated.</p>
<p>THanks</p>
| java android | [1, 4] |
3,117,665 | 3,117,666 | 5 star rating with jquery gives an Unexpected string | <pre><code>$('.star').mouseover(function (){
var star = $(this).index()1;
$(this).parent().css("background-position","0 -" (32 * star) "px");
});
$('.star-rating').mouseout(function (){
var originalresult = $(this).attr('id').split('result')[1];
$(this).css("background-position","0 -" (32 * originalresult) "px");
});
</code></pre>
<p>Don't get this, rewriting is giving me stars in my eyes, but the problem stands... Don't know anymore what I'm doing wrong?</p>
| javascript jquery | [3, 5] |
4,457,001 | 4,457,002 | How to get element inside a td using Row index and td index | <p>I have a <code>Row Index</code> and <code>TD index</code> in a table and I want to select <code>input</code> element inside the cell in <code>[Row Index,TD Index]</code> . How I can do this?</p>
| javascript jquery | [3, 5] |
1,096,928 | 1,096,929 | Create dynamic div with jquery | <p>Im trying to create a button that generates already formated divs everytime it is pushed.<br><br>
The divs are composed by forms and their fields should already be filled with data that is stored in variables in javascript.</p>
<p>eg.</p>
<pre><code><div id="myDiv_#">
<form id="myForm">
<input type="text" id="start_date" name="start_date" value="someJavascriptVariable" />
<input type="text" id="end_date" name="end_date" value="someJavascriptVariable" />
<select name="type" id="type">
<option value="1">"someJavascriptVariable"</option>
<option value="2">"someJavascriptVariable"</option>
</select>
<input type="button" id="new_button" value="Show">
</form>
</div>
<script>
$('#button_push').click(function()
{
//creating myDiv_#
}
</script>
</code></pre>
<p>I was searching arround web, but never found good results :s
Im asking you help with this, maybe a guide line or a start point.
The point is, everytime user push the button, a new div is created with parameters above.</p>
<p>Cheers</p>
| javascript jquery | [3, 5] |
5,785,310 | 5,785,311 | The simplest solution to hide calendar on blur or click | <p><a href="http://jsfiddle.net/SXrAb/" rel="nofollow">http://jsfiddle.net/SXrAb/</a></p>
<p>Following the jsfiddle link there is a simplified sample of what I need. Currently it shows the calendar on button click, and hides it on input blur.</p>
<p>What I cannot implement additionally is hiding calendar on button click.</p>
<p>So - calendar should:</p>
<ol>
<li><strike>open on button click if hidden</strike> (done)</li>
<li><strike>hide on blur</strike> (done)</li>
<li>hide on button click if opened (this is what I'm in stuck with, because blur is triggered before button click event so I have no chance to handle it properly)</li>
</ol>
<p><strong>UPD</strong>:</p>
<p>the solution is expected to work correctly in all cases, like "mousedown on button, drag below, mouseup" (otherwise I wouldn't ask it ;-)</p>
| javascript jquery | [3, 5] |
2,341,111 | 2,341,112 | How do I test for a empty string/null, using JavaScript? | <p>How do I test for a input[text] field that has nothing in?</p>
<p>This is what I have so far:</p>
<pre><code> if ($('#StartingPrice').length == ""){
alert("ERROR!");
}
</code></pre>
<p>Any help would be greatly appreciated, Thanks </p>
| javascript jquery | [3, 5] |
654,925 | 654,926 | ASP.NET - Passing a C# variable to HTML | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1531586/why-works-in-one-situation-but-not-in-another">Why <%= %> works in one situation but not in another</a> </p>
</blockquote>
<p>I am trying to pass variables declared in C# to html. The variables have all been declared as public in the code-behind.</p>
<p>This is the HTML code I am using:</p>
<pre><code><asp:TextBox ID="TextBoxChildID" Text='<%= Child_ID %>' runat="server" Enabled="false"></asp:TextBox>
</code></pre>
<p>The problem is that when the page loads, the text '<%= Child_ID %>' appears in the textbox instead of the value in the variable.</p>
<p>What is wrong please?</p>
| c# asp.net | [0, 9] |
4,150,151 | 4,150,152 | jQuery - Trying to come up with a good strategy | <p>I have some very old hand coded JavaScript which is not scalable. There are loops and loops inside of each other. So I am trying to figure out how to upgrade it into jQuery.</p>
<p>Here is how it works:</p>
<ul>
<li><p>PHP outputs 2 things - a checkbox and a drop down select box (in some cases 2 drop downs)</p></li>
<li><p>The count of checkbox and selectboxes varies. Sometimes there is only 1 and sometimes there are 5 or 7 or 10. </p></li>
</ul>
<p>Here is how the javascript works:</p>
<ol>
<li><p>If a user selects something from the dropdown or 2 drop downs and clicks on Submit, then the checkbox next to it is automatically checked before submitting the form.</p></li>
<li><p>If a user selects the checkbox but the dropdown is not selected or the default (first value) is selected, then it calls the validation plugin. </p></li>
<li><p>If a user selects the check and selects only one of 2 dropdowns, then it calls the validation.</p></li>
</ol>
<p>I have been able to figure out how to count the checkboxes in a div like this:</p>
<pre><code>total = 0;
$("#branches_checkboxes input[type=checkbox]").each(function () {
total++;
}
</code></pre>
<p>The checkbox usually have a name such as <code>optionadd_id[2]</code> or <code>optionadd_id[3]</code> or <code>optionadd_id[4]</code></p>
<p>And the dropdown next to them have the name, respectively, <code>optionsselectid[2][2]</code> or <code>optionsselectid[3][2]</code> or <code>optionsselectid[4][2]</code></p>
<p>I am not looking for someone to code the entire thing for me. I just need some guidance on how to get started on this.</p>
<p>Thanks!</p>
| javascript jquery | [3, 5] |
3,506,644 | 3,506,645 | Save stream as image | <p>How to save stream as image and store the image in temp files?</p>
| c# asp.net | [0, 9] |
4,536,487 | 4,536,488 | jQuery preventDefault function not working on jsfiddle | <p>I cannot get the following simple jQuery to work. I know I am overlooking something, so please help me out. Here is the code at <a href="http://jsfiddle.net/Z5waA/" rel="nofollow">http://jsfiddle.net/Z5waA/</a>. It's a simple click the button, then alert with jQuery.</p>
| javascript jquery | [3, 5] |
5,747,375 | 5,747,376 | Use an array to search element for data-attribute and hide it | <p>I want to search through a class for elements that have data-id attribute that matches in the array, and hide them.</p>
<p>The HTML:</p>
<pre><code><li class="list" data-id="1">one</li>
<li class="list" data-id="2">two</li>
<li class="list" data-id="3">three</li>
<li class="list" data-id="4">four</li>
</code></pre>
<p>I have an array:
<code>var dataIDcheck = ['1', '3']</code></p>
<p>Any ideas on how I can search through the class .list and hide 1 and 3 (or whatever is in the array)?</p>
| javascript jquery | [3, 5] |
627,928 | 627,929 | Pass variable via Javascript | <p>How can I pass a variable (<code>$member_id</code>) to the target php page(Member Profile details Query)?</p>
<pre><code>///-----
echo '<div id="show_profile_box">Show Member Profile details
//MySQL Query to display member profile details</div>
<div id="display_member_id"><a href="show_profile.php"?member_id=$member_id">Display Member id</a></div>';
echo '<script>
$("#show_profile_box").hide(100);
$("#display_member_id").click(function () {
$("#show_profile_box").show(500);
});
</script>';
</code></pre>
<p>Thank you. Let me know if you need more info.</p>
<p><strong>* The whole idea is to display/show SELECTED member profile details. *</strong></p>
| php javascript jquery | [2, 3, 5] |
741,904 | 741,905 | Get the return confirm popbox value in asp .net C# | <p>How can i get the value that was pressed in the confirm box?</p>
<pre><code> <script type = "text/javascript" language = "javascript">
function confirm_proceed()
{
if (confirm("Are you sure you want to proceed?")==true)
return true;
else
return false;
}
</script>
</code></pre>
<p>C#</p>
<pre><code> Button2.Attributes.Add("onclick", "return confirm_proceed();");
</code></pre>
| c# javascript asp.net | [0, 3, 9] |
1,601,168 | 1,601,169 | How to get a collapsible bottom bar Jquery? | <p>I want to do something like this:</p>
<p><a href="http://devheart.org/articles/jquery-collapsible-sidebar-layout/" rel="nofollow">http://devheart.org/articles/jquery-collapsible-sidebar-layout/</a></p>
<p>But I would like the separator bar to be vertical such that the sidepanel is on the bottom and content is on top divided by a separator that runs horizontally to expand and collapse. </p>
<p>What tweaks are needed to accomplish this such that I don't need to worry about having a vertical scrollbar and the sidepanel stays at the bottom without forcing users to scroll when not necessary.</p>
| javascript jquery | [3, 5] |
775,403 | 775,404 | how to show confirmation alert with three buttons 'Yes' 'No' and 'Cancel' as it shows in MS Word | <p>I have showing a confirmation alert box through my javascript as following</p>
<pre><code>function checked() {
if (hdnval.toLowerCase() != textbox1.toLowerCase()) {
var save = window.confirm('valid')
if (save == true)
{
return true;
}
else
{
return false;
}
}
}
</code></pre>
<p>the confirmation alert is showing with two btn OK and Cancel.</p>
<p>I want to show 3 button in my confirmation alert 'Yes' 'No' 'Cancel', as it shows in MS Word.</p>
<p>is it possible if yes then its possible? please someone help me.</p>
<p>thanks in advanced.</p>
| javascript asp.net | [3, 9] |
3,530,500 | 3,530,501 | JQuery add class on current item | <p>I have this method that changes an larger image source on click. </p>
<p>I need to add a 'current' class on the selected. I have no problem adding this class,but I need it to remove the class on the other, previous, selected item.</p>
<p>This is the code I'm using at the moment:</p>
<pre><code>$(document).ready(function() {
$("ul.timgs li a").click(function(e) {
e.preventDefault();
var path = $(this).attr("href");
$("div.tour-image img").attr({"src": path});
});
});
</code></pre>
<p>Thanks :-)</p>
| javascript jquery | [3, 5] |
3,028,970 | 3,028,971 | When you use jQuery .removeClass() does it return an error when run on an element that does not have that class? | <p>I have four html elements that when clicked I want to have a specific class applied to. The problem is that that class is only for one of the four at any one time. I want to when one element is clicked have that class removed from the other three elements and applied to the one that was clicked. If I were to run a loop that removed that class from every single element before applying that class to the element clicked would there be an error on the elements that did not have that class?</p>
| javascript jquery | [3, 5] |
4,738,282 | 4,738,283 | FindControl in a RoleGroup in a LoginView | <p>I can't seem to find a control in a login view.</p>
<p>The aspx is:</p>
<pre><code><asp:LoginView ID="SuperUserLV" runat="server">
<RoleGroups>
<asp:RoleGroup Roles="SuperUser">
<ContentTemplate>
<asp:CheckBox ID="Active" runat="server" /><br />
<asp:CheckBox ID="RequireValidaton" runat="server" />
</ContentTemplate>
</asp:RoleGroup>
</RoleGroups>
</asp:LoginView>
</code></pre>
<p>And the code behind is:</p>
<pre><code>if (Context.User.IsInRole("SuperUser"))
{
CheckBox active = (CheckBox) SuperUserLV.FindControl("Active");
if (active != null)
{
active.Checked = this.databaseObject.Active;
}
CheckBox require = (CheckBox) SuperUserLV.FindControl("RequireValidaton");
if (require != null)
{
require.Checked = this.databaseObject.RequiresValidation;
}
}
</code></pre>
<p>With a user in the right role, I can see the checkboxes, but the code behind doesn't populate them, the result of the findcontrol is null.</p>
<p>What am I missing? Thanks.</p>
<p><strong>Edit</strong>: Looks like my issue was when I am doing the <code>.FindControl</code> the loginview hasn't rendered to the screen and is returning null. Putting my code on a button and calling it after the page has rendered to the screen it works as I would expect.</p>
<p><strong>Edit 2</strong>: Seems the best place to put the code was <code>SuperUserLV_ViewChanged</code></p>
| c# asp.net | [0, 9] |
4,960,603 | 4,960,604 | Where is the best place to store user related data in asp.net? | <p>When a customer logs in to my site, I need to know their account id and their menu id. This lets me know what data they can see on a page and what menu they get. I don't want to have to read this data over and over. Should I store this in a session variable or customize the membership user and membership provider to contain this information?</p>
| c# asp.net | [0, 9] |
3,161,408 | 3,161,409 | Visual Basic 2010 Login view asp.net | <p>I've recently created an asp.net application with a membership login and registeration using the generic template in Visual Studios 2010. Below is how the template looks like within Visual Studios:
<a href="http://www.flickr.com/photos/79954191@N05/7345407648/" rel="nofollow">http://www.flickr.com/photos/79954191@N05/7345407648/</a></p>
<p>Then once I load the application it re-directs me to the login screen (as it should) but the problem is it's missing all the template / css elements. Below is a picture when loaded:
<a href="http://www.flickr.com/photos/79954191@N05/7160199089/" rel="nofollow">http://www.flickr.com/photos/79954191@N05/7160199089/</a></p>
<p>Thank you in advance!!</p>
| c# asp.net | [0, 9] |
937,719 | 937,720 | How to use Rotating Progress Bar? | <p>Hi i'm using Rotating Progress Bar in my Android Music Plyer Application....I'm not able to stop it. While working with horizontal Progress bar i used handler to stop and start it.
But while working with Rotating One, The progress bar goes into Infinite Loop.....</p>
<p>Can you please suggest method to stop the indefinite loop. Thanks in advance. </p>
| java android | [1, 4] |
344,829 | 344,830 | jQuery Search for Text in a Variable? | <p>I have a variable that contains some text, some html, basically can be a string. I need to search the variable for a specific string to process that variable differently if it is contained. Here is a snippet of what I am trying to do, does not work obviously :)</p>
<p><code>
$.each(data.results,
function(i, results) {</p>
<pre><code>var text = this.text
var pattern = new RegExp("^[SEARCHTERM]$");
if(pattern.test( text ) )
alert(text); //was hoping this would alert the SEARCHTERM if found...
</code></pre>
<p></code></p>
| javascript jquery | [3, 5] |
2,129,225 | 2,129,226 | Get location of java.home in C++ | <p>What would be the best way to get the location of java.home in my C++ app? Right now I'm getting it from the registry but am wondering if there's a better/easier/cleaner way.</p>
<p>Thanks,
Serge</p>
| java c++ | [1, 6] |
400,031 | 400,032 | Understanding javascript variables | <p>I am trying to better understand how variables are stored with JavaScript and jQuery.</p>
<p>Using the below code, a separate variable called default_value is created for each .default-value element. Is this correct? Can it only be accessed from within the anonymous function that created it? I've heard the term "namespace", and does it apply? Please provide any additional details so I can better understand what is going on.</p>
<p>Next, if I wanted to apply this to an element with a given ID instead of a group of a given class, then using each() appears unnecessary. How should it be modified.</p>
<p>Thanks!</p>
<pre><code>$('.default-value').each(function() {
var default_value = this.value;
$(this).focus(function() {
if(this.value == default_value) {
this.value = '';
}
});
$(this).blur(function() {
if($.trim(this.value) == '') {
this.value = default_value;
}
});
});
</code></pre>
| javascript jquery | [3, 5] |
2,865,787 | 2,865,788 | allow user to type in 1 or more quantity using jquery? | <p>I have the following code:</p>
<pre><code>quantity = $('div.ProductNameText').text().match(/Exclusive Handmade Box/g).length;
if(quantity)
{
$("#kitProduct #Quantity").attr("value", quantity);
}
</code></pre>
<p>I would like to make it so that the user can enter 1 or MORE.
At the moment it forces the quantity box to display ONLY 1.</p>
<p>Any ideas?</p>
<p>edit: more info: the div class is the product title and im just trying to check that product exists then allowing the user to enter 1 or MORE into the quantity text box.</p>
| javascript jquery | [3, 5] |
1,107,015 | 1,107,016 | How to resize div width with window scroll(jquery) - but only 1/3 of the divs width in the css | <p><a href="http://jsfiddle.net/95EtZ/1/" rel="nofollow">http://jsfiddle.net/95EtZ/1/</a></p>
<p>There is the problem half solved in action.</p>
<p>Right now it's set up with the containers width hardcoded in the javascript.</p>
<p>I need the js to grab the width of the container div - resize it with window scroll. but only resize it 1/3 of the #container divs width. </p>
<p>The way it's set up currently is, you have to set the script manually to the width of the div in the css. I want to be able to change the width of the div in the css and have the js grab it and only allow the user to have it resize 1/3 of it's width as they reach the very bottom of the window. </p>
| javascript jquery | [3, 5] |
2,378,812 | 2,378,813 | Problem in assigning js value to php variable | <p>How can i assign a javascript value to a php variable,</p>
<p>This is what i want to do:</p>
<pre><code><?php
$pag = echo "<script language ='javascript'>var pn = document.getElementById('t').value;
document.write(pn); </script>";
?>
</code></pre>
<p>But getting error as: Parse error: syntax error, unexpected T_ECHO</p>
<p>or is there any other way to do, but i want to assign that valur to php variable.
can somebody help here?</p>
| php javascript | [2, 3] |
395,034 | 395,035 | Get an array of list element contents in jQuery | <p>I have a structure like this:</p>
<pre><code><ul>
<li>text1</li>
<li>text2</li>
<li>text3</li>
</ul>
</code></pre>
<p>How do I use javascript or jQuery to get the text as an array?</p>
<pre><code>['text1', 'text2', 'text3']
</code></pre>
<p>My plan after this is to assemble it into a string, probably using <code>.join(', ')</code>, and get it in a format like this:</p>
<pre><code>'"text1", "text2", "text3"'
</code></pre>
| javascript jquery | [3, 5] |
2,468,746 | 2,468,747 | Running a custom function - settings.func is not a function | <p>I have written a jQuery plugin which I want to call a custom function on like so...</p>
<pre><code>(function($) {
$.fn.testPlugin= function(options) {
var settings = {
func: null
};
if (options) {
$.extend(settings, options);
}
settings.func();
};
})(jQuery);
</code></pre>
<p>In this case I want to run the <code>doSomething</code> function.</p>
<pre><code>$(document).ready(function(){
$('div').testPlugin({
func: 'doSomething'
});
});
function doSomething() {
alert('hello');
}
</code></pre>
<p>I always get the error <code>settings.func is not a function</code> so I am having to use:</p>
<pre><code>eval(settings.func+"()");
</code></pre>
<p>Intead of:</p>
<pre><code>settings.func();
</code></pre>
<p>Which is not ideal! Any ideas why I am getting this?</p>
| javascript jquery | [3, 5] |
348,631 | 348,632 | Where to keep a querystring parameter in session? | <p>Users will get to my site using a specific parameter, e.g. :
<a href="http://www.mysite.com/whatever/?keepTrackOfThisValue=foo" rel="nofollow">http://www.mysite.com/whatever/?keepTrackOfThisValue=foo</a>
or
<a href="http://www.mysite.com/who/cares/?keepTrackOfThisValue=bar" rel="nofollow">http://www.mysite.com/who/cares/?keepTrackOfThisValue=bar</a></p>
<p>I would like to store the value of this peculiar parameter in Session everytime I found it in the QueryString. I'm currently using the Session_Start event in Global.asax in order to store this but I would like to override the value each time the parameter value change, which is not possible my way.</p>
<p>Where would you do this ?</p>
| c# asp.net | [0, 9] |
3,867,464 | 3,867,465 | Adding a default value in dropdownlist after binding with database | <p>I binded my ddl to my database as below, but how can I add a default text on top of the binded values so that it appears as:</p>
<pre><code>Select Color ---> default text
Red ---> database value
Blue ---> database value
Green ---> database value
</code></pre>
<p>Code:</p>
<pre><code> DropDownList ddlSize = (DropDownList)FormView_Product.Row.Cells[0].FindControl("ddlSize");
CommerceEntities db = new CommerceEntities();
ddlColor.DataSource = from p in db.ProductTypes
where p.ProductID == pID
orderby p.Color
select new { p.Color };
ddlColor.DataTextField = "Color";
</code></pre>
<p>Thanks!</p>
| c# asp.net | [0, 9] |
2,515,392 | 2,515,393 | How to get div content which changed by javascript? | <p>I have a div on page, which content will change by javascript, I want get its value from c# code. but, its always returns empty or initial value, not changed value.</p>
<p>If I changed from div to hidden, it works well. I don't know why?</p>
<p>here is the code:</p>
<pre><code>
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
foo = function()
{
var d = document.getElementById('divTest');
d.innerHTML = 'my value';
var e = document.getElementById('hiddenTest');
e.value = 'my value';
}
</script>
</head>
<body>
<form id="form1" runat="server" >
<div>
<div id="divTest" runat="server" />
<input type="hidden" runat="server" id="hiddenTest" />
<input type="button" value="test" onclick="javascript:foo();" />
<asp:Button ID="btnTest" runat="server" Text="ASP.NET Button" OnClick="OnbtnTest" />
</div>
</form>
</body>
</code></pre>
<p>here is the c# code:</p>
<pre><code>
protected void OnbtnTest(object sender, EventArgs e)
{
Response.Write( string.Format("alert('{0}');", hiddenTest.Value) );
}
</code></pre>
| asp.net javascript | [9, 3] |
3,236,148 | 3,236,149 | Omitting special characters from the string using Jquery | <p>I have to implement some type of pixel for analytic and it requires passing a session Id in the url string. My sessionID contains special characters. It looks something like this <strong>BFhGlzT6FBkDr2Zndp0!-1309</strong>
I need to remove the (-!) characters from this string, how do I achieve this using jquery? I need to make sure jquery remove those characters before it render otherwise it will not report a visit to analytic.</p>
<p>Guys thanks your help but maybe I need to explain bit further, my pixel code look some what like this " </p>
</p>
<p>img src="https://sometime.com/png?org_id=k8vif92&session_
id=T6PtTyRSqhGPYBhp84frwth67n6fL7wcLBFhGlzT6FBkDr2Zndp0!-130901808!1319637471144&m=2&m=2" alt=""></p>
<p>Before this pixel fire off, I need to replace the character in the sessionId string to remove !- and keep in mind session id will change every time there is a new session. I need a code that is generic so it works no matter what session id is, it needs to delete special characters from it.</p>
| javascript jquery | [3, 5] |
5,681,709 | 5,681,710 | Returning the gridview to its original vertical location after the rowediting postback | <p>Using a combination of asp.net, jQuery, and c# and stored procedures.</p>
<p>I have successfully created a gridview, which I then apply jQuery datatables plugin to provide text column filtering (I disabled most of the other datatables function/settings off)). </p>
<p>The Gridview works as expected and when I make use of the <code>RowEditing</code> and <code>RowUpdating</code> events also, IE the editable fields update nicely.</p>
<p>If the user clicks and edits, then clicks the update link, the database is updated and the page reloads. now if that person has scrolled down say record 50 (half way down for instance) in order to locate and then edit that record, then after the page refresh, the user then has to scroll back down to find that same record.</p>
<p>I'm trying to find a way of returning the user to the same location (record) that they had just edited before the page refresh after the page refresh.</p>
| c# jquery asp.net | [0, 5, 9] |
4,942,531 | 4,942,532 | how to check if a div has a class out of multiple classes in jquery | <p>I have a dynamic div which can generate over 1000 different classes... its a wordpress theme.</p>
<p>Now i am wanting to check if a div has one of 52 classes.</p>
<p>.bg1, .bg2, .bg3 etc etc...</p>
<p>I know that you can use hasClass();</p>
<p>But how do I check for each one and then get the value. For instance here is the div as it stands</p>
<pre><code><div id="wordpresspost" class="bodyclass post-id-193 wordpresswrap bg1"></div>
</code></pre>
<p>Please bare in mind I dont really know jquery :D</p>
<p>I was thinking it would be something like this but logically this does not make sense to me :(</p>
<pre><code>var divclass = $("#wordpresspost").hasClass('bg1, bg2, bg3, bg4, bg5, bg6');
if(divclass == true){
var divsclass = $(this);
}
</code></pre>
<p>I need to know the class because I want to change it, for instance i would like to .removeClass and then addClass a new class without changing the others as they are dynamic</p>
<p>Thanks in advance for the advice :)</p>
| javascript jquery | [3, 5] |
5,699,684 | 5,699,685 | jQuery submit form calls a function with ajax | <pre><code>jQuery(document).ready(function(jQuery) {
function checkEmail(email){
jQuery.post('someroute.php',
{email:eamil},
function(data){
if(data==error){
return false;
}
);
return true;
}
jQuery('#myform').submit(function(){
// como code and at the momment this
var result true;
//then I check email
var email = ('#myemail').val();
result = checkEmail(email);
return result;
});
</code></pre>
<p>The problem is this, a <code>checkEmail</code> function, first return true, and then return value <code>jQuery.post</code> function. Why?</p>
<p>I checked and in submit, first return true, and if you stop submit then you release that post return the value. Post works fine, but I don't understand why function <code>checkEmail</code> does not wait until post returns the value and goes on until the end to return true.</p>
| javascript jquery | [3, 5] |
3,192,133 | 3,192,134 | Disabling/enabling a button based on multiple other controls using Javascript/jQuery | <p>I have a bunch of controls:</p>
<p><img src="http://i.stack.imgur.com/p06CK.png" alt="form"></p>
<p>When a user clicks the Generate button, a function uses all of the values from the other controls to generate a string which is then put in the Tag text box.</p>
<p>All of the other controls can have a value of <code>null</code> or empty string. The requirement is that if <strong>ANY</strong> of the controls have no user entered value then the Generate button is disabled. Once <strong>ALL</strong> the controls have a valid value, then the Generate button is enabled.</p>
<p>What is the best way to perform this using Javascript/jQuery?</p>
| javascript jquery | [3, 5] |
3,942,972 | 3,942,973 | How to get div content which changed by javascript? | <p>I have a div on page, which content will change by javascript, I want get its value from c# code. but, its always returns empty or initial value, not changed value.</p>
<p>If I changed from div to hidden, it works well. I don't know why?</p>
<p>here is the code:</p>
<pre><code>
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
foo = function()
{
var d = document.getElementById('divTest');
d.innerHTML = 'my value';
var e = document.getElementById('hiddenTest');
e.value = 'my value';
}
</script>
</head>
<body>
<form id="form1" runat="server" >
<div>
<div id="divTest" runat="server" />
<input type="hidden" runat="server" id="hiddenTest" />
<input type="button" value="test" onclick="javascript:foo();" />
<asp:Button ID="btnTest" runat="server" Text="ASP.NET Button" OnClick="OnbtnTest" />
</div>
</form>
</body>
</code></pre>
<p>here is the c# code:</p>
<pre><code>
protected void OnbtnTest(object sender, EventArgs e)
{
Response.Write( string.Format("alert('{0}');", hiddenTest.Value) );
}
</code></pre>
| asp.net javascript | [9, 3] |
117,250 | 117,251 | Infinite Loop? Can't see why | <p>I have a function that takes in a roleID(as an int), and compares it to a multidimensional array to see if that array contains that roleID. if it does, it sets a bool to true and breaks. if it doesn't, the loop never exits. I'm hoping this is something stupid that I'm overlooking, but I've had a few different people look it over now. </p>
<p>The size of the userRoles array that I am testing with right now is 3. I can print userRoles.GetLength(0) and it says 3, and that matches whats in the database.</p>
<p>here's the code:</p>
<pre><code>public bool IsInRole(int roleID)
{
bool inRole = false;
int i = userRoles.GetLength(0);
for (int j = 0; j < i; j++)
{
if (Convert.ToInt32(userRoles[j, 0]) == roleID)
{
inRole = true;
break;
}
}
return inRole;
}
</code></pre>
<p>TIA,<br>
Chris</p>
| c# asp.net | [0, 9] |
1,591,153 | 1,591,154 | Convert sharepoint list number into a string? | <p>I currently call data from column "Prod" which contains numbers, i then set this a variable to return data in my html table. These numbers have text values (e.g. 1 = cash). How can set these numbers as text strings ?</p>
| javascript jquery | [3, 5] |
3,038,730 | 3,038,731 | What does this jQuery code mean? | <p>Can anyone explain the meaning of this code?</p>
<pre><code>if (data.result) {
$('ul#intlist').append(data.content);
}
</code></pre>
| javascript jquery | [3, 5] |
1,224,525 | 1,224,526 | ObjectDataSource, CustomValidators and DataBinding | <p>I have an ObjectDataSource that is bound to a GridView. The object accepts a parameter from a TextBox. The problem I have is when I use a CustomerValidator with a ServerValidate event, the ObjectDataSource would still attempt to perform a DataBind despite the fact the the customer validator has returned false.</p>
<p>The following is the code in the ASPX page.</p>
<pre><code><asp:TextBox ID="sittingDate" runat="server" />
<asp:CustomValidator ID="DateValidator" runat="server" ControlToValidate="sittingDate" OnServerValidate="DateValidator_ServerValidate" />
<asp:ObjectDataSource ID="BatchDataSource" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="GetOrCreateSittingBatch" TypeName="BatchBLL" OnSelected="BatchDataSource_Selected" OnSelecting="BatchDataSource_Selecting">
<SelectParameters>
<asp:ControlParameter ControlID="sittingDate" Name="batchDate" PropertyName="Text"
Type="DateTime" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:GridView ID="BatchGridView" runat="server" DataSourceID="BatchDataSource">
</code></pre>
<p>In the Custom Validator I have</p>
<pre><code>protected void DateValidator_ServerValidate(object source, ServerValidateEventArgs args)
{
//Ensure that the entered data is a date.
string input = args.Value;
DateTime result;
args.IsValid = DateTime.TryParse(input.TrimEnd(), out result);
}
</code></pre>
<p>How do I stop the ObjectDataSource from data binding when validation has failed?</p>
| c# asp.net | [0, 9] |
5,232,558 | 5,232,559 | Android crash report to my mail | <p>I want to report a log when the application crash. Like that <strong>null pointer exception</strong> ,I want to send this to my server or mail. How can I implement this ?</p>
<p>I found something on stack overflow but that asks to user to report something.I want to send report in background.</p>
| java android | [1, 4] |
1,745,298 | 1,745,299 | Why is my exception handling code not handling exceptions? | <p>I have some C# code that pulls down a remote website using the HttpWebRequest class. I'm handling errors with a try/catch, but some errors (like Webrequest and IOException) don't seem to be getting "caught" with the way I have it setup:</p>
<pre><code>try
{
StartScrap("http://www.domain.com");
}
catch (Exception ex)
{
LogError(ex.ToString();
}
private void StartScrap(string url)
{
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse();
if (response.StatusCode == HttpStatusCode.OK)
{
Stream responseStream = response.GetResponseStream();
string responseText = String.Empty;
using (StreamReader readerStream = new StreamReader(responseStream, System.Text.Encoding.UTF8))
{
responseText = readerStream.ReadToEnd(); <-- I will sometimes get a Webexception error here that won't get caught above and stops the code
}
}
}
</code></pre>
<p>Update: There is more to the code, so maybe it is something outside of the code I posted? I am basically using this code in a Windows Application on a form that has a NotifyIcon. I'm using the Timer class to run the code at a certain timer interval. This is how I have it setup:</p>
<pre><code> public TrayIcon()
{
InitializeComponent();
}
private void TrayIcon_Load(object sender, EventArgs e)
{
try
{
StartScrap("http://www.domain.com");
}
catch (Exception ex)
{
LogError(ex.ToString());
}
finally
{
StartTimer();
}
}
private void StartTimer()
{
Timer Clock = new Timer();
Clock.Interval = 600000;
Clock.Start();
Clock.Tick += new EventHandler(TrayIcon_Load);
}
</code></pre>
| c# asp.net | [0, 9] |
2,614,803 | 2,614,804 | Changing Labels Text on MasterPage file | <p>Hi im unable to change the Text properties of my labels that are on the MasterPage and I don't know todo it this is what I've come up with but it doesn't work. It finds the control but doesn't change the text any ideas.</p>
<pre><code> MasterPage master = Page.Master;
AjaxControlToolkit.ModalPopupExtender popup1 =
master.FindControl("ModalPopupExtender1") as AjaxControlToolkit.ModalPopupExtender;
Label lblMessage = master.FindControl("lblMessage") as Label;
lblMessage.Text = msg;
Label MessageStatus = master.FindControl("lblMessageStatus") as Label;
MessageStatus.Text = msgStatus;
popup1.Show();
</code></pre>
| c# asp.net | [0, 9] |
2,944,063 | 2,944,064 | How to select all rows into table | <p>I have a HTML table with pagination. I use this JavaScript to select all rows into the table:
Main checkbox:</p>
<pre><code><h:column id="selection_column">
<f:facet name="header">
<h:selectBooleanCheckbox class="checkall"/>
</f:facet>
</h:column>
</code></pre>
<p>The JavaScript code:</p>
<pre><code>$(window).load(function () {
$(document).delegate(".checkall", "click", function(event) {
$(this).closest("table").find(':checkbox').attr('checked', this.checked);
});
});
</code></pre>
<p>The problem is that when I use it only the rows into the first page are selected. The rows into the second page and so on are not selected. How I can fix this?</p>
<p>EDIT</p>
<p>I have an idea but I don't know is it going to work: I can create a checkbox(lets call it main checkbox) which when it's selected all rows are selected. I tested it - once selected this checkbox is always selected when I shift the pages. But I need a JavaScript code which checks during load time if the main checkbox is selected then all checkboxes are selected. Can you help me to rewrite the JavaScritp this way, please?</p>
| javascript jquery | [3, 5] |
2,780,689 | 2,780,690 | How can I change the text of a <span> element? | <p>I have a toggle button that I'm adding to an iFrame:</p>
<pre><code><script>
$('#list div').each(function(){
$(this).append('<span class="togglebutton">Maximize</span>');
});
$("span.togglebutton").click(function() {
$(this).closest("li").children("div").toggleClass("maximized");
});
</script>
</code></pre>
<p>How can I change the toggle between the text Maximize/Minimize when the toggleClass is maximized?</p>
| javascript jquery | [3, 5] |
1,992,639 | 1,992,640 | Why isn't this code jquery working? | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1970793/changing-password-field-to-text-with-checkbox-with-jquery">changing password field to text with checkbox with jquery</a> </p>
</blockquote>
<p>The code is supposed to check if a checkbox is checked, then change a password field from password to regular text and vice versa. </p>
<pre><code>$('#cpassword_lf').change(function(){
if($('#cpassword_lf').is(':checked'))
{
$('#password_loginform').attr('type', 'text');
}
else
{
$('#password_loginform').attr('type', 'password');
}
});
</code></pre>
| javascript jquery | [3, 5] |
5,922,132 | 5,922,133 | some advice on how to write a window.resize function? | <p>Im trying to write a function that resizes the css widths of some elements when the browser window is resized, right now I dont seem to be getting things right and would love it if someone could help me out on where Im going wrong, my code so far is:</p>
<pre><code>function windowResize() {
$('#content').css('width', $windowWidth);
$('#div.mySection').css('width', $windowWidth);
$('#div.mySection .story').css('width', $windowWidth);
}
$(document).ready(function() {
var $windowWidth = $(window).width();
$(window).resize(function() {
windowResize();
});
});
</code></pre>
<p>Im not sure if I have placed everything in its correct place, if someone could advise me on how I can make this code much better it would be great.</p>
<p>Thanks
Kyle</p>
| javascript jquery | [3, 5] |
5,778,954 | 5,778,955 | Can I convert a php $_POST variable into a jquery variable? | <p>I want to know can I convert a php $_POST variable into a jquery variable. I have php variable below:</p>
<pre><code><?php $postduration = $_POST['durationChosen']; ?>
</code></pre>
<p>Can I convert the php variable above into a jquery variable?</p>
<p>Thanks</p>
| php jquery | [2, 5] |
107,472 | 107,473 | Android Check If Sim is Locked | <p>I have this running at the moment. It keeps outputting the value 5 which means SIM_READY</p>
<pre><code>TelephonyManager telMgr = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
int sim = telMgr.getSimState();
String sim2 = Integer.toString(sim);
Log.d("SIM STATE", sim2);
</code></pre>
<p>I have run this on a few phones some that I know are locked and some that are not.</p>
<p>Is there something that I am missing as I thought this approach would output if the sim was locked by the network.</p>
<p>Cheers</p>
| java android | [1, 4] |
863,733 | 863,734 | Where are all the standard Android icon resources? | <p>I have just started writing my first ever Java/Android application, so forgive the total n00b question.</p>
<p>How do you access the the standard operating system icons such as search icon/menu icon etc? They are not in the res/drawable folder where I would expect to find them. Are they available as part of the SDK or must you download them seperately?</p>
<p><strong>EDIT</strong></p>
<p>Maybe you can help me further - I am getting the following error (repeated on):</p>
<pre><code>[2011-09-08 19:59:47 - TweetTab] C:\Users\Dan\workspace\TweetTab\res\menu\options_menu.xml:4: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/ic_menu_search').
</code></pre>
<p>However, the icon is not empty, the xml looks like this:</p>
<pre><code><?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/search"
android:icon="@drawable/ic_menu_search"
android:title="@string/search"/>
</menu>
</code></pre>
<p>Am I missing something?</p>
<p><strong>SOLVED</strong></p>
<p>I changed <code>android:icon="@drawable/ic_menu_search"</code> to <code>android:icon="@android:drawable/ic_menu_search"</code> and it could then find the icon.</p>
| java android | [1, 4] |
1,974,778 | 1,974,779 | How can send all request from client to single process in server.? | <p>I am developing the web site, It consists of device name list and related Build Button. When one click the Build button the one process will run in server. When more than ten user click the Build button more processes will create at that server will hang. How can send all request from client to single process in server.</p>
| c# asp.net | [0, 9] |
4,890,313 | 4,890,314 | trigger/mimick click even on DOM ready | <p>I ahve this jQuery that is called on click,</p>
<pre><code>$("#overflow-cntr img").click(function(){
$this = $(this);
$("#bigpic-cntr canvas").remove();
$("#bigpic-cntr #bigpic").css("display", "block");
window.setTimeout(function(){
EFFECTS[$this.attr("id")]();
}, 30);
});
</code></pre>
<p>How would I trigger this on DOM ready instead of on click?</p>
| javascript jquery | [3, 5] |
4,536,750 | 4,536,751 | Android program stops working after a few uses | <p>I made my first Android Java program, conversion between celsius and fahrenheit. This works good at first, but after a few conversions it won't convert them. If I change the values and press the button, it won't update the fields. </p>
<p>Here's the code.</p>
<pre><code>package fi.peltoset.mikko.celfahr;
import java.text.DecimalFormat;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
public class Celfahr extends Activity {
private double celsius = 0.0;
private double fahrenheit = 0.0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button celsiusasteiksi = (Button) findViewById(R.id.celsiusasteiksi);
Button fahrenheiteiksi = (Button) findViewById(R.id.fahrenheitasteiksi);
celsiusasteiksi.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
fahrenheit = Double.parseDouble(((EditText)
findViewById(R.id.fahrenheitkentta)).getText().toString());
((EditText) findViewById(R.id.celciuskentta)).setText(
String.valueOf(pyorista((fahrenheit - 32) / 1.8)));
}
});
fahrenheiteiksi.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
celsius = Double.parseDouble(((EditText) findViewById(R.id.celciuskentta))
.getText().toString());
((EditText) findViewById(R.id.fahrenheitkentta))
.setText(String.valueOf(pyorista(celsius * 1.8 + 32)));
}
});
}
double pyorista(double d) {
DecimalFormat df = new DecimalFormat("#.#");
return Double.valueOf(df.format(d));
}
}
</code></pre>
<p>Sorry about bad language there (Finnish, heh...). </p>
| java android | [1, 4] |
1,456,808 | 1,456,809 | find matching image on click of part of the image | <p>I am looking for a bestway to find the matching image (out of set of stored images) on click of the part of image.</p>
<p>For example if I have image of person holding pen, if I click on pen portion of the image, i should be able to retrieve the pen image from the set of predefined images in this case i should be able to retrieve pen image if exists.</p>
<p>I am willing to know what java/javascript based framework is suitable for this and best way of doing it.</p>
<p>Thanks in advance for all the help.</p>
| java javascript jquery | [1, 3, 5] |
1,924,799 | 1,924,800 | First char of String, use as a condition... (Java, Android) | <p>So I want to check if the First character of a String is a "!". This works great, but if I use it as a condition it's wrong everytime. Look at my example:</p>
<pre><code>next.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
EditText num = (EditText) findViewById(R.id.number);
String text = num.getText().toString();
int len = text.length();
String help = text;
String first = String.valueOf(help.charAt(0));
if (len == 7 && first == "!") {
int value = text;
//...
} else {
int value2 = text;
}
}
});
</code></pre>
<p>Thanks...</p>
| java android | [1, 4] |
2,293,261 | 2,293,262 | What's the difference between 'mouseup' and 'click' events? | <p>Using jQuery, I often like to use <code>mousedown</code> and <code>mouseup</code> events in conjunction for pushable buttons.</p>
<p>However, in every case I've used the <code>mouseup</code> event, binding the <code>click</code> event instead seemed to produce identical results.</p>
<p>Is there any substantial difference between the two methods below?</p>
<pre><code>// Method 1
$('.myButton').bind('click', callback);
// Method 2
$('.myButton').bind('mouseup', callback);
</code></pre>
<p><em>Please note I'm seeking a technical explanation on the differences between using both methods. This has no relation to the question that has been flagged as a dupe: <a href="http://stackoverflow.com/questions/12572644/differentiate-click-vs-mousedown-mouseup">Differentiate click vs mousedown/mouseup</a></em></p>
| javascript jquery | [3, 5] |
773,002 | 773,003 | Check and process the div block after its loading | <p>In my HTML, one div block(whose id looks like kdsm_32532535) is dynamically created after about 15-20 seconds of dom loading. I want to style this block with javascript with below code. </p>
<pre><code><script type="text/javascript">
$(document).ready(function(){
if($("div[id^='kdsm_']").length > 0){
$(this).css({'margin':'20px','border':'1px dotted red;'});
}
/* OR below code. None of them working :( */
$("div[id^='kdsm_']").css({'margin':'20px','border':'1px dotted red;'});
});
</script>
</code></pre>
<p>If I would do this in document.ready, it will not work because this div block doesn't exist on DOM ready.</p>
<p>How do i check continuously within interval of fraction, whether this div block is loaded or not ?</p>
| javascript jquery | [3, 5] |
1,269,987 | 1,269,988 | How to call a function repeatedly with 5 seconds delay? (ASP.NET with C#) | <p>I have a some piece of code in Default.aspx.cs file which is written within Page_Load function like this:</p>
<pre><code>protected void Page_Load(object sender, EventArgs e)
{
//code stars here
...
//code ends here
}
</code></pre>
<p>What i want is that this piece of code will run continously with 5 seconds delay. How can I do this here?
Thank You.</p>
| c# asp.net | [0, 9] |
1,800,045 | 1,800,046 | How to increase the height of combo box in asp.net | <p>I have a drop down list in asp.net. I want to increase its height. please suggest, how to icrease it.</p>
| c# asp.net | [0, 9] |
3,164,869 | 3,164,870 | How to open a file | <p>In my project I am trying to open a file. I am storing all the path of the file name along with extensions like .exe,.doc,.xml,etc.....in my database. I am fetching that path and trying to open it.In this I like to open it as a popup window to ask like OPEN,SAVE,CANCEL . Can any one help me to solve this problem. Here is the code:</p>
<pre><code>private void OpenMyFile()
{
string path = GetPath() + ViewState["fileopen"];
FileInfo file = new FileInfo(ViewState["fileopen"].ToString());
SqlConnection con = new SqlConnection(@"server=servername;database=DBNAME;uid=ID;pwd=PWD;max pool size=250;Connect Timeout=0");
con.Open();
cmd = new SqlCommand("select * from filetypemaster where extension='" + file.Extension + "'", con);
myReader = cmd.ExecuteReader();
if (myReader.Read())
{
Response.ContentType =(String)myReader["CONTENT_TYPE"];
myReader.Close();
}
else
{
myReader.Close();
Message("Cannot open selected file");
return;
}
Response.WriteFile(path);
Response.End();
con.Close();
}
</code></pre>
<p>Thanks in advance</p>
| c# asp.net | [0, 9] |
2,864,110 | 2,864,111 | Why isn't my EventHandler firing? (Asp.Net C#) | <p>I am programatically making some LinkButtons, and they worked fine for a while, but now the events aren't firing and I can't figure out why?</p>
<p>This is what makes the button:</p>
<pre><code>protected void MakeUploadButton(attachment a, PlaceHolder ph)
{
LinkButton lb = new LinkButton()
{
Text = "Upload New " + a.attachment_type.type_name,
CssClass = "button right",
ID = "lb" + a.attachment_type.file_tag,
CommandArgument = a.attachment_type_id.ToString(),
CommandName = a.attachment_type.type_name,
CausesValidation = false
};
lb.Click += new EventHandler(showModalPopup);
lb.DataBind();
ph.Controls.Add(lb);
}
</code></pre>
<p><strong>ShowModalPopup</strong> exists and all, but when I run it in Debug, nothing inside of it ever fires... for some reason, it is not getting called. Any ideas?</p>
| c# asp.net | [0, 9] |
4,814,888 | 4,814,889 | jquery tabs, onload event on first tab | <p>I'm using JQuery tabs plugin and ajax json mvc to retrieve data inside these tabs.
Everything works ok with onclick events but I need to load content inside first tab as soon as page load.
Here's the code</p>
<pre><code><script>
$(function () {
$("#tabs").tabs();
// how to add onload event for Tab One GetTabData(id);
$(".tabLink").click(function (event) {
var id = $(this).parent().text();
GetTabData(id);
});
});
</script>
<div class="demo">
<div id="tabs">
<ul>
<li><a href="#tab-1" tabId="1" class="tabLink">Tab One</a></li>
<li><a href="#tab-2" tabId="2" class="tabLink">Tab Two</a></li>
<li><a href="#tab-3" tabId="3" class="tabLink">Tab three</a></li>
<li><a href="#tab-4" tabId="4" class="tabLink">Tab four</a></li>
</ul>
<div id="tab-1">
</div>
<div id="tab-2">
</div>
<div id="tab-3">
</div>
<div id="tab-4">
</div>
</div>
</div>
</code></pre>
| javascript jquery | [3, 5] |
2,511,597 | 2,511,598 | jQuery Sliding Tabs: control options- NEXT/PREVIOUS | <p>I am trying to control tabs with a next/previous options. This is my <a href="http://jsfiddle.net/kFNtX/1/" rel="nofollow">JSFIDDLE EXAMPLE</a>. I have spent hours researching and found the method NEXT/PREVIOUS function in this <a href="http://css-tricks.com/jquery-ui-tabs-with-nextprevious/" rel="nofollow">WEBSITE</a>. I have replicated everything in my example but i am not getting any results. Can someone look at my <a href="http://jsfiddle.net/kFNtX/1/" rel="nofollow">EXAMPLE</a> and tell me what I am doing wrong?</p>
<p><strong>NEXT/PREVIOUS jquery/js</strong></p>
<pre><code><script>
$(document).ready(function() {
var $tabs = $('#st_horizontal').tabs();
$(".st_tab_view").each(function(i) {
var totalSize = $(".st_tab_view").size() - 1;
if (i != totalSize) {
next = i + 2;
$(this).append("<a href='#' class='next-tab mover' rel='" + next + "'>Next Page &#187;</a>");
}
if (i != 0) {
prev = i;
$(this).append("<a href='#' class='prev-tab mover' rel='" + prev + "'>&#171; Prev Page</a>");
}
});
$('.next-tab, .prev-tab').click(function() {
$tabs.tabs('select', $(this).attr("rel"));
return false;
});
});
</script>
</code></pre>
| javascript jquery | [3, 5] |
369,382 | 369,383 | Creating modal window through jquery | <p>I am trying to create a mask (modal) on my whole website and for this i tried :</p>
<p><strong>css</strong></p>
<pre><code> #mask
{
position:absolute;
z-index:9000;
background-color:#000;
display:none;
}
</code></pre>
<p><strong>js</strong></p>
<pre><code> $('body').append(' <div id="mask"></div> ');
var maskHeight = $(document).height();
var maskWidth = $(window).width();
$('#mask').css({ 'width': maskWidth, 'height': maskHeight, top: 0, opacity: 1 });
</code></pre>
<p>it works fine, but the mask is only on the visible part of my website, when i <code>scrolls down</code> there is no mask.Can anybody tell me the solution for this?</p>
| javascript jquery | [3, 5] |
3,915,553 | 3,915,554 | how to put a Location object in Parcelable | <p>I have a Location object in one of my other Venue object that implements Parcelable. How do I serialize this correctly in my writeToParcel method implementation? So here's some code:</p>
<pre><code>public class Venue implements Parcelable{
public String id;
public String name;
public String address;
public Location location;
public String city;
public String state;
public String country;
public String postalCode;
@Override
public int describeContents() {
// TODO Auto-generated method stub
return 0;
}
@Override
public void writeToParcel(Parcel desc, int flags) {
desc.writeString(id);
desc.writeString(state);
desc.writeString(name);
desc.writeString(address);
desc.writeString(postalCode);
desc.writeString(country);
desc.writeString(city);
//I am still missing on a way to serialize my Location object here
}
}
</code></pre>
| java android | [1, 4] |
4,030,680 | 4,030,681 | Setting Navigation url to hyperlink dynamically | <p>Im trying to set navigation url to a hyperlink which is inside a gridview.</p>
<p>Im creating the table inside the gridview using a literal in backend c# code.</p>
<p>The code now look like inside GridviewRowDataBound(object sender, GridViewRowEventArgs e)</p>
<pre><code>Literal.Text += "<asp:HyperLink ID='hlContact' runat='server' NavigateUrl='#'>Contact </asp:HyperLink>";
</code></pre>
<p>I want to set the navidation inside this code</p>
<p>If anyone have an idea it will be helpful</p>
<p>Thanks</p>
| c# asp.net | [0, 9] |
3,649,075 | 3,649,076 | How can I easily manipulate the state of page elements using PHP? | <p>In ASP.NET </p>
<ul>
<li><p>I can show a hidden panel that contains many controls by using simple command such as:</p>
<pre><code>Panel.Visible = CheckBox1.Checked;
</code></pre></li>
<li><p>I can disable a Button easily:</p>
<pre><code><asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Submit" Enabled="false" />
</code></pre></li>
</ul>
<p>But now I'm looking at using PHP. Does it offer a similarly simple technique for hiding / disabling page elements?</p>
| php asp.net | [2, 9] |
2,574,822 | 2,574,823 | Is it possible to implement html5 <video> tag in asp.net 2010 web page | <p>I tried to implement html5 <code><video></code> tag in asp.net 2010 web form (ex: <a href="http://localhost/SampleWebsite/test.aspx" rel="nofollow">http://localhost/SampleWebsite/test.aspx</a>) but its not supporting.</p>
<p>I tried in all browsers like IE9, latest Mozilla, Chrome, Opera.</p>
<p>Its working fine in pure HTML. </p>
<p>Here one thing even if I take the HTML file in my visual studio solution (ex: <a href="http://localhost/Samplewebsite/test.html" rel="nofollow">http://localhost/Samplewebsite/test.html</a>) its not working.</p>
<p>Can any one please provide your valuable suggestions and if possible provide with example.</p>
<p>Sorry guys the link I provided is dummy link just for your information please verify the below .aspx code that I implement in .aspx page in .net framework 4.0 with visual studio 2010</p>
<pre><code> <video width="320" height="240" controls="controls">
<source src="movie.ogg" type="video/ogg" />
<source src="videos/Test-movie.mp4" type="video/mp4" />
</video>
</code></pre>
<p>I struck with another one is
Is it possible to prepare a Images slideshow using html5 tag
if possible can any one please provide the complete details with example.
Thanks in advance.</p>
| c# asp.net | [0, 9] |
5,671,500 | 5,671,501 | Using jQuery to replace each ' with &apos | <p>I can't seem to find the correct way to take some html being returned from the server, replace each ' with &apos and finally - append the new html to the DOM.</p>
<p>Before the modification, the below works just fine to append the html (not altered)</p>
<pre><code>$(xhtml).find("#inner").appendTo("#appendTD");
</code></pre>
<p>But now that I want to alter the xhtml first, the below doesn't seem to work as expected</p>
<pre><code>var html = $(xhtml).find("#gridFormInformation").find("'").replaceWith("&apos;");
$(html).find("#inner").appendTo("#appendTD");
</code></pre>
<p>As you can see from the above, I want to replace each ' w/ the &apos inside a table element w/ the id #gridFormInformation. Part of this doesn't work because the html obj i'm trying to append is a jQuery object (not the simple string that I append in the first working example)</p>
<p>Any help?</p>
| javascript jquery | [3, 5] |
5,603,178 | 5,603,179 | php file_put_contents can't create files on apache server directory | <p>I have installed apache server on a linux fedora machine
and I put the following test.php and test.html on var/www/html
but when I open the 127.0.0.1/test.html on firefox
the test.php doesn't create the text.txt file, let alone write the string to the file
and the there is also no output for "echo $var" </p>
<p>the error is </p>
<pre><code>Warning: file_put_contents(test.txt): failed to open stream: Permission denied in /var/www/html/getdata.php on line 7
</code></pre>
<p>the permission for the directory is:</p>
<pre><code>drwxr-xr-x. 2 root root 4096 Nov 6 14:14 html
</code></pre>
<p>test.php:</p>
<pre><code><?php
$v="x";
$fname='test.txt';
$rv=file_put_contents($fname,$v);
echo $rv;
echo $v;
?>
</code></pre>
<p>the test.html is so complex coz I planned to write something complex to a file on the server, but since there is some problem, I simplified the test.php</p>
<p>test.html:</p>
<pre><code><!DOCTYPE html>
<html>
<body>
<form id="yourFormID" method="POST" action="/getdata.php" ></form>
<script>
function sendArray( theArray )
{
var frm = document.getElementById('yourFormID');
fld = document.createElement("INPUT");
fld.name ="data";
fld.type = "hidden";
fld.value = JSON.stringify(theArray);
frm.appendChild(fld);
frm.submit();
}
var yourArray = [0.000023323,0.00001292,0.00003323];
sendArray( yourArray );
</script>
</body>
</html>
</code></pre>
| php javascript | [2, 3] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.