I need to detect not only the browser type but version as well using jquery.
mostly I need to find out if it is ie 8 or not.
thank you
I am not sure if i am doing it correctly
if I do :
if (jQuery.browser.version >= 8.0) {
dosomething}
I am not sure it will work for version 8.123.45.6 or will it?
...
The question says it all. Which one is better and when to use what, I never use jQuery live() as I am using liveQuery plugin for a couple of years, I am used to it and still continue using it. But I want to know the subtle differences between the two and when to use each of it?
...
Hello all,
I have the below which disables all hyperlinks but after an event I want to enable them back all again, how can I do this?
$("a").click(function() { return false; });
I don't think its as simple as just setting it to true. ;)
Thanks all
...
I'm totally new to dojo ... and am drawing from my experience with jQuery somewhat ...
I have several elements like so:
<input name="info1" value="" style="width:52px" contstraints="{pattern:'#'}" dojoType="dijit.form.NumberTextBox"/>
<input name="info2" value="" style="width:52px" contstraints="{pattern:'#'}" dojoType="dijit.form.Num...
My backend accepts comma delimited id values "11,12,13". On the front end I have a check list that allows multiple selection and posts the following.
someurl.com?id=11&id=12&id=13
How do I use $_GET for multiple instances of ID, format it into a comma seperated string? Or alternatively, is there a better way to force checklists to subm...
I am totally new to JSON and I might need to use it in the future so I did some reading bout it. There's lots of questions regarding JSON on SO. I found heaps of articles using google, I read json.org but I did not understand how to store JSON data.
JSON is is a lightweight data-interchange format. So how I store its data? In a file? In...
Using this as a simplified example, assume I have a table that has some radio buttons in it followed by a div element with a link in it. This pattern is then repeated some unknown number of times like so:
<table class="rdoBtnList">
<tbody>
<tr>
<td> Person 1 </td>
<td>
<label for="rb1">Verified...
I am having trouble writing code JavaScript code. I work with ASP.Net MVC and send a lot of data back and forth for Ajaxy features. The problem is that this code is becoming hard to manage and messy:
I need to do similar functions but
can't find a decent way to reference
methods (such as if they are in
different files).
Methods do not ...
I'm using JavaScript to send textarea updates back to a server in real-time. My HTML page uses a single XMLHttpRequest object to POST data to the server asynchronously. The messages are sent potentially at every onKeyUp event, but because I only use a single XMLHttpRequest object I throttle the requests by only POSTing when the readySt...
I have an application which uses a javascript based rules engine. I need a way to convert regular straight quotes into curl (or smart) quotes. It'd be easy to just do a string.replace for ["], only this will only insert one case of the curly quote.
The best way I could think of was replace the first occurrence of a quote with a left...
I am using this technique to have a popup image of my thumbnails. The only problem is that if the thumbnail is close to one edge of the screen, and the original image is really big, then it gets cut off by the edge of the screen.
I know it requires Javascript, but I'm not entirely sure how to detect that the image is outside of the view...
Hi,
limitation of tags in a wysiwyg editor by excluding buttons is completly not enough, because i still can copy a page content and past it in the editor, and... it's will accept it !
i want some solution to limit the allowed tags, by example i love the way stackoverflow limit it by the traditional way of * and quotes, but i don't wan...
Hello, I'm trying to recreate the following code with jQuery:
var node = document.createElement("div");
node.innerHTML = "DynaColumn";
node.className = "ui-state-default ui-corner-all";
return node;
this is the code I'm trying to get to work:
return $("<div class='ui-state-default ui-corner-all'>DynaC...
I'm trying to find the url for the currently executing javascript. I know I can use window.location.href for the current page, but that's not necessarily the path to the script which is executing.
Any help is greatly appreciated.
Thanks.
EDIT 1: I'm fully open to the use of plugins and such to accomplish this. Don't hesitate to sugges...
My code is working fine in FireFox but my users are restricted to IE. I'm getting an error though in IE, related to my JQUERY function.
populateTable:function(returnList) {
var self = this;
var eat = $.evalJSON(returnList.firstChild.textContent)
$.each(eat,function() {
$("<tr><td>" + this.reportId + "</td><td>" + ...
(I'm using prototype.js here, but I imagine the same holds true across other libraries as well)
I often find myself writing code like this:
var search_box;
Event.observe(window, 'load', function() {
search_box = $('search_box');
});
function doSomething(msg) {
search_box.innerHTML = msg;
}
Rather then writing it simply like...
I'm using Asp.net MVC and I want my partial view to refresh on an interval, which it does until I make an unrelated Ajax request, then it stops.
Here are a few simplified snips to illustrate the problem.
in AjaxRefresh.js:
function ajaxRefresh()
{
var f = $("#AjaxForm");
$("#AjaxLoading").show();
$.post(f.attr("action"), f...
I have a custom control that has a webresource in it.
The webresource is a javascript file and I have the build option on the javascript file set to "Embedded Resource" and I have the following lines of code in my AssemblyInfo.cs for the project my custom control is in:
// Export the MultiSelectGridView.js file
[assembly: WebResource("...
my php code looks like this:
$result['firstName']['lastName']='johan';
echo json_encode($result);
how should i type to use this array in javascript with jquery?
...function(data) {
alert(data.firstName.lastName);
});
or
...function(data) {
alert(data.firstName['lastName']);
});
...
Hi I have a javascript function that checks for signed integer with 0 to 12 length, i also want to see if there are any leading 0's like 0012 should return false.
function sInteger0to12(str) {
str = str.replace(/^\s+|\s+$/g, '');
return /^[-+]?\d{0,12}$/.test(str);
}
any help will be appreciated.
...