Problem With Opera And JavaScript

Jul 20, 2005

I've been trying to make this simple script compatible across various
browsers. It works for IE 6.0 and NS 7 but doesnt work with Opera (I
have version 7.11). This is what is supposed to happen: when the user
clicks a button in the main window, a dialog window pops up. In the
dialog the user enters a university to search for. When the string is
submitted, the dialog then shows all the matches found in the
database. The user picks one and clicks the Submit button. The Submit
button's code is as follows:

View 6 Replies


ADVERTISEMENT

Opera And Javascript Errors

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

Javascript Popup Error - Opera Only

Sep 8, 2001

I have a site which uses a javascript fullscreen popup window which launches from the splash page (as well as a standard browser version for those with non-compliant browsers). All works well on both Netscape and IE, but if you're using Opera and you click on the "All other browsers" version, you get both the browser version and the popup version. This will probably be very irritating to Opera users. Unfortunately, I can't just program the popup for Opera compliance as well because it won't do fullscreen - it nests under the ad/control bars. Could someone look at it in Opera and maybe suggest a solution? Opera users don't make up a lot of my user base but I really prefer to be Opera-compliant.

View 7 Replies View Related

Opera - Problem Determening The SelectedIndex Via JavaScript/DOM

Jun 7, 2006

I have a problem determening the preselection of a dropdown list via
JavaScript DOM:

The followin code works fine with IE and Mozilla but does not preselect
the correct element in Opera:

//snip
myCurrentElement =
window.document.getElementById(''role'');
myNewElement =
window.document.getElementsByTagName(''font'')[0];
myNewChildElement =
window.document.getElementsByTagName(''select'')[0];

for (var i = 0; i < optionArray.length; i++)
{
myNewGrandChildElement =
window.document.createElement(''option'');
myNewGrandChildElement.setAttribute(''value'',
optionArray[i]["value"]);
if (optionArray[i]["selected"]!=null)
{

//myNewGrandChildElement.setAttribute(''selected'', ''selected'');
}
myNewGrandChildElementText =
window.document.createTextNode(optionArray[i]["label"]);

myNewGrandChildElement.appendChild(myNewGrandChild ElementText);
myNewChildElement.appendChild(myNewGrandChildEleme nt);
}
myNewElement.appendChild(myNewChildElement);
myCurrentElement.appendChild(myNewElement);
//snip

View 2 Replies View Related

JavaScript Image Refresh In Mozilla And Opera

Sep 15, 2004

We've got a server-side page (status.php) that dynamically generates a GIF image. The displayed image depends on the value of a boolean field in a database. Just calling the page displays the current value of the boolean, calling it with a parameter switch (status.php?switch) flips the database value and generates a new image. We've included headers to prevent caching of the image by the browser.

Whenever our HTML page is displayed in the browser, we just include an image that shows the current status: img src='status.php'/

We want to allow the user to click the image, which then inverts the boolean status in the database: img src='status.php' onclick='this.src=status.php?switch;'/

This works great in Internet Explorer, but both Mozilla and Opera only allow to switch once. My idea of the problem is that those browsers think like this; after one click, the src is already 'status.php?switch', so changing the src again would be redundent in their eyes, so they won't do it.

We found a temporary solution by generating the current time as a parameter in the image URL: img src='status.php' onclick='this.src=status.php?switch+(new Date());'/
However, this is not a very elegant solution.

Does anyone know a proper solution to this? This means, forcing Mozilla and Opera to load an image using JavaScript, even though the URL of the image didn't change?

View 2 Replies View Related

Problems With Opera

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

AJAX And OPERA 8.50

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

Debugging In Opera

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

Opera 9 Problem

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

Opera 7.11 Reloads *.js

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

OnKeyPress In Opera 7.11

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

SetAttribute() In Opera 7.54 Win

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

FF And Opera JS Problem

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

Js Works Only In Opera?

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

Multiple OnLoad In Opera

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

Iframe Resizing On Opera

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

AvailHeight/Width In Opera

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

Opera Bug? -- Disappearing <form> ?!

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

How To Reload A Whole Frameset With Opera

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

Write To Iframe In Opera

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

GetElementsByName() - Opera X Firefox

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

How Do I Detect Opera/Netscape/IE?

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

Button Resizing In Opera

Jul 20, 2005

How can I dynamically resize a button in Opera?

The following code works for both IE 5.5 and NN 6.1, but Opera 7.01 is not budging...

View 2 Replies View Related

XHTML, <script>, Opera

Jul 20, 2005

Opera 7 doesn't appear to support the <script> element in XHTML. Does
this mean that it impossible to use Javascript with XHTML? Or is there
a workaround, such as the legacy method, in HTML, of commenting out the
Javascript code.

View 1 Replies View Related

JQuery :: Opera Will Work But IE Can't Get Value

Sep 16, 2009

This is the source code that I want to get the weather from Google API, Firefox, Safari, Opera will work, but IE can't get the value, so I did some test, and I found the reason xml structure in php page [code]

View 10 Replies View Related

JQuery :: Opera, Chrome But Not In IE8?

Mar 22, 2011

If you click on IE8 picture is open lightbox, if you open in Opera or Chrome and click on picture - picture open in this same window. Example url

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved