Unnamed: 0
int64 302
6.03M
| Id
int64 303
6.03M
| Title
stringlengths 12
149
| input
stringlengths 25
3.08k
| output
stringclasses 181
values | Tag_Number
stringclasses 181
values |
---|---|---|---|---|---|
4,679,140 | 4,679,141 | jquery swap content between two DOM elements | <p>I have two span tags. I'd like to swap the content between them once the user clicks on one of them. If the user clicks once more, swap the content again and so on.</p>
<pre><code>$(".sectionTitleText").livequery("click", function () {
var editor = $(this).attr("data-edit-id");
var viewer = $(this).attr("data-view-id");
//Swap code
});
</code></pre>
| javascript jquery | [3, 5] |
3,910,838 | 3,910,839 | Go back a page onload? | <p>Is there a way for a page to go back a page onload using javascript or php?</p>
| javascript jquery | [3, 5] |
3,446,056 | 3,446,057 | How to set page title in single page site | <p>Hi I have a single page ajax website the single page is basically loading all the pages I would like to set the page title depending on the current view.</p>
<p>I have tried using this </p>
<pre><code><title><!--TITLE--></title>
<?
$pageContents = ob_get_contents (); // Get all the page's HTML into a string
ob_end_clean (); // Wipe the buffer
// Replace <!--TITLE--> with $pageTitle variable contents, and print the HTML
echo str_replace ('<!--TITLE-->', $pageTitle, $pageContents);
?>
</code></pre>
<p>I have then added the titles to the page links like this </p>
<pre><code> <li class="menu-link">
<a href="index.php?page=home"><img src="images/menu/home.png" width="72" height="72" alt="Home" />Home</a>
<?php $pageTitle = 'Saunders-Solutions Freelance Design and Development'; ?>
</li>
<li class="menu-link">
<a href="index.php?page=about"><img src="images/menu/about.png" width="72" height="72" alt="About" />About</a>
<?php $pageTitle = 'About Saunders-Solutions Freelance Design and Development'; ?>
</li>
</code></pre>
<p>however it always shows the same title for all pages any help appreciated </p>
| php jquery | [2, 5] |
235,866 | 235,867 | Get parent class property | <p>I have a javascript class that has a method that uses jQuery to send an Ajax request and handle the response.</p>
<p>The problem I am having is that I can't figure out how to get the properties of the initial, parent class from within the jQuery functions. I have tried <code>$(this).parent()</code> but this doesn't get what I need for some reason.</p>
<p>My code is below. Can anyone tell me how to get to the base class from this loop?</p>
<pre><code>function companiesPage()
{
this.childCategoriesSelectid = '#childCategoryid';
this.setChildCategories = function()
{
$.ajax({
url: this.url,
dataType: 'json',
success: function(data)
{
$.each(data.childCategories, function()
{
$($(this).parent().childCategoriesSelectid)//problem here
.append(
$('<option></option>')
.attr('value', this.childCategoryid)
.text(this.name)
);
});
}
});
}
}
</code></pre>
| javascript jquery | [3, 5] |
5,598,671 | 5,598,672 | replace all instances of letters in the alphabet with another | <p>I have the english alphabet:</p>
<pre><code>abcdefghijklmnopqrstuvwxyz
</code></pre>
<p>I have another alphabet:</p>
<pre><code>ypltavkrezgmshubxncdijfqow
</code></pre>
<p>If i have a string. I want to replace every character with the equivalent in the new alphabet. </p>
<p>So if the string was abcde the new string would be yplta.</p>
<p>I have tried:</p>
<p><a href="http://jsfiddle.net/KvFCr/10/" rel="nofollow">http://jsfiddle.net/KvFCr/10/</a></p>
<p>but not got very far and dont even know if this is the best way to do it. Is there a better way achieve what I want using jquery and javascript?</p>
| javascript jquery | [3, 5] |
1,534,838 | 1,534,839 | replace function in jquery | <p>I am using following code </p>
<pre><code>$.post("insertPrivateMessage?action=sendchat",
{ to: GroupUserArray[count],
message: message,
username: $("#author").val(),
GROUP: chatboxtitle
} ,
function(data){
message = message.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;");
});
</code></pre>
<p>but when replacing message getting following error </p>
<p>message.replcace is not a function </p>
<p>is my code OK?</p>
| javascript jquery | [3, 5] |
164,911 | 164,912 | Passing a JavaScript object using addJavascriptInterface() on Android | <p>Is it possible to pass a JavaScript object from JavaScript to Java using addJavascriptInterface()? Something along these lines:</p>
<pre><code>var javaScriptObject = {"field1":"string1", "field2":"string2"};
JavaScriptInterface.passObject(javaScriptObject);
</code></pre>
<p>How would such a call be captured on the Java side? I have no problem setting up the interface to send a string, but when I send an object, I receive null on the Java end.</p>
| java javascript android | [1, 3, 4] |
776,118 | 776,119 | How to handle Confirm() of Javascript as per my following requirements? | <p>My Requirement is this.
Steps:-</p>
<ol>
<li>On Client Click (button)</li>
<li>Disabled the Button. </li>
<li>Then it should prompt for OK or CANCEL.</li>
<li>If OK then fire the OnClick event (Code Behind). </li>
<li>If CANCEL then don't make a server-side trip and enable the button.</li>
</ol>
<p>Following is the code I am using for the button.</p>
<pre><code><asp:Button ID="btn1" OnClientClick="this.disabled=true;return Confirm();" Text="Testing" runat="server" />
</code></pre>
<p>But instead of what I am expecting, it is disabling button and prompting Confirmation but if User hits Cancel then button stays as disabled.</p>
| javascript asp.net jquery | [3, 9, 5] |
3,042,888 | 3,042,889 | I want to cancel page submit ,on cancel action of confirm using C# in asp.net4.0 | <p>I want to stop page submit on cancel action of confirm .</p>
<p>What I want to achive is , I have a form with server validation, if user submit the form without entering any fields, it should validate the form and no confirm window should open.
But now if user have filled all the fields and go on submit the form, It should confirm the page submission (Are you sure you want to create user.),
So on clicking yes it should submit the page .
But on cancel it should cancel the page submission.</p>
<p>My only problem is with the cancel as it is still submitting the form.</p>
<p>my code in javascript is as follows:</p>
<pre><code>function ConfirmSubmit() {
Page_ClientValidate();
if (Page_IsValid) {
if(!confirm('Are you sure?'))
{
return false;
}
}
}
<asp:Button ID="btnSave" runat="server" OnClientClick="javascript:return ConfirmSubmit()" OnClick="btnSave_Click" Text="Save" />
</code></pre>
<p>I have server code on btnSave_Click.</p>
<p>Please help me , I have tried many things but could not sucesseed</p>
<p>Many thanks..</p>
| c# javascript asp.net | [0, 3, 9] |
5,401,274 | 5,401,275 | jQuery Height Altimeter | <p>I would like to know it would be possible to create a sort of altimeter / counter display that dyamically changes the counter as you scroll.</p>
<p>For example when you are in the top of the page it displays 10 000 and as you scroll down it decreases, until it reaches to 0 when you have scrolled to the bottom of the page.</p>
<p>It should work according to the scrolling, so when you scroll up it increases and scroll down decreases, with a max range of lets say, 10000 in the top of the page and 0 in the bottom.</p>
<p>Is ther a simple function that solves this?</p>
| javascript jquery | [3, 5] |
20,867 | 20,868 | Android - how to close notification in service started by startForeground? | <p>Say I start a notification via the following in a service of my app:</p>
<pre><code>notification = new Notification(R.drawable.icon, getText(R.string.app_name), System.currentTimeMillis());
Intent notificationIntent = new Intent(this, mainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
initService.notification.setLatestEventInfo(this, getText(R.string.app_name), "ibike rider", pendingIntent);
startForeground(ONGOING_NOTIFICATION, notification);
</code></pre>
<p>How would I go about <code>shutting down/cancelling</code> this service? And would it be possible to do this in another activity? </p>
<p>Thanks.</p>
| java android | [1, 4] |
3,636,686 | 3,636,687 | use of IPC in Cpp in Android | <p>after having a bit exploring at Android2.2 source code,I get to know Android Framework works with large number of IPC mechanisms written in Cpp, such as CameraService,MediaService and etc.</p>
<p>I also see those many key classes drive these IPC mechanisms, such as IInterface, BpInterface, BnInterface, Binder, IBinder, RefBase and lots of others...</p>
<p>I now want to write my IPC-Service in cpp ( not in Java using AIDL ) , unfortunately, I cannot find out any helpful resources(articles, tutorials, books and so on) that thoroughly detail use of these classes</p>
<p>anyone who is proficient in this aspect, can u give me ideas?</p>
<p>thanks!</p>
| c++ android | [6, 4] |
2,377,279 | 2,377,280 | How to enable filtering on an ObjectDataSource with FilterExpression when bound to a List<object>. | <p>Does anyone know how to use <code>FilterExpression</code> with an <code>ObjectDataSource</code> when it is bound using a select method that returns a list of entity objects?</p>
<p>I get the following error when I attempt it:</p>
<p>"The data source 'testODS' only supports filtering when the SelectMethod returns a DataSet or a DataTable"</p>
| c# asp.net | [0, 9] |
5,404,062 | 5,404,063 | Listbox not scrolling up automatically to show selected item | <p>I have two listboxes, countries and states. When I select a country, first state that belongs to the country should be selected in the states listbox. I get the selected countryid and then set the first state that belongs to the country as selected. This works fine in IE8, but in chrome I have a problem. when I first select a country, states listbox scrolls down to select the state. Second time, if I select a country for which the state list needs to scroll up to show the state, it doesn't happen. When i scroll up i see that the item is selected as expected. It's only that the item is not shown in the visible portion of the list. Any suggestion?</p>
| javascript jquery | [3, 5] |
30,802 | 30,803 | Check if javascript is already attached to a page? | <p>Is there any way to check if javascript file is already attached to the page by its file name.</p>
<p>For eg : </p>
<pre><code>if ("path-to-script/scriptname.js") already embeded
{
call related function
}
else
{
Append '<script src="path-to-script/scriptname.js" type="text/javascript"> </script> '
call related function
}
</code></pre>
<p><strong>Basically I dont want 1 script to be attached twice on the same page.</strong></p>
| javascript jquery | [3, 5] |
1,146,381 | 1,146,382 | javascript jQuery - Given a comma delimited list, how to determine if a value exsits | <p>given a list like:</p>
<pre><code>1,3,412,51213,[email protected], blahblah, 123123123123
</code></pre>
<p>which lives inside of a input type"text" as a value:</p>
<pre><code><input type="text" value="1,3,412,51213,[email protected], blahblah, 123123123123, [email protected]" />
</code></pre>
<p>How can I determine if a value exists, like 3, or blahblah or [email protected]?</p>
<p>I tried spliting with inputval.split(',') but that only gives me arrays. Is search possible?</p>
<p>Thanks</p>
| javascript jquery | [3, 5] |
2,870,071 | 2,870,072 | Button.Click event is not firing up | <p>I am new in JQ. I have created this fiddle here: <a href="http://jsfiddle.net/SZ6mY/7/" rel="nofollow">http://jsfiddle.net/SZ6mY/7/</a></p>
<p>All I want to do is to show an "ALERT" message when "C" button is clicked. Also I want to know that if you click "7" how you grab the value 7 in a variable in JQ?</p>
<p>Any input is appreciated! Thanks.</p>
| javascript jquery | [3, 5] |
210,429 | 210,430 | Android Ldap with Sasl Security | <p>I am making application on android in which my server is windows server 2008.I am using LDAP Protocol for accessing detail from my app.For it I am using unboundid.jar for making connections.I am using various security mechanism like ssl Tls Sasl Digest MD5,Genric sasl.SSL Tls working fine on Android but Sasl is not working on android for LDAP.
i go through many forums and try many codes but not find any useful solution.Can Any knows what is the problem?Does android support sasl?Please give me solution........!!! </p>
| java android | [1, 4] |
3,388,015 | 3,388,016 | OnTouchListener() will only execute once while button is pressed and held down | <pre><code>brown = (Button) findViewById(R.id.brownButton);
brown.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
count++;
Log.d("count", "" + count);
return true;
} else if (event.getAction() == (MotionEvent.ACTION_UP)) {
count--;
Log.d("count", "" + count);
return true;
}
return false;
}
});
</code></pre>
<p>When my finger presses and holds the button my count will only increment ONCE. When I let go it will decrement accordingly. Please can someone show me how I can get my code to increment as long as my finger is holding the button down. Thanks. </p>
| java android | [1, 4] |
6,031,940 | 6,031,941 | How to get content of div which contains JavaScript script blocks? | <p>I have the following HTML</p>
<pre><code><div id="example">
...some text...
<script type="text/javascript">
... some javascript...
</script>
</div>
</code></pre>
<p>How to get content of <code>#example</code> but also with the JavaScript?</p>
<pre><code>$("#example").html(),
$("#example").text(),
$("#example").val()
</code></pre>
<p>all don't work.</p>
| javascript jquery | [3, 5] |
2,221,016 | 2,221,017 | Build modal dialog from scratch with JavaScript for IE and Firefox | <p>I am trying to build a modal dialog box in JavaScript. I have it working in Firefox but not IE with some code like this...</p>
<pre><code>$(window).bind('scroll resize', function (e) {
var $this = $('.popup');
var d = document;
var rootElm = (d.documentelement && d.compatMode == 'CSS1Compat') ? d.documentelement : d.body;
var vpw = self.innerWidth ? self.innerWidth : rootElm.clientWidth; // viewport width
var vph = self.innerHeight ? self.innerHeight : rootElm.clientHeight; // viewport height
$this.css({
position: 'fixed',
left: ((vpw - 100) / 2) + 'px',
top: (rootElm.scrollTop + (vph - 100) / 2) + 'px'
}).show();
});
</code></pre>
<p>This works perfectly in FireFox, but not in IE (not targeting ie6)</p>
<p><strong>The Problem</strong></p>
<p>The initial placement is fine in IE, but when i go to resize, the div does not move back to middle of the view port. I verified that the resize and scroll both are being triggerd, but the placement is off in IE.</p>
<p><strong>DEMO</strong></p>
<p><a href="http://jsfiddle.net/LpuDh/" rel="nofollow">http://jsfiddle.net/LpuDh/</a></p>
| javascript jquery | [3, 5] |
3,210,669 | 3,210,670 | How to get current time elapsed percentage of today? | <p>Im trying to get the current time elapsed percentage of todays time. It can be either javascript or php. How can I do that ?</p>
| php javascript jquery | [2, 3, 5] |
2,586,768 | 2,586,769 | Highlight search text in textarea | <p>I have to highlight the search terms in the text area.</p>
<p>I have one text Filed,search Button and text area.</p>
<p>Quote ...</p>
<pre><code>After i have enter the search string in the text field whenever i click the search button it highlight the search terms which is available in the text area and focus the search term in text area.
I have try to do this by using jquery.
But in mozilla,I can't get the focus to the search term at the time of search.
I have to scroll down the text area for find the focused search term.
In I.E. also it doesn't work properly.
</code></pre>
<p>Otherwise if any post related to highlight search term in text area is also appreciable.</p>
<p>Please guide me to achieve this. </p>
| javascript jquery | [3, 5] |
4,495,731 | 4,495,732 | How to open a page in a new window or tab from code-behind | <p>So I have a webapplication where I select a value from a dropdownlist. When this value is selected, I want to load another page in a new window.</p>
<p>I tried this:</p>
<pre><code>ScriptManager.RegisterStartupScript(Page, typeof(Page), "OpenWindow", "window.open('Default.aspx', '_blank');", true);
</code></pre>
<p>It does open the page, but not in a new window/tab. It opens it in the current opened page.</p>
<p>Alternatively I tried:</p>
<pre><code>ClientScript.RegisterStartupScript(this.GetType(), "OpenWin", "<script>openDashboardPage()</script>");
</code></pre>
<p>and</p>
<pre><code>HttpContext.Current.Response.Write("<SCRIPT LANGUAGE='JavaScript'>window.open('Default.aspx', '_new');</SCRIPT>");
</code></pre>
<p>They all behave in the same fashion. I just loads the page in the existing window. I tried it in both Firefox and Chrome, thinking it might be a browser thing, but they both behaved the same.</p>
<p>How do I open a new window?</p>
| c# asp.net | [0, 9] |
3,130,383 | 3,130,384 | To prevent back once the application runs correctly in asp.net | <p>Hi
I have created quiz application. once login entered by user then test will start after he will submit the test then results will appear. If user clicks back button in toolbar then again earlier questions appears, it should not appear as he already given the test.
Asp.net c#
Thank you.</p>
| javascript asp.net | [3, 9] |
3,140,480 | 3,140,481 | Jquery - More than 1 "$(document).ready" = dirty code? | <p>is it OK to use the </p>
<pre><code>$(document).ready(function ()
{
// some code
});
</code></pre>
<p>more than 1 time in the javascript code?</p>
<p>Thanks in advance!
Peter</p>
| javascript jquery | [3, 5] |
2,437,000 | 2,437,001 | Android viewflow validation | <p>Currently I have a few forms using this horizontal sliding view.</p>
<p><a href="https://github.com/pakerfeldt/android-viewflow" rel="nofollow">https://github.com/pakerfeldt/android-viewflow</a></p>
<p>Is their a way to prevent the user from sliding to the next screen when the form is filled in incorrectly? e.g. disable the horizontal scroll.</p>
| java android | [1, 4] |
2,024,628 | 2,024,629 | How to get the response from Confirm box in the code behind | <p>I am new to asp.net/C# .I am trying to create a web application.</p>
<p>Below is my requirement.</p>
<p>I am trying to save a record on button click. Before saving the record,I will be checking if that record exist in the database or not(in the code behind).If it exist,then I need to show an alert to the user as "Record already exist.Do you want to proceed?"When the user press 'Yes',I need to continue my save for the record in the code ,else I just need to exit the save process.</p>
<pre><code>//......code for checking the existence of the record
if (check == true)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "script", " confirm('Record already exist.Do you want to proceed?');", true);
}
//
</code></pre>
<p>The above code shows me confirm box with 'OK' and 'Cancel' buttons.
My questions are </p>
<ol>
<li>how can I make it 'Yes' or 'No' in the confirm dialog?</li>
<li>After the user press 'Yes'/'No',how can I catch the response(yes/no),and proceed with rest of my program?</li>
</ol>
<p>I have searched for this a lot.But couldn't get a proper answer.Please help me on this.</p>
| c# asp.net | [0, 9] |
1,779,993 | 1,779,994 | Convert attribute/value pairs of a DOM element into a Javascript object? | <p>Is there a shortcut function that converts a DOM element and its various attribute/value pairs to a corresponding Javascript object?</p>
<p>E.g convert this in the HTML page:</p>
<pre><code><div id="snack" type="apple" color="red" size="large" quantity=3></div>
</code></pre>
<p>to an object in Javascript, as if you had typed:</p>
<pre><code>var obj = {
id: "snack"
type: "apple"
color: "red"
size: "large"
quantity: 3
};
</code></pre>
| javascript jquery | [3, 5] |
2,018,257 | 2,018,258 | Java to c# convertor | <p>looking for a java to c# converter. the project is about 100 classes. what is the best program for this?</p>
| c# java | [0, 1] |
2,057,166 | 2,057,167 | Hide a single DIV out of multiple DIV with same id using javascript | <p>I want to hide a DIV in my page but there is no id for the DIV.
There is only class for the div which is common to other DIV too .</p>
<p>Please help me how i can hide only a single DIV based on the 'for' attribute of the label tags</p>
<p>below is the DIV</p>
<pre><code><div class="field-group aui-field-versionspicker frother-control-renderer">
<label for="versions">Affects Version/s</label>
</div>
<div class="field-group aui-field-versionspicker frother-control-renderer">
<label for="fixVersions">Fix Version/s</label>
</div>
</code></pre>
| javascript jquery | [3, 5] |
645,002 | 645,003 | Change the background of all the activities in the app | <p>I'm trying to define a background as default for all the activities in the app. So I have used:</p>
<pre><code><style name="testStyle" parent="@android:style/Theme.NoTitleBar">
<item name="android:background">@color/app_background_color</item>
</style>
</code></pre>
<p>and then in the manifest </p>
<pre><code><application
android:icon="@drawable/icon"
android:theme="@style/testStyle"
.....
</code></pre>
<p>But that way the background is applied to other elements like Dialogs title and Toasts backgrounds. How can I make that style only affect the background of the activities?</p>
<p>Thanks</p>
| java android | [1, 4] |
3,103,395 | 3,103,396 | select a row after page reload | <p>Is it possible to select a row after page reload?</p>
<p>I try to get this effect: <a href="http://jsfiddle.net/yg4n6/2/" rel="nofollow">http://jsfiddle.net/yg4n6/2/</a> I mean that the user can get the row highlight when he clicks. But the problem comes when I have to reload the page to do other things with php. The row selected is the same of the id.</p>
<pre><code><tr>
<td> <a href="?id=<?php echo $row['id'] ?>">
<input type="text" name="num" value="<?php echo $row['id']?>"/>
</a> </td>
<td><input type="text" name="a" value="<?php echo $row['a']?>"/></td>
<td><input type="text" name="b" value="<?php echo $row['b']?>"/></td>
</tr>
</code></pre>
| php jquery | [2, 5] |
2,737,307 | 2,737,308 | dataadapter fill missing parameter | <p>I recieve the following error when I try to execute this code. But I added it to my commands. Can someone point out the step that overlooked? Thanks.</p>
<p>Procedure or function 'usps_getContactDetails' expects parameter '@aspContactID', which was not supplied. </p>
<p>SqlConnection conn = new SqlConnection(GetConnString());
SqlCommand cmd = new SqlCommand("usps_getContactDetails", conn);</p>
<pre><code> SqlParameter parmContactID = new SqlParameter("@aspContactID", Convert.DBNull);
cmd.Parameters.Add(parmContactID);
parmContactID.Direction = ParameterDirection.Input;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
conn.Open();
DataSet cusDS = new DataSet();
da.Fill(cusDS, "Contacts");
</code></pre>
| c# asp.net | [0, 9] |
4,870,150 | 4,870,151 | Replacing – character using Javascript or JQuery | <p>I need to replace the dash in a title on by site with a span tag and line break to break to title over two lines.
Unfortunately I don't have access to do this in the PHP :(</p>
<p>The below statement seems to do this. Although with bugs as it's making this change to the character throughout the page.</p>
<pre><code>document.body.innerHTML = document.body.innerHTML.replace(/\u2013/g, "</span><br /><span>");
</code></pre>
<p>The jQuery solution I tried below, works but sometimes the element would have a visibility hidden on the element!</p>
<pre><code>$("#events h3 a").each(function() {
$(this).html($(this).html().replace(/\u2013/g,"</span><br /><span>"));
});
</code></pre>
<p>Ideally I would like to use the pure JavaScript version above but need help navigating to the Events Link.</p>
<pre><code>#events h3 a
</code></pre>
<p>Thanks anybody who can help, I have hunted for a solution everywhere.</p>
<p>This is an example of the page structure. And explains why the span close and start are back to front in the code excerpt. This is so each half can be styled when on separate lines.</p>
<pre><code><ul id="events">
<li>
<h3>
<a href="http://example.com">
<span>First Events Title - On Every Sunday</span>
</a>
</h3>
</li>
<li>
<h3>
<a href="http://example.com">
<span>Second Events Title - On Every Monday</span>
</a>
</h3>
</li>
</ul>
</code></pre>
| javascript jquery | [3, 5] |
471,274 | 471,275 | Server Error in '/' Application, The resource cannot be found | <h2>Server Error in '/' Application.</h2>
<p>The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. </p>
<p>Requested URL: /public/google_setup.aspx</p>
<p>I am getting the above error when i host the site on the server. In my local computer it is working fine. google_setup.aspx is referring to a master page which is also on the server. I have developed other pages using that master page <strong>before</strong> and they are working fine.</p>
<p>Any idea what is wrong.</p>
<p>If someone can suggest a way to get little bit more detail information on this error i would be able to fix it</p>
| c# asp.net | [0, 9] |
759,493 | 759,494 | navigation menu not show up on mobile browsers | <p>I am trying to find out why my navigation window not showing up when I visit my page using mobile devices and iPad?</p>
<p>Any idea please that can help?</p>
<p><a href="http://egycotravel.com/trips.html" rel="nofollow">http://egycotravel.com/trips.html</a></p>
<p>Thanks </p>
<p>sorry : this link have the navigation bar that i am talking about , it have orange background and white text links . when i am opening this URL on my mobile , the navigation links not showing up ... i wonder why ?</p>
| javascript android | [3, 4] |
5,777,426 | 5,777,427 | Adding a Javascript listener that triggers when an element has a certain Y position | <p>Is there a way to add a listener that triggers a function when an element is at a certain y-position?</p>
<p>On click, I have an element animating up with jQuery.</p>
<p>During that animation, the elements y-position will reach 0 (and go past it). When it reaches 0, I'd like to trigger another function that displays a different .</p>
<p>I've been trying to read about event management with anonymous event handling but have been unable to figure out how to get it working. Thank you!</p>
| javascript jquery | [3, 5] |
2,368,227 | 2,368,228 | Multiple User Controls with Javascript | <p>I am trying to emulate a simple timepick user control with a combo box and a little image of a clock. In the user control I type in the code:</p>
<pre><code>function SetFocus() {
var comboBox = $find("<%=cboTime.ClientID %>");
var input = comboBox.get_inputDomElement();
input.focus(); }
</code></pre>
<p>cboTime is the combobox control and there is an image of a little clock right after
I tie the click event of the image to this function</p>
<p>all is fine and dandy if I have ONE user control on my page.....</p>
<p>If I add another user control with a different name, the behavior is such that no matter which image I click, the very last combo box gets the focus.</p>
<p>I know WHAT is happening...I just need a workaround.
When the page is rendered, it creates two identical scripts with the client id of the combo box. Problem is, all the preceding instances overwrites the predecessor because they are the same name.</p>
<p>Anyone got a solution to this? Its gotta be simple but I can't find the answer anywhere.</p>
<p>Thanks</p>
| c# asp.net javascript | [0, 9, 3] |
2,629,003 | 2,629,004 | Getting number of a clicked div - and out of dynamic written group of divs - in jQuery | <p>I have a html like shown bellow. What im trying to achieve is, after I click on a specific div, to get clean number out of that div(id) as a var in a jQuery. Just a number.</p>
<p>PHP is writing html like this.. ability to delete via label id jquery code is even more welcome (so ie. level does not need to be numerated). :s</p>
<pre><code><div id="level_1">aaa
<label id="del_1">Delete this post</label>
</div>
<div id="level_2">bbb
<label id="del_2">Delete this post</label>
</div>
</code></pre>
<p>Something like level_1 (or del_1) to become var num = 1, level_2 (or del_2) to become var num = 2; and so on. You are free to change this html also to obey jQuery if necessary, or just to be more clean. Thx. </p>
| php jquery | [2, 5] |
3,765,464 | 3,765,465 | Is this the best way to load google-analytics and jQuery | <p>I don't need jQuery to be available immediately on page load:</p>
<p>So far I have the following: </p>
<pre><code><script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '...']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
var gb = document.createElement('script'); gb.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
gb.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
s.parentNode.insertBefore(gb, s);
})();
</script>
</code></pre>
<p>I am not 100% sure it is the most efficient way. Would anyone please let me know if I am doing things the best way. </p>
<p>Thanks</p>
| javascript jquery | [3, 5] |
1,113,068 | 1,113,069 | Jquery methods? | <p>I keep seeing codes like this:</p>
<pre><code> $(document.documentElement).keyup( function(event) {
var slides = $('#slides .pagination li'),
current = slides.filter('.current');
switch( event.keyCode ) {
case 37: // Left arrow
if ( slides.filter(':first').is( current ) ) {
slides.filter(':last').find('a').click();
} else {
slides.eq( slides.index(current) - 1 ).find('a').click();
}
break;
case 39: // Right arrow
if ( slides.filter(':last').is( current ) ) {
slides.filter(':first').find('a').click();
} else {
current.find('+ li').filter(':first').find('a').click();
}
break;
}
});
</code></pre>
<p>For a line like this: <code>current = slides.filter('.current');</code>, <code>.filter()</code> is a jquery method, right? Then shouldn't it be <code>current = $(slides).filter('.current');</code>. </p>
<p>Does it work the way it is done in the code? Why?</p>
| javascript jquery | [3, 5] |
2,417,606 | 2,417,607 | Save image from Image.Control to website directory | <p>Is there a way to save an image from a .net Image Control to the server's directory?</p>
<p>It's a barcode image that gets generated on Page_Load:</p>
<pre><code>Image1.ImageUrl = "~/app/barcode.aspx?code=TEST"
</code></pre>
<p>The barcode image displays just fine on the webpage, but I wnated to save it to a directory as well:</p>
<p><code>~/barcode image/TEST.jpg</code></p>
<hr>
<p>So far, here's what I have:</p>
<pre><code>WebClient webClient = new WebClient();
string remote = Server.MapPath("..") + @"\app\barcode.aspx?code=TEST";
string local = Server.MapPath("..") + @"\barcode image\TEST.jpg";
webClient.DownloadFile(remote, local);
</code></pre>
<p>But it gives me an error: <code>Illegal characters in path.</code></p>
| c# asp.net | [0, 9] |
3,798,350 | 3,798,351 | Letting others off-server use my forms java script or php | <p>I was wondering if anyone could offer me some suggestions as to the best method to accomplish the following:</p>
<p>I have a few html forms that simply post a php page for processing of data.</p>
<p>What would be the best method of letting other people implement my form on their website OFF of my server? (important because I tried a simple php include, but doing this off server is an issue.)</p>
<p>I have tried file_get_contents but this method does not respect css.</p>
<p>I am looking for the most simple, elegant solution to provide affiliates with a way to add my form to their website with one line of code. </p>
<p>Is this possible?</p>
| php javascript | [2, 3] |
3,980,387 | 3,980,388 | Datakey values of a grid view using Jquery | <p>Hii...
How can i get the data key values of a gridview using Jquery?If there any method please share .... thanks in advance</p>
| jquery asp.net | [5, 9] |
1,990,821 | 1,990,822 | Cannot read property 'img' of null | <p><a href="http://bvh.delineamultimedia.com/?page_id=2" rel="nofollow">http://bvh.delineamultimedia.com/?page_id=2</a> -> I'm getting an error on this page with the Superbox.js script located here. <a href="http://bvh.delineamultimedia.com/wp-content/themes/bvh/js/portfolio/superbox.js" rel="nofollow">http://bvh.delineamultimedia.com/wp-content/themes/bvh/js/portfolio/superbox.js</a> </p>
<p>Console states on line 51 that Uncaught TypeError: Cannot read property 'img' of null </p>
<p>Right now on line 51 it states the following. </p>
<pre><code>var imgData = currentimg.data();
superboximg.attr('src', imgData.img);
</code></pre>
<p>I don't see anything wrong with this but I am confused as to why I'm getting this error. </p>
<p>Any thoughts or help is appreciated! </p>
| javascript jquery | [3, 5] |
189,692 | 189,693 | How to identify button click from array of buttons | <p>I have a table with 1 button in each row, on click of button tax shown in that row will be applied to the client and i need to show some indication to end user. I want to change the button css(color, txt ect.) on click for that purpose. Below is the code -</p>
<pre><code><table class="data report_table">
<tbody>
<c:forEach var="taxVO" items="${taxVo}" varStatus="item">
<tr class="${item.index % 2 == 0 ? 'odd gradeX' : 'even gradeC'}">
<td><c:out value="${taxVO.taxName}" /></td>
<td><input type="button" class="btn-icon" value="Apply" id="applyTaxButton" onClick="applyTax('${taxVO.taxId}');"></input>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</code></pre>
<p>and jquery i am using is -</p>
<pre><code>function applyTax(taxIdValue) {
$('#taxId').val(taxIdValue);
$(this).$('#applyTaxButton').css("background-color","yellow");
}
</code></pre>
<p>but i am getting error - Uncaught TypeError: Object [object Object] has no method '$'. Can someone please let me know how to fix it?</p>
| javascript jquery | [3, 5] |
1,160,901 | 1,160,902 | implements OnClickListener VS. new Button.OnClickListener() {}; | <p>I have a question about implementing OnClickListeners for developing with the ADT. I'm unsure of which way is more efficient, can anyone please provide me with pro's and con's of each approach?</p>
<pre><code>class x extends Activity implements OnClickListener
{
button.SetOnClickListener(this);
OnclickListener(View v)
{
switch(v.getGetId());
{
case R.id.y:
//do stuff here
break;
.
.
.
}
}
}
</code></pre>
<p><-VERSUS-></p>
<pre><code>class a extends Activity
{
.
.
.
btn.setOnClickListener(new Button.OnClickListener()
{
OnClickListener(View v)
{
//do stuff here
}
});
}
</code></pre>
| java android | [1, 4] |
534,270 | 534,271 | Get Country, GMT, City by IP address using PHP | <p>I have tried to get the <strong>Country</strong>, <strong>City</strong>, and <strong>GMT</strong> using <code>js</code> by set it to cookies, and then I fetch it with <code>PHP</code> to save into <code>Database</code>.
But the method I used, is does not work sometimes,
So, is there anyway to get them by using PHP alone?
or is there another way by using JS?</p>
<p>I using this <code>js</code> provided by <strong>maxmind</strong></p>
<pre><code><script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script>
</code></pre>
<p>But I often fail to save the data.</p>
| php javascript | [2, 3] |
1,955,015 | 1,955,016 | action button after the second click | <p>I have a button in my form. I need my form to be processed after the first click (or pressing Enter) on the button, and after that, if some conditions would be true, I do something like submitting the form by the second click or pressing Enter key on the button.</p>
<p>What do you think I have to do?</p>
| javascript jquery | [3, 5] |
972,915 | 972,916 | ajax calling some other javascript | <p>i need to call text.php on clicking the table content but its returning some other file in xmlhttp.responseText a page with in that is displaying. its returning some page even though i kept blank at xmlhttp.open </p>
<pre><code><html>
<head>
<script type='text/javascript'>
function text1()
{
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4)
{
//alert(xmlhttp.responseText);
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","text.php",true);
xmlhttp.send();
}
</script>
</head>
<?php
echo "<body>";
echo "<table>";
echo "<h2>".$_GET[rep_name]."\n Repository Content<br></h2>";
$l=shell_exec("ls /var/www/users/$_COOKIE[user]/$_GET[rep_name]");
$urlarray=split("\n",$l);
for($i=0;$i<count($urlarray)-1;$i++)
{
if(is_dir($urlarray[$i]))
{
echo "<tr><td><img src='../icons/folder.png'/></td>".$urlarray[$i]."</a><br>";
}
else
{
echo "<tr><td><img src='../icons/text.png'/></td onclick='text1()'>"."<td onclick='text1()'><span id='txtHint'></span>".$urlarray[$i]."</td></tr><br>";
}
}
echo "</table>";
//echo "";
echo "</body></html>";
?>
</code></pre>
| php javascript | [2, 3] |
3,963,550 | 3,963,551 | Asp.Net : How to provide email preview for the different email providers | <p><p>In my asp.net application I need to show the email preview of created email, like with gmail the email will display some different formatting & with hotmail it will some different formatting...</P></p>
<p>
So, How to provide email preview for the different email providers like gmail, hotmail rediffmail etc...</p>
<p><br/>
Is their any tool with which I can render in my application?</p>
| c# asp.net | [0, 9] |
2,533,960 | 2,533,961 | Weird behavior in Android's "if" block | <p>It walks like a bug, it chirps like a bug.... I need someone to confirm that it's a bug.</p>
<p>I was trying to get phone numbers from the address book with this code:</p>
<pre><code>public JSONObject getAllPhones() throws JSONException{
String mPhoneNumberProjection[] = new String[] {
Contacts.Phones.NAME, Contacts.Phones.NUMBER, Contacts.Phones.TYPE
};
Uri phoneNumbersUri = Contacts.Phones.CONTENT_URI;
JSONObject result = new JSONObject();
JSONArray phones = new JSONArray();
Cursor myCursor = mApp.managedQuery(phoneNumbersUri, mPhoneNumberProjection, null, null, null);
mApp.startManagingCursor(myCursor);
if (!myCursor.isAfterLast()){
myCursor.moveToFirst();
do{
JSONObject aRow = new JSONObject();
for (int i = 0; i < myCursor.getColumnCount(); i++){
Log.d(LOG_TAG, myCursor.getColumnName(i) + " -> " + myCursor.getString(i));
aRow.put(myCursor.getColumnName(i), myCursor.getString(i));
}
phones.put(aRow);
} while (myCursor.moveToNext());
}
result.put("phones", phones);
result.put("phoneTypes", getPhoneTypes());
return result;
}
</code></pre>
<p>But when there are no contacts, and !myCursor.isAfterLast() evaluates as "false", program steps into "for" loop. So it enters "if" block, skips several methods and lands in "for" loop... </p>
<p>When I extract this loop into a separate function, everything works ok.</p>
<p>I'm doing this in Eclipse Helios on 32-bit Vista. I tried cleaning the project, erasing Java cache, restarting computer, creating new AVD... I used Android 1.6 and Android 2.2, but the error stays on...</p>
<p>Can someone explain what's going on?</p>
| java android | [1, 4] |
5,867,425 | 5,867,426 | How to overwrite JQuery plugin function? | <p>How to overwrite a function which is from a JQuery plugin? I am trying to overwrite a function in csv2table plugin called mkTable() in my own javascript file. Is it possible? Here is the original definition:</p>
<pre><code>$.fn.csv2table= function(url,setting) {
function mkTable(id,rowsAry){
...
}
}
</code></pre>
| javascript jquery | [3, 5] |
5,513,219 | 5,513,220 | Browser support for stopImmediatePropagation? | <p>IE support for <code>stopPropagation()</code> is lacking, and <a href="http://stackoverflow.com/a/387750/165673">requires workarounds</a>, but I can't tell if the same thing is true for <code>stopImmediatePropagation()</code>- is it safe for all browsers, or does it requires its own set of workarounds?</p>
| javascript jquery | [3, 5] |
3,257,384 | 3,257,385 | jquery replace text with image, help | <pre><code>("*").each(function () {
if ($(this).children().length == 0) {
$(this).text($(this).text().replace('basketball','test'));
}
});
</code></pre>
<p>i'm only able to change the text to another string of text, but how can I pass an image?</p>
| javascript jquery | [3, 5] |
2,273,317 | 2,273,318 | Putting an image and variables in an HTTP Post (Not using FileUpload Control) | <p>Following on from my post..</p>
<p><a href="http://stackoverflow.com/questions/1411670/saving-an-image-from-http-post-not-using-fileupload-control">Saving an image from HTTP POST (Not using FileUpload Control)</a>. Where I kind of came to the assumption that I could just use Request.Files..</p>
<p>To test the saving functionality, i'm now looking at <strong>sending an image via an HTTP Post</strong> by crafting this HTTP Post dynamically in the code behind and <strong>not using a FileUpload Control</strong>.</p>
<p>It is touched upon here..</p>
<p><a href="http://stackoverflow.com/questions/1131425/send-a-file-via-http-post-with-c">http://stackoverflow.com/questions/1131425/send-a-file-via-http-post-with-c</a></p>
<p>But, i'm looking for a more complete sample and one that ensures that other POST variables are maintained.</p>
<p>In fact this one might help..</p>
<p><a href="http://stackoverflow.com/questions/219827/multipart-forms-from-c-client">http://stackoverflow.com/questions/219827/multipart-forms-from-c-client</a></p>
<p><strong>UPDATE :</strong>
Sorry.. Question is..</p>
<p>How do I send an image to a url via HTTP Post (without file upload control) along with other POST variables and have Request.Files pick it up at the destination url?</p>
<p><strong>SOLUTION</strong></p>
<p>In the end I solved it using the WebHelpers class here</p>
<p><a href="http://stackoverflow.com/questions/219827/multipart-forms-from-c-client">http://stackoverflow.com/questions/219827/multipart-forms-from-c-client</a></p>
| c# asp.net | [0, 9] |
2,640,479 | 2,640,480 | In my android project there are two classes and there is a button on first class,i need to view next page when i click on the button. | <p>In my android project there are two classes and there is a button on first class,i need to view next page when i click on the button. </p>
<p>package com.example.restaurantapp;</p>
<pre><code>import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.view.View.OnClickListener;
import android.support.v4.app.NavUtils;
public class RestaurantActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_first);
Button orderbutton=(Button)findviewById(R.layout.activity_first);
orderbutton.setOnClickListener(new View.OnClickListener());
}
private Button findviewById(int activityFirst) {
// TODO Auto-generated method stub
return null;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_first, menu);
{
public void onClick(View v) {
Intent intent = new Intent(RestaurantActivity.this,SecondActivity.class);
startActivity(intent);
}
return true;
</code></pre>
| java android | [1, 4] |
4,806,703 | 4,806,704 | hide source error (lines of code) when throwing exception | <p>How can I hide line of source throwing an exception in yellow screen of death? For example, consider following screen of potential dangerous request:</p>
<p><img src="http://i.stack.imgur.com/Sn9yC.png" alt="enter image description here"></p>
<p><strong>In above example, source lines are not displayed. Whereas, if it is any custom written code throwing an exception, lines of error are always displayed as following:</strong></p>
<p><img src="http://i.stack.imgur.com/alnTD.png" alt="enter image description here"></p>
<p>How can I hide lines of code (similar to first image) when throwing an error??</p>
| c# asp.net | [0, 9] |
4,856,908 | 4,856,909 | How to get last sms from the device? | <p>I have been developing the application which must recognize SMS commands. So, I need to know how I can get the last sms. I know that I need to use BroadcastReceiver (and I use it), but I don't know how I can get the last sms in this class. Please, help me with it, I hope you can do it. Thank you in advance. </p>
| java android | [1, 4] |
4,904,267 | 4,904,268 | Dynamically creating concentric div given the inner div | <p>I have 2 divs as :</p>
<pre><code><div id="outer">
<div id="inner">
</div>
</div>
</code></pre>
<p>The inner div has some fixed height(H) and width(W) . Initially the "outer" div doesn't<br>
have width and height.Also has same top and left values.(same origin) </p>
<p>How can I create/place a concentric "outer" div (or make the "outer" div concentric)<br>
with some height OH and width OW ? </p>
<p>The problem is I know W and H (width and height of inner div).</p>
<p>I need the outer div with dimensions OH and OW (width and height of outer div).</p>
<p><strong>Added Edit</strong>:
Is there way to calculate left and top for the outer div instead of doing it the CSS way?</p>
<p><strong>Edit2</strong> : The earlier image was bit misleading. the divs are more rectangular than square.So the padding left and right are equal as well as top and bottom but different values.</p>
<p><strong>ie. In some cases , dW is not equal to dH</strong> </p>
<p><img src="http://i.stack.imgur.com/anciZ.png" alt="concentric divs"></p>
<p>Added <a href="http://jsfiddle.net/CYjAR/6/" rel="nofollow">Fiddle</a> </p>
<p>Also looking for jquery / js solution.</p>
| javascript jquery | [3, 5] |
81,365 | 81,366 | Unexpected token Illegal | <p>I know there are other similar question related on stack overflow, but none seemed to correct my problem. This error occur on every browser (although I used webkit error name).</p>
<p>I need to add javascript using PHP. This cause the error "Unexpected token illegal" to appear. I tried this <a href="http://stackoverflow.com/a/4635492/1202691">answer</a> without success. This is what I have now :</p>
<pre><code> $texte .="<script>";
$texte .="$(function(){";
$texte .="$('#field_".$this->id."').css('position','absolute').css('left','".$this->x."px').css('top','".$this->y."px');";
$texte .="$('#field_".$this->id."').draggable({stop:function(event,ui){saveFieldPosition(".$this->id.");},grid:[10,10],containment:\".work_plane:first\"}).resizable({grid:[10,10]});";
$texte .="});";
$texte .="</script>";
return $texte;
</code></pre>
<p>I have enabled Dreamweaver hidden characters and remove every one that would be in $texte value.</p>
<p>Anyone sees the problem? Any hint would be appreciated.</p>
<p>Edit: the $texte is passed trough htmlentities() before it's added.</p>
<p>Here's the output : </p>
<pre><code> &lt;script&gt;$(function(){$('#field_1').css('position','absolute').css('left','px').css('top','px');$('#field_').draggable({stop:function(event,ui){saveFieldPosition();},grid:[10,10],containment:&quot;.work_plane:first&quot;}).resizable({grid:[10,10]});});&lt;/script&gt;
</code></pre>
| php javascript jquery | [2, 3, 5] |
30,962 | 30,963 | selecting classes using wildcard not exact class name | <p>I have several classes that I want to select .group1-1 .group1-2 .group1-3, each one of these has 50 elements under it. </p>
<p>Is there a way to select all classes that start with group1 (so I end up selecting group1-1, group1-2, group1-3), something like <code>$(".group1"+*)</code></p>
| javascript jquery | [3, 5] |
2,099,383 | 2,099,384 | bind callback parameter | <p>I have this code to set "State Machine" in view of a javascript application:</p>
<pre><code> var Events = {
bind: function(){
if ( !this.o ) this.o = $({});
this.o.bind(arguments[0], arguments[1])
},
trigger: function(){
if ( !this.o ) this.o = $({});
this.o.trigger(arguments[0], arguments[1])
}
};
var StateMachine = function(){};
StateMachine.fn = StateMachine.prototype;
$.extend(StateMachine.fn, Events);
StateMachine.fn.add = function(controller){
this.bind("change", function(e, current){
console.log(current);
if (controller == current)
controller.activate();
else
controller.deactivate();
});
controller.active = $.proxy(function(){
this.trigger("change", controller);
}, this);
};
var con1 = {
activate: function(){
console.log("controller 1 activated");
},
deactivate: function(){
console.log("controller 1 deactivated");
}
};
var sm = new StateMachine;
sm.add(con1);
con1.active();
</code></pre>
<p>What I don't understand at this point is where the <strong>current</strong> parameter in <strong>bind</strong> function comes from (That is: <code>this.bind("change", function(e, current){...}</code>). I try to log it on firebug console panel and it seems to be the controller parameter in StateMachine.fn.add function. Could you tell me where this parameter comes from?
Thank you.</p>
| javascript jquery | [3, 5] |
4,411,615 | 4,411,616 | jQuery - Controlling div visibility with a Select Box | <p>Updated: I would like to control the visibility of the bottom divs based on the value of the top SELECT..</p>
<p>i.e </p>
<pre><code>selected = dogs:: only bulldog, pitbull visible
selected = fish:: GOLDFISH! visible
</code></pre>
<p>etc..</p>
<p>Appreciate it.. Sorry I didn't do a better job of explaining my question initially - </p>
<pre><code><select>
<option value="dog">dog</option>
<option value="cat">cat</option>
<option value="fish">fish</option>
</select>
<div id="dog">bulldog</div>
<div id="cat">stray cat</div>
<div id="dog">pitbull</div>
<div id="cat">alley cat</div>
<div id="fish">GOLDFISH!</div>
</code></pre>
| javascript jquery | [3, 5] |
5,596,588 | 5,596,589 | How to change the LinkButton forecolor in C#? | <p>I am doing project for a mobile company.<br>
Where the home page will display all the mobile's with LinkButton<br>
which will take us to respective mobile's detail when we clicks that.<br>
the thing is i want to change the forecolor of the selected linkbutton using C# codings. </p>
<p>Eg : </p>
<p>asp.net : </p>
<pre><code><asp:LinkButton ID="MobileLinkButton" runat="Server" OnClick="MobileDetailslinkButton_Onclick" ForeColor="White" />
</code></pre>
<p>C# : </p>
<blockquote>
<p>protected void MobileDetailslinkButton_Onclick(object sender, EventArgs e)<br>
{<br>
Response.Redirect("~/MobileDetails.aspx");<br>
MobileLinkButton.ForeColor = System.Drawing.Color.Yellow; </p>
<pre><code>}
</code></pre>
</blockquote>
<p>But the ForeColor is not changing,but the rest is working good.</p>
<p>Note : these linkbutton's are all in MasterPage which is been used in my whole project's all the pages.</p>
| c# asp.net | [0, 9] |
636,568 | 636,569 | How do I get a simple jQuery code to replace my current Javascript | <p>Goal : When click a link on my navigation will show spinning image until script fully loaded.</p>
<pre><code>function ahah(url, target) {
document.getElementById(target).innerHTML = '<img src="loading.gif" />';
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
}
if (req != undefined) {
req.onreadystatechange = function() {ahahDone(url, target);};
req.open("GET", url, true);
req.send("");
}
}
function ahahDone(url, target) {
if (req.readyState == 4) { // only if req is "loaded"
if (req.status == 200) { // only if "OK"
document.getElementById(target).innerHTML = req.responseText;
} else {
document.getElementById(target).innerHTML=" AHAH Error:\n"+ req.status + "\n" +req.statusText;
}
}
}
function load(name, div) {
ahah(name,div);
return false;
}
</code></pre>
<p>On Link</p>
<pre><code><a href="wrapper.html" onclick="load('file1.html','content');return false;">File 1</a>
<a href="wrapper.html" onclick="load('file2.html','content');return false;">File 2</a>
</code></pre>
<p>On content wrapper</p>
<pre><code><div id="content"></div>
</code></pre>
<p>Let me know simple way to do this on jquery.</p>
| javascript jquery | [3, 5] |
361,923 | 361,924 | Can i pass the ID name in an onChange event for a textbox? | <p>I have 3 textboxes to do a check on the entered date. The code I originally had was for one textbox. Is there a way to pass an ID name to the onChange event</p>
<pre><code><asp:TextBox ID="txtDate" runat="server" Width="110px" onChange="checkEnteredDate('txtDate')"></asp:TextBox>
function checkEnteredDate(var textBox = new String();) {
var inputDate = document.getElementById(textBox);
//if statement to check for valid date
var formatDate = new Date(inputDate.value);
if (formatDate > TodayDate) {
alert("You cannot select a date later than today.");
inputDate.value = TodayDate.format("MM/dd/yyyy");
}
}
</code></pre>
| asp.net javascript | [9, 3] |
280,164 | 280,165 | User Specific Aceess to the menu in asp.net with C# | <h2>ASP.NET with C#</h2>
<p>I want to create user through my registration page.</p>
<p>While creating the user i should be able to provide which menu or links the user should be able to access.</p>
<p>According to the registration, when the user will login then it should get the menu which are given to him.</p>
<p>I am using my own authentication (means using database username & password for authenticating)</p>
<p>Please suggest any thing .....</p>
<p>Thanks.....</p>
| c# asp.net | [0, 9] |
2,101,804 | 2,101,805 | Jetbrains PHPStorm 5.0.4 tells me I have a Duplicated jQuery Selector | <p>This is the piece of jQuery I wrote,</p>
<pre><code>$('#editUser').click(function(){
if ($(".selectedTR")[0]){
if($('.form-actions').is(':visible')){
$('.form-actions').slideUp('slow',function(){
$('.form-actions > h3').text("Edit");
}).css('display', 'none');
}
$('.form-actions')
.css('display', 'block')
.slideDown('slow');
}
else{
alert("Please select a user");
}
});
</code></pre>
<p>How can I remove the duplicated selectors?</p>
| javascript jquery | [3, 5] |
4,510,177 | 4,510,178 | RegisterStartupScript on master page not working. Alternatives? | <p>I have tried using RegisterStartupScript and ScriptManager.RegisterClientScriptBlock to no effect. both are failing to send my list of javascript arrays.</p>
<p>I am doing this on the masterpage's page load and can only assume the fact that I'm doing it on a master page is the problem.</p>
<p>I have the exact same C# code on another page (that is not being loaded at this time and holds different value names, thus will not conflict to create this current issue) and it works flawlessly.</p>
<p>Any insight would be greatly appreciated. </p>
<p>Upon further debugging the problem seems to lie in the fact that the code I send to be written in js from the C# file is being done 'after' it reads the masterpage's javascript somehow.. Though it should have to read the CS file and do it's work first, yeah? Hmph. I'm not sure.</p>
<p><strong>Edit: FIX'D</strong></p>
<p>Oh! I found a cheap way around. What I was doing was:</p>
<ul>
<li>A) creating arrays in C# to be sent
to javascript (so creating javascript
arrays that are already filled) </li>
<li>B)
trying to call registerstartupscript
/RegisterClientScriptBlock<br>
<ul>
<li>C) Getting an error because
window.onload reads the builder that
required those variables before
they're created (god knows why)</li>
</ul></li>
</ul>
<p><strong>Solution</strong>: instead of using window.onload to run the generator, I put it in the code block I was sending to javascript after I declare the variables. A devilish way that doesn't actually solve the problem, just works around it.</p>
| c# javascript asp.net | [0, 3, 9] |
1,117,407 | 1,117,408 | ConcurrentModificationException when iterating on LinkedList | <p>I am not sure why this part of my code causes error but I know that if I remove an item from a list and I am just iterating through it at the same time I get this exception. I read that syncronizing would be another idea, but it is not always the right apporach. LogCat shows the ConcurrentModificationException for <code>while (sw.hasNext())</code> row. Please note that other part of my code has abosultely no effect on the Lists. </p>
<pre><code>Iterator<Weapons> sw = Selected_Weapons.iterator();
while (sw.hasNext()) {
Weapons www = sw.next();
if (www.getY()<648){
Iterator<Container> cit2 = Containers.iterator();
while (cit2.hasNext()) {
Container c = cit2.next();
if (c.getWeaponID()==www.id){
c.setWeaponID(-1);
c.setIsEmpty(true);
Selected_Weapons.remove(www);
}
}
}
}
</code></pre>
<p>How can I solve this?</p>
| java android | [1, 4] |
2,481,395 | 2,481,396 | How to set textview text using javascript android | <p>I want to set text in textview in my android class using a javascript which contains a same named variable as in the class for textview to which I want to assign some text. Something like this:</p>
<p>In js:</p>
<pre><code>function validClick() {
fromJS.append("vikrant");
valid.performClick();
document.getElementById("ok").value = "Accepte";
}
</code></pre>
<p>fromJS is my textview in android class.</p>
<p>and the code in the class looks like:</p>
<pre><code> valid.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Context context = getApplicationContext();
CharSequence text = fromJS.getText();
CharSequence text = clsVariable;
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, text, duration);
toast.show();
}
});
</code></pre>
<p>EDIT:
Also,
I' writing </p>
<pre><code> wbvw.addJavascriptInterface(valid, "valid");
wbvw.addJavascriptInterface(fromJS, "fromJS");
</code></pre>
<p>in my onCreate method.</p>
<p>Can anybody please help?</p>
<p>Thanx in advance.</p>
| javascript android | [3, 4] |
2,138,167 | 2,138,168 | Multiple JavaScript files, combine into one | <p>I am developing in ASP.NET MVC and using multiple JavaScript files. E.g. jQuery, jQuery UI, Google Maps, my own JavaScript files, etc.</p>
<p>For performance, should I combine these into one? If so, how?</p>
| javascript asp.net | [3, 9] |
745,763 | 745,764 | Is there an elegant way to overload a jQuery method inside of a plugin only? | <p>I am having a bit of a <em>dull</em> moment today, where I can't think of an elegant solution for this problem.</p>
<p>I have inherited a plugin, and I need to modify it to allow passing a <em>enabled</em> or <em>disabled</em> state to it, to have it detach all of its events, show the <em>disabled</em> state, etc.</p>
<p>Like a jQuery UI <em>plugin</em>, I was simply going to use...</p>
<pre><code>$('div').myPlugin('disabled');
</code></pre>
<p>This I have no problem with.</p>
<p>However, the plugin attaches many events which are not <a href="http://docs.jquery.com/Namespaced_Events" rel="nofollow">namespaced</a>. I want the events to be namespaced, so I can remove the events easily.</p>
<p>There are many events that are bound, so I thought <em>hey, why don't I overload <a href="http://api.jquery.com/bind/" rel="nofollow"><code>bind()</code></a> to attach the namespace automatically?</em></p>
<p>I came up with this...</p>
<pre><code>(function(oldBind) {
$.fn.bind = function() {
if (arguments.length >= 2) {
arguments[0] += '.my-plugin';
}
return oldBind.apply(this, arguments);
}
})($.fn.bind);
</code></pre>
<p>I placed this at the top of the plugin, before the <code>return this.each(fn)</code> code.</p>
<p>It seemed to work nicely.</p>
<p>However, I tossed in a <code>console.log(arguments[1].toString())</code> and noticed (as I expected) this overwrote the main jQuery <code>bind()</code> outside of the plugin.</p>
<p>What is the best way to have this overloaded <code>bind()</code> only available to this plugin?</p>
<p>Should I simply place at end of the plugin <code>$.fn.bind = oldBind</code> or is there an easier way? </p>
| javascript jquery | [3, 5] |
3,689,082 | 3,689,083 | Double Space text on button from code behind C# | <p>I need to add text on a asp.net button depending on a virtual keyboard status</p>
<p>if the keyboard is visible the button text must be Hide Keyboard and if the Keyboard is not visible the text must be Show Keyboard. the button width is too short for the text i need to do a double space text inside the button i had already tried with</p>
<pre><code>1-&#13;&#10;
2- </br>
3- /n
4-adding a literal br
</code></pre>
<p>and nothing works can somebody help me with this?</p>
<p>Thanks in advance</p>
| c# asp.net | [0, 9] |
5,299,645 | 5,299,646 | How do I call a defined variable with jQuery? | <p>I'm kinda stuck.</p>
<p>I defined three variables:<pre><code>var part1 = "<form><input type='button' value='Open Window' onclick='window.open('http://jsfiddle.net/
";
var part2="5Xket,"
var part3 = "'toolbar=no',menubar='no')></form>";</code></pre></p>
<p>My aim is to concat those variables to create a working link when clicking on the button.</p>
<p>This is my try to concat the values of the variables.</p>
<pre><code>var mytest_2=part1+part2+part3;
alert (mytest_2);</code></pre>
<p>By clicking a button the button from mytest2 should appear. Clicking on that button there should be opened a new window with the url <a href="http://jsfiddle.net/5Xket/" rel="nofollow">http://jsfiddle.net/5Xket/</a></p>
<pre><code>$('#searchbutton').click(function() {
$("<td class='testclass'><input id='an_id' type='text'></td>").show();
$(mytest_2).insertAfter('#an_id');</code></pre>
<p>Well, the button appears as it should, but won't open a window.
My guess is that I'm wrong with the syntax somewhere because the alert puts out the correct order of variables.</p>
<p>Any ideas? Thank you.</p>
| javascript jquery | [3, 5] |
5,579,843 | 5,579,844 | Hide window when creating new process | <p>I am starting a new process with the following code:</p>
<pre><code>Process n;
n = Process.Start("D:\\Update");
</code></pre>
<p>When the process starts, it is visible on the desktop. Is there any way to ensure that the new process will start in the background?</p>
| c# asp.net | [0, 9] |
3,798,697 | 3,798,698 | How to get last sms from the device? | <p>I have been developing the application which must recognize SMS commands. So, I need to know how I can get the last sms. I know that I need to use BroadcastReceiver (and I use it), but I don't know how I can get the last sms in this class. Please, help me with it, I hope you can do it. Thank you in advance. </p>
| java android | [1, 4] |
1,712,822 | 1,712,823 | google map find latlng | <p>I used the google map api to find the co-ordinates of addresses. I used this function</p>
<pre><code>function searchLocations() {
var address = document.getElementById("addressInput").value;
var geocoder = new google.maps.Geocoder();
geocoder.geocode({address: address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
searchLocationsNear(results[0].geometry.location);
} else {
alert(address + ' not found');
}
});
}
</code></pre>
<p>the "addressInput" i get from html form</p>
<pre><code><input type="text" id="addressInput" size="10"/>
<input type="button" onClick="searchLocations()" value="Search"/>
</code></pre>
<p>I alert the var address it catches the address, means function work correctly. But it is not converting the address into latitude and longitude. please tell me where i am wrong</p>
| php javascript | [2, 3] |
2,039,791 | 2,039,792 | Using jQuery 1.4.4 This simple method fails for some reason | <pre><code>$.get($(this).attr('rel'), function(response){}, 'script')
.error(function(){ alert('this failed')});
</code></pre>
<p>I get. <code>.error is not a method</code> . But it was added in version 1.4.3</p>
<p><a href="http://api.jquery.com/error/" rel="nofollow">http://api.jquery.com/error/</a></p>
<p>Is there some kind of type I have ?</p>
| javascript jquery | [3, 5] |
4,433,370 | 4,433,371 | How to avoid calling implements at 2 activites? | <p>I have two activities: <code>MainActivity extends ListActivity</code> and <code>Preferences implements BillingController.IConfiguration</code>.</p>
<p>Now I need to call <code>BillingController.someMethod(this)</code> at <code>MainActivity</code>. Such call can be made only if <code>MainActivity implements BillingController.IConfiguration</code>. But this is already implemented at <code>Preferences</code> class. What can I do to avoid implementing that again?</p>
| java android | [1, 4] |
4,652,104 | 4,652,105 | Jquery limit text in text field copy safe | <p>Here is a mind Boggling question i am having trouble with. I have a text field. This text field needs to accommodate U.S mobile numbers with 4 formats </p>
<ol>
<li>XXX-XXX-XXXX </li>
<li>XXXXXXXXXX</li>
<li>X-XXX-XXX-XXXX</li>
<li>XXXXXXXXXXX</li>
</ol>
<p>When the last character is entered it needs to do a check via ajax which i have no problem with. </p>
<p>I need to check if the textbox has the full mobile number in when typing, copying and pasting, deleting and every possible way to put numbers in that field. </p>
<p>i tried checking it with $("#id").keyup but that doesn't work when you paste something. </p>
<p>is there a way to check either via interval or something else if there is 10 or eleven characters in that field regardless of how it got there? [edit]</p>
<p>Here is a solution i found</p>
<pre><code>var checkMsisdnInterval = window.setInterval( function () {
var msisdn = getdigits($("#newSessionMsisdn").val());
if(msisdn.length == 10 && !checked) {
doPreCheck(msisdn);
checked = true;
} else if(checked == true) {
//do something here
} else {
//do something else
}
}, (1000 * 60 * 0.1));
$("#newSessionMsisdn").keyup(function(){
checked = false;
});
function getdigits (s) {
return s.replace (/[^\d]/g, "");
}
</code></pre>
<p>it works like a bomb. Thanks for all the replies</p>
| javascript jquery | [3, 5] |
3,313,704 | 3,313,705 | System.Diagnostics.Process.Start not work with IIS, but on ASP.NET Development Server | <p>I am using VS2008 C# and testing on my local XP Pro PC with local IIS, I have wrote a web service to call a third party software .exe file to use svn checkout commands to insert data into a folder, which use System.Diagnostics.Process.Start . The same codes did work when I use VS2008 build-in ASP.NET Development Server(http://localhost:2999/MyServices/MyServices.asmx). but when I use IIS normal URL(http://developer/MyServices/MyServices.asmx) to run Process.Start on the web service, it just haunlted and not doing anything.plz send one sample program.</p>
| c# asp.net | [0, 9] |
453,154 | 453,155 | need to add before and after disconnected html code like /div to an object | <p>got a simple question! i have a code with structure like that:</p>
<pre><code> <a class="adv_link" target="_blank" href="">Link 1</a>
text here 1
<div class="adv_separator"></div>
<a class="adv_link" target="_blank" href="">Link 2</a>
text here 2
<div class="adv_separator"></div>
and etc...
</code></pre>
<p>i want to add BEFORE EACH link with class "add_link" the code: <code><div class="slide"></code> and add AFTER EACH div with class "adv_separator" the code: <code></div></code> how i can do it with jquery?</p>
<p>p.s. in other words i want to create several divs nested with these links,texts and divs so i can use jquery cycle plugin to create a slider.</p>
<p>thank you all for the help!</p>
| javascript jquery | [3, 5] |
5,910,634 | 5,910,635 | onblur doesn't work when i clone input | <p>I want to change input type text to password. But it doesn't work in ie8. I found a solution; clone and replace input but onblur doesn't work after clone.</p>
<p>The debugger doesn't break OnBlur function. Can somebody show me?</p>
<p>Here is js code : </p>
<pre><code>$(document).ready(function () {
var input = document.getElementById("Password");
var input2 = input.cloneNode(false);
input2.id = 'password1';
input2.type = 'password';
$('#Password').focus(function () {
input.parentNode.replaceChild(input2, input);
input2.focus();
});
$('#password1').blur(function () {
if ($(this).val() == '' || $(this).val() == Passwordtxt) {
document.getElementById("password1").setAttribute("type", "text");
$(this).val(Passwordtxt);
}
});
});
</code></pre>
| javascript jquery | [3, 5] |
4,457,425 | 4,457,426 | Jquery getting information from php | <p>I need to get information from a php file and put the information in jquery and i also need to know if the information has changed</p>
| php jquery | [2, 5] |
562,691 | 562,692 | Javascript code in php variable | <p>I want to put javascript code to php variable, after that save it to mysql database and after that echo it on page. I have problem with save javascript code to php variable and echo it on page.</p>
<p>I tried to save javascript code to php variable this way but got errors:</p>
<pre><code>$parameter = "<script language='JavaScript'>document.write(geoip_country_name());</script>";
</code></pre>
<p>For echo this javascript code from database I was thinking to use that way:</p>
<pre><code>$parameterecho = htmlentities($parameter);
echo $parameterecho;
</code></pre>
<p>Is there any better solution to echo code to page and how to save code to php variable?</p>
| php javascript | [2, 3] |
4,094,380 | 4,094,381 | How to get confirmation box along with the input value values entered in the form? | <p>I am designing a web application, in which I set and give lot of input values. On button click I want to get a brief details of what I have done on a confirmation window.</p>
<pre><code><asp:Button ID="DONE" runat="server" onclick="DONE_Click" Text="DONE" OnClientClick="return confirm('Are you sure, you wish to create profile?');"/>
</code></pre>
<p>Above is my sample what I have tried, which just asks <strong>Are you sure, you wish to create profile?</strong>, along with this I want details of what I fill in the form.</p>
<p>For example, If my form contains entering some fields like firstname, lastname. After entering the fields, When i clcik on button, the confirmation window should say :</p>
<p><strong>Firstname : textbox1.text and lastname : textbox2.text, Are you sure yo want to update in the database?</strong></p>
<p>Any help will be appreciated.
Thank you.</p>
| c# asp.net | [0, 9] |
639,468 | 639,469 | how to check whether the link button visible in jquery | <p>how to check the link button visible in jquery. Below code is not working?</p>
<pre><code> if ($('id*="LnkBtn"').is(':visible')) { // check visibility
if (!Validatechecked("SrvRgnMDD")) {
$('#<%=Valid.ClientID%>').html("*");
passtest = false;
}
<asp:LinkButton ID="LnkBtn" runat="server" Text="Show Details" AutoPostBack="true"
CausesValidation="False" OnClick="MktallocLnkBtn_Click" />
</code></pre>
| jquery asp.net | [5, 9] |
3,613,928 | 3,613,929 | Disable redirection script | <p>We have a redirect script on our site that detects mobile devices and redirects users to a subdomain which goes to the mobile site folder. But now we need a mechanism that gives the visitor a button on the page that then reloads the page and bypasses this check. The goal is if a smartphone user wants to see the full site, we need to give them a button to push to do so. So, the question is: is it possible to disable this script when user clicks on that button?</p>
| php javascript jquery | [2, 3, 5] |
2,721,433 | 2,721,434 | Defining a variable in a js file, from a php file | <p>I have a javascript file that needs a value from a variable in a php script in which the JS file is being called.</p>
<pre><code><?
$sid = session_id();
?>
<html>
<head>
<script src="javascript.js" type="text/javascript"></script>
...
</code></pre>
<p>How can i get $sid into the js file for use?</p>
| php javascript jquery | [2, 3, 5] |
59,990 | 59,991 | Clear dynamic UserControl container | <p>How can I make _dynamicMaterials empty or clear the viewstate?</p>
<p>When the user clicks on submit I want to reset the container so all textboxes are empty.</p>
<p>Any ideas how I can work this out? </p>
<pre><code> private materials[] _dynamicMaterials; // Container for dynamically added UserControl "materials.ascx"
protected void Page_PreInit(object sender, EventArgs e)
{
GetPostBackControl(Page);
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
if (!this.DesignMode)
{
int count = MySession.Current.UserControlCount;
_dynamicMaterials = new materials[count];
for (int i = 0; i < count; i += 1)
{
Control newcont = LoadControl("materials.ascx");
newcont.ID = "materialControl" + i.ToString();
myPlaceHolder1.Controls.Add(newcont);
_dynamicMaterials[i] = (materials)newcont;
}
}
}
</code></pre>
| c# asp.net | [0, 9] |
935,870 | 935,871 | android transaction notification from webserver | <p>I have made a website about online shopping, I want each transaction order provide alarm notification to my android application. What is needed to make this and how to get started?</p>
| php android | [2, 4] |
4,842,499 | 4,842,500 | Using jQuery, how do I get the index of an element found in XML? | <p>I have an XML file setup like so:</p>
<pre><code><entry name="bob"></entry>
<entry name="ryan"></entry>
<entry name="joe"></entry>
...
<entry name="etc"></entry>
</code></pre>
<p>Next, I have a line of code that picks out a name from the XML like so:</p>
<pre><code>var $user= $('entry[images="' + userName + '"]', xml);
</code></pre>
<p>But how do I find out what the index of $user is in the overall XML? Example: if userName was 'joe', I should get the number '2' back. Any suggestions?</p>
| javascript jquery | [3, 5] |
3,210,331 | 3,210,332 | checked checkbox values | <p>I'm creating the checkboxes and corresponding ids for them dynamically as shown, according to the values in which I'm getting from back end.<br>
Once it has been created, how could I retrieve the values of this checked checkboxes? </p>
<p><strong>HTML:</strong></p>
<pre><code><tr>
<td class="valueleft">All</td>
<td class="valueleft"><input type='checkbox' id="cb1"/></td>
</tr>
<tr>
<td class="valueleft">--------</td>
<td class="valueleft">----checkbox-------</td>
</tr>
</code></pre>
<p><strong>jQuery:</strong></p>
<pre><code>$("#myTable").last().append("<tr><td>"+name+"</td><td><input type='checkbox'id="+id+"/></td></tr>");
</code></pre>
| javascript jquery | [3, 5] |
1,273,793 | 1,273,794 | Test for empty jQuery selection result | <p>Say I do </p>
<pre><code>var s = $('#something');
</code></pre>
<p>and next I want to test if jQuery found #something, i.e. I want to test if <code>s</code> is empty.</p>
<p>I could use my trusty <code>isempty()</code> on it:</p>
<pre><code>function isempty(o) {
for ( var i in o )
return false;
return true;
}
</code></pre>
<p>Or since jQuery objects are arrays, I suppose I could test <code>s.length</code>.</p>
<p>But neither seem quite in the idiom of jQuery, not very jQueryesque. What do you suggest?</p>
| javascript jquery | [3, 5] |
1,296,008 | 1,296,009 | ADT field not being set | <p>I'm running a simple java project on Android (using Eclipse ADT).
During debugging I see that a value is not set correctly.
I think this screenshot says it all:</p>
<p><img src="http://i.stack.imgur.com/8miyO.png" alt="debug screen shot"></p>
<p>Any idea what can cause this?</p>
<p>Thanks a lot,
Omer</p>
| java android | [1, 4] |
5,240,442 | 5,240,443 | Rebooting a computer from an ASP.Net page hosted on the computer | <p>I have a computer A which hosts different kind of things:</p>
<ul>
<li>A website (is developped using <code>C#</code> and <code>ASP.Net</code>)</li>
<li>Applications</li>
</ul>
<p>Our customers have access to the website and sometimes, they will want to reboot the computer A (knowing that it will cut the website during the reboot).</p>
<p>My question is simple : does it exist a way of :</p>
<ul>
<li>Rebooting a computer by simply clicking a button on an <code>ASP.Net</code> page ? How would I manage to do so ?</li>
<li>The same way, is it possible to execute some batch script (executes on the Computer A) when clicking on a button on an <code>ASP.Net</code> page ?</li>
</ul>
<p>Thanks for your help!</p>
| c# asp.net | [0, 9] |
2,767,278 | 2,767,279 | How can I dynamically change text based on input field? | <p>How can I dynamically change a link based upon an input field in a form. For example, if I input <code>1.00</code> into the input field, I want to change the link to this:</p>
<p><code>donate.php?amount=1.00</code></p>
<p>Where the amount changes to the amount specified in the input field.</p>
<p>I'm guessing its JavaScript which isn't my strongest point but any help would be awesome. :)</p>
<p>Thanks</p>
| php jquery | [2, 5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.