...

View Full Version : Firefox quirks...



jamescover
08-15-2004, 06:04 AM
Two questions:

1). I'm accustomed to using wrap="virtual" in a textarea, but Firefox does not wrap the text to the next line, if there is no break between characters. For example, if you enter a long URL like below:


http://forddirect.autotrader.com/forddirect/inc/fd_vdetail_results.jtmpl?car_id=165965101&dealer_id=67159&vin=1FTZX1725XNA44122&page=findacar&make=FORD&distance=75&max_price=&model=F150PICKUP&end_year=2000&address=19973&start_year=1999&car_year=1999&rdpage=ymm

Instead or wrapping the line, it adds a horizontal scrollbar. What would mimick the behavior or virtual in Firefox, eliminating the horizontal scrollbar?

2). When opening a js window using Firefox, without specifying scrolling, I'm still getting scrollbars at times, and that, when I'm opening a 640x480 window, with no content but a 640x480 image (the borders are set to zero in the body tag). Any ideas?


Thanks, for any assistance.


-james

jamescover
08-15-2004, 06:16 AM
Regarding my 2nd question:

...when I reload the page, the scrollbars disappear (I am writing the HTML to this page to embed the image, btw).


-james

Willy Duitt
08-15-2004, 07:11 AM
For question #1 look into CSS white-space and/or text-overflow (http://www.w3.org/TR/css3-text/#white-space) but these properties are not widely supported...

Below is as cross-browser as I know to achieve IE's word-wrap:break-word

pre {
white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */
white-space: -pre-wrap; /* Opera 4 - 6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation)
http://www.w3.org/TR/css3-text/#white-space */
word-wrap: break-word; /* IE 5.5+ */
}


.....Willy

jamescover
08-15-2004, 07:22 AM
Thanks, Willy, I'll check out the link!

Any ideas on Q2 (if you have Firefox)?

Below is a link to the page:

http://www.ekigroup.com/dbdemo/dbdemo.php

Select A Make > Nissan > View Listing

If you reload the popup after the image has loaded, the scrollbars disappear.


-james

Willy Duitt
08-15-2004, 07:30 AM
Using a resolution of: 768 X 1024 I do not have scroll bars either hoizontal or vertical while veiwing Nissan --> View Listing while using IE or Firefox.....

However, your popup images do have scrollbars.
I would assume this is because your get image size function does not account for margins and padding....

.....Willy

jamescover
08-15-2004, 07:38 AM
Using a resolution of: 768 X 1024 I do not have scroll bars either hoizontal or vertical while veiwing Nissan --> View Listing while using IE or Firefox.....

Sorry, I meant just the popups. It was just easier to give the url to the db, instead of the individual listing.


However, your popup images do have scrollbars.
I would assume this is because your get image size function does not account for margins and padding....

I'm not sure what you mean by this. I'm writing to the page, which includes removing the margins in the body tag. This works fine in NN4.05, IE 5.0, & IE6.0. And as I said, if you reload the popup containing the popup, after it has loaded, the scrollbars disappear. And since I js launching the popup never declares scrollbars, I'd assume they wouldn't appear in any case. The default is still no for window attributes, right?

Anyway, thanks for having a look.



-james

Willy Duitt
08-15-2004, 07:50 AM
How do you reload the popup?
Truthfully, it never even occured to me to try Ctrl & R and I didn't look at the popup codes but margins are not set at 0 or none by default. Even an undeclared default image or body margin of 1px will add 2-4px's on each axis... Either use css and remove all margins/paddings/borders or try to account for a few pixels in your window size script...

What I usualy do is set a dark background (black/blue) and add 5px to each axis of the window size. This way a slight shadow of the background appearing is nearly imperceptable...

And BTW: I had scrollbars using both IE and Firefox and several of the images I loaded a few times...

.....Willy

jamescover
08-15-2004, 06:53 PM
How do you reload the popup?

Same way I used to view source on pages with no right-click scripts: place my cursor about 1px from the edge and right-click to get the context menu.


but margins are not set at 0 or none by default.

No, you misunderstand: I wasn't refering to the margins, but the scrollbars window attribute. Isn't this (even in Firefox) no by default? Which should actually prohibit the appearance of scrollbars, even if the content [image, in this case] is larger than the available viewing area. I was saying that I didn't declare this (scrollbars=no) in the script, but the effect should be the same as if I had.

Below is the actual code written of the popup (margins and image border set to zero):



<html>
<head>
<title>Large Image</title>
</head>
<body topmargin=0 marginheight=0 leftmargin=0 marginwidth=0>
<a href='javascript:window.close();'><img src=images/61264-1.jpg name=sImg border=0 width=640 height=480></a>
</body>
</html>


I had scrollbars using both IE and Firefox and several of the images I loaded a few times...


This is distressing. I have personally tested this in IE5.0 & 6.0, as well as NN4.06, and I have never had scrollbars appear. What version are you running? I'm assuming you're on a PC.


Thanks, for your feedback, Willy.


-james

hemebond
08-15-2004, 11:00 PM
I didn't get any popups. I guess this means Firefox wins again.

Willy Duitt
08-16-2004, 03:13 AM
I didn't get any popups. I guess this means Firefox wins again.

Firefox wins nothing....

You need to click on a image to see the full size image popup... ;)

.....Willy

Willy Duitt
08-16-2004, 03:21 AM
Yea your image has a defined height/width of: 640 X 480
Which is probably the size you assigned the window by getting the image height/width before popping the window....

Although it looks as if you tried address the margins/borders on the body and image, you forgot the anchor...

.....Willy

jamescover
08-16-2004, 08:01 AM
Firefox wins nothing....You need to click on a image to see the full size image popup...

Yeah, I didn't want to say anything...besides, it is a terrible disappointment that the popup blocker is on by default--let me decide who I want to block, not who I want to unblock. :thumbsup:


Although it looks as if you tried address the margins/borders on the body and image, you forgot the anchor...

Hmmm...okay, I removed the hyperlink and the problem disappeared, so that was it. But how do I fix it with the hyperlink? Besides the idea of adding extra space. I mean, isn't this what the image border property is for (keep in mind, to this point, I have been coding everything in js 1.2/3 & HTML 4.0)? Maybe, hspace, vspace would do the trick, or do you suggest css? At this point, I'm just looking for a simple fix, so that I don't have to do too much recoding for little app I wrote for generating the code:

http://www.ekigroup.com/javascript/workGenForm.html

This actually appears to be a bug. Otherwise, the borders would not disappear when the popup is reloaded, not to mention, they should be turned off by default. Or is this just another example of something I missed while away...?

Thanks, again.


-james

Willy Duitt
08-16-2004, 08:21 AM
Try adding style="margin:none;padding:none;border:none;text-decoration:none"
to your anchor....

.....Willy

jamescover
08-16-2004, 08:29 AM
Try adding style="margin:none;padding:none;border:none;text-decoration:none" to your anchor....

I thought that's what you'd suggest...but I thought I'd ask anyway...okay, inline style it is then...I don't have time to recode everything right now.


Thanks, again, for all of your help, Willy!


-james

Willy Duitt
08-16-2004, 08:45 AM
Actually, looking at your anchor codes again I now see that you are only using the anchor to close the window....

But, the anchor is completely unnecassary. You could just add an onclick event to the image or iffin' it was me I would just add: onload="self.focus()" onblur="self.close()" to the body tag of the window....

.....Willy

jamescover
08-16-2004, 05:31 PM
But, the anchor is completely unnecassary. You could just add an onclick event to the image or iffin' it was me I would just add: onload="self.focus()" onblur="self.close()" to the body tag of the window....

Yeah, I don't know if I want the window to close when focus is removed. This is a commercial project, and users will most likely have more than one popup open at a time--that's why I'm giving all of the windows different names.

But adding the onclick to the image might be a good alternative...I'm still living in the dark ages, when the only handlers for an image were onAbort, onError, and onLoad, with camel-back casing. :eek:

Time for this old dog to start learning some new tricks....

BTW, does anyone have a good, up-to-date, worldwide, reference (not server logs) showing the market penetration of different browsers?



As always, thanks for your time!


-james



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum