Unnamed: 0
int64 302
6.03M
| Id
int64 303
6.03M
| Title
stringlengths 12
149
| input
stringlengths 25
3.08k
| output
stringclasses 181
values | Tag_Number
stringclasses 181
values |
---|---|---|---|---|---|
1,877,874 | 1,877,875 | How to limit users from entering english characters in a textbox | <p>Do I need to use regex to ensure that the user has typed in English? All characters are valid except non English characters.</p>
<p>How do I validate this textbox?</p>
| c# asp.net javascript | [0, 9, 3] |
890,667 | 890,668 | passing array fields to jquery ajax | <p>I have a form I am submitting via jquery ajax. Early in the form, I have this field:</p>
<pre><code> <select name="inquirymodule[]" id="inquirymodule">
</code></pre>
<p>The user can add as many as they like, and all the selects go into the inquirymodule[] array.</p>
<p>The jQuery looks like this:</p>
<pre><code> jQuery.ajax({
type: 'POST',
url: 'ajax.php',
dataType: 'json',
data: {
inquirymodule: jQuery("select[name='inquirymodule[]']").serialize(),
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
alert('error');
}
});
</code></pre>
<p>That works fine. </p>
<p>Trying to do the same thing with a date, like this:</p>
<pre><code> <input class="formInput" type="text" id="startBreak0" name='startbreak[]' />
</code></pre>
<p>adding</p>
<pre><code> startbreak: jQuery("select[name='startbreak[]']").serialize()
</code></pre>
<p>to the ajax call. It doesn't work, I cannot see why. Suggestions?</p>
| php jquery | [2, 5] |
2,744,265 | 2,744,266 | Math.POW(x,y) getting different value from x ^ y | <p>In JavaScript </p>
<pre><code>215 ^ 150 = 65
</code></pre>
<p>But when i try <code>Math.POW(215, 150)</code> in C# I am getting Infinite</p>
<p>Why it is not <code>65</code> ? How should I get 65 in C# ?</p>
| c# javascript | [0, 3] |
1,636,968 | 1,636,969 | Custom Javascript Ajax for ASP.NET | <p>I've written some basic Javascript functions and would like to learn how to enable asynchronous postbacks within a C# 4.0/ASP.net project using this JS code. </p>
<p>For example, I have a script that increments a number when clicked. When clicked again, the number is decremented. I basically load the number from a database, then hide one <code><span></code> and show another with the corresponding decremented number on click. This is not complicated javascript; its a simple example. Now when I click the button I want to send this increment/decrement call back to the server to update the database's number.</p>
<p>I realize that I can accomplish something akin to this example using the AJAX Control Toolkit's toggle button. I, however, want to know how to use my OWN javascript to create AJAX functionality.</p>
<p>How do I accomplish this using C# and my custom Javascript code?</p>
<p>I'm not opposed to using the ASP.net AJAX library, I just don't want to use a ready built control. I want to learn the process of creating my own AJAX functionality. I would presume that I will have to use an <code>asp:UpdatePanel</code>, but I don't know how to call C# functions from the client side.</p>
<p>My javascript is not jQuery, in fact I want nothing to do with jQuery until I learn more about javascript and this process.</p>
| c# javascript | [0, 3] |
417,413 | 417,414 | My site works fine in FF, but IE7 gives me error | <p>Here is my site:
<a href="http://www.sumsy.com/temp/templatesys/config.php?template=1" rel="nofollow">http://www.sumsy.com/temp/templatesys/config.php?template=1</a></p>
<p>IE6, 7 give me errors.</p>
<p>Line 9
Char 3
Expected identifier, string or number
Code 0
URL: config.php?template=1</p>
<p>so for situation like this, how do you guys debug it?
I dont even know the error is coming from JS code or Php code.
IE doesnt say which file.</p>
<p>Thanks</p>
| php jquery | [2, 5] |
1,823,860 | 1,823,861 | jquery basic of dollar sign - named vs anonymous | <p>I have a couple of interview questions</p>
<ol>
<li><p>What is the different between <code>$(function(){});</code> and <code>$(document).ready(function(){});</code></p></li>
<li><p>What is the difference between <code>$(function(){});</code> and <code>var func=function(){};</code> How are each of them called?</p></li>
<li><p>Given the following script</p>
<pre><code><script language="javascript">
$(function()
{
var id=$("cssID");
//do something with your id
//your event to be added here
});
</script>
</code></pre>
<p>How can you add an event, say, <code>onmouseout</code> that will work on the <code>id</code>?</p></li>
</ol>
<p>Here are my answers:</p>
<ol>
<li><p>They are the same, both are meant to run when the page document finishes loading</p></li>
<li><p>The first one is called automatically while the second one will be called via named reference; that is <code>func.called()</code>, for example.</p></li>
<li><p>Something like this: </p>
<pre><code>$(function()
{
var id=$("cssID");
//do something with your id
//Oki
id.onmouseout
(function(){
//do something
});
});
</code></pre></li>
</ol>
<p>However my professor says I was wrong in all three. she explained things I am unsure and didn't dare to ask, she was mad about me. What are the correct answers and why are mine wrong?</p>
| javascript jquery | [3, 5] |
4,761,866 | 4,761,867 | Javascript - using in function defined variable | <p>I want to execute this function and use the variable outside the function, but inside an each fucntion. How can I get this work?</p>
<pre><code>$('.social').each(function() {
url = "http:www.google.com";
bit_url(url);
$(element).append(urlshortened);
});
function bit_url(url) {
var url = url;
var username = "...";
// bit.ly username
var key = "...";
$.ajax({
url : "http://api.bit.ly/v3/shorten",
data : {
longUrl : url,
apiKey : key,
login : username
},
dataType : "jsonp",
success : function(v) {
urlshortened = v.data.url;
}
});
}
</code></pre>
<p>Thanks guys!</p>
| javascript jquery | [3, 5] |
4,702,367 | 4,702,368 | POST array through PHP and get in Python | <p>I am posting a array </p>
<pre><code>$name[0] = "anurag";
$name[1] = "abhishek";
$ch = curl_init('http://localhost:8000/v0/url-generator');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, "name=$name");
curl_exec ($ch);
curl_close ($ch);
</code></pre>
<p>In python I got name = array .</p>
<pre><code>if request.method == 'POST':
name = request.POST["name"]
print name
</code></pre>
<p>output = array.</p>
<p>I would like to output this in python:</p>
<pre><code>name = ['anurag','abhishek']
</code></pre>
| php python | [2, 7] |
2,171,656 | 2,171,657 | Get me off the JavaScript postback Failboat | <p>I've got to call two js functions, setfocus on textbox and stop a postback from occuring on single buttonclick. I think I got it if I could only intercept the postback. My js skills are on par with weaksauce. </p>
<p><strong>test case</strong></p>
<pre><code><%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JsTextFocus.aspx.cs" Inherits="WebApplication1.JsTextFocus" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" language="Javascript">
function aMethod() {
var dowork = 'bleh';
}
function setFocusOnTextBox() {
TextBox1.Focus();
return false;//Stop the postback..FAIL
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:ImageButton ID="imageBtn" runat="server" ImageUrl="images/document_Small.gif" CausesValidation="false" OnClientClick="aMethod();return setFocusOnTextBox();return false;" />
</div>
</form>
</body>
</html>
</code></pre>
<p><strong>Page load shouldn't fire after OnClientClick</strong></p>
<pre><code> protected void Page_Load(object sender, EventArgs e)
{
Response.Write("PS happened at " + DateTime.Now);
}
</code></pre>
| javascript asp.net | [3, 9] |
4,901,691 | 4,901,692 | Pasing the selected checkbox integer values in gridview in a single list | <p>I ve a gridview with checkbox, wherein if I select the checkboxes, the respective values are got using datakeys.How do I pass the values in a list as a whole instead of loopin with foreach? I need to pass it in asingle variable. Any help is appreciated</p>
<pre><code> foreach (GridViewRow row in gvAll.Rows)
{
string status =row.Cells[4].Text;
CheckBox chkb = (CheckBox)row.FindControl("chk");
//Rows[i].Cells[0].FindControl("CheckBox1");
if (chkb.Checked)
{
int id = Convert.ToInt32(gvAll.DataKeys[row.RowIndex].Values[0]);
//int id =int.Parse(a);
if (!(id.Equals(System.DBNull.Value)))
{
if (String.Equals(a, status))
{
SC.Mark(id);
}
if (String.Equals(b, status))
{
SC.Mark_next(id);
}
}
}
</code></pre>
| c# asp.net | [0, 9] |
1,093,752 | 1,093,753 | javascript in asp.net | <pre><code><asp:RadioButtonList ID="RdoBtnHasNotified" runat="server" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="RdoBtnHasNotified_SelectedIndexChanged">
<asp:ListItem Value="1">Yes</asp:ListItem>
<asp:ListItem Value="0" Selected="True">No</asp:ListItem>
</asp:RadioButtonList>
<asp:TextBox ID="TxtHowNotified" runat="server" TextMode="MultiLine" MaxLength="100"></asp:TextBox>
</code></pre>
<p>i want to enable textbox by clicking on radiobuttonlist but i am not able to do so without making autopostback=true.how can i do it using javascript??</p>
| asp.net javascript | [9, 3] |
2,691,743 | 2,691,744 | Javascript, jQuery - how signed actions to just created object? | <p>I am trying to make simple list with ability to add and delete elements. For now I am working on adding and performing a simple action on each of list elements object (existing and added). Unfortunately I have met some difficulties with that. I am able to modify objects that are created at the beginning, but not one added during "webpage working".</p>
<p>First of all my idea was to add AJAX to this, but I don't think it is the easiest way.</p>
<p>I think that some time ago (I don't remember where) I read how to make this work, but now I don't know. I would be really glad if someone would help me with this or at least give a link to good explanation of this.</p>
<p>There is what I have done so far (well this is mostly just a scratch, but the main idea is in it): <a href="http://jsfiddle.net/sebap123/pAZ7H/0" rel="nofollow">http://jsfiddle.net/sebap123/pAZ7H/0</a></p>
<pre><code>$("li").click(function() {
$(this).text("new text");
});
$("#addButton").click(function() {
$(".list").append(
$('<li>').append($('<span>').append("added li")));
});
</code></pre>
<p>Thank you for all responses.</p>
| javascript jquery | [3, 5] |
5,939,719 | 5,939,720 | Running background tasks in asp.net | <pre><code> I ve implemented the following code in the below link:
</code></pre>
<p><a href="http://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/" rel="nofollow">http://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/</a></p>
<p>Can i implement it for sending mails once in a day and i want to send mail at 6.00AM india time... Plz help me guys.....</p>
| c# asp.net | [0, 9] |
476,995 | 476,996 | get user confirmation activation link value | <p>I'm using a confirmation link method to activation of user account in my website.when user submit the form, I send a link on user email address, with activation code. when user click on this link he redirect on my site registration page with value in address bar like
<a href="http://showmycode.co.in/boobloom/[email protected]&activation_code=caU8xWxvYM" rel="nofollow">http://showmycode.co.in/boobloom/[email protected]&activation_code=caU8xWxvYM</a>
how can check the email address and activation code for active the user status...and i get the value email address and activation code. </p>
<pre><code> $confirmLink = HTTP_PATH.'register'.'?'.'email'.'='.$to.'&'.'activation_code'.'='.$confirmationcode;
</code></pre>
| php javascript | [2, 3] |
3,821,043 | 3,821,044 | Generating table inside a table row dynamically | <p>I have a web application, which uses HTML generic control to generate tables. I have a button in each row created dynamically. My question is, how can I add a new table under the corresponding row that holds the button?</p>
| c# asp.net | [0, 9] |
2,169,759 | 2,169,760 | Auto submit form before going to next page of form | <p>I have a multi-page form that was created for me. All of the pages on the form have submit button that saves the data to a database, a previous button that goes to the previous page and a next button. The problem is that the data does not save if I click the previous or next links. </p>
<p>How can I set it up so that that submit button is automatically pressed before going to the previous or next page of the form?</p>
<pre><code><a class="form-buttons" href="<?php echo $prev_url;?>">Prev</a>
<div class="form-buttons-middle"><input type="submit" name="status" value="Save" /></div>
<a class="form-buttons" href="<?php echo $next_url;?>">Next</a>
</code></pre>
<p>I'm new to programming so any help would be greatly appreciated.</p>
<p>Thanks!</p>
| php javascript jquery | [2, 3, 5] |
810,509 | 810,510 | How to run separate application from Android button click | <p>I tried to add two buttons in my Android application to select an application from separate two applications Order system and Inventory system.As shown in the image.</p>
<p><img src="http://i.stack.imgur.com/PslmY.jpg" alt="enter image description here"></p>
<p>I have implemented these two applications as separate two Android projects. When I try to run this application it comes until to the the selecting window correctly, but when one button is pressed emulator shows "Force Close" message.
I have added Order system and Inventory system projects to first application's build path and then import their packages(com.oms.ws and com.inv.ws). This may be incorrect, but don't know how to do this. Please help me! I'm new to Android.
I want to test this application using the emulator! </p>
<p>Here is the code I have used to select applications.</p>
<pre><code>import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import com.oms.ws.*;
public class ThirdScreen extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.thirdscreen);
Button oms;
oms = (Button)findViewById(R.id.orderSystem);
oms.setOnClickListener(ordrMnagemntSys);
Button inventory;
inventory = (Button)findViewById(R.id.inventorySystem);
inventory.setOnClickListener(inventorySys);
}
private OnClickListener ordrMnagemntSys = new OnClickListener(){
public void onClick(View v) {
Intent oMs = new Intent(getApplicationContext(), com.oms.ws.TestOms.class);
startActivity(oMs);
}
};
private OnClickListener inventorySys = new OnClickListener(){
public void onClick(View v) {
Intent inven = new Intent(getApplicationContext(), com.inv.ws.TestInventory.class);
startActivity(inven);
}
};
}
</code></pre>
<p>Thanks!</p>
| java android | [1, 4] |
4,034,108 | 4,034,109 | How in InputMethodService generate KeyEvent equivalent "Next" | <p>How in InputMethodService generate KeyEvent equivalent "Next" (jump to the next view) without change current view?</p>
<p>I try code</p>
<pre><code> getCurrentInputConnection().sendKeyEvent( new KeyEvent( KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_TAB));
getCurrentInputConnection().sendKeyEvent( new KeyEvent( KeyEvent.ACTION_UP, KeyEvent.KEYCODE_TAB));
</code></pre>
<p>This work in emulator, but not work on real devices in real app (android 2.3.4, com.android.email).</p>
<p><strong>Edit:</strong></p>
<p>This code in android >= 4.X generate jump to the next view.</p>
<p>In android 2.3.X this code add tab-code to the end of current view but not jump to next view.</p>
| java android | [1, 4] |
2,235,025 | 2,235,026 | Creating an asp.net server control with jquery | <p>I have done my research before posting this question and I can not find anything helpful. I do not know if it is possible to create asp.net server control with the help of jquery. I have an upload control input that runs at server and I have used a javascript code to create a new upload control input any time a particular button is clicked. But I require a new <strong>RegularExpressionValidator</strong> to be created to control each new upload control. Can this be achieved rather than using multple upload control and <strong>RegularExpressionValidator</strong> on my page. Scrutinize my code on what I have done so far.</p>
<pre><code>function addFileUploadBox() {
if (!document.getElementById || !document.createElement)
return false;
var uploadArea = document.getElementById("upload-area");
var count = uploadArea.getElementsByTagName("input").length;
if (!uploadArea)
return;
var newLine = document.createElement("br");
uploadArea.appendChild(newLine);
var newUploadBox = document.createElement("input");
// Set up the new input for file uploads
newUploadBox.type = "file";
newUploadBox.size = "20";
// The new box needs a name and an ID
if (!addFileUploadBox.lastAssignedId)
addFileUploadBox.lastAssignedId = 100;
newUploadBox.setAttribute("id", "dynamic" + addFileUploadBox.lastAssignedId);
newUploadBox.setAttribute("name", "dynamic:" + addFileUploadBox.lastAssignedId);
newUploadBox.setAttribute("runat", "server");
uploadArea.appendChild(newUploadBox);
$("<asp:RegularExpressionValidator ID='regular" + addFileUploadBox.lastAssignedId + "' ValidationExpression='(.*?)\.(jpg|jpeg|png|gif|JPG)$' runat='server' ErrorMessage='Invalid file' ControlToValidate='dynamic" + addFileUploadBox.lastAssignedId + "' ForeColor='Red'></asp:RegularExpressionValidator>").insertAfter("#dynamic" + addFileUploadBox.lastAssignedId);
addFileUploadBox.lastAssignedId++;
}
</code></pre>
| jquery asp.net | [5, 9] |
4,422,098 | 4,422,099 | How to ignore uppercase/lowercase when selecting pathname? JS/Jquery | <pre><code>if (pathname == "/" || pathname == "/default.asp")
</code></pre>
<p><em>in js using jquery library.</em></p>
<p>I want this to catch "Default.asp" as well as "DeFaULT.asp" and "default.asp"</p>
<p>halp. </p>
| javascript jquery | [3, 5] |
569,098 | 569,099 | Read Images programmatically | <p>i am a 3rd year computer science student, and my seminar(graduation project) is in the next semester, so i started to think about it and i thought that a face recognition system would be a great idea, so i have two questions:</p>
<p>1- how can i read a picture programmatically, i mean if i have a picture, how can read the pixels and colors in order to recognize the face later on?</p>
<p>2- do you know any useful ebooks or resources that might help me in this topic cuzz i am really interested about it, and i hope that i can implement it.</p>
<p>thank you very much dudes </p>
<p><strong>this is my first post and i hope you will really help me :)</strong></p>
| c# php | [0, 2] |
2,432,614 | 2,432,615 | Website Architecture Module Versioning | <p>I currently have an ASP.NET web application that is serving multiple clients from a single codebase. We use URL rewriting to detect which client is being served (pretty much a virtual vdir) and that drives which master page/themes/module version to run.</p>
<p>Right now, each client can have a different version of a module or the default module. A module may consist of a catalog (grid) of data with various links to other modules, or it can be a chart generation module with options for which data is pulled. The modules need to be themed and localized...</p>
<p>Right now, we make ascx controls (/modulename/clientid.ascx) that are a part of the website's solution. If we haven't registered a control for a client, the default is used. To publish an update to any module a full publish must take place. This can be an issue if a different client has work that isn't ready to be published. For the rewrite I'd like to address this. I'm just not sure what approach to take for this. Can WCF be used here? Maybe add-ins? Each client's implementation is its own dll?</p>
<p>Thanks</p>
| c# asp.net | [0, 9] |
209,950 | 209,951 | Need to run alert a string using javascript code | <p>I want to alert <code>is it executed well?</code> after following line is executed in javascript</p>
<p><code>window["is"]("it")("executed")("well")("?")</code></p>
<p>window here means a global object. I have no idea what that above line is in javascript.</p>
| javascript jquery | [3, 5] |
694,363 | 694,364 | jquery scroll view without displaying scroll bar | <p>I hope to create scroll view likes the attached image</p>
<p><img src="http://i.stack.imgur.com/ZSMth.png" alt="enter image description here"></p>
<p>it will not display the horizontal scroll bar, but display the arrow at top and bottom.
when user's mouse move over them, it will scroll and display more items</p>
<p>Is there any library/jquery extension can do this?</p>
<p>Welcome any comment</p>
| javascript jquery | [3, 5] |
3,646,912 | 3,646,913 | getting .text() of children elements from jQuery() | <p>I'm having trouble to get the proper formatted texts of each child elements, either as an Array or in as text.</p>
<p>I had tried</p>
<p>var name= jQuery(".childOne").text();
var number = jQuery(".childTwo").text();</p>
<p>but it joins all the name/number text in name and number.</p>
<p>HTML is:</p>
<pre><code><span class="parent"><span class="childOne">David</span><span class="childTwo">541</span></span>
<span class="parent"><span class="childOne">Gruce</span><span class="childTwo">162</span></span>
<span class="parent"><span class="childOne">Proman</span><span class="childTwo">743</span></span>
</code></pre>
<p>and I need to generate output in multi-dim-array so that each child-element's-text can be figured out properly.</p>
<p>Preferred output can be in array or in any form.</p>
<pre><code>Array
(
0 = > array (
0 => "David",
1 => "541"
),
1 = > array (
0 => "Gruce",
1 => "162"
),
2 = > array (
0 => "Proman",
1 => "743"
)
)
</code></pre>
| javascript jquery | [3, 5] |
3,794,403 | 3,794,404 | Option menu default gray border removal | <p>in my app i have option menu i try to customize it , i did it by refer it to style ,</p>
<p>what i need is either removal of default gray border around option menu or customize it to another color .</p>
<p>any advice will be appreciated . </p>
<p>as shown below :</p>
<p><img src="http://i.stack.imgur.com/TDamH.png" alt="enter image description here"></p>
<p>My code :</p>
<pre><code> public boolean onCreateOptionsMenu(android.view.Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.cool_menu, menu);
getLayoutInflater().setFactory(new Factory() {
public View onCreateView(String name, Context context,
AttributeSet attrs) {
if (name .equalsIgnoreCase("com.android.internal.view.menu.IconMenuItemView")) {
try {
LayoutInflater li = LayoutInflater.from(context);
final View view = li.createView(name, null, attrs);
new Handler().post(new Runnable() {
public void run() {
view .setBackgroundResource(R.drawable.border1);
((TextView) view).setTextSize(20);
((TextView) view).setTextColor(Color.RED);
}
});
return view; }
catch (InflateException e) {}
catch (ClassNotFoundException e) {}
}
return null; }
});
return super.onCreateOptionsMenu(menu); }
</code></pre>
| java android | [1, 4] |
3,350,343 | 3,350,344 | Why url parameter doesn't have correct format in javascript? | <p>I have to create a javascript which contains an url in code behind page using C#. But the url parameter inside javascript doesn't have correct format after generated by C#.</p>
<p>Example:</p>
<p><strong>Url parameter:</strong> <a href="http://google.com" rel="nofollow">http://google.com</a></p>
<p><strong>Javascript:</strong> javascript:dnnModal.show('<a href="http://google.com" rel="nofollow">http://google.com</a>',false,365,206,false)</p>
<p><strong>C# code:</strong></p>
<pre><code>string link = "http://google.com?popUp=true";
string googleIcon = "<a href='javascript:dnnModal.show('" + link +',false,365,206,false)'><img border='0' src='~/Icons/gIcon.png'></a>";
</code></pre>
<p>After generated from code behind the page view the url incorrect format. There is the code of googleIcon after I am using "View Select Source" to view the code of aspx page:</p>
<pre><code><a href="javascript:dnnModal.show(" http:="" google.com?popup="true',false,365,206,false)'"><img src="~/Icons/gIcon.png" border="0"></a>
</code></pre>
<p>The hyperlink on icon just show this when I move the mouse over it:</p>
<pre><code>javascript:dnnModal.show(
</code></pre>
<p>The url is lost and the remind string is lost too.</p>
<p>I need some help on my issue to show the way how to pass an url parameter into javascript using C#.</p>
| c# javascript asp.net | [0, 3, 9] |
1,739,742 | 1,739,743 | way to load javascript code in web page | <p>I prepare a project with a simple webpage, canvas, and javascript files that run game in the canvas. I want load my code when page starts, what is best way?</p>
<ol>
<li>put body onload?</li>
<li>startup code in body of .js file (not in function)?</li>
<li>attach to window load event?</li>
<li>use some jquery capability?</li>
</ol>
<p>Thanks!</p>
| javascript jquery | [3, 5] |
5,427,260 | 5,427,261 | .stop() doesn't work with hover selector | <p>This is my code: </p>
<pre><code>$(function(){
$("#deals ul li ul").hover(function(){
$(this).stop().find(".trans").fadeIn("fast");
$(this).stop().find(".text").fadeIn("fast");
return false;
},function(){
$(this).find(".trans").fadeOut("fast");
$(this).find(".text").fadeOut("fast");
});
return false;
});
</code></pre>
<p>When you hover a few times quickly it will load those actions per second and stop() should make it stop but it doesn't work here, any thoughts would be appreciated.</p>
| javascript jquery | [3, 5] |
3,425,502 | 3,425,503 | Calling instance method in Java | <p>Following this tutorial:</p>
<p><a href="http://developer.android.com/training/notepad/notepad-ex2.html" rel="nofollow">http://developer.android.com/training/notepad/notepad-ex2.html</a></p>
<p>In Step 2, this method gets called:</p>
<pre><code>registerForContextMenu(getListView());
</code></pre>
<p>which is a public method of Activity. Now, I'm a bit of a Java newbie here - I thought if you wanted to call an instance method of a superclass you needed to preface it with <strong>this</strong>. E.g. </p>
<pre><code>this.registerForContextMenu(getListView());
</code></pre>
<p>Is it just a style thing here? Is there any difference between </p>
<pre><code>this.registerForContextMenu
</code></pre>
<p>and simply </p>
<pre><code>registerForContextMenu
</code></pre>
| java android | [1, 4] |
3,167,325 | 3,167,326 | jQuery datePicker plugin loading problem | <p>I'm trying to use the following plugin for date picking:</p>
<p><a href="http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/index.html" rel="nofollow">http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/index.html</a></p>
<p>And I'm trying to use the code from the first demo but I get an error that jQuery is not defined (last line of the plugin, where the function is closed).</p>
<p>I haven't used jQuery before so I'm hoping this is a simple error.</p>
<p>I've tried to call it as follows:</p>
<pre><code><script type="text/javascript" charset="utf-8">
$(function()
{
$('.date-pick').datePicker();
}
</script>
</code></pre>
<p>^ Inside the head of the page. There is also other jQuery code in the head, could this be causing a problem?</p>
<p>The plugin and other required JS are all present.</p>
<p>Adam</p>
| javascript jquery | [3, 5] |
1,272,686 | 1,272,687 | Speed difference between very similar jQuery expressions in IE | <p>In IE, compare the speed of execution of an expression along the lines of</p>
<pre><code>$('div.gallery div.product a");
</code></pre>
<p>to the very similar</p>
<pre><code>$('div.gallery').find("div.product").find("a");
</code></pre>
<p>Sometimes the second variant runs faster, sometimes slower. Often the speed difference is a factor of 2 or more. What is going on?</p>
| javascript jquery | [3, 5] |
2,489,934 | 2,489,935 | sending non form values in Jquery post | <p>I have a form and I send all form values using the following in Jquery:</p>
<pre><code>$.post('get-offers.php', $("#offerForm").serialize(), function(data)
</code></pre>
<p>Is there anyway I can send a non form value along with the post, for ex the id name of a div? I don't get any response when I try the following:</p>
<pre><code>$.post('get-offers.php', {$("#offerForm").serialize(), lastid: $(".box").attr("id") }, function(data)
</code></pre>
| javascript jquery | [3, 5] |
5,304,789 | 5,304,790 | EventObject is not defined when calling a class function out of mousemove | <p>I wrote a Object which "manages" a <div>-Element. I wanted it to do something on mousemove so I wrote this line in a function I call to create the content of this -Element:</p>
<pre><code>$('#' + this.slider_id).mousemove(this.mouseMoveHandler(e));
</code></pre>
<p>Later i defined a function which handles this Event:</p>
<pre><code>this.mouseMoveHandler = function (e) {
var mouseX = e.pageX;
....
}
</code></pre>
<p>But when I call it, all I get is : </p>
<pre><code> Uncaught ReferenceError: e is not defined
</code></pre>
<p>What am I missing?</p>
| javascript jquery | [3, 5] |
632,585 | 632,586 | append li into an existing ul inside another html file | <p>I like to append an li into an existing ul like here: <a href="http://stackoverflow.com/questions/1145208/jquery-how-to-add-li-in-an-existing-ul">jQuery: how to add <li> in an existing <ul>?</a></p>
<p>But in my code the li is an existing li from another html file.
So 'm having the products.html with an ul. In this html file I like to append the li</p>
<pre><code><li class="first-li" id="hotel_belle">
<h2>Hotel Belle</h2>
<div>
<img class="sub-img" alt="picture from hotel" src="pic/products/HotelBelle.png" />
<p>Lorem Ipsum</p>
<a href="#"><img class="btn-cart" alt="add this product to cart" src="pic/book/cart.png" /></a>
</div>
</li>
</code></pre>
<p>into the cart.html:</p>
<pre><code> <div id="inner-cart-content">
<ul id="content-cart">
<li>
//The new li element from products.html
</code></pre>
<p>in the JavaScript I wrote this:</p>
<pre><code>$(".btn-cart").click(function(){
var cart = $(this).parents("li").eq(0);
//$("#inner-cart-content ul").append('cart'); <--this is not working
});
</code></pre>
<p>So what do I have to do?</p>
| javascript jquery | [3, 5] |
1,014,789 | 1,014,790 | Is it possible to obtain a web-browser's Java VM without using an applet? | <p>We have an ages old Java applet that we want to move forward to a newer version of Java (5 or 6), however until today we've always supported people using Java VMs as far back as version 1.1 (specifically for those still using the Microsoft VM)</p>
<p>As part of the upgrade, we'd like to be able to serve a web page to people using out-of-date VMs telling them which versions we now support and where they can download them from. Ideally we want to do this <strong>without</strong> having to serve a Java 1.1 applet first just to determine the JVM version.</p>
<p>Answers to either of the following (with code samples if possible) would be appreciated:</p>
<p>Question 1: is it possible to determine the JVM in a script on the server using information from the HTTP headers?</p>
<p>Question 2: is it possible to determine the information on the client using just JavaScript?</p>
| java javascript | [1, 3] |
2,275,930 | 2,275,931 | function is setting all instead of each | <p>I have a simple function that sets the width of a bar based on an argument.</p>
<p>And I call the function on .each with jQuery.</p>
<p>The console logs the statement correctly, showing me it seems to work. However, the style seems to be overridden by the last value found.</p>
<p>Here is the function:</p>
<pre><code>function barGraph(innerWidth, barWidth) {
innerWidth = parseInt(innerWidth) * .01 || .50;
barWidth = parseInt(barWidth) || 267;
// find percentage of total width
var innerWidth = Math.floor(innerWidth * barWidth);
var $innerBar = $('.slider-box div');
$innerBar.css('width', innerWidth + 'px');
console.log("Width should be: " + innerWidth + 'px');
}
</code></pre>
<p>then i call the function on each with jQuery:</p>
<pre><code>$(document).ready(function() {
var $innerBar = $('.slider-box div');
$innerBar.each(function(index) {
var newWidth = $(this).attr("data-bar-width");
barGraph(newWidth, 267);
});
});
</code></pre>
<p>the console log shows 10 times, with all appropriate widths. However, the style for all is the same as the last width.</p>
<p>Can someone help explain how I get the function to set the width of the currently selected div?</p>
<p>Thanks so much in advance,</p>
<p>Adam.</p>
| javascript jquery | [3, 5] |
4,614,096 | 4,614,097 | Javascript alert when user closes the tab or the window | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/6280202/javascript-alert-when-user-closes-the-tab-ot-the-window">Javascript alert when user closes the tab ot the window</a> </p>
</blockquote>
<p>I want when user close the window (or the tab) or when he goes to another website different from my own, a confirm to pop up, and if he confirms to execute a ajax script and after that to close (or change the location). I'm using jQuery and <code>onbeforeunload</code> event, but I dont know how to capture what is the new location, or when the tab or window is closed. Please help.</p>
| javascript jquery | [3, 5] |
279,969 | 279,970 | How can I check if a class doesn't exist? | <p>I don't know why this doesn't work, I'm just trying to check if <code>.searchBar</code> doesn't exist.</p>
<pre><code> var $school = "Washington";
if(!$('.searchBar')){
$('#schoolname').text($school);
}
</code></pre>
| javascript jquery | [3, 5] |
2,131,700 | 2,131,701 | Redirection to specific page from directory path in URL | <p>I have the directory abc and inside it I have two files. One is login.php and another one is index.php. I have path localhost/abc redirect to index.php but I want to redirect to login.php.</p>
| javascript jquery | [3, 5] |
1,734,470 | 1,734,471 | android java arithmetic expression evaluator | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/1432245/java-parse-a-mathematical-expression-given-as-a-string-and-return-a-number">Java: Parse a mathematical expression given as a string and return a number</a> </p>
</blockquote>
<p>i m trying to figure out which would be best way to evaluate any string based arithmetic expression like</p>
<p>10 * 2 + 34 / 3</p>
<p>according to precedence. i would prefer using any java based solution</p>
| java android | [1, 4] |
4,432,812 | 4,432,813 | How can I pass a reference to the current activity | <p>I am trying to pass a reference of the current activity to an object but can't seem to find a method that will do this easily. Previously I was able to do this simple passing with the "this" reference of the current context. I then changed my activity from implementing OnClickListener to creating an OnClickListener object so that I could pass it as a parameter. This is when I ran into trouble as I was trying to create the object after I clicked on a button, this means I can no longer pass the activity with "this" because "this" is now a reference of the OnClickListener.</p>
<pre><code>public class MyActivity extends Activity {
private Object mObject;
private OnClickListener mListener = new OnClickListener() {
public void onClick(View v) {
Object mObject = new Object(this);
}
}
}
public class Object {
private Activity mActivity;
public Object(Activity a) {
mActivity = a;
mActivity.setContentView(R.layout.layout);
}
}
</code></pre>
<p>Seems like an easy fix but I can't find the answer...</p>
<p>Any help is greatly appreciated.</p>
| java android | [1, 4] |
1,951,311 | 1,951,312 | Storing the selected values in a hiddenfield inside a repeater | <p>I have a repeater and i have some controls like dropdown and text box how can i catch the drop down selected value and the value entered in the textbox and store them in the hidden field??</p>
<p>It is like a formula <code>Left(c1+c2)*c3</code> the format is like this.</p>
| c# asp.net | [0, 9] |
470,474 | 470,475 | jQuery times out waiting for server to respond back | <p>Background:</p>
<ul>
<li>I have two pages (index.php and script.php).</li>
<li>I have a jQuery function that calls script.php from index.php.</li>
<li>script.php will do a ton of data processing and then return that data back to index.php so that it can be displayed to the user.</li>
</ul>
<p>Problem:</p>
<ul>
<li>index.php appears to be timing out because script.php is taking to long to finish. script.php can sometimes take up to 4 hrs to finish processing before it can return the data to index.php.</li>
<li>the reason I say index.php is timing out is b/c it never updates and just sits there with an hour glass even after script.php stops processing.</li>
<li>i know for sure that script.php does finish processing successfully b/c i'm writing the output to a log file as well and see that everything is being processed.</li>
<li>if there is not much data to be processed by script.php then index.php will update as it is supposed to.</li>
<li>I'm not setting any timeout values within the function inside index.php when calling script.php.</li>
</ul>
<p>Is there a better to get index.php to update after waiting a very long time for script.php to finish? I'm using FireFox, so is it maybe a FireFox issue?</p>
| php javascript jquery | [2, 3, 5] |
287,317 | 287,318 | Accessing parent control from child control - ASP.NET C# | <p>I have a parent user control with a label. On the parent's OnInit, I dynamically load the child control. From the child control, I will need to set the parent's label to something.</p>
<p>Using the Parent property returns the immediate parent which is actually a PlaceHolder in my case. Theoretically, I can recursively loop to get the reference to the Parent User control. Am I heading in the right direction here? Is there a straightforward way of doing this?</p>
| c# asp.net | [0, 9] |
5,639,599 | 5,639,600 | jQuery or onClick Div Fade | <p>I apologize if this is in the wrong section..</p>
<p>Could someone possibly point me towards a script or a tutorial on this:</p>
<p>when I click on something, say for instance an "x", I'll click it, then it fades away on click. </p>
<p>If you understand what I mean, could someone point me in the right direction please? </p>
<p>Thanks!</p>
| javascript jquery | [3, 5] |
2,838,934 | 2,838,935 | how to null a variable of type float | <p>My code is working if my float variable is set to 0, but I want my code to work if my variable is null. How could I do that? Here is a code snippet I wrote:</p>
<pre><code>float oikonomia= (float)((float)new Float(vprosvasis7.getText().toString()));
if(oikonomia==0){
</code></pre>
<p>I have tied <code>if(oikonomia==null)</code> or <code>if(oikonomia=null)</code> but it is not working.</p>
<p>P.S.: Another way would be to initially set <code>oikonomia=0;</code> and, if the users change it, go to my if session. This is not working either.</p>
<p>Float oikonomia = Float.valueOf(vprosvasis7.getText().toString());</p>
<pre><code> if(oikonomia.toString() == " "){
float oikonomia= (float)((float)new Float(vprosvasis7.getText().toString()));
oikonomia=0;
if(oikonomia==0){
</code></pre>
<p>that way is not working too:</p>
<pre><code>Float oikonomia = Float.valueOf(vprosvasis7.getText().toString());
if(oikonomia.toString() == " "){
</code></pre>
| java android | [1, 4] |
3,172,515 | 3,172,516 | import unique elements out of ArrayList in Java | <p>I've <code>ArrayList</code> (get_unique) of type integer where in I have to insert only unique values in
it. how can I do it??</p>
<p>I've got it some idea to do the same in javascript but do not know how to do it in Java?</p>
<pre><code> <%
ArrayList<Integer> get_unique = new ArrayList<Integer>();
ArrayList<Integer> set_unique = new ArrayList<Integer>();
// how do it
%>
</code></pre>
<hr>
<pre><code><script language="JavaScript">
<!--
// note: you will need to populate the myList() array with values!
var myList = new Array();
var uniqueList = new Array();
var uniqueListIndex = 0;
for (i=0;i<myList.length;i++) {
var temp = myList[i];
var unique = true;
for (j=0;j<uniqueList.length;j++) {
if (temp == uniqueList[j]) {
unique = false;
break;
}
}
if (unique == true) {
uniqueList[uniqueListIndex] = temp;
uniqueListIndex++;
}
}
</script>
</code></pre>
| java javascript | [1, 3] |
4,096,036 | 4,096,037 | jQuery calling post URL | <pre><code> $.post('controller/method', $("#form").serialize , function(data) {
//alert data
});
</code></pre>
<p>It works if domain name is www.domain.com
It doesn't work if domain name is domain.com/category/</p>
<p>What should I do here? Or I must use PHP to help me? Thanks.</p>
| php jquery | [2, 5] |
4,785,925 | 4,785,926 | Listen to phone state throughout the application? | <p>I nee to liste to phone state using phone state listener .I have many activities in a project. Should I register the listener to each of the activities or else is ther a better way.</p>
<p>ps: i am not interested to use broadcast receiver</p>
| java android | [1, 4] |
3,882,438 | 3,882,439 | PHP / javascript live chat using too much bandwidth | <p>So I am learning about javascript, so I am making a live chat system with PHP and javascript. I have it so the javascript refreshes the log (each message gets logged in a file on the server), and it refreshes every second. Im using firebug to monitor the resource usage, and I see under the net tab each times its updated, and the bytes add up really fast. I know I can change it to update less, but is there a way that when a user on the other end I'm talking to, when the send a message, it gets sent to the server, then an alert gets sent to me saying that the chatlog needs to update somehow. That way it only updates when the log is updated. let me know, thanks</p>
| php javascript jquery | [2, 3, 5] |
4,922,456 | 4,922,457 | ASP.NET master page error | <p>The master page is getting called twice. Once after the full page is rendered. At this time isPostback value is false and SESSION is null. </p>
<pre><code>protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//SOME CODE
try
{
strUserId = Session[USERID].ToString();
}
catch
{
Response.Redirect("error.aspx");
}
}
}
</code></pre>
<p>For the first page load of master page (before rendering of page) everything is fine. After rendering again page_load of master page is called. This time accessing SESSION is giving an exception:</p>
<blockquote>
<p>HttpException (Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <code><configuration>\<system.web>\<httpModules></code> section in the application configuration.). </p>
</blockquote>
<p>I dont have any problem if page_load is getting called twice or thrice. I just dont want to access SESSION on second page load.</p>
<p><strong>EDIT 2</strong></p>
<p>The second master page load is happening because of this code which i've overseen earlier (present Global.asax file)</p>
<pre><code> void Application_Error(object sender, EventArgs e)
{
Server.Transfer("~/ErrorMessage.aspx");
}
</code></pre>
<p>The ErrorMessage.aspx page is the child page of master page :(</p>
<p>But still the answered question is why is the Application_Error() being generated even on successful rendering of pages? I tried to keep a break point at Application_Error() and event args is empty every time.</p>
| c# asp.net | [0, 9] |
2,246,132 | 2,246,133 | What does it mean for a method to be deprecated, and how can I resolve resulting errors? | <p>Why do I get a deprecation error on the line containing <code>setWallpaper(bmp)</code>, and how can I resolve it?</p>
<blockquote>
<p>Error: The method setWallpaper(Bitmap) from the type Context is deprecated</p>
</blockquote>
<pre><code>switch(v.getId()){
case R.id.bSetWallpaper:
try {
getApplicationContext().setWallpaper(bmp);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
break;
</code></pre>
| java android | [1, 4] |
1,037,994 | 1,037,995 | Date comparision in javascript + jquery | <p>I have this script piece in an javascript function to validate some fields in my form</p>
<pre><code>var situacao = $("select[name='situacaoCRC']").val();
var dta_emissao = $("input[name='dtaEmissao']").val();
var dta_validade = $("input[name='dtaValidade']").val();
if (situacao == -1) {
alert('Selecione um estado para o CRC.');
return false;
}
if (dta_emissao === undefined || dta_emissao === "") {
alert('Data de emissão do CRC inválida.');
return false;
}
if (dta_validade === undefined || dta_validade === "") {
alert('Data de validade do CRC inválida.');
return false;
}
if (dta_validade <= dta_emissao) {
alert('A data de validade do CRC deve ser posterior à data de emissão.');
return false;
}
</code></pre>
<p>The fields dta_validade and dta_emissao are both dates in the format DD/MM/YYYY</p>
<p>When i put in this fields, let's say, dta_validade = 01/12/2011 and dta_emissao = 01/01/2012 and, with this data, i get the alert in the 4th IF</p>
| javascript jquery | [3, 5] |
5,500,796 | 5,500,797 | Roguelike game library for mac | <p>I am looking into making a "rogue-like" game, preferably in python/Java/C++ and it has to run on a mac. I have looked into using the libtcod library but there doesn't seem to be an easy way of compiling with that on a mac.</p>
| java c++ python | [1, 6, 7] |
5,196,059 | 5,196,060 | improve my jquery validation plugin code | <p>Just hoping soemone can help me to write better code than I can come up with on my own.</p>
<p>I am using the jquery validation plugin. I have some fields that are mandatory ONLY if certain options are chosen.</p>
<p>The below code works fine. But the thing is, is that that my list of 'OR's is much longer than I've put here. and it needs to be applied not just to 'directorsName' but a whole long list of inputs, selects etc.</p>
<p>My question is.. how can I wrap up the code contained inside the RETURN?
(so I dont have to keep repeating my 'OR's. I'm guessign I need a function but I'm unsure of the syntax) </p>
<pre><code>$("#myForm").validate({
rules: {
directorsName : {
required: function(element) {
return ( $('#account_for').val() == "Joint" || $('#directors_number').val() == "2" || $('#directors_number').val() == "3" );
}
}
}
});
</code></pre>
<p>Thanks in advance</p>
| javascript jquery | [3, 5] |
1,324,413 | 1,324,414 | Android Game: How often should the server be pinged? | <p>I'm currently writing an Android Game. The game has a social part to it, where you can view your friend's scores and compare them to yours. </p>
<p>I'm currently unsure about how often I should update the score of the user. e.g. sending the players' score to the server.</p>
<p>And I'm unsure about how often I should download new data from the server eg. friends scores.</p>
<p>The more I update (making requests to the server) the more expensive this will get, however I don't want it to update to slowly, otherwise the users might get upset.</p>
<p>What is an ideal update time? I was thinking around every 3 minutes?</p>
| java android | [1, 4] |
2,697,987 | 2,697,988 | how to convert file path into file explore view in android | <p>i my android i ve to buit an explorer view for files from cloud. I get the response as below string format.. can any one give an idea to show it in a file manager. </p>
<blockquote>
<p>"c:\myfolder\java\ss.class,c:\myfolder\java\javafolde\txet.txt,c:\first.doc
"</p>
</blockquote>
| java android | [1, 4] |
1,533,717 | 1,533,718 | Floating point operation returns different result in PHP and C# | <p>I get different results when try to division same numbers in PHP and C#:</p>
<p>PHP:</p>
<pre><code>echo 1000/0.03475;
output:28776.9784173
</code></pre>
<p>C#:</p>
<pre><code>1000/0.03475
output:28776,9784172662
</code></pre>
<p>Why? And how to get same results?</p>
| c# php | [0, 2] |
5,765,372 | 5,765,373 | Can't get Select box value in IE using JavaScript | <p>I'm trying to get the value of a select box using JavaScript. This works in Firefox, Chrome and IE9 but not IE6,7,8. It works if i use jQuery's <code>val()</code>, but i'm trying to get the value using vanilla JavaScript. Why is this not working'.</p>
<pre><code>$('#get').click(function() {
var x = document.getElementById('bbb').value;//works if i do $('#bbb').val()
alert(x)
})
</code></pre>
<p>Check <a href="http://jsfiddle.net/s7YAN/25/" rel="nofollow">http://jsfiddle.net/s7YAN/25/</a></p>
| javascript jquery | [3, 5] |
2,519,528 | 2,519,529 | Same function wi for two dynamic tabs | <p>I have created Dynamic Tabs using Jquery. In each Tab some different contents. In First Tab(created dynamically), i used a function with setTimeout of 1000 ms.....so this function will execute for every 1 second....Same time, i create another tab, in that tab also same function will execute for 1 second interval.....</p>
<p>My problem is, When creating two new tabs,If i create second the current Tab executing function stops and new tab function executes....again if i come to first tab means the the contents only shows upto the first tab function executes....same as again i go to second tab, there also the contents will display only upto that tab function executed...</p>
<p>How to solve this problem...please help me... </p>
| javascript jquery | [3, 5] |
1,123,212 | 1,123,213 | Printing the contents of a div tag without a POP-Up window in Javascript | <p>I'm struggling to print the contents of a div tag without a pop up window</p>
<p>My code looks like this at the moment</p>
<pre><code>var DocumentContainer = document.getElementById('print');
var WindowObject = window.open('', 'Completed Registration Form', 'width=750,height=650,top=50,left=50,toolbars=no,scrollbars=yes,status=no,resizable=yes');
WindowObject.document.writeln(DocumentContainer.innerHTML);
WindowObject.document.close();
WindowObject.focus();
WindowObject.print();
WindowObject.close();
</code></pre>
<p>The below uses a popup window, is there a way to not do this using a popup window.</p>
| javascript jquery | [3, 5] |
412,628 | 412,629 | Class constructor error | <p>Since we know that constructor is not inherited in the child class as i asked in the my previous question <a href="http://stackoverflow.com/questions/11271920/constructor-overriding">Click here to view question </a></p>
<p>I had write the code </p>
<pre><code>namespace TestConscoleApplication
{
abstract public class A
{
public int c;
public int d;
private A(int a, int b)
{
c = a;
d = b;
}
public virtual void Display1()
{
Console.WriteLine("{0}{1}", c, d);
}
}
internal class B : A
{
protected string Msg;
public B(string Err)
{
Msg = Err;
}
public void Display()
{
Console.WriteLine(Msg);
}
}
class Program
{
static void Main(string[] args)
{
B ObjB = new B("Hello");
Console.ReadLine();
}
}
}
</code></pre>
<p>when i compile the code its showing an error </p>
<blockquote>
<p>Error <code>TestConscoleApplication.A.A(int, int)</code> is inaccessible due to its protection level. </p>
</blockquote>
<p>Then why it is showing an error.</p>
| c# asp.net | [0, 9] |
2,841,663 | 2,841,664 | Short snippet summarizing a webpage? | <p>Is there a clean way of grabbing the first few lines of a given link that summarizes that link? I have seen this being done in some online bookmarking applications but have no clue on how they were implemented. For instance, if I give <a href="http://petewarden.typepad.com/searchbrowser/2010/01/mapreduce-for-idiots.html" rel="nofollow">this</a> link, I should be able to get a summary which is roughly like:</p>
<blockquote>
<p>I'll admit it, I was intimidated by
MapReduce. I'd tried to read
explanations of it, but even the
wonderful Joel Spolsky left me
scratching my head. So I plowed ahead
trying to build decent pipelines to
process massive amounts of data</p>
</blockquote>
<p>Nothing complex at first sight but grabbing these is the challenging part. Just the first few lines of the actual post should be fine. Should I just use a raw approach of grabbing the entire html and parsing the meta tags or something fancy like that (which obviously and unfortunately is not generalizable to every link out there) or is there a smarter way to achieve this? Any suggestions?</p>
<p><strong>Update:</strong></p>
<p>I just found <a href="http://www.instapaper.com/browse" rel="nofollow">InstaPaper</a> do this but am not sure if it is getting the information from RSS feeds or some other way.</p>
| php javascript jquery python | [2, 3, 5, 7] |
5,366,831 | 5,366,832 | Can I say that ASP.NET is compiled? | <p>You know that C# is a compiled language. But when we develop web applications we use ASP.NET + C#, in this case can we say that ASP.NET is compiled? </p>
<p>If ASP.NET is not compiled does it affect the performance of C# when ASP.NET and C# works beside each other to develop web applications? </p>
| c# asp.net | [0, 9] |
4,990,148 | 4,990,149 | Open popup and poulate it with data from parent window? | <p>How can I use Javascript/jQuery to populate a popup-window with data from JS-variables in the parent page?</p>
<p>In my example I have an array of filenames. I list at most five in the parent window and if there's more I want to provide a link that opens a popup window and lists each post in the array.</p>
<p>So if I open a popup that contains a <code><ul id="all_files"></ul></code>. How can I add <code><li></code>-items to that list?</p>
<p>Thanks!</p>
| javascript jquery | [3, 5] |
3,065,761 | 3,065,762 | create a CalendarView with my own properties | <p>hello I'm a beginner in android programming and I have a small problem with the CalendarView, I try to change the properties by changing the color of the numbers of days but it does not really change. Does anyone can help me please.</p>
| java android | [1, 4] |
4,210,019 | 4,210,020 | Weird margin issue with relative layout | <p>I am trying to have a TextView to fill the space between a button on the left and the edge of the layout on the right.</p>
<pre><code><TextView
android:id="@+id/welcomeHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_toRightOf="@+id/setInfusionReminder"
android:layout_marginRight="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="Welcome!" />
</code></pre>
<p>What I am seeing in the editor however is <code>android:layout_marginRight</code> is applied on the left. The end result is 40dp margin on the left and 0 margin on the right.</p>
<p><img src="http://i.stack.imgur.com/IwbAr.png" alt="enter image description here"></p>
| java android | [1, 4] |
5,399,680 | 5,399,681 | Need help about how to control a light sensor | <h2>I'm not asking for the entire solution, I'm just asking the information about where to buy these programmable hardware brands, models etc.</h2>
<p>I have searched many websites about the light sensor, many of them came up with information about some cheap gears which has no programmable functionality.</p>
<p>I need to control a light sensor so when strength of illumination reaches a certain level, it will automatically open a sunroof.</p>
<p>But I have no idea about both where to start this project and where to ask the question other than here.</p>
<p>So I am grateful if someone could come up with details of these two hardware (where to buy, types, brands).</p>
| c# asp.net | [0, 9] |
4,253,119 | 4,253,120 | Is it possible to access a regular javascript variable from within a JQuery function? | <p>I have an HTML file which imports two files:</p>
<p>graph.js and main.js</p>
<p>The main file contains logic which accesses a phone's accelerometer/records acceleration and it is a purely javascript file. The Graph.js file contains a single JQuery function $(.....) </p>
<p>Is it possible to access a variable in main.js from graph.js?</p>
| javascript jquery | [3, 5] |
5,201,820 | 5,201,821 | determine biggest variable in javascript? | <p>let's say I have the following variables:</p>
<pre><code>int currentCreated = 94.6;
int averageCreated = 80.1;
int currentAssigned = 78.9;
int averageAssigned = 81.3;
</code></pre>
<p>How would one determine the biggest variable? I mean, I can easily do the number itself with Math.max, but I'm interested in the biggest value <em>and</em> variable name.</p>
<p>Thanks!</p>
| javascript jquery | [3, 5] |
4,183,898 | 4,183,899 | Refreshing ListView on every few sec | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="http://stackoverflow.com/questions/8968911/updating-the-list-ui-with-timer">Updating the List UI with Timer</a> </p>
</blockquote>
<p>I am trying to do something like reminder. At the moment I have a database where every record has a remaining time. I show them as a custom list. I have two lists:</p>
<ul>
<li>one for active records from db (depends on time set);</li>
<li>one for expired records.</li>
</ul>
<p>I need to refresh the list on every few seconds like 3–5 seconds to check which record is still active. I read about <code>notifyDataSetChanged();</code> but I want to refresh it on every 3–5 seconds.
Any simple way to make this?</p>
| java android | [1, 4] |
5,255,764 | 5,255,765 | Combinining several strings to a single string | <pre><code> String f = DropDownList1.SelectedItem.Value;
String s = DropDownList3.SelectedItem.Value.PadLeft(3,'0');
String q = DropDownList2.SelectedItem.Value;
String w = TextBox2.Text.ToString();
String o = TextBox3.Text.ToString();
</code></pre>
<p>I want to combine it to a single string i.e <strong>String u= f+s+q+w+o</strong></p>
<p>How to do it?</p>
| c# asp.net | [0, 9] |
679,599 | 679,600 | HTTPS Auto-Login Probs | <p>I am trying to create a C# script to login automatically to a website and download a report.</p>
<p>I have managed to login to the site. Effectively the steps are:</p>
<p>1) Get login form
2) Sent login/pass with cookies
3) Logged In
4) Ask for Report & Download</p>
<p>The problem I am having is that 4).. doesn't work. It just keeps redirecting me to login form again even when I sent all cookies and I am logged in.</p>
<p>I know the URL is correct because when I login via the browser the report appears immediately ?</p>
<p>Any ideas?</p>
| c# asp.net | [0, 9] |
265,189 | 265,190 | Implementing a background thread - Slow process | <p>So I have a method in my android program that takes a long time to process since it has some implementation in fetching data from the internet.</p>
<p>I wanted to put this process in the background and have it update the UI when it completes but not prevent the user from seeing the program.</p>
<p>The problem is though I just have it all in one method (This function that takes a few seconds). I know it works properly and from what I've seen with <code>ASyncTask</code> I would need to split it up for it to utilize <code>ASyncTask</code>.</p>
<p>Is there anyway I can just do something so that this one in particular method can just be put on another thread? It seems extraneous to have to split up something that already works :-/</p>
<p>Edit: Solved, I ended up just using ASyncTask and taking the time to understand it. I only need to tinker two or three lines and it works perfectly now.</p>
| java android | [1, 4] |
1,622,544 | 1,622,545 | failed to call event from gridview linkbutton | <p>basically i wish to set a session folo by button click, but i failed to do so</p>
<p><strong>i failed to call abcde function(), don't know what to set,i did try onRowCommand,onDataBound,OnDataBinding</strong></p>
<pre><code><asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
</code></pre>
<p><strong>my link button on gridview</strong> </p>
<pre><code><asp:LinkButton ID="lnkname" runat="server" Text='<%#Eval("movieTitle") %>' Width=500 CommandName="cmdLink">
</code></pre>
<p><strong>in order to find link button control i did try DataGridItemEventArgs, but it didnt work as well</strong></p>
<pre><code> protected void abcde(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "cmdLink")
{
string path = //some path;
Session["path"] = path;
((LinkButton)e.Item.FindControl("lnkname")).PostBackUrl = "~/somewhere/ + Session["path"].ToString()";
}
}
</code></pre>
<p><strong>y i do so is because my next page function is depend on the session</strong></p>
| c# asp.net | [0, 9] |
4,916,886 | 4,916,887 | How do I check to see if form inputs(x5) have not been left empty by the user, using JavaScript/JQuery? | <p>I am working on this code below and have had a stab at writing a IF statement around the code with <code>//*</code> .</p>
<p>The <code>if</code> statement logic should say 'If all(x5) form input fields are empty then show alert message else do what's between <code>//*</code></p>
<p>The user must modify at least one of the five input fields with a letter or number, for the form to be submitted.</p>
<pre><code>$('.submit').live('click', function(){
// *
$('.submit').parent().find('form').submit();
alert('The form has been submitted!');
// *
});
</code></pre>
<p>HTML Structure:</p>
<pre><code><div style="margin:50px;">
<div id="search-prefix">
<form method="post" action="">
<input type="text" class="alpha-first default-value" name="" maxlength="1" value="?" />
<input type="text" class="numeric plate-divide default-value" name="" maxlength="3" value="???" />
<input type="text" class="alpha default-value" name="" maxlength="1" value="?" />
<input type="text" class="alpha default-value" name="" maxlength="1" value="?" />
<input type="text" class="alpha default-value" name="" maxlength="1" value="?" />
</form>
</div>
<span class="btn submit">Search</span>
</div>
</code></pre>
<p>Any help would be greatly appreciated, Thanks</p>
| javascript jquery | [3, 5] |
4,063,127 | 4,063,128 | JQuery change Image dynamically loaded from aspx in DIV | <p>I have a DIV and loading a Image in that div at runtime from a aspx file as src. </p>
<p>I use JQUERY .Post(..) to post the aspx page and get the Image and load that Image in div by following code.</p>
<pre><code> function UpdateCapticha() {
$.post("../JqueryCapticha.aspx", {},
function (data) {
$("div#CapDiv").html(data);
});
}
</code></pre>
<p>I call this function on click of a button and expect a different Image in div as <strong>JqueryCapticha.aspx</strong> is posted everytime. But everytime I get same Image. I think that <strong>JqueryCapticha.aspx</strong> is not getting posted but the Image is comming from cache. </p>
<p>Can someone please suggest me that what should i do so <strong>JqueryCapticha.aspx</strong> is posted everytime and a new Image should come.</p>
<p>Also i tested <strong>JqueryCapticha.aspx</strong> seperatly on browser and it works fine by providing different image on each post.</p>
<p>Thanks in Advance.</p>
| jquery asp.net | [5, 9] |
4,550,663 | 4,550,664 | Pass a List<int> from javascript to controller | <p>I'm trying to pass a <code>List<int></code> from my <code>View</code> to my <code>Controller</code>. I've tried multiple ways, with different parameters. No luck.</p>
<p>I'm currently trying to pass <code>{[4,5,13]}</code> to a method with the parameter <code>List<int> ids</code>.</p>
<p>What's the correct format to send a list or array of numbers?</p>
| c# javascript | [0, 3] |
5,749,887 | 5,749,888 | How do i get the javascript status of any browser? | <p>I want to get the javascript status of any browser.
How do i get this.?</p>
<p>Means when page load it should display that javascript in that browser is enable or disable.</p>
<p>I m using php.</p>
<p>Thanks In advance......</p>
| php javascript | [2, 3] |
3,835,278 | 3,835,279 | Javascript equivalent of php's $object->{$stringvar} = 1 without eval()? | <p>How do i create properties of an object from values of other variables without using the eval() function?</p>
| php javascript | [2, 3] |
5,420,654 | 5,420,655 | local Javascript - write to local file | <p>I have some javascript code loaded from a local html file (without going through a webserver).. i.e., opened using <code>file://</code></p>
<p>Is there any way the javascript in this file can be used to write to a local file?</p>
<p>I know that cross-site restrictions do not allow lot of things in javascript, but this is not cross-site, so it should be allowed in theory.</p>
| javascript jquery | [3, 5] |
2,455,921 | 2,455,922 | Finding if a jquery plugin/function is available. Diff between $.pluginName() and $().pluginName() | <p>I am trying to detect if a jQuery plugin is available, I tried </p>
<pre><code>$.pluginName
</code></pre>
<p>but failed then tried</p>
<pre><code>$().pluginName
</code></pre>
<p>it works. But whats the difference between the 2?</p>
| javascript jquery | [3, 5] |
5,638,329 | 5,638,330 | Google Chrome logo using Android | <p>I couldn't find a similar example as close as the Google chrome logo. I want to make this logo using Android, forget about the colors or exact design. Imagine the blue dot is an ImageView, the red,green and yellow are ImageButtons. I want an ImageView surrounded by 3 or 4 ImageButtons like this. All what I came up to is the Oval layout shape with ImageView centered. I only need a hint if anybody has.</p>
<p><img src="http://i.stack.imgur.com/wM8LU.jpg" alt="enter image description here"></p>
| java android | [1, 4] |
1,734,834 | 1,734,835 | HowTo create ASP:Buttons in Code-Behind? (or just add an working Eventhandler to Standard-Buttons?) | <p>My Code works perfectly with normal Buttons. But i need to add some Code-Behind to those dynamically added Buttons. Thus i'd need ASP:Buttons instead of Standard-Buttons.
How do i do this?</p>
<p>At the moment my working Code looks like this (only the important parts):</p>
<pre><code>AjaxControlToolkit.AccordionPane nrX = new AjaxControlToolkit.AccordionPane();
Button b = new Button();
b.OnClick += Eventhandler(my_function);
nrX.ContentContainer.Controls.Add(b);
</code></pre>
<p>Currently the Eventhandler is not called. When i look at the produced source in the Browser, there is noch onclick Event or anything like that which is (i think) the problem.
So how can i change my "Button b" to an "ASPButton" b? Adding an attribute "runat="server"" doesn't do the trick, as this code is (of course) executed after the page_load...
Or am i getting something wrong?</p>
| c# asp.net | [0, 9] |
654,302 | 654,303 | event attched to link button inside gridview is not working? | <p>I have a grid in asp.net, inside the asp.net i am binding data as linkbutton when clicking on link button I need to call a method in code behind. the attached event is not woking in my code. how i can solve this?</p>
<p>my code is similar like this,</p>
<pre><code>protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton link = new LinkButton();
link.Text = e.Row.Cells[0].Text;
link.CommandArgument = "Hello";
link.Click += new EventHandler(this.onLinkClick);
e.Row.Cells[0].Controls.Add(link);
}
}
protected void onLinkClick(object sender, EventArgs e)
{
LinkButton btn = (LinkButton)(sender);
string value = btn.CommandArgument;
TextBox1.Text=value;
}
</code></pre>
| c# asp.net | [0, 9] |
5,735,426 | 5,735,427 | Difference between `.click(handler())` and `.click(handler)` | <p>I have the following code.</p>
<pre><code><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="jquery-1.4.2.min.js" ></script>
<script type="text/javascript">
function myFun()
{
alert(5)
}
$(document).ready(function(){
$("#myID").click(myFun());
})
</script>
</head>
<body>
<input type="button" value="Click it" id="myID" />
</body>
</html>
</code></pre>
<p>When I run this code then <code>alert(5)</code> is coming when the page loads. If I write</p>
<pre><code>$("#myID").click(myFun)
</code></pre>
<p>then the alert only appears when we click on the button. Why does it behave like this?</p>
| javascript jquery | [3, 5] |
438,941 | 438,942 | How to become an expert in Python, PHP and Javascript? | <p>So I've been programming for about 9ish months now, and I've taught myself some Python, some PHP and some Javascript.</p>
<p>I want to become better at these languages - I can hack something out, but a lot of things like OOP, using lists in the most effective ways, etc, is lost on me.</p>
<p>What are the best ways to become an "expert" programmer? Does it depend on the nuances of the language, or is it more general? Is there any math I should be studying alongside it? Obviously a lot depends on what you want to do with it - so far I've mostly done small scale internal applications as well as web programming. How do I find out about good program design?</p>
| php javascript python | [2, 3, 7] |
4,556,395 | 4,556,396 | Append POST data javascript | <p>Using either Javascript and/or Jquery how can I append POST data to a form to submit. I have in my server side code that will check to see if the post data dictionary contains a certain key.</p>
<p>I already have a form in the code. So I would just like to use javascript to add a new key to the POST data.</p>
| javascript jquery | [3, 5] |
970,298 | 970,299 | Replace all iframes on a page, regardless of ID, using javascript | <p>I'm wanting to find all iFrames within an html document, then replace their src attr value.</p>
<p>Is there a way to do this in JavaScript or Jquery?</p>
<p>If so, any help is appreciated.</p>
<p>(I also need to do this in steps. Aka, find the iframe, get the width and height, add the value "scrolling=no", and change the src to something else.)</p>
| javascript jquery | [3, 5] |
78,837 | 78,838 | How to send data to another server using jquery | <p>I need to post data to another server using jquery.</p>
<p>Here is the code i am using</p>
<pre><code>$.ajax({
url:"https://www.thewiseagent.com:443/secure/webcontactAllFields.asp",
type:'POST',
data:"ID=" + $ID
+ "&Source=" + $Source
+ "&notifyCc=" + $notifyCc
+ "&notifyBcc=" + $notifyBcc
+ "&noMail=" + $noMail
+ "&CFirst=" + $first
+ "&CLast=" + $last
+ "&Phone=" + $Phone
+ "&Fax=" + $Fax
+ "&CEmail=" + $CEmail
+ "&Message=" + $message,
success: function() {
//window.location.href = "http://www.petlooza.com";
}
});
</code></pre>
<p>i got error (302 object moved) in case of firefox/chorme although data is inserting.. but in case of IE data is not entering in external database. In IE i got a Access denied error.</p>
<p>Can anyone have alternative?</p>
<p>I have tried with json and jsonp still same error.</p>
<pre><code> $.ajax({
type: "POST",
url: "https://www.thewiseagent.com:443/secure/webcontactAllFields.asp",
data: dataString,
dataType: "jsonp",
success: function(data) {
}
});
</code></pre>
| php jquery | [2, 5] |
1,271,601 | 1,271,602 | jQuery ignores .replace() after first usage | <p>the following lines of code are supposed to take whatever i type in and replace " " with "-" which works on the first space, but no space thereafter.</p>
<pre><code>$('#myinput').live('keypress', function() {
var value = $(this).val();
value = value.replace(" ", "-");
$('#mydiv').text(value);
});
</code></pre>
| javascript jquery | [3, 5] |
2,205,304 | 2,205,305 | Can Data transferred between two Html page? | <p>My Code Project has Master page video.master, and it contains navigation
menu. </p>
<pre><code> <ul class="menu">
<li><a href="AlbumVideo.aspx" class="parent" ><span>Album Video</span></a></li>
<li><a href="MovieVideo.aspx"><span>Movie Video</span></a></li></ul>
</code></pre>
<p>And I want to transferred name of link to Label control in child page.</p>
| c# javascript asp.net | [0, 3, 9] |
182,812 | 182,813 | How to append the output of a servlet using JQuery | <p>I am currently making a website. Basically when the user scrolls to the bottom of the screen I am going to download another 10 posts (I'm making a little social network). To do this I have downloaded JQuery. The following JavaScript is ran when the user scrolls to the bottom of the page:</p>
<pre><code>page++;
var next = 'posts?page=' + page;
$('.pContainer').append("code that loads the servlet in the next var goes here");
</code></pre>
<p>Inside the posts servlet I have a few out.println statements to test this. I have tried using JSP: Include tags inside the append brackets but it does not work.</p>
| java javascript jquery | [1, 3, 5] |
3,790,512 | 3,790,513 | Using jQuery to change style of clicked element and removing that style from other elements with same class | <p><strong>EDIT: fixed it! Thanks to those who said to post my HTML - I looked at it, and didn't realize that I had the "appname" class twice.</strong></p>
<pre><code><li class="<?php echo $apid; ?> appname appname_getinfo appname_<?php echo $apid; ?>">
<span class="appname"><?php echo $apname; ?></span>
</li>
</code></pre>
<p><strong>So, I removed the "" and it works!</strong></p>
<p>Say that I have three elements with a class:</p>
<p>EL ONE</p>
<p>EL TWO</p>
<p>EL THREE</p>
<p>When I click on EL ONE, I would like to make it bold. When I click on EL TWO, it should become bold and EL ONE should become normal weight. When I click on EL THREE next, it should become bold and EL TWO becomes normal weight.</p>
<p>MY SCRIPT:</p>
<pre><code>//// app info ////
$("li.appname_getinfo").click(function(){
var appID = this.className.split(' ')[0];
$.get("wishlist/appinfo.php?pw=R32kd63DL&apid=" + appID, function(data){
$("div#appinfo").html(data);
});
$("div#appinfo").show();
$(".appname").css("font-weight", "normal");
$(this).css("font-weight", "bold");
});
</code></pre>
<p>I thought that I could set all with class "appname" to normal, then change $(this) to bold, but it doesn't work. (it disallows any to be bold).</p>
| javascript jquery | [3, 5] |
2,229,999 | 2,230,000 | Copy table row and increment all name attributes | <p>Let's have a table like this:</p>
<pre><code><table>
<tr>
<td><input type="text" name="FirstName1" /></td>
<td><input type="text" name="LastName1" /></td>
</tr>
<tr>
<td><input type="text" name="FirstName2" /></td>
<td><input type="text" name="LastName2" /></td>
</tr>
</table>
</code></pre>
<p>I want to have a button that will add new row at the end of the table with incremented name attributes so it will look like this:</p>
<pre><code><table>
<tr>
<td><input type="text" name="FirstName1" /></td>
<td><input type="text" name="LastName1" /></td>
</tr>
<tr>
<td><input type="text" name="FirstName2" /></td>
<td><input type="text" name="LastName2" /></td>
</tr>
<tr>
<td><input type="text" name="FirstName3" /></td>
<td><input type="text" name="LastName3" /></td>
</tr>
</table>
</code></pre>
<p>And so on.</p>
<p>So far I have this but it does not increment name attributes:</p>
<pre><code>$("#newRowButton").click(function(){
$("table tr:last").clone().appendTo("table");
});
</code></pre>
| javascript jquery | [3, 5] |
6,019,070 | 6,019,071 | Free C# / ASP.NET E-Mail Ticket Support System for postgresql? | <p>I am looking for an open source ticket system that I can use with our postgresql database (npgsql or dotconnect).</p>
<p>I have found that link, but all posted systems need MS SQL:
<a href="http://stackoverflow.com/questions/1748247/asp-net-based-open-source-support-ticket-system">http://stackoverflow.com/questions/1748247/asp-net-based-open-source-support-ticket-system</a></p>
<p>Thank you very much in advance!</p>
| c# asp.net | [0, 9] |
668,857 | 668,858 | Call an event on Web Control Load | <p>I am loading my with web controls and loading them based on the URL parameters.</p>
<p>I need to load a gridview if the user is in :&cat=8</p>
<p>My web control has a method which I need to call. One of its parameters is a session which is created only when the category is 8.</p>
<p>Technically I need a way of calling methods within my web control from my page. Placing it on page_load results in an error.</p>
<p>Thanks</p>
| c# asp.net | [0, 9] |
2,371,104 | 2,371,105 | chata application built in jquery - how to keep client & server connected | <p>i have built a jquery based text chat in asp.net..... the flow is as such...
User A logs in.... Now in the bottom of my page i have a iframe on which the jquery code is embedded.. the jquery will send request to server after every 5 seconds... on the server i have a web method that will check the if any user has sent a text message to user A (checks in database).. if found it will return it in json format and will be displayed in a div...
my problem is that is it a good idea to send request to server after every 5 seconds... suppose 1000s of users gets logged in.. jquery will send 1000s of request every 5 seconds... i am new i need your support</p>
| jquery asp.net | [5, 9] |
1,065,792 | 1,065,793 | Reloaded : Replace text into links using jquery | <p>I was searching so much over the net to convert text into links. I found one solution for that but now after testing that code i came up with problem. </p>
<p>Here is discussion regarding that : <a href="http://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links">How to replace plain URLs with links?</a></p>
<p>Code i used : <a href="http://tech.cibul.net/turn-urls-into-links-in-text-with-jquery/" rel="nofollow">http://tech.cibul.net/turn-urls-into-links-in-text-with-jquery/</a></p>
<p>Problem: suppose i have html code like this </p>
<pre><code> <a name="../uploads/1/7367217144viruddh7(www.songs.pk).mp3" href="#viruddh7(www.songs.pk).mp3" onclick=" playmedia(this.name)" id="viruddh7(www.songs.pk).mp3">viruddh7(www.songs.pk).mp3</a>
</code></pre>
<p>Then it converts links with in name, id and href as well. I want to stop this kind of thing. I want to convert text into links which is out of the <code><a></code>and <code><img></code> tag</p>
| javascript jquery | [3, 5] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.