I've searched for days but couldn't find one solid solution to get the selection start / end in Internet explorer, I've tried this and this solution.
Both of them involve using document.selection.createRange(), the below code will work quite good but if you go to a new line (press enter one or more time) and then try to get the selecti...
Since it appears Silverlight does not support the middle mouse button click event, is there a way to capture this event in JavaScript when the user middle button clicks on the Silverlight control? That way, I could pass the event on via a javascript to silverlight bridge.
...
I am using javax.scripting to add support for running arbitrary user-uploaded JavaScripts on the server-side. Obviously I want to secure those scripts!
Rhino, on it's own, has a framework for securing scripts at runtime. The documentation for javax.scripting, however, doesn't mention security, permissions or restricting classes availa...
Hello, my query is simple, as I do, if possible, the following in C #.
<html>
<head>
<script src="../jquery-1.3.2.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$("#datos").append("<span style=\"font-weight:bold\">(false || null || \"1º\" || \"2º\")</span> : <span>"+(false || null || "1º" ||...
I'm trying to load some content into a table using insertAfter(), but the content I'm trying to load is html (output from an asp.net page) that I'm getting using AJAX.Load().
From my understanding, insertAfter() works like this: $("htmlcodehere").insertAfter("selector"). AJAX.Load() works like this: $("selector").load("Html/file"). ...
i have a set of radio buttons.
<ul class="ProductOptionList">
<li>
<label>
<input class="RadioButton" type="radio" value="157" name="variation[1]"/>
Lemon (200 ml)
</label>
</li>
<li>
<label>
<input class="RadioButton chosen" type="radio" value="160" name="variation[1]"/>
Lemon and Herbs (200 ml)
</label>
</li>
</ul>
i want to highli...
Is there any way to do the following:
validateLogin();
return false;
But actually like this..
validateLogin();
And here is the function:
function validateLogin(){
if(hi=true){
return true;
}
else{
return false
}
I want to attach this function for the event of a form being submitted, so if HI is false - i want to return false; me...
Is there a better way than this to splice an array into another array in javascript
var string = 'theArray.splice('+start+', '+number+',"'+newItemsArray.join('","')+'");';
eval(string);
...
I have a page with this method in CreateTicket.aspx.cs:
[WebMethod()]
public static string Categories()
{
var business = new CategoryBusiness();
var categories = business.ListRootCategories();
return categories.Json();
}
And the javascript/jquery code on the page (same page, .aspx):
function LoadRootCategories() {
Pa...
I'm looking for some Javascript jedi-master to assist in creating a function that adds a class to a list of elements based on a session variable.
In other words:
If SESSION['MM_UserGroup'] is not equal to 1, then add the class '.hide-content' to the following elements:
.control #nav li#nav-admin
.control #nav li#nav-pages
or any ele...
When the users of this app make changes to the fields a large amount of changes need to happen across other fields. Typically even with optimized scripts the browser will block user input for upwards of 1 second in IE. To stop with from occurring I do this:
var i = 100;
GetTextInputs().filter('[' + name + ']').each(function()
{
...
Is it possible to display superscripted characters (not only numbers) in the alert(), confirm() or prompt() dialogue boxes in JavaScript?
Due to some reasons I need to insert a text:
2 followed by superscripted 'n'
2^n
Into JavaScript alert, confirm and prompt boxes. Fast google searching did help but not exactly I found a way to dis...
I'm hoping someone can point a relative jQuery/jqModal newbie in the right direction for debugging this error. I'm loading an html fragment into a div and then use jqModal to display that div as a modal dialog. The problem is that the div is displayed but not with my updated html.
I'm showing my jqModal dialog in the response from a jq...
Is it possible to do this? I haven't been able to find anything in the documenation that says you CAN'T do it, but the following selector is not working for me:
Cufon.set('fontFamily', 'Museo');
Cufon.set('fontWeight', '300');
Cufon.replace('input.text, input.password, textarea');
Any ideas, or does Cufon simply not support this?
Th...
The iPhone supports geolocation in mobile Safari via the following call:
navigator.geolocation.getCurrentPosition(
function(pos){
var lat = pos.coords.latitude;
var long = pos.coords.longitude;
},
function(){
/* Handler if location could not be found */
}
);
I'd like to build a good list of devices that have one of...
I am trying to perform this AJAX post but for some reason I am getting a server 500 error. I can see it hit break points in the controller. So the problem seems to be on the callback. Anyone?
Thanks!
$.ajax({
type: "POST",
url: "InlineNotes/Note.ashx?id=" + noteid,
data: "{}",
dataType: "json",
success: function(data) ...
Hi,
I've been pretty interested in coding a Mandelbrot Set zoom and have already done it twice. However there were problems with each one.
The first time I thought it'd be cool to do it in javascript... but that was so damn slow. Then I did it in C++, which worked great until you zoomed so far that the units on the graph got to the sma...
I want a 5 character string composed of characters picked randomly from the set [a-zA-Z0-9].
What's the best way to do this with Javascript?
...
Hi,
Is it possible to in a situation like this;
<li><a href="javascript:productPop('includes/products/test.php','8 mil');">asadfasdf</a></li>
<li><a href="javascript:productPop('includes/products/test.php','15 mil');">asdfasdf</a></li>
<li><a href="javascript:productPop('includes/products/test.php','hello');">asdfasdf</a></li>
to hav...
This is an SO challenge
I would like to know how someone would get an invalid formal parameters in a function without the arguments object to as simulate not knowing the format of the parameter destructuring assignment. This is not an ECMAScript question and only pertains to JavaScript.
Your mySolution cannot access arguments or test. ...