tgreer 189 Made Her Cry Team Colleague

Yes, I have a permissioning script I can use, or I can add the "grant" clause to each CREATE... that will solve the specific issue (and has). So let me rephrase the question:

Where, using VS2005 and SqlExpress2005, is the "widget", wizard, menu, button, etc. for assigning permissions? It seems to me that the VS2005 DB Interface is missing some crucial elements.

BTW, you do a great job answering questions here. Keep up the good work, it's appreciated.

tgreer 189 Made Her Cry Team Colleague

I've developed a few ASP.NET applications in the past, develop C# windows apps all the time, but am just now developing my first ASP.NET 2.0 app. I'm having a nightmare getting a database connected.

Everything is on my local machine, including

IIS
Visual Studio 2005 Professional
Latest .NET Framework 2.0
sqlexpress 2005

I've managed to create my database, tables, sprocs, etc. with VS2005.

My ASP.NET 2.0 app has a "SqlDataSource" control, with proper connection strings, etc. (The "test" button on the wizard runs the stored procedure, getting the correct results). This DataSource is bound to a dropdownlist. Everything is fine until I debug or run the app.

Then I get the standard "Error connecting to database... login failed for user XXXX\ASPNET".

Now, in any other database, I'd simply grant the appropriate rights for the stored procedures to the ASPNET user.

However, I can discover no way to do that with SqlExpress2005. Any ideas?

tgreer 189 Made Her Cry Team Colleague

There is no simple way, but some searching on the web reveals some scripts. For example, this one:

http://jira.codehaus.org/secure/attachment/15108/ResizableTableColumns.html

and this:

http://persistent.info/archives/2004/07/10/tables

tgreer 189 Made Her Cry Team Colleague

This is a professional-grade forum. Please post in "real" English. This forum is about HTML, CSS, and JavaScript development, not Java or "premade blog" scripts. I've moved the thread and encourage you both to run a spell-checker on your posts in the future!

tgreer 189 Made Her Cry Team Colleague

Sessions are controlled by the web server... you can't terminate them with JavaScript code. Usually, sessions are set to time-out in 15 minutes (I think that's IIS' default, different web servers may vary).

tgreer 189 Made Her Cry Team Colleague

CSS attributes "cascade", from least-specific to most-specific. You are also mixing inline attributes with CSS class definitions.

In any given TD for your table, you'll get a "combined" or "derived" style based on the inline attributes, the "overbodyline" class, and the "stand" class. Any attributes you've left undefined (such as "margin") will get whatever default the browser uses.

Is the data in your table really tabular? Are you actually presenting a "table" of data? If not, then consider using DIVs, SPANs, and CSS to control appearance and flow. It will be much simpler to troubleshoot these issues if you didn't mix tables and CSS.

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

Are you doing this client-side, or server-side?

What do you mean by "disable"? Show, but have no effect when clicked? Or, remove the button completely?

I have difficulty understanding your last sentence. Could you rephrase the question?

tgreer 189 Made Her Cry Team Colleague

In general, CSS spacing issues can be resolved by specifying both the "padding" and "margin" properties of all the affected elements.

Tables have their own properties... try setting "cellpadding".

tgreer 189 Made Her Cry Team Colleague

But that isn't a button... that's an image within a hyperlink. :)

Yes, if you want a hyperlinked image, you simply... make a hyperlinked image. :rolleyes:

tgreer 189 Made Her Cry Team Colleague

Use <input type="file"> . You'll need a server-side program to process the uploaded file.

tgreer 189 Made Her Cry Team Colleague

No, no no. Read the first part of my first reply. Buttons are made with "input" tags, and can be made to perform navigation tasks with the "onclick" attributes. Re-read the first part of my first reply.

tgreer 189 Made Her Cry Team Colleague

What isn't working? What do you expect to happen? Please ask an actual question.

tgreer 189 Made Her Cry Team Colleague

To create a button, use the "input" tag, with the type attribute set to "button": <input type="button" id="myButton" /> To make it perform an action, including navigating to another site, code the "onclick" attribute. The value will be a JavaScript function you've written and included elsewhere in the document (in the HEAD section, within SCRIPT tags), or will be inline JavaScript itself:

<input
   type ="buttton"
   id = "myButton"
   onclick="self.location='destination_page.html';" />

However, might I suggest another technique entirely? Use standard hyperlinks. Using CSS, you can make them look and behave exactly like buttons, with no JavaScript.

<html>
<head>
<style type="text/css">
a:link, a:visited
{
  float: left;
  margin: 2px 5px 2px 5px;
  padding: 2px;
  width: 100px;
  border-top: 1px solid #cccccc;
  border-bottom: 1px solid black;
  border-left: 1px solid #cccccc;
  border-right: 1px solid black;
  background: #cccccc;
  text-align: center;
  text-decoration: none;
  font: normal 10px Verdana;
  color: black;
}

a:hover
{
  background: #eeeeee;
}

a:active
{
  border-bottom: 1px solid #eeeeee;
  border-top: 1px solid black;
  border-right: 1px solid #eeeeee;
  border-left: 1px solid black;
}
</style>
</head>
<body>
<a href="#">Button 1</a><a href="#">Button 2</a><a href="#">Button 3</a>
</body>
</html>

Replace the "#" sign in the href tags, with the actual URL of the target page.

This technique will accomplish all your stated goals.

tgreer 189 Made Her Cry Team Colleague

I'm not a Dreamweaver user, so can't direct you there. Are you asking for help on how to use Dreamweaver itself, or how to code a "file upload" feature into a web page?

tgreer 189 Made Her Cry Team Colleague

I believe there are classes built into the .NET Compact Framework for Short Message Service.

tgreer 189 Made Her Cry Team Colleague

A batch file is a great idea. The thing with XCOPY, is that it preserves permissions and other attribute flags. A simple "copy" may not.

tgreer 189 Made Her Cry Team Colleague

Not so. If you don't want to use the simple click-through wizard built-in to Visual Studio.NET, and would prefer to deploy your ASP.NET Applications through the command-line, then Microsoft recommends using the XCOPY method, as discussed here:

http://msdn2.microsoft.com/en-us/library/f735abw9.aspx

tgreer 189 Made Her Cry Team Colleague

There is no need in doing all of that manually. Visual Studio has built-in deployment methods and wizards.

tgreer 189 Made Her Cry Team Colleague

With which specific area do you need help? What do you know how to do already? No one is going to write your application for you, so you need to ask specific questions.

In any data-driven project, you need to start with the database design. Are you using Access, or SQL Server? Decide. Do you know SQL? The basics of data normalization?

tgreer 189 Made Her Cry Team Colleague

ASP.NET Applications are run via IIS. What you're asking makes no sense. If you mean, you'd like to migrate the application to a different IIS web server, then search for "ASP.NET deployment".

tgreer 189 Made Her Cry Team Colleague

Please use code tags. It is very hard to read posts that mix the message with the code. That's what the code tags are for.

tgreer 189 Made Her Cry Team Colleague

If the server is completely down, there's nothing you can do. If the server is under load, it can redirect.

I suggest you post in the 'Site Management | Web Hosting' forum.

tgreer 189 Made Her Cry Team Colleague

I haven't read all of your code. I'd suggest simply wrapping the image in a standard hyperlink.

tgreer 189 Made Her Cry Team Colleague

This is a server-side question. Please ask in the forum for whatever server-side language you use.

tgreer 189 Made Her Cry Team Colleague

Regular Expressions have always been very difficult for me, for some reason. I'd be happy to try to help when I have a bit more time later this week.

Can you post a very simple "test harness" version of your HTML here?

tgreer 189 Made Her Cry Team Colleague

Redirection can be accomplished either client or server side, but the real question is, why? When?

tgreer 189 Made Her Cry Team Colleague

I don't see where you're applying any alignment to the td elements. It's very had to diagnose such a, well, messy bunch of code.

Strip it down. Make a static page, with only the very bare essentials. Get it working there. Then you'll have some idea of what to edit in your real page.

tgreer 189 Made Her Cry Team Colleague

Research the JavaScript "window.open()" method. You can do everything you've asked via the parameters for that method.

tgreer 189 Made Her Cry Team Colleague

Please use code tags. It's very difficult to understand and answer messages that combine code and commentary without differentiation. Also, please use correct punctuation, spelling, and grammar. This is a professional forum, not a teen party site.

tgreer 189 Made Her Cry Team Colleague

There is no need to use Flash for something so basic. I can't answer your Dreamweaver questions, sorry. As a Web Developer, I code HTML, CSS and JavaScript "by hand". If you'll be working in this arena, those are skills you should definitely learn!

A very simple script using JavaScript's "onmouseover" and "onmouseout" events will do what you're asking. I'd suggest doing some web searches on those terms, and then post again if you have any more questions.

Also, on a personal note, since this is a professional forum, I would ask that everyone use proper spelling, punctuation, and grammar. It doesn't take that much more time and increases your chances of getting quality responses.

tgreer 189 Made Her Cry Team Colleague

Yes, you should be in the PHP forum.

The basics: set the form action tag to point to a PHP program.

When the user submits, the PHP program runs.

The PHP program calls its built-in email function.

Start by visiting www.php.net.

Then for more details, post in the PHP forum here on Daniweb.

tgreer 189 Made Her Cry Team Colleague

I'm not familiar with the term "cades".

A server-side language works in conjunction with the Web Server software itself (such as IIS or Apache), to generate web pages.

When the user makes a request to a page like "mypage.php", the Web Server runs the program contained in the php file. The php file can perform a variety of tasks, such as looking up information from a database, performing calculations, etc.

Then, it outputs a Reponse. That Response contains all the HTML, CSS, and JavaScript that the client is supposed to see. The Web Server sends that to the browser.

In your case, you could have a static standard Web Page, with a form, which submits to a php program. One of the things a server-side program can do is process the form results, and generate and send emails.

If none of this answers your question, then you need to ask better questions! :)

tgreer 189 Made Her Cry Team Colleague

Yes... you can include a <script></script> anywhere in your page. It doesn't have to be in the HEAD, that's just a good convention.

But, you have to start it somewhere, and <body onload=...> is the right spot to do it.

tgreer 189 Made Her Cry Team Colleague

Insert them? "them" what?

A server-side language isn't inserted onto a web page. It outputs the web page. Seriously, if you're going to be a web developer, you'll need to learn the server side of things. Start at www.php.net, is my advice.

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

Sure, if you're willing to experiment with personal quasiperiodicty.

tgreer 189 Made Her Cry Team Colleague

Ok, I understood all that, and really already knew it... but just wanted to double-check.

The reason I can't just override ReadLine(), is because ReadLine() uses internal, private, methods. To do what I need, I would have to re-write ReadLine(). Ok, no problem. But to do that, means I've have to write my own ReadBuffer(), etc.

I think I already travelled down the roads your pointing at, met with dead-ends, and so ended up where I'm at.

And where I'm at works perfectly for my needs... but take a closer look, and if there's a way to derive from StreamReader, with overridden methods, I'd like to see it.

tgreer 189 Made Her Cry Team Colleague

You'll have to explain to me the differences between override and overload. When I tried to derive from StreamReader, and provide my own ReadLine(), I ran into problems, because the core ReadLine() users private member methods that I couldn't overload/access.

tgreer 189 Made Her Cry Team Colleague

There is quite a bit wrong in your code. First, you absolutely don't need to measure any mouse position or x,y coordinates do what you've asked.

This will work to create an alert when the user closes the window:

<!-- note: you're missing a doctype here! -->
<html>
<head>
<title>Test</title> 
<script type="text/javascript"> 
 
function unLoadFnc() 
{
  alert("Closing the window .. ");
}
 </script> 
</head> 
<body onUnload="unLoadFnc();"> 
Sample Html. 
</body> 
</html>

There's no need for events, clientX, any of that. Perhaps though, you're not showing me the entire script or explaining the entire project. So, in the case that you DO need the event, you need to test if it's part of the window object (IE) or not.

Here's how I would code it:

<!-- doctype excluded, you need to pick one -->
<html>
<head>
<title>Test</title>

<script type="text/javascript">
function unLoadFnc(evt)
{
  var e = (window.event) ? window.event : evt;
  alert(e.clientX);
}
</script>
</head>

<body onUnload="unLoadFnc(event);">

Sample Html.
</body>
</html>

I hope you're noting a few things, such as the fact that your page needs a doctype declaration, the proper way to write a script tag, and the semicolon after your event handler assignment.

The goal is to pass in the event object, and in your function, create a variable to hold it, using the tertiary operator.

Note, in FireFox, if you ran this code, the alert would say "undefined". That's because the widget that closes the window (the 'X') isn't within the client, so clientX would …

tgreer 189 Made Her Cry Team Colleague

Here's my solution, for any interested. This is basically a hacked version of the .NET StreamReader code. It adds two public properties, LineLength and BytesRead. LineLength returns the actual length of the current record, inclusive of line-termination characters. BytesRead returns the actual real bytes read (regardless of the buffer mechanism). This value is suitable for passing into .BaseStream.Seek().

It could be better. The real StreamReader code uses some methods internal to some of the core .NET namespaces, so I did the best I could with those. If anyone would like to post improvements, they are welcome to do so.

using System;
using System.Text;
using System.Runtime.InteropServices;
using System.IO;

namespace TGREER
{
	[Serializable()]
	public class myStreamReader : TextReader
	{
		public new static readonly myStreamReader Null = new NullmyStreamReader();

		internal const int DefaultBufferSize = 1024;  // Byte buffer size
		private const int DefaultFileStreamBufferSize = 4096;
		private const int MinBufferSize = 128;
		private Stream stream;
		private Encoding encoding;
		private Decoder decoder;
		private byte[] byteBuffer;
		private char[] charBuffer;
		private byte[] _preamble;
		private int charPos;
		private int charLen;
		private int byteLen;
		private int _maxCharsPerBuffer;
		private bool _detectEncoding;
		private bool _checkPreamble;
		private bool _isBlocked;

 		private int _lineLength;
		public int LineLength
		{
			get { return _lineLength; }
		}

		private int _bytesRead;
		public int BytesRead
		{
			get { return _bytesRead; }
		} 

		internal myStreamReader()
		{
		}

		public myStreamReader(Stream stream)
			: this(stream, Encoding.UTF8, true, DefaultBufferSize)
		{
		}

		public myStreamReader(Stream stream, bool detectEncodingFromByteOrderMarks)
			: this(stream, Encoding.UTF8, detectEncodingFromByteOrderMarks, DefaultBufferSize)
		{
		}

		public myStreamReader(Stream stream, Encoding encoding)
			: this(stream, encoding, true, …
tgreer 189 Made Her Cry Team Colleague

They are properties of the Event Object. From the www.w3.org:

// Introduced in DOM Level 2:
interface MouseEvent : UIEvent {
  readonly attribute long             screenX;
  readonly attribute long             screenY;
  readonly attribute long             clientX;
  readonly attribute long             clientY;
  readonly attribute boolean          ctrlKey;
  readonly attribute boolean          shiftKey;
  readonly attribute boolean          altKey;
  readonly attribute boolean          metaKey;
  readonly attribute unsigned short   button;
  readonly attribute EventTarget      relatedTarget;
  void               initMouseEvent(in DOMString typeArg, 
                                    in boolean canBubbleArg, 
                                    in boolean cancelableArg, 
                                    in views::AbstractView viewArg, 
                                    in long detailArg, 
                                    in long screenXArg, 
                                    in long screenYArg, 
                                    in long clientXArg, 
                                    in long clientYArg, 
                                    in boolean ctrlKeyArg, 
                                    in boolean altKeyArg, 
                                    in boolean shiftKeyArg, 
                                    in boolean metaKeyArg, 
                                    in unsigned short buttonArg, 
                                    in EventTarget relatedTargetArg);
};

So "event.clientX' should work, depending on how you are getting the "Event" object.

tgreer 189 Made Her Cry Team Colleague

Form processing and email generation are server-side tasks. You'll need to ask this question in the forum for whichever server-side language you use (PHP, ASP, ASP.NET...).

tgreer 189 Made Her Cry Team Colleague

Most of the time, complex multi-page tasks like this are accomplished with a server-side language, supported by a back-end database.

The applications are divided into 2 or 3 "levels" or tiers.

One tier would be the database. It would contain all of your products, organized properly, as well as all of the code to maintain the database and its integrity, commonly called the "CRUD" code: Create, Replace, Update, Delete.

Another tier would be what the user sees: the HTML, CSS, and JavaScript that controls the users' experience.

The middle tier holds all of your business logic. It would be written in PHP or ASP.NET - some server-side language. It responds to the users' actions, interacts with the database, and outputs the proper responses to the user.

All of that aside, some of what you ask can be accomplished with client-side code:

You wrote:

1. When the customer enters a quantity in the form field next to the part number(s), the quantity(s) and part number(s) they have chosen will then be moved to a new page when they click continue. This will be the page where they enter their contact information, etc...

You have two ways of passing data from one page to another. These methods are known as GET and POST. What you'll need is to write some JavaScript that handles the form's "submit" event. When the user submits the form, you will construct a GET querystring from the form data, and then …

tgreer 189 Made Her Cry Team Colleague

What CSS settings are applied to the table?

tgreer 189 Made Her Cry Team Colleague

But you can put anything in a List, including a complete Object. So, you can make a Class that exposes the properties you need (like a key and a value). Mark the class [Serializable]. Then, make a List of that <class> type.

Heck, I'll just show you the whole thing. Two classes, Document and Pages. The idea is that another program parses a large PostScript file, finding the start of each document and each page. Later, I need to recreate this index in order to randomly retrieve any document or page. So, this class has two contstructors, the original which is used to create the index information, and another to de-serialize the previous values:

using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;

namespace TGREER
{
	[Serializable]
	public class Document
	{
		private string _seq;
		private Int32 _offset;

		public Document(string _seq, Int32 _offset)
		{
			this._seq = _seq;
			this._offset = _offset;
		}

		public override string ToString()
		{
			return _seq;
		}

		public string GenericSequenceNo
		{
			get { return _seq; }
			set { _seq = value; }
		}

		public Int32 ByteOffset
		{
			get { return _offset; }
			set { _offset = value; }
		}
	}

	[Serializable]
	public class Page
	{
		private string _seq;
		private Int32 _offset;

		public Page(string _seq, Int32 _offset)
		{
			this._seq = _seq;
			this._offset = _offset;
		}

		public override string ToString()
		{
			return _seq;
		}

		public string GenericSequenceNo
		{
			get { return _seq; }
			set { _seq = value; }
		}

		public Int32 ByteOffset
		{
			get { …
tgreer 189 Made Her Cry Team Colleague

The main problem I had with Dictionaries is there is no .IndexOf property. I not only had to retrieve a value from the dictionary via a key, but the "next" value as well.

List has an .IndexOf property. The problem is, in a List of Objects, you have to pass in the full object to get a match. The "Find" method is nice, but it took awhile to figure out the Predictor mechanism.

tgreer 189 Made Her Cry Team Colleague

I ended up using standard serialization instead of xml serialization. Also, I used a List instead of Dictionaries... I made a class for the items I wanted to store in the list, then serialized the List object.

tgreer 189 Made Her Cry Team Colleague

None of the schemes I referred to ever required that anyone else be recruited, just for the record. I'm not promoting anything, just adding to the conversation.

tgreer 189 Made Her Cry Team Colleague

One thing to keep in mind, though, is that the security policies don't migrate. If you install .NET Framework 2.0, it won't have the security policies you set with 1.1. Just a side-point; something I discovered the hard way.