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.
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>
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.
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>
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.
This is turning up null all of a sudden. I'm running version 5.0.375.70
alert(document.styleSheets[0].cssRules);
shows null in chrome with a very simple test page and single css file with just one rule, but turns up as an CSSRuleList for FF Safari, Opera etc... document.styleSheets[0].rules is also null in my Chrome browser. How do i get the css rules in chrome? I think this actually used to work in my older versions of chrome but now I'm second guessing myself.
I have encountered an issue with Javascript and my novice skill set has not allowed me to find a solution. On a page I have several images, when the user clicks on an image I pass some info about that image to my display html page. In the display page I want to display two images so I append Zoom.jpg and Medium.jpg to the string I passed. FireFox displays both images but IE does not seem to know what to do with it.
well as the title indicates I have a little bit of javascript code that works perfectly in IE but not at All in FireFox. the code checks the length of text in a textarea. the code for the textarea: Code:
I'm writing a SOAP type application that only works over ssl. Authentication works with Firefox but fails when I use a different browser. For some reason, chrome, opera, IE all omit the POST information and I don't understand why. Below is the requests sent to the server from Firefox and Opera. Following that is the javascript that sends the password. My js skills are pretty weak to say the least. Is "document" cross compatible or different for all browsers?
------------------Recieved------------------- POST /authme.cgi HTTP/1.1 Host: localhost:6060 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
This program (the search function) works well with IE8 but it is a mess with Firefox. My knowledge of Javascript is very limited:o. I have been unable to find what is wrong.
I have created a very simple JavaScript code to display larger images of a thumbnail image on the main section of a website. It works fine in FF3 however in IE 7 is giving me an error code of Invalid argument on line 6 character 1. The funny thing is I have used this exact code in another site and it worked fine with IE 7.
I am getting the following error in firefox and nothing happens when I click on the image map.
The "coords" attribute of <area shape="rect"> tag is not in the "left,top,right,bottom" format. As you can see above, I am using shape="poly" and not shape="rect".
Usually it's the other way (IE works, Firefox not working)... but here it is. IE does render something, although it puts the advert script (starting on line 9) at the very end, after the close of the last table. Firefox displays it as I have intended it (Ad inside the table). Code:
I've inherited a page that enters data into a database, some of the fields are calculated and one uses today's date. In Firefox it all works fine but in IE it wont load the full page.
I have a javascript function on my page named "print", that opens up a new window and a print dialog so the user can select a printer and print the page. The html itself is in a frame, so the print function extracts the innerHTML and then presents it to the user in the new window. After extracting the innerHTML, I'm attempting to remove any links to avoid having the user click on them (I just want the user to print). This works fine in FF (3.6.9), but causes IE (IE7 and 8) to lock up in a rather nasty manner. The "destination" in this case is simply the current page (e.g., index.aspx).