What's the best way to grab the number in this url string with jQuery or vanilla javascript?
"/organizations/1/media/videos/11" I would like to just grab that 1 . Not sure how to exactly do that. Any ideas? ...
"/organizations/1/media/videos/11" I would like to just grab that 1 . Not sure how to exactly do that. Any ideas? ...
Hello Everyone, Here is my code scenario, I display html page in webbrowser control. The content will be loaded from some RSS url dynamically (used JQuery to load the content from URL) and displayed in WB. My problem is, i have to check for the "Internet Connectivity" when a loop is completed by scrolling text. I tried using "navigat...
hi i have a function that worked fine using jQuery 1.3.2 but now i am trying to run it with 1.4.2 and i get the following error "event is not defined". here is the code simplified: <div id="mapcontainer><img href="" usemap="#rage_image_map"> <div id="mytext"></div> </div> <map name="rage_image_map"> <area shape="poly" href="asth...
hi, as I can get my textfield displays the contents as <a>? items: [{ xtype: 'textfield', value: '<a href="www.google.com"> www.google.com </a>' <-- }] ...
Are there any good video to learn programming basics which are required to learn JavaScript, then jQuery later. for the person who is already having good command over xhtml and css ? future aim is not to learn any server-side language, php, asp.net, ruby ,etc. just pure and advanced javascript/jQuery. Video for absolute programming begi...
I'm having problems getting this to work. I first tried setting my script tags as strings and then using jquery replaceWith() to add them to the document after page load: var a = '<script type="text/javascript">some script here</script>'; $('#someelement').replaceWith(a); But I got string literal errors on that var. I then tried enc...
This code results in an error at second line ($('boxes div.box')) <script type="text/javascript"> $(document).ready(function () { boxes = $('#boxes div.box'); images = $('#images > div'); boxes.each(function (idx) { $(this).data('image', images.eq(idx)); }).hover( function () ...
I am building a web application that needs windows explorer-like feature. I have implemented jQuery File Tree but that one works for left navigation only. Any ideas that I can work on or any ready-made solutions out there? Following is the PHP code that builds the ul and li tags: if( file_exists($root . $_POST['dir']) ) { $files = scan...
I have been looking all day for a PHP or JavaScript solution to do this. I would like to alert the user their session is about to time out (popup), ability to extend the session time. Here is a visual if you need one on this page EDIT: jQuery is the framework if that helps ...
Does anyone know if there's any benefit in 'minifying' locally-stored javascript code to squeeze more performance out of the javascript engine? Usually minification is done to reduce bandwidth requirements/costs, or obfuscation, but would there actually be any performance benefits? In other words, does this code: let i=[1,2,3,4,5,6];l...
Can you capture events from the 5-way keypad of a device using Opera Mini using Javascript? (My guess is the answer is no, but I figured I'd ask anyway) ...
How does Google append search parameters to url without reloading page? Does anyone know how they do it? I know about the HASH trick and the webkit pushState function. I don't think they are using either. Their solution is cross browser compatible, do they use a combination of different methods for each browser? ...
Hi, basically I'm trying to pass a variable that is defined in a JSON array that is parsed through in a for loop to be accessible in a click statement. $(document).ready(function() { getJSON(); var usedID; }); function readJSON() { for (var i = 0; i < json.array.length; i ++) { usedID = json.array[i].id; var template = $('re...
What's the big O for JavaScript's array access when used as a hash? For example, var x= []; for(var i=0; i<100000; i++){ x[i.toString()+'a'] = 123; // using string to illustrate x[alpha] } alert(x['9999a']); // linear search? One can hope JS engines will not use a linear search internally O(n), but is this for sure? ...
Is there a way to specify something similar to the following in javascript? var c = {}; c.a = function() { } c.__call__ = function (function_name, args) { c[function_name] = function () { }; //it doesn't have to capture c... we can also have the obj passed in return c[function_name](args); } c.a(); //calls c.a() directly c.b()...
Hello, I am trying to have a resizable on a div, but the resizer handle is always contained within the div can I have it where scrollbars end. /////////// Edit /////////// I have achieved it with jScrollPane but after using jScroll I am unable to resize horizontally. ...
I want to make everything I write in a textfield to be capital letters. As I write, not after losing focus. How do I do this using jQuery? ...
The following statement: <%= Html.EditorFor(model => model.Material.Serial) %> Generates the following code; <div class="editor-field"> <input type="text" value="" name="Material.Serial" id="Material_Serial" class="input-validation-error"> <span id="Material_Serial_validationMessage" class="field-validation-error">Debe in...
Hi, I want to store elements as the keys in my array and object as values,for example - var arr = []; arr[ document.getElementById('something') ] = { data: 'something' , fn : function(){ } }; But the problem is: If I will add another element with the key of : document.getElementById('otherthing'). And later will try to get the value ...
Hello, I have a javascript file that is ran through a windows job using cscript. However, I can't seem to fix this thing to work correctly. Inside the file, it basically takes a URL and transforms it to a UNC path. ex: http://mysite.com/document1.htm to \myserver\document1.htm However, I can't seem to get the /'s to goto \'s and am ...