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.
I'm using height() and width() to find the dimensions of some inline images in the html. FF and IE work fine, but Opera is returning incorrect values. For example, it returns 92px as the width of an image that is actually 160px wide. How can I fix this?
let me try to explain better what I'm trying to do. I'm a real newbie I don't know much javascript but I understand more or less the logic behind it... tell me if this solution should work and if you know how to do it please show me. [URL]... I need to make div#photo's width to match the total width measurement of all the images it contains. If you load the page and you don't touch the size, it will work fine... but that's not realistic. If I resize the page, which will happen often on this kind of page (I'm assuming), the whole thing goes haywire (try it, scroll to the last image and resize the page you'll see what I mean). What can I do? Is my idea the right solution? Am I not explaining this clearly enough? Let me know please, I'm desperate. I've been trying to get CSS to do this for me for 3 hours now. Nothing works.
Is there any way that one could have supersubs functionality applied to drop-down multi-column menus?I assume one would need to calculate the width of each column plus the combined width for the container.
I currently have a website where i share thoughts with my friends (some kind of forum) and within this 'forum' people can post pictures they made but most of the time these pictures exceed the max width of my website so my website gets all streched out!So this is what i want: all images on the page must run thru some sort of function which checks if the image image width exceeds the max_width. if it does then the script must calculate how many pixels the current width exceeds the max_width and get this number so that the script does: current_width = current_width - (max_width - current_width)
I've recently start using Flexigrid (old JQuery grid plugin), and, as you may know, one of the few issue this really good grid plugin got is the lack of liquid layout option. My personal idea to solve the problem is to set the "width" parameter depending on $(window).width. Here is the problem (and here's why i post this question in "General use" and not in "Plugin").
The starting, and working, code is: $(document).ready(function(){ $("#flex1").flexigrid ( {
[Code].....
This work fine for me, but I supose it could be done way much elegant... maybe somethin without "IF" that could emulate the "%", like var percentage = $(#div.id).width()*0.XX with the 0.XX picked from an array of percentage, one for each column. Probably I should set up a function... ahhhh, as you may easily see I'm a total beginner with JQuery (and JS in general...)
I am trying to setup a javascript function that sets a div's width based on the combined width of the li's with the name "navItem". The problems I have been running into when trying to define the width of the li's is that they do not have a width defined in css. Can anyone help me out with this? The javascript function setWindow is suppose to show the div loginWindow and set the width of it.
Is the next jQuery code the best way to decrease an elements width?[code]I tried using the next code:[code]but that's not working, also not with '-20'.Maybe it's an idea to add this functionality? It's is already used in the .animate() function for changing the position of an element.
I need a code that when a button or image is clicked then a div's width and height are changed.
Ive managed to get a few codes that does this, but the real problem is that, the contents of the div is an embedded flash file and i thought that by setting the flash width and height to 100% then the flash would fit to the new size of the div, but it just didnt work.
I need a code that when a button is clicked then the div's and the flash's width and height are changed.
please have a look at the temp website latinunit net / temp / , you will understand where im coming from.
on the right hand side i have a flash chat in a div , div is controled by a script that allows it to follow the scrollers up and down.
My goal is to add a little button in the same div that says expand or maximise so when clicked the the div expands aswell as the flash file.
I want to set the width of a div to be the same width of the image inside the div.The following code works great. But...The images are different widths, so both wrappers are set to the width of the first image. Without having to add an ID to each wrapper or image, can the wrapper width be set to the image width using the name of the image as the unique identifier?
jQuery: $(document).ready(function(){ var newWidth = $('div.wrapper img').attr('width'); $('div.wrapper').width(newWidth); });
<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?
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?
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.
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.
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:
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.
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.
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.
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
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:
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?