JQuery :: Internals And Exception Handling?
Aug 19, 2009
Couple questions for the jQuery internals-aware folks. This is a bit long, sorry for that. I'm working on beefing up error handling in a web application. I want to ensure that I'm catching all exceptions and handling them via my own UI system. The window.onerror function is part of the solution,
[Code]...
View 5 Replies
ADVERTISEMENT
Dec 14, 2011
When I upgraded to jQuery 1.7.1 (from 1.5.x), I found that an exception was suddenly thrown on every keydown event on an INPUT type="text". I still get the exception when I remove my change and keyup events. Previously I bound to these elements with .live, but I have the same issue with the new .on, so I don't think this problem is even related to my bindings.
The exception is as follows (from the custom WebKit frame where my script runs):
This occurs on line 3255 of jquery-dev-1.7.1.js, which reads:
I did some poking around and found that handleObj.origType is "keydown". There is no jQuery.event.special["keydown"] defined, meaning that the first part of the expression evaluates to undefined (there is no such thing as {}.handle). The second part of the expression, handleObj.handler, evaluates to true. The entire expression therefore evaluates to true, which can't be applied as a function.
View 1 Replies
View Related
Aug 12, 2010
I'm trying to develop proper exception handling for a javascript framework I'm developing but I keep hitting an annoying dead end: caller and line numbers / stack trace.I have a basic exception class:
Code:
/**
* Exception.js
*
* @classException
[code].....
The problem is that the console.trace() function returns only one line: "log", referring to ExceptionHandler.log(e) (at least in webkit). What I'd love to do is have the Exception class get information as to (at the very least) what called it and also, although perhaps less viable, the line number it was called on. I don't think the line number is going to work though. I would _like_ this to happen automatically, but if I have to include another argument called_from it won't be the end of the world. I know about arguments.caller but this is depreciated (as of ECMAScript 1.3 (?)).
View 5 Replies
View Related
Jul 22, 2009
In my code (ASP.NET MVC using Nhibernate) , I do this :
[Code].....
Then I display the result in the DIV named "myFormDOFF" Of course, my .NET code can generate exception. I'd like when I receive an exception didn't change the content of "myFormDOFF" but display the message send by the exception in another DIV.
View 1 Replies
View Related
Sep 23, 2009
I am needing some help with an error I'm getting from a project I'm working on. First off let me preface this all with the fact that I'm a total javascript noob. I'm really trying to understand what I'm doing wrong. So any help or advice is MORE than welcome. Here's what is happening. I found this code that will duplicate a row in a table and modifiy the name of a input in the row. Well for my purposes I have two different tables I need to work with. (each one idividually) So I changed the code a bit to make it accecpt a variable to use for the table name. (before it was static) and now I'm getting a error. Error: uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://www.tourandtravelnow.com/admin/scripts/faxPageScript.js :: addRow :: line 14" data: no] This is the old code that would work (only for one of the tables)
[Code]...
View 1 Replies
View Related
Jan 10, 2009
I am having trouble getting my expanding menu to work in Firefox and Opera. It works fine in IE though. I did not write the javascript myself, as I am fairly new to JS, but I did all the HTML and CSS. I used the error console on FF, and also used FireBug. They both returned the following error:
[Code]...
View 23 Replies
View Related
Oct 5, 2010
I'm a newbie jquery user so I may be doing something wrong, but I'm doing it well. My use case tells that I need to send files to server and the server will throw an Excption when the file type is unkwown. We are only accepting text files such as word, so a movie will get the mentioned exception.
It works on firefox, but on IE8 (and maybe others) I get a blank page since the line below gets a "Access Denied". It seems that the iframe that jquery builds gets inconsistent.
[Code]...
View 2 Replies
View Related
Feb 3, 2011
Why behaviour of:
Differs from:
jquery raises exception TypeError: object is null
IsObj = length === undefined || jQuery.isFunction(object); we should test is object is null
View 1 Replies
View Related
Mar 6, 2011
I'm getting a warning message from internet explorer's javascript debugger for jquery.min.js (I load the most recent version from Google's CDN):
Error details Web page
User agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
Timestamp: Sun, 6 Mar 2011 14:40:13 UTC
[code]....
View 4 Replies
View Related
Aug 4, 2010
I am able to run below code in IE but not in FireFox.
Script :
var prodElement
= document.getElementById('moveattrribseq
');
var value = " ";
prodElement
.add(new Option(value,value)); : This not working in FireFox
JSP code :
<select class="widthed" name="moveattrribseq
" id="moveattrribseq" multiple="multiple" size="10" >
<c:forEach items="${sessionObj.attributeNameList}" var="sessionObj">
<option value="<c:out value="${sessionObj.attributeName}" /> ">
<c:out value="${sessionObj.attributeName}" />
</option>
</c:forEach>
</select>
ERROR
: from FireBug
[Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame
prodElement.add(new Option(value,value));
View 2 Replies
View Related
Mar 28, 2011
I keep getting the error message below using IE8 browser.
Error:
Message: Exception thrown and not caught
Line: 3291
Char: 2
Code: 0
[URI]
Line # 3291 error is the second line below (
"Syntax error, unrecognized expression: " + msg;)
Sizzle.error = function( msg ) {
throw "Syntax error, unrecognized expression: " + msg;
};
var Expr = Sizzle.selectors = {
order: [ "ID", "NAME", "TAG" ],
match: { .....
View 2 Replies
View Related
Jun 19, 2009
I want to add a color change to an anchor tag. But only on a few pages. I am trying this but it does not work:
$(function(){ var urlName = [URL]
if (urlName == window.location.href) {
$('.news-list-item > h3 > a:first').css('color','#8CAAC3').css('text-decoration','underline');
}});
View 1 Replies
View Related
Jun 28, 2010
I was using jquery-1.3.2.min.js to show a modal dialog on a button click event handler and this worked fine. The same did not work with jquery-1.4.2.min.js and yielded the following script error on my IE -8 broswer. Message: Exception thrown and not caught Line: 75 Char: 399
View 2 Replies
View Related
Aug 21, 2009
I've been using $.get() and $.post() extensively, but then noticed the more functional $.ajax, which lets you handle server-side errors using the "error" option. The parameters to the callback function for the error option are:
(xhr, status, exception), where in the documentation it says "exception" is the Exception object if it's supplied.
My server-side is PHP, and when I perform a:
throw new Exception("You can't do that!")
or
trigger_error("You can't do that!", E_USER_ERROR)
It does run my error callback, but it puts 'undefined' in the "exception" object, and my custom error message is nowhere to be found. How do I populate that Exception object on the server side, so that the error callback can then access it?
View 2 Replies
View Related
Jul 28, 2009
Lots of submenus and such, and just can't get this going. Works fine if I remove the submenu aspects of the script, however with these, it returns the error: uncaught exception: Syntax error, unrecognized expression: #
[Code]....
View 1 Replies
View Related
Jun 22, 2010
Theexpression in red works fine in jQuery 1.2.6 but does not in 1.4.2.
jQuery(
"#menu_sample > li > a[@class=expanded]").find("+ ul").slideToggle("medium");
All the child li items for the following HTML should display:
<
li><a class="expanded" href="#">Weather</a><ul> (li items here)
[Code]...
View 4 Replies
View Related
Aug 2, 2010
Geeting a JS error from IE 6 only in this method: handle: function( event ) { var all, handlers, namespaces, namespace, events;
[Code]...
On the last line of the code snippet above. It appears to me that IE6 doesn't like the fact that the events object is undefined. To trigger this error we are doing a simple blur binding to an input box. ex:
$(field).bind('blur', function(){onfocusout(this);}); It appears IE 6 stops executing JS after the error (imagine that). Is this an issue in jQuery core or BTW I know MS has dropped IE 6 support but we still have customers.
View 2 Replies
View Related
Aug 19, 2009
I have a form with the same structure being loaded in 3 tabs. Now during validation, I will have issues with the IDs of the form fields. Now is it possible to disable the forms in tab 1 and tab 3 when tab 2 is clicked.
View 1 Replies
View Related
Jan 23, 2011
I developed a plugin which loads some content via AJAX. Every time the content is loaded I need to bind to certain elements ( let's say the elements with 'bar' as classname ) the mouseover and mouseout elements. I achieved it by using the ' live() ' instruction.Now my problem comes when I need to scan every element which has 'bar' as classname and do some calulcations on it (they are over 600). I tried to do like this
$container.find('.bar').live('customevent', function()
{
// do some stuff
});
then, once the contents is loaded
...
$container.find('.bar').trigger('customevent');
but this will cause the browser to carsh ( I think because jQuery is scanning over than 600 elements)
View 1 Replies
View Related
Dec 29, 2011
I'm a just wondering about something that might be quite simple but I'm not sure how to achieve it.
<form>
That's the code for my form. Two radio boxes one called car and one called bus. I'm not so much bothered about the contents of what is selected, just that if car or bus (or both) is selected.
I have two buttons:
If I choose a car such as Ford, I want the car one to be changed to
I also want the submit button to be 'greyed out' until both of them have been submitted which looks like this.
View 3 Replies
View Related
Dec 24, 2010
This is the exemplar I've been using for my $.ajax requests to my php script.
$.ajax({ type: 'GET', url: 'getDetails.php', data: { id: 142 }, success: function(data) {
// grabbed some data! };
});
I'm working with a few more variables than this, I'm working with 3 variables. What I'm wondering is should I use json_encode() on the php side. I will be using php validations, so I may return error messages in an array. How do I check whether I have error messages or true value.
I'd like to send in an associative array so I can have email = "error"; amongst a few others. So if email is the only one with error I will .append a message to the correct div id.
View 3 Replies
View Related
Jan 8, 2010
i'm trying to do some event delegation, and i can't seem to get the onchange event working in IE. i've tried:
$(document).change(function () { alert('fuck. me. IE sux'); }); $(document.body).change(function () { alert('fuck. me. again'); });
and later i have:
<select id="aSelect"> <option value="0">a first option</option> <option value="1">a second option</option> <option value="2">a third option</option> <option value="3">a fourth option</option> </select>
but this doesn't work in IE. i've also tried to wire these up manually: document.body.onchange = function (e) { alert('foo); }; and document.onchange, but those don't work either. what's the story here (other than the fact that IE is sucking balls)?
View 5 Replies
View Related
Aug 21, 2009
Suppose I have this syntax:
I want tellme() to handle the value of href of the clicked link.
What syntax do I put in tellme()?
I got this far:
Here is question: How would I get this info from the API documentation?
View 7 Replies
View Related
Aug 4, 2009
I'm working on a small plugin that extends a checkbox to behave as if it has 3 states. Basically it just adds an anchor above the underlying checkbox, intercepts mouse clicks, and cycles the checkbox between:
disabled + unchecked
enabled + unchecked
enabled + checked
It works fine in FF. But in IE7, for some reason, the click events are always sent to the underlying checkbox instead of the overlaid anchor. The anchor is sized to completely overlay the checkbox (and in fact, I made it's slightly bigger so clicking at the very edges
works). Incidentally, I'm using jQuery 1.2.6 since this is part of a much larger web application and we haven't yet worked out the incompatibilities we're seeing with the latest jQuery version.
Here's the plugin code (the alerts are for debugging in IE)
(function($) {
$.fn.checkbox3s = function(options) {
var opts = $.extend({}, $.fn.defaults, options);
return this.each(function() {
var proxy, cbx = $(this), parent = cbx.parent();
parent.css({position:"relative"});
proxy = $("<a href='#'></a>").css({
position:"absolute", .....
View 5 Replies
View Related
Jun 9, 2009
I am very new to javascript/jquery so bare with me. I am using this loop code below with a populated array called "listarray":
[Code]...
View 3 Replies
View Related
Dec 5, 2010
I am trying to get this simple piece of code to work, for some reason the HTML page is not handling the jQuery.js link. Tried the ../ for a link would'nt work either. The HTML file and the .js file all in the same folder in my htdocs
<!DOCTYPE html
View 3 Replies
View Related