tgreer 189 Made Her Cry Team Colleague

This is best done via server-side code. Any client-side code would probably involve pre-loading lots of Flash movies: a bad idea.

tgreer 189 Made Her Cry Team Colleague

You simply provide a link to the file.

No, you cannot blindly force a file from a server to be written to a user's system. Think about this for 5 seconds; the reason should be obvious.

tgreer 189 Made Her Cry Team Colleague

Your question is perfectly understandable, it just is too general.

There are several ways to tackle this. You can simply do a query, return the results as a DataReader, loop through the reader, adding the records to the DropDownList. Or, you can do data binding to one of the data objects.

So, where to start? Do you know how to use .NET's data access objects? Do you know SQL?

I'm not trying to be difficult, but you have to give us somewhere to start. Outline what you already know and have tried. Tell us what specific line of code you'd like to write, but can't.

tgreer 189 Made Her Cry Team Colleague

This is far too general of a question. Which specific area do you need help understanding? Access queries? Data-binding? The DropDownList server control?

tgreer 189 Made Her Cry Team Colleague

I don't understand at all. The "select" is used to place one of the drop-down values into the "textbox" portion of the element. So, almost by definition, the box has to be large enough to contain all of its possible values.

I think what you really what is an "unordered list", the <ul><li> elements.

tgreer 189 Made Her Cry Team Colleague

This is impossible to answer with the provided level of detail (which is none). Make smaller scripts?

Also, your posts are hard to read due to the fractured punctuation, spelling, and grammar. If you want good help, you need to do a better job of writing your posts. You're asking people to take the time to give you good technical answers, you should at least take the time to use the "shift" key when you type "I".

tgreer 189 Made Her Cry Team Colleague

Nope, not really. By design, a person's browser isn't allowed to snoop around the file system.

tgreer 189 Made Her Cry Team Colleague

Is your keyboard missing letters? Many of your words are incomplete. If you want good quality answers, ask good quality questions, which includes not typing like a chimp.

There are many forum packages available. The two most popular are phpBB and vBulletin.

tiger86 commented: It is not polite to be rude to people just because of their spelling this is the World Wide Web so some people may not be fluent in english. +0
tgreer 189 Made Her Cry Team Colleague

The World Wide Web Consortium maintains all the standards and documentation.

tgreer 189 Made Her Cry Team Colleague

You can use the cross-browser DOM method "getElementsByTagName".

tgreer 189 Made Her Cry Team Colleague

Ok, let us know how you progress. Please do make an effort to spell-check and proofread your posts here... old folks like me have a hard time reading (and taking seriously) posts with stuff like "i am gona" in them!

tgreer 189 Made Her Cry Team Colleague

Script bodies can exist anywhere in your page, if that's your question.

The reason why image objects are defined in the HEAD is to give the user a better experience. They'd rather wait a few seconds up-front, once, for the page to load, than have to wait for an image to load when they rollover a link.

tgreer 189 Made Her Cry Team Colleague

HTML is not ASP.NET. To get the values of HTML elements server-side, post them in a form and iterate through the Request object; or don't use an HTML element in the first place, use an ASP.NET server control instead.

You don't need to place them in a hidden element, as the Request object contains all the posted form values.

If you have additional ASP.NET questions, it's best to ask them in the ASP.NET forum.

tgreer 189 Made Her Cry Team Colleague

Looks good. You can validate it against w3c.org's validators, to be sure.

Ok, the short answer is that you use CSS to style HTML elements. You could create two CSS classes, one for normal color, and one for "old" dates.

<style type="text/css">
.normal
{
  color: black;
}

.old
{
  color: red;
}
</style>

Something like that, to use a simple example. This goes in your HEAD portion of your document.

Then, to apply the style, add the "class" attribute to your tags:

<td class="normal>normal</td>
<td class="old">old</td>

The trick is, how to do that programmatically? Again, I suggest server-side. There is no one solution, first you have to decide what language you're going to use, and learn the basics of that language.

I suggest PHP. Daniweb has a great PHP forum.

The basic idea is that you create CSS and HTML to control how the page looks, and then you write a PHP program to output the CSS & HTML. At the time the PHP program runs (which is as soon as a user browses to the page), it can enter the dates into the table, check the dates, and add the correct "class" to the table elements.

Daniweb in fact is a big PHP program.

tgreer 189 Made Her Cry Team Colleague

The Date Object would indeed come into play, but the bigger question is how he'll access the "dates" that are in his table. There needs to be a corresponding Date Object for those, or a method to access those via the DOM and move them into a Date Object, before any comparsion could be done.

That's why I pointed toward the server-side solution. My guess is that this is a dynamic, program-generated page, and as such, rather than load the page with JavaScript Date Objects to do client-side, after-the-fact date recognition, he should simply do it server-side while building the page.

tgreer 189 Made Her Cry Team Colleague

Since this is a JavaScript question, I assume you want this done completely client-side? We'll be happy to help, but first a couple of observations:

1) This might be easier server-side. How are you generating your pages?

2) The approach will depend on your page structure and doctype. Can you give us a skeleton sample of your HTML?

tgreer 189 Made Her Cry Team Colleague

how does my web site show up in searches "google"

I don't understand the question, sorry. If you're asking how to make sure your site is well-indexed by Google and ranks well in Search Results pages, that isn't an HTML coding question. Ask in the Site Management forums.

I have an animated .gif moves very slow when page loads can that be sped up

Not really. Most sites don't use animated GIFs anymore.

any way to do things in colums EX:

1 2 3 4

5 6 7 8

Research HTML tables.

tgreer 189 Made Her Cry Team Colleague

Points to Blazing Wolf.

That's the correct answer, according to Microsoft's ASP.NET FAQ.

tgreer 189 Made Her Cry Team Colleague

Yes, everyone of her pages somehow includes header. It will always run. But when it does, it does frame detection.

That's what I meant originally: you could only control whether nor not to include the file, server-side. And, server-side, as far as I know, you can't detect whether the request is coming from a framed page or not (I'll have to research that! Perhaps the user-agent reports something?)

But her file isn't really a script, it's an HTML fragment, so I'm unsure how to code this. Really, she needs a header script, included on every page, which does frame detection.

tgreer 189 Made Her Cry Team Colleague

Whenever I see people talking about "dynamic controls", I shudder. I've written this article about dynamic controls and page life-cycle. Chances are you're not recreating everything properly on each code path.

tgreer 189 Made Her Cry Team Colleague

That page you posted isn't written in the Java programming language, so it can't be a "Java Server Page", or JSP. It's simply JavaScript (not Java). So the file extension ".JSP" is incorrect, it should be named "header.js".

There is no such thing as a "server page" vs. a "client page". A page is a page. The client Requests a Page, the server sends the page as a Response. A Page (lets call it a "document" instead of a page)... so, a document might just be HTML, in which case it's served "as is" to the client, which renders it.

A document might include JavaScripts, which are served to the browser, and which then run on the client.

A document might be written in a language such as PHP, which needs to be interpreted. The web server will pass the document through a filter, in this case the PHP interpreter, to process the script and generate the Response, which takes the form of HTML/CSS/JavaScript, which is passed back to the client.

In your case, you're serving JavaScript. It runs on the client. It will run on every page. If we're loading the page in a frame, we want nothing to happen. That requires an IF statement.

Now, theoretically, you could edit your header.js page to look like this:

if (top.location == location)
{
 
All header.jsp file as posted above
 
}

However, that won't really work because your header.js …

tgreer 189 Made Her Cry Team Colleague

DOM methods have replaced document.write(). You can create elements (nodes), set their attributes, and invoke their methods. You've seen some of this, for example: document.getElementById("x").innerText = "Howdy"; sjklein: just the opposite. You're asking the client to do something that should be done on the server.

The web is very simple: you have web server (the server), and you have browsers (the client).

Clients can request documents from the server. That request (called HTTP Request or just "Request" in web development jargon) can pass in parameters. There are two modes, GET, and POST. With GET Requests, the parameters are tacked onto the URL in what's known as the QueryString:

http://server_name/page.html?key=value

With a POST, the variables are passed in via an HTML Form.

The server generates a RESPONSE, which can be the document itself. The document comes back to the client, and at that time, any client-side code, such as a JavaScript, can be run by the browser.

The Web Server might be configured to perform additional tasks with certain types of documents. For example, a PHP document is passed to the PHP interpreter, which runs all the server-side code, generating the final HTML, which is given back to the web server and then eventually to the client.

So it's real simple: CLIENT = BROWSER = REQUEST, SERVER = WEB Server = RESPONSE.

In your case, doing a "document.write()" of an include line won't work, because it doesn't generate a Request.

Ok, …

Comatose commented: ;) +3
tgreer 189 Made Her Cry Team Colleague

It doesn't work because you are writing in a statement, on the client. That is not the same as evaluating a statement on the server.

Document.write(), then, is not the proper mechanism to use. In fact, in the more recent XHTML implementations, it isn't even supported.

You need to do all of this on the server, using the server-side language of your choice.

I guess we'd like to know what header.jsp actually does. If it writes out HTML/JavaScript, that JavaScript could indeed contain a conditional to test if the page is within a frame or not using "location" as a test as already explained.

tgreer 189 Made Her Cry Team Colleague

I'm sure we'd all like to help, but you have to ask a question. What is your specific question?

Please use code tags in your postings. When ending a sentence, one period or one question mark will suffice. Thanks.

tgreer 189 Made Her Cry Team Colleague

It isn't too bad, as long as you don't break their strict rules. If you do break the rules, like I was wanting to do, they provide all sorts of "helpful" classes etc., which are anything but.

I'm putting more and more into .config as time goes by. I find myself thinking, "if I hard-code this, they'll sure enough want to change it, so I'll put it in the config file instead".

Not logic, of course, but folder settings, label text, filenames, all the database connection strings, etc.

tgreer 189 Made Her Cry Team Colleague

That should work fine, if IIS is installed properly:

http://server_name/folder/appname.aspx

So, you likely have an IIS configuration issue, which is outside the scope of this forum. You should post in the Site Configuration section.

You need to test first:

1) Can you access your app on the machine itself, using "localhost" as the server name?

If this test fails, you don't have IIS running correctly.

2) Can other machines access the app, using the IP address of the IIS server as the server name?

If the this test fails, then you have a network configuration issue. 192.168 numbers are "local IP" addresses, and your network could be divided into subdomains, you could have a firewall on the machine blocking inbound traffic - all sorts of issues, none of which are ASP.NET questions!

tgreer 189 Made Her Cry Team Colleague

Here's what I've learned.

1) You have to add the System.Configuration class as a reference, not just a "using" namespace declaration.

2) The "type" does indeed need to match a schema, in this case Microsoft's, and they have only 3 values, all related to a NameValue organization. Mine isn't, mine is Element-Node-Element.

3) You can add a custom type, but then you have to create a class to provide the handler for the type

4) All of this is ridiculous, because you can simply use an XmlTextReader to do a forward-only, read-only pass through any XML file, including the config.

So, I'll re-visit and really figure this all out when I need an application that can get/set its own complex configuration settings. For now, I just stored everything under the appsettings section as key-value pairs, which you can access directly.

I personally think .NET 2.0 over-complicated the Configuration aspect.

tgreer 189 Made Her Cry Team Colleague

I cannot tell you anymore than I already have:

You access via a browser:

http://servername/appname

The "servername" is the name you've given the IIS server. That's all there is to it - there isn't a big mystery here.

You can also access via IP address:

http://192.168.xxx.xx/appname

tgreer 189 Made Her Cry Team Colleague

ASP.NET works with IIS. You access ASP.NET applications through a web browser. Whatever you've configured a particular IIS installation's server name to be, is how you access it, via WAN, LAN... whatever.

tgreer 189 Made Her Cry Team Colleague

As usual, the examples I find for this either don't work, or don't apply.

I want to store, essentially, a text file, within my app.config file, and access it programmatically.

Here's a simplified version:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="PostScript" type="" />
  </configSections>
  <appSettings>
    <!--   User application and configured property settings go here.-->
    <!--   Example: <add key="settingName" value="settingValue"/> -->
  </appSettings>

  <PostScript>
    <prolog>
<![CDATA[
My big long
text file
goes here.
]]>
    </prolog>
  </PostScript>
</configuration>

Two questions:

1. What goes in the "type" attribute, which I've colored red?
2. How would I retrieve the "prolog" element from the "PostScript" section of this file?

Note: this is read-only, I do not need to change/set the values in the customSection as so many examples assume.

tgreer 189 Made Her Cry Team Colleague

I think this could be done simply by including or not including the "target" attribute in your links. Hard to tell without seeing the code.

tgreer 189 Made Her Cry Team Colleague

Sorry to burst your bubble, but if iyou intend to be a serious web developer then IE is the first browser you should aim to get perfect.

I strongly disagree with this advice. It's more important to get the underlying code right, and then address any browser discrepancies. As a web developer, I prefer FireFox, as the most standards-compliant browser.

Once I have the code right, with the page displaying correctly in FireFox, and validated against the w3c.org validators, then and only then will I test/fix IE.

Starting by getting things to "look right" in IE will lead to buggy code and extreme maintenance issues down the road.

tgreer 189 Made Her Cry Team Colleague

If you're serious about web development, you'll install the main browsers, so you can test your layouts yourself.

Also, we prefer you start a thread for each new question, with a descriptive subject. This way, others who are searching for answers can find the threads. They won't know that "My Questions" might answer a question about table-based layouts, for example.

tgreer 189 Made Her Cry Team Colleague

There are no such magic "codes". If you are storing username/password data in an Access database, you'll have to write the appropriate query to retreive them.

For authentication/redirection issues, research basic .NET Forms Authentication.

tgreer 189 Made Her Cry Team Colleague

Of course you have to write code-behind. Where else would code go? Surely you're not mixing your code and HTML together in the ASPX page?

Simply modify your INSERT query itself.

tgreer 189 Made Her Cry Team Colleague

I have to add mine, of course:

http://www.tgreer.com/comboArticle.html

tgreer 189 Made Her Cry Team Colleague

What errors? You should be able to integrate a script into your declarative markup just fine.

Are you sure your script tag is proper for the doctype you're using?

tgreer 189 Made Her Cry Team Colleague

Yes. The technique is to create an ASP.NET page which creates an image. I've done this for dynamic charting. Pass in all your parameters on the query string, your page consumes this and streams back an image. Call this page "Image.aspx", for example.

The trick is, on your main page, you can dynamically add image tags to your Placeholder, setting the src attribute equal to image.aspx.

tgreer 189 Made Her Cry Team Colleague

Use a Placeholder. You can insert as many elements as you like into a Placeholder, including divs and images. Please let me know if I haven't understood the question properly.

tgreer 189 Made Her Cry Team Colleague

My experience was on a development machine, where I installed VS.NET. Later, I installed IIS, and things never worked correctly. I searched MSDN, and saw that this was a common problem, and then had a "fix" script, which didn't work.

So, uninstalling both, then re-installing IIS and VS.NET after, solved my problem.

That may not help you, if IIS and VS.NET are on two separate machines.

However, a clean re-install might not be a bad idea.

tgreer 189 Made Her Cry Team Colleague

This is the ASP.NET forum. Is that what you're asking about? If not, I can move the thread to the ASP forum, just let me know.

ASP.NET and IIS can get into problems based on which was installed first. This may seem like overkill, but the best catchall solution is to uninstall VS.NET and IIS, and then reinstall 1st IIS, and 2nd VS.NET.

tgreer 189 Made Her Cry Team Colleague

I assume you're asking this in the ASP.NET forum, because you hope to write an ASP.NET application that will do this for you?

I don't think that's going to work. I mean, you can certainly code the registration page in ASP.NET, but the redirect must be handled at a different stage entirely, at the router. Try asking this question here.

tgreer 189 Made Her Cry Team Colleague

Cosmic rays? No, sorry, no clue! I just thought I'd respond so you know someone read and thought about your post.

tgreer 189 Made Her Cry Team Colleague

I moved this thread; it isn't a PHP question and you'll likely get better responses here.

Yes, Dani is still the owner. Yes, she's continually changing/improving/evolving the forum.

Do you like or dislike the changes?

tgreer 189 Made Her Cry Team Colleague

It's one of the most short-sighted policies I can imagine. I'm amazed that no one apparently understands that the long-term effect of offshoring to a less-developed nation will be to equalize the relative economies.

tgreer 189 Made Her Cry Team Colleague

Way too complex for the task. Also, having two such similarly-named methods is a very bad idea.

Look into the String.Split() method. It breaks a string into an array of substrings, based on any delimiter you like. Then, you simply grab the last element of the array as your filename.

tgreer 189 Made Her Cry Team Colleague

The main difference is the "footprint" of the return value. ExecuteReader always returns an object, for example, a SqlDataReader. Then, to get the actual results, you have to do a Read(), then get the value.

ExecuteScalar immediately returns the actual value.

So, in terms of retrieving Scalar data from a database, ExecuteScalar is more efficient.

tgreer 189 Made Her Cry Team Colleague

No one is going to send you any code, as that totally defeats the spirit of a forum.

"n-tier architecture", with various "layers", is a philosophical thing. In terms of actual coding, all it really means is that you organize things in a logical manner.

For example, all the code to interact with your database, should be in its own class. To write something to a database, your application would use the members of your "db" class.

tgreer 189 Made Her Cry Team Colleague

Your ASPNET user account very likely does not have permissions to your Window's temp folder. You should create all temporary files within the webroot of your application.

I've never used Crystal Reports (as a PostScript/PDF coder, I create reports directly when needed), so this advice might be off-base: is there an object you need to "close"? If the file handle is still being controlled by some class/method/object in your program, you might not be able to access it. Make sure you do all the necessary housekeeping tasks.

tgreer 189 Made Her Cry Team Colleague

Those stats always confuse me too. I think what it means is that one person, tracked by IP address, viewed the page 10 times. This is common, for example, if you have a home page with links to and from several auxilary pages. They hit your page once, click to somewhere, then click the "home" link and hit the page again, and so forth.

I could be wrong about this, of course! You can always ask your web host for a precise breakdown and explanation.