What a strange error in JS formatting of a new object?
My javascript code that produces a syntax error: var x = { a: 123 }; The same code without an error: var x = { a: 123 }; What the heck? ...
My javascript code that produces a syntax error: var x = { a: 123 }; The same code without an error: var x = { a: 123 }; What the heck? ...
I have few anchors with a click event: $$('.someanchor').invoke('observe', 'click', somefunction ); When the anchor is clicked, the browser scrolls to top. I tried to insert return false at the end of somefunction, but it still scrolls up. Usually I would use something like: Event.observe('somelement', 'click', somefunction, false);...
Hello folks! You'll have to forgive me on this one. I understand that the issue is probably very simple, but I'm not a JS coder and am only just starting to get to grips with jQuery. So I have a jQuery Ajax call in $(document).ready: $('#newesttab').click(function() { $('li').removeClass('selectedtab'); $('#newesttab'...
Hi, How I can delete all value into a grid? Thanks. ...
I've got a single mousedown event handler on a table with dynamically increasing number of rows (right now over thousand, in perspective should have been unlimited) and I observe a drop down in performance as the number of preloaded rows increases. The purpose of event handler is simple - figure out which row was clicked and highlight it...
Hello everyone, I am in the process of writing a login/register form for my MVC website and am facing an issue regarding security and AJAX. It seems that more and more popular sites are utilizing javascript to process logins, and many from a non https URL (www.giantbomb.com and www.gametrailers.com to name two). I'm wondering if there...
I am using AJAX requests (more specifically, jQuery's load method) to load different views within the same HTML DIV. This works fine, but, some of these dynamically loaded pages have events hooked to them, for e.g. setTimeout, setInterval events, etc. My question is: How do I handle the loading & unloading of these events across the ...
I'm working on a new website that uses twitter's embeddable widget (see http://twitter.com/goodies/widgets ). You can control the widget's dimensions - width can be a fixed number of pixels or be set to 'auto'. Unfortunately I'm unable to convince the widget's height to be set to 'auto', which causes problems on long pages as large are...
My HTML looks like this: <script type="text/javascript" src="jquery-1.4.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#btn").click(function(){ $.post("test.jsp", { "txt": $("#txt").val() }, function(data){ alert(data); ...
Many posts address this for iPhone apps, but I need to know how to do this for javascript on a web page. My specific problem is that I want to track the device's location over a long period of time (say a car trip). This becomes a problem when the device sleeps (and maybe during a phone call, I haven't tried that case yet). I'm open to...
I want to make a delay when the result comes in the note. I have a form > input the user types his username in the input and I check with AJAX if the username is available or not. If yes a note shows up near the input with the result. Please no jQuery! ...
I am working om a menu bar, each menu bar item is an image, when user places mouse over menu item a div with submenu will appear. I want to place div directly under the appropriate image item (no space, and div will hover above all elements), with right side alignment, meaning the right top corner of div should be under bottom right...
We have a .net based application hosted with SAP enterprise portal iframes. The domain of the SAP portal is al.xx.companyname.com. The domain of the .Net application server is ss.xx.companyname.com. Now when I open the application through Enterprise portal, I get a 'Permission denied' JavaScript error. I enabled script debugging in IE ...
Hi, I'm looking at using less.js (looks great), but our site requires that some styles be loaded dynamically after initial page load. It seems, however, that all LESS stylesheets must be loaded prior to the less.js script load. i.e. this works <link rel="stylesheet/less" href="/static/less/style.less"/> <script src="http://lesscss.goo...
Hi, I am trying to set the charSet in a jquery call the site I am making is for a Lithuanian friend thus has some letters with accents etc. As far as my research so far (2 days worth!!!) has shown, I need to place it in the beforeSend section which I have done as follows: $(document).ready(function(){ $('.content').load('home...
Using MySQL & Java Script I want to make a mysql connection in Java Script, then how can i get a table value by using this connection. ASP.Net code con.ConnectionString = "Dsn=server1;" + "Uid=root;" + "Pwd=root;"; con.Open(); cmd = new OdbcCommand("S...
Hello, Is it possible to use "tabs"(indenting) in textarea using javascript. When tab button is clicked, the next form element is focused. But, i need to indent the text in textarea. I am currently working in a project and any code with javascript or jquery will help me. ...
IF I send an AJAX request to a PHP file, what would result in faster rendering of HTML: Sending the completely formatted HTML straight from PHP, or: Just send JSON data and let Javascript do the HTML rendering? I have a rather complex HTML structure, and this puts download time of a large HTML chunk vs. the times Javascript (jQuery) ...
anyone have an idea to make a marquee effect just like twitter ? its steamless ( doenst stop waiting for the loop ends ) + fadeing at the start and the end. thanks. edit ok edit, ive found one semi - steamless here http://jsbin.com/uyawi/3/edit but its still laggy + not really streamless maybe becouse the use of css? ...
I want to save webpage as image file or i want to take snapshot of an webpage using PHP. Just like firefox extension Fireshot doing. ...