Jump to content
xisto Community
Sign in to follow this  
ramvis

Webpage Display Changes Each Time I Refresh In Firefox

Recommended Posts

I have a question that I am hoping one of you can help with. I have this webpage http://www.ratekhoj.com/search/riv.php. All the elements in this page are to display in one single row as they do in MSIE, Chrome and Opera. But in firefox, each time I refresh I see a different layout with the correct layout coming once in a few times. I don't know what's going on and have tried different things without luck. Any suggestions are appreciated.

Thanks,
Ram

Share this post


Link to post
Share on other sites

all i can say is....WOW! i use firefox. at first, i didn't notice a problem as i refreshed. i even took a quick look at the source. then i refreshed a few more times and now know EXACTLY what you are talking aboutnow i wouldn't say it's a layout problem because the layout is basically the dropdown menu and the options to pick from when someone selects something from the dropdown menu. problem is how things are being displayed. now it's christams bud....and i have to admit, i've been drinking....but your source sucks and i believe it has something to do with your placement of your drop down menus. i would mess around with the values and see what happens. maybe i will look at it again when i'm sober....but i really hate looking at really crappy source code...thank god i'v been drinking. doesn't bother me as much... :P

Share this post


Link to post
Share on other sites
<div style=" #position: absolute; #top: 50%;display: table-cell; vertical-align: middle; left: 0px;">      <div class="greenBorder" style=" #position: relative; #top: -40%; color:#ffffff; width:48px;     font-family: Arial,sans-serif;  font-size: 13px;  font-weight: bold;  color: white;">        Search      </div   </div>

You're missing ">" at </div the second last DIV tag. Fix that and see if it helps. I don't like testing out the page when all tags are not properly closed--because a simple fix like that could be everything when it comes to debugging.

Share this post


Link to post
Share on other sites

Thanks guys for your responses. I have closed the </div mentioned and it still doesn't solve the problem. It's so strange that I see different layouts every time I reload the page.... Any help would be greatly appreciated. I know that the code is crappy, but I have been just trying to get this working before making it better. Thanks again.

Share this post


Link to post
Share on other sites

I can see you are using all that scripts...Is this page programmed by you,or you download it? Because all that scripts you have in the source are changing attributes.As i can see,if obj.options[obj.selectedIndex].value = "/search-fd.php",then all the elements will be with display:block...Instead of all that,all you need is to write a PHP script which will automatic change all the styles of elements.Why you don't backup this file,and create a copy which will be the same,with one exeption,it will not have all the scripts.For me all the JavaScripts are so stupid,and there is no standard for them.In IE function is bla,in Firefox function is blabla,in Opera is huhu :P But when script runs on server,using PHP it always is the same :P It doesn't matter which browser are you running to show date.There are javascript libraries which can help you,plus they are standard,the same on every browser.I can't see why are all that JavaScripts you have in the source...

Share this post


Link to post
Share on other sites

like i said, i think it has something to do with your positioning there is also some unneccesary source which could be disrupting the positioning. this is why i HATE absolutes. i used them for my myspace page years ago. i have never used them when creating my own page though. so much can go wrong where the answer is so simple....but the answer is always hidden within a bunch of absolutes. it's just hard to find. from my own experience, it has in the past caused ie to show something different than firefox. i forget if firefox showed something different each time however. but i would start messing with the positioning like i said before and i would also HIGHLY suggest you clean up that code because it's just plain messy and some of it can be interfering.

i don't have an hour to show you everything i see or what changes i would start making....but i would try to research on the web through google. you are probably not alone and the answer is out there somewhere already.

after you find your answer, i also suggest you put your scripts in a seperate file. btw...i absolutely hate js too and try to avoid it if i can....but that's just me.

are you writing this code yourself or did you copy it from somewhere and trying to edit it for your personal site?

Thanks guys for your responses. I have closed the </div mentioned and it still doesn't solve the problem. It's so strange that I see different layouts every time I reload the page.... Any help would be greatly appreciated. I know that the code is crappy, but I have been just trying to get this working before making it better. Thanks again.

Share this post


Link to post
Share on other sites

What if it's \n or \r character that you didn't intend to happen?

 

Are you creating each input field by doing some script and then echoing it, like "show first pulldown box" then "show second pulldown box" etc?

 

I think as it executes it inserts unwanted new line or next line character. But I cannot tell any further without seeing the entire code. When I simply copied the source code and viewed, it does not alter every time I refresh the page. That tells me that you are doing some kind of loop or function to draw each pulldown.

 

If you want to do it that way, try putting each loop or function as a variable. So,

 

$search = first pulldown box (function to draw)

$search.= second pulldown box

$search.= third pulldown box

etc...

 

and at the end, just echo $search. This way, it's drawing each function/loop at once, instead of showing one by one. Again, I have to assume because I don't see the entire code.

 

Wait...hold on. After reviewing with other browser I have this screen shot

 

Posted Image

 

The top screenshot is from Firefox. Notice the unknown image/object appears with your page. It's not part of a tag or image. What is it?

 

The bottom scrrenshot is from IE7. Your css is way off.

 

Looks like you have to show us the entire code for us to see what's really going on.

Share this post


Link to post
Share on other sites

After checking with a validator, the page has lots of errors, try to fix the errors: http://validator.w3.org/ by using valid markup..

Invalid markup usually is a problem of different support for cross browsers..

Where you're defining data with & tag and < or > you need to change to & and < > as it may ruin the layout and different browsers fix the problems automatically different.

All browsers try to show the source by fixing the problems a web master might have forgot to fix by some methods, it seems that Firefox doesn't handle this? or handles it a bit differently? It's just what I think may be the problem..

Edited by Quatrux (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.