tgreer 189 Made Her Cry Team Colleague

A class is a recipe for an object. A class is a "design time" object, and when the code runs, the class creates an instance of an object.

Think of a class as a blueprint. A single blueprint can be used to build multiple houses. Each house is unique and distinct, and can even have different characteristics (properties!) such as paint color, brick vs. stone, etc.

An object can have properties, and methods. It can also respond to or create events.

Most of the examples in books aren't very clear, and aren't good examples of classes or objects. No one writes a "shoe" class.

As for how objects relate to each other: I often have to write programs that work with truly huge files. Now, C# provides a StreamReader class. It does buffered file IO.

In my applications, I'll write a class that does some specific operations on a file. However, I don't want to write all the underlying buffered reads and so on. I write my class to require that the "user" give my class/object an already built, instantiated StreamReader object. In my class, this is a simple property. To use it, the programmer/user would have to do something like:

StreamReader myStreamReader = new StreamReader();
// set the streamreader properties, etc. Open a file, and so on.
tgreerFileClass myCustomObject = new tgreerFileClass();
myCustomObject.fileToActOn = myStreamReader;
myCustomObject.doSomethingToTheFile();

This code has two objects: a StreamReader, and a "tgreerFileClass". The StreamReader object is created, and then …

tgreer 189 Made Her Cry Team Colleague

The short answer is "no", most likely. It isn't very intuitive, but the reason why images appear "bad" on screen is likely because they are actually high-quality, high-resolution images. A typical computer screen can display 72 or 96 pixels per inch. Even a low-quality laser printer prints at 300 dots per inch. So a "low quality" print image can contain much more information than a computer screen can display.

Thus, images can often appear choppy or "pixelized" on-screen.

Likewise, images specifically prepared for on-screen, low resolution display will often look bad when used in print workflows, because there simply aren't enough pixels/dots to make a good image.

The answer in all cases is to create the images at the proper resolution for the intended medium.

tgreer 189 Made Her Cry Team Colleague
tgreer 189 Made Her Cry Team Colleague

The CSS for print media is not well supported. Personally, I think that's fine. If I want to print landscape, I will. In any case, I don't think there is a solution at this point in time. Have you read through the other threads on this topic in this forum?

tgreer 189 Made Her Cry Team Colleague

Research the CSS "visible" property.

tgreer 189 Made Her Cry Team Colleague

You can't. The page you are crawling has to "execute" the JavaScript embedded on the page. I'm not sure why you'd want to capture JavaScript variables anyway, since they are only used to render content on the page. In other words, a JavaScript variable might be used to control the position of an element or the value of a textbox, something your crawler should be able to capture directly. Otherwise, you'd be trying to capture an "interim" state of the page.

tgreer 189 Made Her Cry Team Colleague

These are called "progress bars", and they really can't be accurate. There is no way to pre-determine how long a page will take to load on any particular client browser. Also, browsers wait until the entire page is loaded before processing scripts or events.

Therefore, "progress bars" have gone out of style in the web development community. Usually, if a page is known to be large, a "Please Wait" message of some site, with or without animation, is used instead of a progress bar.

tgreer 189 Made Her Cry Team Colleague

Research the JavaScript "scrollto" functions. I've moved this thread to the proper forum.

tgreer 189 Made Her Cry Team Colleague

Well, think of it this way: how "big" is the head section of your page? A page contains a head, and a body. Does the head have a size? Can it be positioned, or have a border around it? No. Some browsers treat the "body" the same way. It's a logical/organizational thing, so can't be sized etc. Hopefully the next round of specifications will clear things up.

tgreer 189 Made Her Cry Team Colleague

Many people agree, that the "body" tag should be treated as a top-level block element: the "box" everything is in. Another viewpoint is that it is a syntactical (rather than structural) element, and so doesn't have any "dimensions" in and of itself.

Since there is no agreement, the solution is treat the body element like an "open" and "close" statement that has nothing to do with position, size, etc. and to either put everything within a table, or a DIV.

tgreer 189 Made Her Cry Team Colleague

I think I see what you mean... you've set a border on the body element, and your page contents are breaking through that bottom border. Unfortunately, it isn't clear how the "body" element should be treated in the current HTML specifications, so each browser does things differently. Instead of styling your body tag, put all of your page's contents in an DIV, and style the DIV. That should resolve the issue.

P.S. You've also get both your menu DIV and your main DIV floated left. That won't work. Remove the "float: left" from the DIV with all your text.

tgreer 189 Made Her Cry Team Colleague

But, where are you expecting the content to go? With small enough browser window, everything breaks. I've looked with both FF and IE and I'm not sure I see a problem.

tgreer 189 Made Her Cry Team Colleague

You cannot force an application on the client to open. That violates the browser security model. You can configure certain helper applications, such as Acrobat Reader or Flash, to respond to certain MIME types.

It sounds like you are doing some ActiveX scripting. We really cannot help you with specifics until you show us what you've written.

tgreer 189 Made Her Cry Team Colleague

Yes, that's what it sounds like. Be sure to make a backup and test the site, of course.

tgreer 189 Made Her Cry Team Colleague

You mean "deprecated", right? Font tags are. Tables are not. For certain pages/applications, tables are still the best way to control layout. This forum (any forum) for instance, uses CSS extensively, but the overall structure of the site is tabular.

tgreer 189 Made Her Cry Team Colleague

Typically, in the absence of a particular file in a URL (the URL points to a folder), the web server is configured to deliver an "index" file inside the folder. Traditionally, this is index.html, or index.php, etc. It doesn't have to be. It sounds like the developer started with index.html, and for some reason later created home.html, set the web server to deliver it, and never deleted index.html.

In other words, you don't have to worry about browsers: they don't determine what file gets served.

tgreer 189 Made Her Cry Team Colleague

It's likely related to "relative" positioning. The position of the element is relative to the content of the parent element. I explain positioning in this article.

Can you post your HTML, as well?

tgreer 189 Made Her Cry Team Colleague

You have it backwards. You don't "target search engines". Search engines find YOU. They are SEARCH engines. Most SEO advice is based on misinformation, untestable theories, and anecdotes. The only advice I'd echo is to focus on good content, and to promote your site on other, related sites. Then let things take their course. If you feel you're not getting enough exposure, then advertise. Any artificial manipulation in an attempt to get better rankings will either backfire, be ineffective, or make your site less enjoyable/natural for your members.

tgreer 189 Made Her Cry Team Colleague

As a scripting language, JavaScript acts on the underlying Object Model of its host. In a web environment, this means the browser/web page. In Acrobat, this means the various objects exposed by Acrobat (AVDoc, PDDoc, etc.). So not only can you not arbitrarily execute a "JavaScript" from C#, it's a meaningless concept. What would such a script "do" or act upon?

It is possible, though, to write a C# program that interacts with another program that supports JavaScript. For example, you can embed a Web Browser control on your C# form, and load HTML documents in it that in turn use JavaScript functions... or use IAC to communicate with Acrobat and load PDFs that use JavaScript internally.

You'll have to paint a clearer picture for us.

tgreer 189 Made Her Cry Team Colleague

Re-read my post. PHP is server-side code. JavaScript is client-side code. You cannot write PHP that will run on the client in response to a JavaScript onChange event. I don't know what "embedded HTML" means in this context, sorry.

tgreer 189 Made Her Cry Team Colleague

Again, start simple, as I've shown. Then add styles, as needed. All positions follow the box model, and cascade (Thus "Cascading" Style Sheets).

Continuing my example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Sample Page</title>
<style type="text/css">
.container
{
  width: 200px;
  margin: auto auto;
}

.child
{
  position: relative;
  left: 40px;
}
</style>
</head>

<body class="container">
<div id="container" class="container">
<p>Some content to flesh out the div.</p>
  <div id="child1" class="child"><p>A child div</p></div>
  <div id="child2"><p>Another child</p></div>
</div>
</body>
</html>

Now you can see that one of the child DIV elements is positioned 40px to the left, relative to the parent DIV. Or, put another way, the position of the child element is determined by

1) The automatic margin of the parent DIV, which cascades down into the child divs, and
2) The "left" setting, 40px

I explain CSS Positioning in the linked article.

You seem oddly unwilling either to learn or to accept the help being offered, so this will be my last post in this thread. Soldier on.

tgreer 189 Made Her Cry Team Colleague

in css you can assign divs to layers by numbers and is standard xhtml.

No, you cannot, as there is no such thing as "layers" in HTML, or XHTML. Plus, CSS cannot assign "divs" to anything at all. A DIV is an element, and CSS can apply styles to a DIV, but it cannot "apply" a DIV to anything. I think you need to go back to fundamentals. Drop Dreamweaver, learn the basic building blocks, and get your terminology down.

As I've explained, if you style your main container DIV properly, then DIVs defined inside of it will fall into place naturally. Start with a simple page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Sample Page</title>
</head>

<body>
<div id="container">

</div>
</body>
</html>

Now, create a CSS class, and assign it to the DIV.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Sample Page</title>
<style type="text/css">
.container
{
  width: 200px;
  margin: auto auto;
}
</style>
</head>

<body>
<div id="container" class="container">
<p>Some content to flesh out the div.</p>
</div>
</body>
</html>

Add more CSS declarations to the class until it appears as you wish. Frankly, there is rarely a need to do any vertical centering. Users expect pages to start at the top of the browser, just as they expect words to appear at the top of book page. I would stick with simplistic, basic CSS.

Then, you simply add child DIVs.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML …
tgreer 189 Made Her Cry Team Colleague

Sorry, I don't use/know Dreamweaver. I code all my HTML, CSS, and JavaScript in a text editor. Note that the term "layer" refers to an older, proprietary Netscape-only tag/element. There is no such thing as a layer in standard HTML. I recommend you get in the habit of referring to elements by their proper names. We're dealing with DIV elements, not layers.

That aside, yes, the approach I'd take is to delete all CSS and styles until you get to the bare minimum. Then, build back up as needed.

tgreer 189 Made Her Cry Team Colleague

ASP.NET is not a mail server. Your users are sending email to a mail server, not to an ASP.NET application. If you want to send an email programmatically when a user fills out a form or clicks a link to your ASP.NET application, you can do this of course. Simply search for [search]ASP.NET email[/search] for plenty of examples.

If you want your mail server to send an auto-response, read the documentation for your mail server.

tgreer 189 Made Her Cry Team Colleague

You don't have to do anything special to any "contained" block-level elements (divs). They will automatically adjust to changes to the containing element. You can't assign an "align" property to a DIV element. There is no such thing in XHTML.

tgreer 189 Made Her Cry Team Colleague

Yes. Ok, so you're using XHTML. Tell me again (so I don't have to re-read the entire thread), what you're trying to achieve? There is no "center" attribute in XHTML. To do horizontal centering, you have to set the left and right margins to "auto". The CSS attributes are:

margin-left: auto;   margin-right: auto

Vertical centering is another issue entirely, and it depends on whether you're working with elements of known vs. unknown height.

Study this source of this page for an example.

Also, this page gives a complete discussion of CSS centering techniques.

tgreer 189 Made Her Cry Team Colleague

No. "Doctype" is short for "Document Type", and specifies to the browser the HTML/XHTML version your page is using. Until you know about doctypes and the various underlying DOMs they represent, you'll be shooting in the dark.

http://alistapart.com/stories/doctype/

tgreer 189 Made Her Cry Team Colleague

In all of this discussion, "doctype" hasn't been mentioned. It is impossible to tell you what HTML/CSS code to use if we don't know which version of HTML/CSS you're using.

tgreer 189 Made Her Cry Team Colleague

Client vs. Server. The only thing that will "activate" PHP code is a server request. There are two types of server request, GET, and POST. GET requests happen by typing in a URL or clicking a link. POST requests happen when you submit a form.

As far as "activating" HTML code... that happens when the browser renders a page. I think you mean JavaScript code, and there are lots of ways to run JavaScript. Every HTML element has associated JavaScript events and event handlers. You, as a developer, have to code them.

The thread title seems to indicate you want to know the difference between a submit button and a regular button, but you don't ask that in your post. You're going to have to narrow things down to a specific question. Which piece of the puzzle can you not do?

1. Write an HTML form with a dropdown list and a submit button?
2. Write a PHP program to process the form results?
3. Query a MySQL database?
4. Process the query results and output new HTML?

tgreer 189 Made Her Cry Team Colleague

I don't see any of these imaginary purists whom you're addressing, but I'd imagine they'd tell you that you can have as much markup as you need in order to achieve your effect, however, you have to structure it so that it is maintainable. That usually equates to having the smallest amount of elements as possible.

As for images vs. code: whichever produces the least bandwidth and renders fastest on the client. The fancy effect is kind of ruined when the objects are slowly built-up piecemeal.

tgreer 189 Made Her Cry Team Colleague

I was making a joke... nevermind.

tgreer 189 Made Her Cry Team Colleague

Those are called "[search]HTML entities[/search]". Certain characters that are reserved in web development languages, or that would cause confusion to web servers, or that cannot be typed directly on the keyboard, are encoded this way.

It is the responsibility of your server-side code to interpret and convert HTML entities back into text. Without knowing your server-side language, it's not possible to give you a concrete answer.

If you're using PHP, this page has the information you need.

tgreer 189 Made Her Cry Team Colleague

Right, this isn't Messenger. It's a forum for technical discussion. In order to communicate with each other, we have to be precise. To do that, we've decided that standard English is required.

To start learning HTML,

1. Get a good text editor. There are many. I like TextPad.
2. Read a good tutorial. You say you don't like books. Sorry, there are no shortcuts. Either get a book, or study HTML online.

I doubt anyone here is willing to give a complete breakdown on HTML to someone who isn't willing to take the time to crack open a book and study. I wish you well.

tgreer 189 Made Her Cry Team Colleague

It's "you", not "u". You'll have to ask specific questions to get any meaningful help. For examples on HTML, you can use any web page. View the source, study it. Make copies and experiment.

tgreer 189 Made Her Cry Team Colleague

Please define "sideline background". Also, are you asking for Photoshop help or HTML help?

tgreer 189 Made Her Cry Team Colleague

I am not aware of any PHP script that will automatically upload files from a client's local system to a server. In fact, such a script would be a major security violation.

tgreer 189 Made Her Cry Team Colleague

What script? What upload function?

But it displayed errors... it displayed no such file...

Please initialize your pronouns... what is "it"?

Either FTP the files, or use an editor/IDE that will FTP the files for you.

tgreer 189 Made Her Cry Team Colleague

Do you have any database/SQL experience at all? It's hard to answer such a generic question without knowing your expertise level.

Did you check Daniweb's tutorials on PHP? There are a couple there that discuss PHP and databases. I would also suggest using better thread titles. Everyone posting here needs "help on this". Something like "Basic PHP and database help" or "How do I display data from database?" would have been better.

tgreer 189 Made Her Cry Team Colleague

You don't have a "name" attribute for your form tag. However, depending on the doctype you're using, you may want to switch to standard DOM methods, such as document.getElementById() , which will alleviate such problems.

tgreer 189 Made Her Cry Team Colleague

Research the "enabled" and "readonly" attributes.

tgreer 189 Made Her Cry Team Colleague

Use a DIV, with the appropriate styles applied and then toggled. My personal webpages demonstrate this, and you're welcome to view source to learn how to do this.

For example, go to my Articles Page, and click on any article. Once you have a technical article displayed, click on the logo/header section. A movable div "popup" appears.

tgreer 189 Made Her Cry Team Colleague

JavaScript is always enabled by default.

tgreer 189 Made Her Cry Team Colleague

1. Learn HTML
2. Learn the basics of Database design
3. Learn SQL
4. Learn to write/communicate well

tgreer 189 Made Her Cry Team Colleague

A combination of CSS and JavaScript. I'll leave you the joy of researching this on your own, with just a few guiding hints: imagine that your FAQ Answers are within DIV elements. Investigate the various "display" settings in CSS. You basically want to toggle from one "display" to another when a link is clicked. That should give you enough to go on.

tgreer 189 Made Her Cry Team Colleague

One word for every 5-10 letters.

tgreer 189 Made Her Cry Team Colleague

JavaScript is of course standardized. What confuses many is that it's a scripting language, so interacts with the underlying DOM, and that each doctype has its own DOM. Morever, JavaScript is used with other, non-HTML DOMs as well, such as Acrobat. However, the language itself is standardized.

I've been a web developer since the web's inception, and coded EDI and BBS systems prior to that... in all that time, in all the systems I've written or been involved with, there has never been a situation where we had to code around a "non-JavaScript" user. Not once.

So while I am absolutely all for people developing their own coding standards and best practices, I would recommend spending zero time worrying about "non-JavaScript" users.

tgreer 189 Made Her Cry Team Colleague

What you are describing is called a "ComboBox" and it doesn't exist in HTML.

tgreer 189 Made Her Cry Team Colleague

Well, all the mouse event handlers are just that: event handlers. The events are provided by JavaScript. Also, the "style." is a reference to the DOM, and again is JavaScript. So while you may not have written any JavaScript functions, or put anything inside of script tags, your solution DOES use JavaScript. My point is, though: that's perfectly fine.

tgreer 189 Made Her Cry Team Colleague

This isn't an HTML coding question. Moved to the Lounge.

tgreer 189 Made Her Cry Team Colleague

This entire discussion is very amusing. In short, you have to use JavaScript for most of the questions in this thread. There is no reason not to do so, either. If you want a real-world solution, don't impose silly restrictions. This is like saying "I need directions from my business to yours, but I'll only take left turns".