Forum Moderators: open

Message Too Old, No Replies

Huge variable fails to display on page with Netscape 7.0

         

peterinwa

6:03 pm on Apr 12, 2003 (gmt 0)

10+ Year Member



I search through a list of foods and then use HTML/JS/Frames to display the search results on a page. It works fine with IE and Netscape 4. But with N 7.0 the list truncates if it is too large. I get no error messages.

At first I wondered if there might be a limit to how large a variable can be, but if I insert an alert(variableName.length) it's all there in all three browsers. It just doesn't all display with N 7.0.

For example, the alert might indicate 69,000. With IE and N 4 it all displays on the page; with N 7.0 the alphabetical list just stops in the Cs. With a smaller list, like 28,000, it works well in all three browsers.

Any ideas?

Thanks, Peter

DrDoc

8:23 pm on Apr 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does it stop at the same point each time? If so, there might be a syntax error in the code.

peterinwa

12:11 am on Apr 13, 2003 (gmt 0)

10+ Year Member



It wasn't that but good idea. Thanks.

DrDoc

12:28 am on Apr 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When you say that you "use HTML/JS/Frames to display the search results", what exactly do you mean? :)

Can you post a brief excerpt of the code?

peterinwa

12:35 am on Apr 13, 2003 (gmt 0)

10+ Year Member



I seem to remember you can't post URLs in this forum or you could easily see it.

I use JS to create the page in HTML. A Frame called create does the work and maintains the variables; it creates the Frame called image that the user sees.

Part of the page the users see displays this variable which, again, all shows up with IE or N 4... and shows up fine with N 7 unless it's really big.

There's just so much code I wouldn't know where to start looking for a problem or what to show you.?

tedster

3:16 am on Apr 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried the page in Mozilla? And have you run the final code through a validator [validator.w3.org]? Either or both actions might give you further clues.

peterinwa

3:40 am on Apr 13, 2003 (gmt 0)

10+ Year Member



I have seen the word Mozilla a zillion times but don't have a clue what it is. I'd love to know.

I tried a validator a couple years ago and it fussed about so much stuff that didn't matter that I never looked back. Maybe that's a mistake.?

An example would be starting a new cell in a table with <td> without an ending </td> for the previous cell. I've never used the </td> and in years never seen it matter. I also use & and ¦ instead of && and ¦¦ and it works fine. Maybe these things do matter?

Also I wasn't sure if you could use a validator on a page using JS. Where do I find one?

Thanks!

tedster

4:24 am on Apr 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mozilla is an open-source web browser, developed to support standards. Versions of Netscape are based on Mozilla code. You can download the Mozilla browser at [mozilla.org...]

I'd recommend version 1.3, the most recent "stable" release, rather than version 1.4 alpha.

It's an excellent idea to do a website's initial developmnet in the the strictest and most standards-compliant browser you can. Then when you test in more "forgiving" browsers, your code will most likely hold up well with only the barest minumum of tweaks. But when you begin development in a forgiving browser, the more standards compliant browsers may surprise you in a big and ugly way.

For example, Netscape 7 is very picky about ending tags for table cells - and table structures in general. Code that IE renders with no problem, Netscape 7 (and Mozilla) may choke on.

The link I paced on the word the validator [validator.w3.org] takes you to the W3C HTML validator. The W3C is the standards body for HTML and their online HTML validator is extremely solid. Also check out their CSS validator [jigsaw.w3.org].

Ensuring that I have valid code is the first step I take whenever any problems rear their head. Otherwise it's just trial and error - and all I know in the end is that it works on my browsers and operating systems...and all the rest of the possibile combinations are still wide open.

With valid code, I know have an excellent chance of the page coming out the way I want on many browsers and many operating systems.

peterinwa

4:41 am on Apr 13, 2003 (gmt 0)

10+ Year Member



Thank you very much. After completing my taxes, I will download both.

Ref: "...when you begin development in a forgiving browser, the more standards compliant browsers may surprise you in a big and ugly way."

I started out on WebTV, and it turns out it's the most forgiving of all. I didn't even know IE and N existed, and boy did I get a shock! And I had to work on other people's PCs to solve the problems. Of course after awhile I learned to code to avoid them in the first place.

Though I feel some responsibility to the thousands of visitors I get each day, my websites are just a hobby and so I enjoy playing around a lot. I can't get much of my fun stuff to work in N, so I just put "if (N!=1)" on the code and make sure it works with or without that particular code. Fortunately few people use N. The only thing I like about it is that it gives good error messages, but maybe the stuff I'm going to download will take care of that.

Thanks for all your help... back to my taxes!

Peter

tedster

5:26 am on Apr 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I will download both

The W3C offers free validation online as well. In fact, automatic page validation is built into the Opera browser. You just navigate to the page, press ctrl+alt+v and the page gets sent straight to the W3C website and put through the validator.

Integrated validation is a really nifty feature in Opera - one among many, many, many.

g1smd

6:44 am on Apr 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The composer part of Mozilla also links to the W3C HTML validator. I prefer to use [validator.w3.org...] as that screen allows you to tick the boxes for show source and show outline and show parse tree and verbose mode before you validate a page.

If you use the HTML editor built into Mozilla at all, then I would tick the box in the Preferences to NOT reformat existing code (Edit --> Preferences --> Composer --> Retain original source formatting) as I don't like the way that it reformats the code.