JQuery :: GetJSON In Firefox Takes Longer Than In Other Browses?
Sep 16, 2009
jQuery using getJSON calls specific handler, lets say MyHandler.ashx $.getJSON(/MyHandler.ashx?param1=someVal, function(data) {
some code;
}
In Opera and Explorer this is executed immediately. In FireFox it takes over 1s before request is executed. Even when I set breakpoint in my handler it will be hit after 1s... could you tell me why it is so slow? I got latest version of firefox.
View 1 Replies
ADVERTISEMENT
Jan 22, 2006
I have a WYSIWYG editor based on the HTMLArea project that uses the
cssRules object of a stylesheet to add/update stylesheet rules for
table cells. Ever since I upgraded to FireFox 1.5, I get the following
error message when trying to access the cssRules object:
"Access to restricted URI denied"
The code I am trying to execute looks like this:
var currStyleSheet = editor._doc.styleSheets[0];
var currRules = currStyleSheet.cssRules;
var tdIndex = currRules.length;
for(i = 0; i < currRules.length; i++) {
if(currStyleSheet.cssRules.item(i).type == 1) {
//if it is a style rule
var currRule = currRules.item(i)
if (currRule.selectorText.toLowerCase() == "td") {
tdIndex = i;
}
}
}
This code is simply looking for any rules for TD elements. I am at a
loss as to what is going on and/or what changed if FireFox to cause
this error. It worked fine in previous releases of FireFox. The
document that I am trying to access the stylesheet for is within an
IFRAME, which is what I believe is causing the problem.
View 19 Replies
View Related
Oct 28, 2009
Why this script no longer works in firefox? It works in the older version but since it got updated to version 3.5.3 it doesnt work anymore. It works fine in IE.
<script type="text/javascript">
function show_popup(s_file, msg, msg2, msg3, w, h) {
var p=window.createPopup()
var pbody=p.document.body
pbody.style.backgroundColor="white"
pbody.style.border="solid white 6px"
pbody.innerHTML="<table cellpadding=0 bgcolor=white style='border:0px solid #777777'><tr><td colspan='3'><img src='images/"+s_file+"'></td></tr><tr><td align=left><font face='times' color='black' size='1'><i>"+msg+"</i></font></td><td align=left><font face='times' color='black' size='1'><i>"+msg2+"</i></font></td><td align=left><font face='times' size='1' color='black'><i>"+msg3+"</i></font></td></tr></table>"
p.show(15,15,w,h+40,document.body)
}
</script>
This is then what I add for each of the images ->>
<a href="javascript:show_popup(image.jpg','Image Example ','acrylic on masonite','62 X 48 inches',430,564)"><img src="images/thumbs/image_thumb.jpg" alt="Images" width="100" height="128" border="0" align="center" valign="TOP" /></a>
View 6 Replies
View Related
Apr 2, 2010
Recently i tried to use getJSON to retrieve data from [url] and every time i tested in firefox, the console will always give me error on the line $.each(data.results, function(i,result) saying data is null. i am wondering how to solve this problem?
View 2 Replies
View Related
Jan 21, 2011
We've been using ajaxSubmit to process a login form request (can be found here: [URL] Login Link in navigation). However when we attempted to upgrade from 1.3.2 to 1.4.4, we get the following error whenever we submit the form:
"jQuery(this).ajaxSubmit is not a function"
The only way we've been able to get the form to work again is to go back to vs. 1.3.2.
Has something changed in 1.4.4 that would prevent the form from working? Is "ajaxSubmit()" no longer a valid function?
Here's the javascript below:
jQuery(document).ready(function() {
jQuery("#show_login").click(function() {
formLogin();
jQuery('#user').focus();
[Code].....
View 2 Replies
View Related
May 20, 2009
I am hiding a login panel like:
$(document).ready(function() {
$("#login").css({marginTop: "-105px"});
});
But in IE 8 it takes very long to hide? I don't like to set it in CSS because if javascript is turned off people can still login as it is visible... is there anyway to make it faster ?
View 3 Replies
View Related
Aug 14, 2009
We are using JQuery for one of our software projects, and it's a very nice library. It's making things far easier. We are also using the Validation plugin, which is working wonders for form validation.However there's one wrinkle that we have not been able to figure out.Is there any way to run a function before the validation takes place?We have help text displayed in some of our text inputs and text areas,which are cleared onFocus (and restored onBlur if the user has not entered anything). We would like to clear those help text before validation is run, so that we don't get any false validations based on the help text, rather than the actual value of the field, which is blank.
View 1 Replies
View Related
Jun 2, 2011
In our application we have used json data and we get json data from the server and on client side we display in grid. We have functionality of paging and filter. so on paging and filtering we process that json data and show to user. For filtering we are comparing each value to the filtered criteria and when json value is more thatn 35 kb it takes around 8-10 second to filter it. So is there any way that we can minimize the processing tiem.
View 1 Replies
View Related
Nov 24, 2009
Code:
function getCount1(){
sndReq("count&queue=1");
newCount1 = document.getElementById("count1").innerHTML;
if(count1 != newCount1){
[Code].....
I have no other animations on my page, yet "updateQueue1()" happens way before the animation...
View 2 Replies
View Related
Aug 9, 2011
Have a web app which consists of a form and have it set up to launch a dialog box containing information next to the subject label text field.Everytime, someone fills out the form and clicks on submit, the form's message body (from the text area of the form) is displayed on top and theform is displayed underneath it. Before, I had it set up as fixed (x,y) for the dialog box to appear next to the subject label. But, now, whenthe page becomes longer, the dialog box doesn't appear next to my subject label text field. It is displayed a lot lower.
Here's the code to find the position:
// Finds the position and adds 40px to the left axis.
function findPosition(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
[Code]....
How can I set it so my findPosition() calculation doesn't miscalculate when the page is too long (when scroll bars are needed)?
Is there a way to set the relative positioning to always have the dialog appear 40px right of the subject label?
View 2 Replies
View Related
Sep 29, 2010
I'm using simpleModal.js on a page and it works great however, once I try to add options to the modal it no longer works.
Here's what I'm using now and it works successfully:
If I try adding a width option it breaks...absolutely nothing happens:
View 1 Replies
View Related
Mar 24, 2010
Ihave two select boxes. The second one is getting the content with ajax call, acording to the value selected at the first one.
My problemis onlyin IE. When the second select box geting longer text and the html table TD is not enlarging itself too.
FireFox works fine with this code.
View 2 Replies
View Related
Sep 12, 2004
I really like this script http://dynamicdrive.com/dynamicindex1/navigate2.htm
however, I can't seem to find a script that uses cookies for a long period of time, instead of just for browser sessions.
Is there any way someone could help me on this and make the script use longer cookies for so many days.
View 1 Replies
View Related
Jul 23, 2005
I check data validity in html form by JS. Something like
for (i=0; i<document.form[0].elements.length; i++) {
chechkValidity(i);
}
Unfortunately, the form[0] has about two thousands elements (it is
statistical questioning form for companies) and execution of this one
cycle takes about twenty seconds.
The problem is, that during these 20 seconds the browser "freezes":
The button activating the cycle disappears and the mouse pointer
doesn't change into "watch" (sandglass) showing that something is
being carried out.
Although after the 20s everything is ok, it is not the nicest behavior
of the form. I don't assume somebody is so impatient to restart during
those 20 seconds. I just want to minimize the users' swearing on my
address and tha's why my question:
How to show the progress of that cursed for-cycle?
View 13 Replies
View Related
Jul 20, 2005
I have been trying to use the following:
document.getElementById('someId').setExpression('s omeExpression');
This works ok.
But in my actual implementation, I have over 20 different elements
which need to be positioned using this method. When I made the code, I
found that my CPU would be at 100% for even trival events such as
mouseover() and mouseout()
Am I doing something wrong?
View 1 Replies
View Related
Mar 6, 2006
I want to start out by entering an investment amount as well as an interest amount. Then I want to find out how many years it would take to become a millionaire, using each cycle through a looping statement as one year. What would be the best way to do this?
View 13 Replies
View Related
Jan 15, 2010
What do I need to do with this?
Code:
1st:
<script type="text/javascript" src="includes/js/jquery.js"></script>
<script type="text/javascript" src="includes/js/jquery.lightbox-0.5.js"></script>
<script type="text/javascript" src="includes/js/jquery.hoverIntent.minified.js"></script>
<script type="text/javascript" src="includes/js/jquery.tooltip.js"></script>
[Code]....
The one in the red is no longer working after adding the 2nd one.
View 5 Replies
View Related
Jan 31, 2010
i've built an app using extjs when it a user browses to the url domain.tld/#v=xxxxxx a new tab opens in a extjs panel to show content for the video with id xxxxx as soon as i submit a form from another page or even the same one and popuulate another variable, q, the tab no longer opens when the url looks like domain.tld/index.php?q=some+text#v=xxxxxx why it no longer gets the value of v? i'm using
[Code]...
to get v's value and if it is set then a javascript function is called to open the tab.
View 2 Replies
View Related
Feb 8, 2011
I have a page where an alternate address area is kept hidden via JavaScript and CSS divs. If you click that you want to use an alternate billing address, two divs are expanded. One with the form fields for entering in your alternate address, the other area has further info about why we need that alternate address. (Code is below). This works PERFECTLY for my needs....however, if you reload the page, the "show" button remains selected and OFF=ON and ON=OFF if you get my meaning...so when you click the radio that should be hiding the divs, it shows them and vice versa. Additionally if there is an error in the form and the page reloads to display the error, only the billing address area stays expanded (its inside the <form> tags), the text area next to it goes back to being hidden, and the show/hide OnClick no longer works. Ideally, I'd like the two to maintain the same state (i.e. if both we're shown, both stay shown).
CODE (trimmed down of course):
Code:
<head>
<style type="text/css" media="all">
.invis { visibility: hidden; display: none; }
.vis { visibility: visible; display: inline; }
</style>
<script language="javascript" type="text/javascript">
var c = 'invis';
var ids = new Array('id1', 'id2'); // IDs of your <div>s
function doSwap() {
c == 'vis' ? c = 'invis' : c = 'vis';
for (var i=0; i<ids.length; i++) {
document.getElementById(ids[i]).className = c;
}}
</script>
</head>
<body>
<div id="id1" class="invis">This is all just plain text that appears when the NO radio is clicked but disappears on reload</div>
<form>
<table>
<tr>
<td>
<input type="Radio" name=" " value="hide" onClick="doSwap()" id=""> YES
<input type="Radio" name=" " value="show" onClick="doSwap()" id=""> NO
</td>
</tr>
<tr id="id2" class="invis">
<td>extra address entry stuff that appears when the NO radio and that stays on page after reload</td>
</tr>
</table>
</body>
View 2 Replies
View Related
Feb 12, 2010
I encountered some code in "Javascript the good part" from Douglas Crockford.There is a way to passing callback function as second argument to string.replace() method.
Code:
var entity = {
quot: '"',
lt: '<',
[code]....
1. How do I know what the number of parameters should be in callback function ( function(a,b) ) ?
2. How do I know what will be passed in as a and b when I am defining the callback function?
View 2 Replies
View Related
Jan 2, 2011
I'm sure this question has been asked many times before, but I can't seem to get the correct terms to find the answer in Google.I understand basic JavaScript inheritance. However, everything I've read makes the inheritance work something like this:
Code JavaScript:
var ChildClass = new Function();
ChildClass.prototype = new ParentClass();
ChildClass.constructor = ChildClass;
That's fine, but what happens when ParentClass's constructor needs parameters?As an example, look at the following code:
Code JavaScript:
function Furniture(color){
this.color = color;[code)....
How could I "copy" Furniture's constructor into the Chair object? Better yet, how could I copy Furniture's constructor and then add some functionality to it?
View 9 Replies
View Related
Jul 2, 2009
I am new to this discussion but hope you would post reply for my query and encourage me to keep in touch with this discussion. Well here is my problem. I have made an edit in place form in which we can add and remove the elements. I have used jquery.jeditable.mini.js and jquery.duplicate-remove.js plugins for edit in place and add and remove action. I have live() function to access the dynamically ganerated elements like this. $(".addressDiv span").live("mouseover", function(){
clickable function here...
[Code]...
View 1 Replies
View Related
Feb 15, 2011
I am trying to understand somecode. I don't think I am understanding everything correctly. Can someone confirm or add to my understanding?
Here is the code, below is my explanation:
- CODE 1 - is saying if the the class subnav_dd is called on an anchor tag on a li, then make the function in the if statement "live". (Live in a sense binds the function to the condition, but unlike bind it allows the condition to be used more then once. ) So if the class subnav_dd is the parent, and has a class of .dis then prevent anything below it from firing. CSS - If code 1 is true, then I will only get the first li to fire, the remaining ones will not.
- CODE 2 - This one is a little tricky. Function ToggleOptions takes 3 variables (target, array, state). The condition is if the div subnav + target have siblings, then check to see how many siblings are there. Put the amount of siblings into an array, then check the state of each sibling. I don't completely the rest of it.
I think if the div subnav is called and something is found in the array then the class dis is either added or removed. Then what? I don't understand why I still need the else that adds a class to #subnav_ +.target
View 1 Replies
View Related
Sep 15, 2009
ser is able to create queries and issue them. The query is sent to the web-app by means of an ajax call. Then, the server computes the result set and a small subset (100) of tuples are sent back to the client for visualization.
These thing works with queries that are simple and do not require to the database long computations. As soon as I try a more complex query (computation requires ~ 7secs), the answer returned to the client is empty.
I suspect that this is a problem of timing out the connection, is that possible?
(edit) I have almost forgot, I'm using Prototype as JS library
View 1 Replies
View Related
Jan 3, 2010
I'm trying to create a page that takes data and turns it into images - I'm starting very simply. For each row of text, I first:
if(j.match(/[a-z]+_\d+/)){
colorval='red';
} else {
colorval='blue';
}
then I add a sequence of numbers for positioning to an object called pixs (with a numerical index as well that may or may not be useful):
var xpos = startwidth+d_num;
var ypos= startheight+d_scroll;
pixs[num]= {};
pixs[num]['xpos']=xpos;
pixs[num]['ypos']=ypos;
pixs[num]['color']=colorval;
As I loop through my arrays of little pieces of data, all of this information is stocked into pixs - BUT then- I have to insert this information from pixs to a function, like:
$(container).fillRect(xpos,ypos, width, height, {color: color}) where width and height are each preset vars.
My challenges here are to 1) successfully loop through the pixs object. 2)Use jquery if possible (or if easier) to get these variable values into the function to evaluate. 3) Successfully '.fillRect' with each loop. 4) Use the append method (or something?! again, I am a n00b) to get all of these instances of fillRect onto the container in the html document (which appears to be set up and working with instances of fillRect not using variables as parameters)
View 12 Replies
View Related
Apr 24, 2010
I have a very large tree data structure and I want to display some of its sections on a HTML page. I wrote the following JavaScript that loads parts of the tree dynamically injecting the desired HTML code.
Code:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>[code]....
Each show_xxxxxxxx() function displays desired part of the tree on HTML.The problem is each time I load the HTML file it takes a lot of time to read the JavaScript (there are many show_xxxxxxxx() functions with a lot of HTML to insert).Is it possible to cache the loaded JavaScript into browser memory so it won't read the entire script when I reload the page with different content?
View 3 Replies
View Related