RemoveAllRanges Not Working In FF, Opera
May 27, 2010
I'm working on developing this script and struggling to get it to work correctly in firefox. The idea of the script is that you highlight a word, and onmouseup the selection is passed to an XMLhttprequest, and the returned data comes up in a tooltip by the word you highlighted. Also, after the selection is captured, the word needs to be deselected instantly. This is working beautifully in Safari and Chrome, but the text will not instantly deselect in Firefox or Opera. Firebug is telling me that window.getSelection().removeAllRanges() is not a function. why it's not deselecting the text right away in those browsers? My js is posted below (sorry for including it all, but I'm not too good with js and don't know where the problem lies):
javascript Code:
var text = "";
var time_variable;
function getXMLObject(){
var xmlHttp = false;
[Code]....
Also, in IE for mac, the function doesn't seem to be capturing or doing anything with the selected text at all... it neither deselects nor produces the tooltip.
View 2 Replies
ADVERTISEMENT
Aug 5, 2009
I've determined that my problem wasn't in the script itself, but in the fact that Opera 10 Beta 2 apparently does not recognize the "onload" attribute of the body tag.
View 3 Replies
View Related
Jan 18, 2010
I have a feature on my site that allows visitors to enlarge the text at the click of a button, and I store their preference in a cookie. This allows them to keep the same setting as they navigate around the site, or even if they re-visit another day. It works perfectly on Firefox 3.6, IE8 and Safari 4, but for some reason it won't work in Opera 10.
Here are the two links for changing the text size:
HTML Code:
<span id="fontsize">Font Size:<a href="#" class="size" onclick="getElementById('wrapper').style.fontSize = 'medium';setCookie('size','','');return false">A</a></span>
[Code]....
As I say, it works fine in the other 3 big browsers, and I've triple-checked on two different computers that cookies are enabled.
View 6 Replies
View Related
Aug 11, 2010
every other browser fails. there's got to be a simple explanation for this. code:
$(document).ready(function() {
$('.next').click(function() { nextSlide(); return false });
$('.back').click(function() { prevSlide(); return false });
[code]....
View 9 Replies
View Related
Jul 11, 2010
I've made a web based tool that times how long a web page takes to load in an iframe and today I redesigned it but now it has issues. When I load it in Chrome and Opera the new version works fine but in FF 3.6 and IE 8 only the footer area is displayed. I have added the links below - You'll be able to access the code via your browser's "View page Source" option.
URLs:
New test (With problem): [URL]
Old test (Works perfectly): [URL]
View 2 Replies
View Related
May 17, 2011
I have this script that I've been modifying, but somehow it doesn't work in Opera and Firefox!! IE, Safari and Chrome works just fine!
Code:
/**
* This function creates a Ajax call to the defined responce file and can run a defined javascript right after the innerhtml is loaded.
[Code].....
View 4 Replies
View Related
Jul 6, 2011
I am looking for a solution for many days: my callback - function works well in firefox 5, IE8, but not in safari, opera, IE7 etc. The function "checken" is not executed. There are no error messages in the debugger of safari or IE7.
var session_id = $.cookie("fe_typo_user");
function checken (nummer){
var elem = "#img" + nummer;
$(elem).attr('checked',true); }
var url = "refreshCheckboxes.php?id=" + session_id;
$.getJSON(url,function(data){
$.each(data.posts, function(i,data){
checken (data.number);
}); });
The response of the script:
{"posts": [{"number":"1325"},{"number":"1303"},{"number":"1302"}]}
html (example):
<input
type="checkbox"
id="img1325"
class="merkzettel"
name="merkzettel1325"
value="img_1325.jpg"
/>
You can test it here: [URL]. Activate some checkboxes, load another site and then go back to this site and the checkboxes you have selected, must be activated by the script.
View 9 Replies
View Related
Oct 30, 2009
I am not a guru jquery coder and still have to learn alot, recently while learning jquery AJAX I have bumped into a weired issue, I have a apge right and in this page I have a dropdown list for people to select an RSS channel that they wish to know more about, the dropdownlist ahs an onChange event which when triggered it will get the value of the selected item in teh dropdownlist and post it to the other 'mini' pages that load on the same page via AJAX by using the GET method - ie: im passing the parameters like a normal querystring would. The problem is that when I assign the dropdown value to a variable called dropdown in the following line of code "var dropdown =document.getElementById('ddlChannelSelect');" it works in IE but not in the other browsers, I have debbugged this in FireBug and it seems that the variable dropdownlist is not actually getting the value of the actual dropdownlist nad it says 'null' or sometimes 'undefined'. Am I doing something wrong ? why is it that it is working in IE but not in other browsers ? can you pls give me a solution with some examples ?
[Code]...
View 4 Replies
View Related
Jul 23, 2005
<script language="JavaScript1.2" style="text/javascript">
<!--
function checkLocation() {
if (navigator.userAgent.indexOf("Opera")!=-1) type="OP"
else if (document.all) type="IE" // ie 4 & up
else type="XX"
if (type=="IE")
moveNav.style.pixelTop=document.documentElement.sc rollTop
setTimeout("checkLocation()",5);
}
//-->
</script>
This is suppose to keep the Nav bar at the top of an IE browser. (Yes, it
wobbles a little bit, but what can I do?)
With most other browsers, the Nav Bar stays nice and stationary at the top,
thanks to a nice CSS solution. However, with Opera (at least Opera 7.54 that
I have) the nav bar wobbles a bit like I would expect it to in IE, but still
it gets hidden under most scrolling situations. What's the cure for Opera?
View 4 Replies
View Related
Mar 30, 2006
I have strange situation, in my webb apps i use a lot of AJAX.
in my developer computer i use opera and naked apllication (it's using
Python Application Server cherrypy www.cherrypy.org), in production I
covered my application be Apache server which serves static files. The
problem is that AJAX working in Opera but only on production server
(cherrypy behind Apache), on developer machine it's not working. Others
browser (IE, FF 1.5.0.1) working without any problem. Does anyone know
solution for this? Or is is a way to lookup what is happen under Opera
engine? any plugin or something what shows AJAX status call?
View 1 Replies
View Related
Jun 28, 2006
I really want to make my scripts work in Opera. I really, really do.
But it seems like an uphill struggle. First of all, I can't get ANY
kind of debug output. No error messages in the "javascript console" -
but then, I have never seen ANYTHING in Opera's javascript console. Is
there some kind of voodoo I need to perform in order to make that work?
Then, when Opera doesn't like something about a script (even if it works
fine in Spidermonkey), it will sometimes refuse to load it entirely,
which means I can't even do alert() based debugging. What the hell?
Can anyone give me some insight as to how they go about making their
scripts run properly in Opera? I make a point of sticking to ECMAScript
standards (and then making per-browser exceptions where needed *COUGH
IE*), but Opera just doesn't want to cooperate.
This is in Opera 8, by the way. I haven't upgraded yet, since I don't
use it, and I think more people still use 8 than 9 so that's what I want
to target.
View 6 Replies
View Related
Jul 18, 2006
i have such a problem:
document.forms[formName]['image'+orderID+'_'+lineID].click();
this code works only in IE! how can i make something same in Opera 9?
View 1 Replies
View Related
Jul 20, 2005
Has any user of Opera 7.11 noticed that it does not reload all files
when the reload button is clicked? I can click on my html file to cause
Opera to load and start and it's OK. But if I then correct an error in
a *.js file and click reload I often get a javascript console with the
same error that I just corrected and line numbers that refer to the old
file. This has got to be something that I am doing wrong, but I can't
see it.
View 1 Replies
View Related
Jul 20, 2005
I have included a file below that tests onKeyPress in Opera 7.11. I am
getting peculiar behavior. When the file is first loaded, pressing the
keypad + causes the textarea to get physically larger on the screen, and
pressing the keypad - causes the textarea to get physically smaller. I
click on the scrollbar then this behaviour stops and subsequent
keystrokes are displayed appropriately. Is this some kind of bug in
Opera 7.11? Code:
View 5 Replies
View Related
Mar 27, 2005
I'm in the process of migrating a script to use DOM core methods but I've hit a roadblock in the aforementioned browser. The following code snippet illustrates what I'm basically trying to do, it really is incredibly basic!
var newimg = document.createElement('img');
newimg.setAttribute('id', 'placeholder');
newimg.setAttribute('src', 'images/large/courtyard.jpg');
I'm then positioning the element on the page using appendChild(). Everything works perfectly on Firefox 1, IE5+, Opera 8, Konqueror 3.3.1 (Linux) but not in Opera 7.54. I suspect the element is being created as associated styling on #placeholder is being applied (just some padding and borders) but the image itself is not being displayed. I assume therefore that the problems lies with setAttribute()?
This seems like the sort of problem that others would have encountered, but I haven't been able to find mention of it anywhere.
View 7 Replies
View Related
Nov 6, 2005
I am using this code:
document.getElementById("p").setAttribute("disabled","true");
to disable a button after user clicks it (this is to make sure user clicks it only once). It is needed to prevent multiple clicks on a button since each click calls a servlet.
This code works in IE but does not in FF and Opera.
View 2 Replies
View Related
Jun 24, 2011
I have this code
[URL]
If you'll use Opera browser, it will display lightbox style animation after clicking on marker on the map. Other browsers are not so kind
Chrome give an error Uncaught TypeError: Object [URL] has no method 'click'
To display animation in bumpbox(lightbox alternative) I use this html code
Code:
<div id="neco" style="display: none">
<a href="clouds.swf" class="bump">clouds</a>
</div>
and this javascript
Code:
google.maps.event.addListener(markerName, 'click', function mojafunkcia() {
document.getElementById("neco").getElementsByTagName("a")[0].click();
})
I assume that html element cannot access that javascript function because it ist nested within other function (please see source code on turie.eu), but I'm not very skilled with javascript, so I'm not sure.
View 3 Replies
View Related
Jul 23, 2005
How do you view javascript errors in Opera?
IE pops them in a modal box and NS has the excellent javascript console.
What does Opera have?
View 2 Replies
View Related
Jul 23, 2005
How to get multiple onLoad in Opera (v.7)?
Example shows what I mean - it works well IE and Mozilla, but not in
Opera Code:
View 1 Replies
View Related
Jul 23, 2005
the problem is, i have this javascript code in my aspx page that i want
it to work on almost all browsers, especially opera and safari :
function resize(){
displayFrm = document.getElementById("ifrmDisplay");
innerDoc = (displayFrame.contentDocument) ?displayFrm.contentDocument :
displayFrm.contentWindow.document;
objToResize = (displayFrm.style) ? displayFrm.style : displayFrm;
objToResize.height = innerDoc.body.scrollHeight;
}
the code above gets called every time a new page is loaded inside the
iframe (ifrmDisplay) what its doing is resizing the iframe so it can
have the same size as the page inside it, so i can eliminate the need
for vertical scroller for the iframe, i assumed that it works on opera
and IE at the same time, when i tried it out, it worked on IE but not on
opera. after lot of time in researching how i can get workaround this
issue with opera, that is the best possible solution i have and yet it
doesnt work. so i gave up and asking you if you can help me out here ,
coz this is jst driving me crazy!
the problem is im not a javascript expert, to be honest i jst started
doing javascripts about two days ago, that is why im in need for help
by the way, here is inner html for the iframe if its any use
<iframe id="ifrmDisplay" style="Z-INDEX: 99; LEFT: 187px; WIDTH: 567px;
POSITION: absolute; TOP: 136px; HEIGHT: 408px" src="" scrolling="no"
</iframe>
View 5 Replies
View Related
Jul 23, 2005
I've noticed that screen.availHeight/availWidth don't return
correct results in Opera 8, meaning that what Opera returns are
the pure screen dimensions, no the actual dimensions due to
taskbars or similar. On the other hand other browsers (MSIE,
Netscape, Mozilla) get this correct.
View 6 Replies
View Related
Jul 23, 2005
In Opera 8.01 (Linux; Build 1204) and in Opera 7.54 (Windows XP; Build 3865),
my form disappears from the HTML markup (below). To summarize:
1) In a <script> block in the <head> I create a form element (part of
object/feature/bug detection).
2) There's a <form> element defined in the <body>, with the id 'theForm'.
3) The onload function tries to access that form, and also counts the
total number of forms in the document. It fails to get a reference
to the form; the count is 0. Code:
View 4 Replies
View Related
Nov 23, 2005
After my web page has been loaded I'm doing some tests with a JavaScript. If
I figure out that something is wrong I'd like to reload the whole frameset.
With Internet Explorer and Mozilla Firefox I can reload the whole frameset
with
parent.location.href = "index.html";
However, this doesn't work with Opera.
Does someone know how to do that with Opera?
View 6 Replies
View Related
Apr 16, 2006
I create an IFrame and want to dynamically add content to it in Opera (8.54) like this: Code:
View 2 Replies
View Related
Apr 20, 2006
I'm trying to get all the "divs" that have a given NAME using
getElementsByName(). For example, the following code:
<html>
<head>
<script type="text/javascript">
function on_load()
{
var pages = document.getElementsByName("name");
alert(pages.length);
}
</script>
<body onload="on_load()">
<p name="name" id="id">Teste</p>
</body>
<html>
when I open this page in Firefox, it gives me a popup saying "1", that
is correct. But if I do it in Opera, it gives me "0"....
View 2 Replies
View Related
Jan 2, 2007
The « navigator » object contains strings which
specify the browser and version; however, this is in general not
very genuine. Mozilla (and therefore Netscape 6+) allows this to
be freely set, and Opera and IE allow it to be modified. There
are also at least 25 other javascript capable browsers with
their own strings here.
Generally though, you don't need to identify which browser is
being used. There are alternative techniques, but which one you
choose depends on why you want to redirect browsers. If it's to
offer different CSS stylesheets, then....
View 4 Replies
View Related