PDA

View Full Version : Website wont display correctly, possibly javascript related



Question
19-06-2011, 03:47 AM
www.stuhrling.com

Intro movies play fine, and i have the latest version of java, flash player, javascript enabled(and things that rely on javascript on other sites work fine), but search results and many of the buttons on the site do not function(see pic).

http://i.imgur.com/SO5uh.jpg

Tried this in both firefox and IE, and it doesnt work in both. Normally i would assume that theres something wrong with the website itself, except that many other people verify that it works for them(although some say it doesnt work for them).

Someone gave me a java script code to paste in my address bar, which does make the images show up(but the rest of the site such as the buttons still fail to function). Code is javascript:void(document.getElementById('wn').firs tElementChild.style.visibility="Visible");

My question is...

-Why is this happening? All i can tell is that this is something javascript related

-If the javascript on the site is itself broken, why does it work for others?

pctek
19-06-2011, 09:55 AM
What version of Firefox do you have?

Question
19-06-2011, 03:25 PM
Ive tried both firefox 4.01 and beta 5. Same thing occurs in both.

GameJunkie
19-06-2011, 03:39 PM
Firefox 5 is final now

Question
19-06-2011, 09:04 PM
Thats cool, but its still not working...

PPp
19-06-2011, 11:20 PM
Works on Chrome. Its just about all Flash.

zqwerty
20-06-2011, 12:13 AM
Have you got NoScript addon in Firefox?

Question
20-06-2011, 12:25 AM
Have you got NoScript addon in Firefox?

Nope. Also, javscript works for me on all websites, except this one apparently.

Question
20-06-2011, 08:16 PM
Any ideas at all? Anyone familiar with javascript?

Snorkbox
20-06-2011, 08:18 PM
Have you got the latest version of flash?

Question
20-06-2011, 08:37 PM
Yes. Its not a flash issue...i can see the flash intro movies fine.

Snorkbox
21-06-2011, 02:18 AM
OK. If it's not a flash issue can you tell us as to why you circle a blank area in your first post?

http://i.imgur.com/SO5uh.jpg

I guess you want to buy a watch maybe.

But as you know what's going on then fix it yourself then possibly.

Question
21-06-2011, 08:47 PM
Well that area wont show up. All i can guess is that its javascript related, because if i put the code into my address bar and press enter, the search results will appear.

Erayd
22-06-2011, 09:07 AM
OK, well as you seem to be convinced that this is a JavaScript issue (note however that your logic for concluding this is faulty), could you please post the error output? That way we can either tell you what is breaking, or rule out JavaScript as the problem.

hueybot3000
22-06-2011, 11:17 AM
Id start by updating flash. It's a flash thing that isnt loading. Not sure why you think javascript is the problem. If it's enabled on your browser it will work

Question
24-06-2011, 01:33 AM
OK, well as you seem to be convinced that this is a JavaScript issue (note however that your logic for concluding this is faulty), could you please post the error output? That way we can either tell you what is breaking, or rule out JavaScript as the problem.

Well if i enter the javascript code into my address bar and hit enter, i can see the images...

Im not seeing any error output anywhere though.


Id start by updating flash. It's a flash thing that isnt loading. Not sure why you think javascript is the problem. If it's enabled on your browser it will work

I dont know why people keep telling me to update flash...ive said multiple times that i already have the latest version.

Iantech
24-06-2011, 03:40 AM
Have you tried validating your pages?

http://validator.w3.org/

Erayd
25-06-2011, 12:15 PM
I've done some investigating - in a nutshell, the problem is with the site, and there is nothing you can do about it. If you're interested in why, read on for the long version:


Well if i enter the javascript code into my address bar and hit enter, i can see the images...As others have mentioned above, this does not mean that JavaScript is the problem! I have checked the site, and am able to replicate the issue in Firefox 4.0.1.


Im not seeing any error output anywhere though.Click 'Tools >> Error Console', clear the log, click the 'Errors' button, then refresh the page. Having looked into the issue in more depth however, this step is now redundant - you don't need to bother - and you can rest assured that your JavaScript implementation is not at fault.


I don't know why people keep telling me to update flash...ive said multiple times that i already have the latest version.I don't understand why you're being asked this either; the page you're having problems on doesn't include *any* Flash objects, so there's no way Flash is at fault here. I'm not sure why people are assuming it's a Flash issue when it's clearly not.

I've done some investigating, and have reached the following conclusions: The site is incredibly badly written.
Contrary to popular opinion in this thread, the site is mostly Flash-free; the only parts of note that use Flash as far as I could see are the splash page at the beginning, and the slideshow.
It makes some big assumptions about what will be used to view the site, and any deviations from these assumptions results in somewhat broken behavior.
The site uses some rather shoddy JavaScript to achieve some of the effects.
Whoever wrote the site doesn't appear to know how to centre things properly, and attempted to centre the <body> tag itself using absolute positioning and JavaScript screen size detection.
If your detected OS and screen width doesn't match one of their rather limited detection options, you get the 'default' <body> tag instead of one of their horribly centred versions.
The default <body> tag is missing the onload attribute which is used to start the various fancy JavaScript effects (the important bit here is the initScrollLayer() function).
Because initScrollLayer() is never called, the library that handles the effects is never initialised, and as a result the problematic elements are never shown.
Noting the cause of the problem, there's nothing you can do about it from your end (unless you want to get into hackish solutions involving user-provided JavaScript, which I suspect you don't).

Question
16-07-2011, 05:08 PM
I could have sworn i posted a response to this...

In short the problem happens when the user browsing the site has a unusual screen resolution that the site was not designed for?

Erayd
17-07-2011, 01:25 AM
I could have sworn i posted a response to this...None that I've ever seen ;).


In short the problem happens when the user browsing the site has a unusual screen resolution that the site was not designed for?Yep, that's the nutshell version.

Question
17-07-2011, 04:31 AM
Thanks for clearing that up, though it seems the company who runs that site is trying to cover it up and refuses to acknowledge the problem. Shame.