tgreer 189 Made Her Cry Team Colleague

Use <div> tags and CSS Positioning. All of your background images would be contained in one <div>, and your "content" would be in another.

With CSS, you can make elements overlap each other. I have an article about CSS Positioning on my website, on the "Articles Page".

tgreer 189 Made Her Cry Team Colleague

Research the CSS Print Profile: http://www.w3.org/TR/2004/CR-css-print-20040225/

tgreer 189 Made Her Cry Team Colleague

I played with this for about 10 minutes, and through aggresively taking out giant chunks of nested tables, I was able to get it to display the inner table in question "correctly". But by that point there was no way to tell where I was anymore.

With tables, divs, spans, spacer gifs, sized td's, images and background images, etc. it's like looking for a needle in a haystack.

I don't normally make commercial offers in a forum, but I can convert this to CSS for you.

tgreer 189 Made Her Cry Team Colleague

For now, during testing, set it to "0px":

form
{
	margin: 0px;
}

See if that fixes the problem. You can adjust it if you need to. That's just the first thing I noticed that looked strange to me. If it's something else, we'll hunt for it.

Added
Ok, that wasn't the problem. That is one of the most extreme examples of nested tables I've ever seen. It may take days to track down the problem. It might be easier, in fact, to rewrite the entire layout/page in CSS. Do away with tables entirely. I'll continue to poke around, but I'm sure there is an unbalanced table structure somewhere.

tgreer 189 Made Her Cry Team Colleague

You have a CSS setting, the "form" selector, with a margin property set to 100%. That could very well be the problem. Try changing that.

I would strongly recommend selecting and adding a proper DocType, and then validating both your CSS and your HTML.

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

What would trigger the action? Yes, you can add new rows. What are you binding to the DataGrid?

I like to use a DataReader, as they are very high performance. I loop through the DataReader to create an ArrayList. Then I bind the ArrayList to the DataGrid.

In server-side code, it is easy to add items to the ArrayList and simply re-bind.

tgreer 189 Made Her Cry Team Colleague

When I'm coding to a specific resolution, I set my screen to that resolution. I have a dual-screen setup, so that's very convenient for me.

But to make adjustments on the fly, you use "screen.width". So you can set the various CSS Positioning attributes, via JavaScript, based upon the user's resolution.

There just isn't a shortcut to testing. Look at your site on various resolutions, and determine, in advance, how your layout should react to those resolutions. Code accordingly.

tgreer 189 Made Her Cry Team Colleague

Did this work? Do you need more help? Pleave give us some feedback.

tgreer 189 Made Her Cry Team Colleague

Did this work? Do you need more help? Please give us some feedback.

tgreer 189 Made Her Cry Team Colleague

Did this work for you? Do you need anymore help? Give us some feedback.

tgreer 189 Made Her Cry Team Colleague

I use: http://www.onestat.com/html/aboutus_pressbox31.html

to tell me what the most common browser/screen configurations are. Then I decide, based upon the site, what to do.

If I'm working on a company's intranet, then I am much less conservative. If the page/site has user interface features that benefit from a maximized browser on a 1024 x 768, and the company can require the users to use it that way, then that's what we do.

A site such as this, where most users are programmers and techies, who will tend toward newer hardware, etc, then go with the most common settings.

If it's a public high-traffic website, then I'll generally make the site work on the number 2 or 3 config in that list.

Notice for example, that 1024x768 is the most common. But not everyone has it, and not everyone browses maximised, so 800x600 is a good target.

To determine, on-the-fly, what a user has, JavaScript provides the "screen.width" property. That way, you can dynamically alter your site or load different CSS files, based upon a user's screen resolution.

tgreer 189 Made Her Cry Team Colleague

I have a cross-browser (FireFox and IE) sample of this code working at:

http://www.tgreer.com/daniweb/main.html

You do have to use a little JavaScript and a bit of misdirection. If this example does what you want, let me know and I'll provide an explanation of what is happening.

tgreer 189 Made Her Cry Team Colleague

Is the frameset one of your pages? In other words you have a layout like:

MAIN              FRAMESET
--------          --------
       |          |   f1 |
link --------->   |------|
       |          |   f2 | 
--------          --------

And you want f2 to be different based on a value you attach to the link/querystring?

If that's correct, let me know, and I'll show you how to do that.

tgreer 189 Made Her Cry Team Colleague

Look at an application I helped to write. It uses a DHTML web front-end, and PostScript back-end for print production.

The site allows customers to build their own business cards. I could see you doing some of the same techniques for web layout generation.

The site is Swiss: http://www.monopoly.ch

tgreer 189 Made Her Cry Team Colleague

I'm glad I could help. The logo looks great. As your artist probably told you, the web uses bitmaps for graphics. What Illustrator does, though, is to work with vectors until the last possible step. That way it can render the best bitmap. With PhotoShop, you're only working with bitmaps, so run into all the problems that "rus" described in his post.

tgreer 189 Made Her Cry Team Colleague

The only way I have known to work (12 years in the graphic arts industry) is to use true vector art, rather than bitmap. Instead of working in PhotoShop, for example, work in Illustrator.

tgreer 189 Made Her Cry Team Colleague

I invented the printing industry's first true eCommerce site, complete with dynamic, real-time PDF production. I wrote the first version single-handedly, before any PDF libraries existed, in CGI with a 2GL business language called PL/B. I had to work directly with the language vendor to get CGI to work.

The next version was also CGI, but I had a team: myself and two great freelance contractors who had previously worked for me.

The 3rd and current version is ASP, and is being used by the largest commercial printing company in the U.S.

I called it "COIN", but after it was finished they fired me and all of the other developers, turned it over to the marketing staff, and renamed it. It's still at http://www.cgxcoin.com.

Since then they have purchased several other off-the-shelf systems but still use the one I created.

It was extremely difficult because of, mainly, the interstate commerce and taxation laws. It was used by over 60 companies, in nearly every state. Any single order could be produced in multiple states, each with their own taxation rules, and shipped to a different state again, with ITS rules.

The most difficult part, though, wasn't the coding. It was working for a brutally awful company!

tgreer 189 Made Her Cry Team Colleague

Just my $0.02 worth to the conversation... I know this might sound arrogant, but I feel that providing quality content through good posts is my contribution to a forum. I don't mind ads, in fact, I vigorously support them, as long as they are professional and don't get in the way. The Google Ads are a good example of this. Plus, those ads are targeted to the content, so they actually might be for a product/service a user would want to buy.

So rather than make your regular users (who are your content providers) pay, make advertisers pay. I also have no shame in asking people to click ads, both on the forum and on my personal site. See my sig!!

tgreer 189 Made Her Cry Team Colleague

Of course, you CAN save your form values in cookies. Not all users have cookies, enabled, but that is exactly what cookies were designed to do.

Do you need help with JavaScript cookie code?

tgreer 189 Made Her Cry Team Colleague

No, not quite. The CSS specification allows you to set styles that come into play when the user Prints. So the site may display one way, but when you print, certain elements will be excluded, etc.

tgreer 189 Made Her Cry Team Colleague

I'm confused how one can set the page orientation of a website. One can simply stretch a browser window to any shape and size they want and if relative values are used for tables and such, the text will stretch along with the window.

Dani,

You can apply CSS style rules to create a custom-sized print box. What you cannot do is force the Print Dialog box to default to landscape. CSS and/or JavaScript cannot reach into the system resources.

tgreer 189 Made Her Cry Team Colleague

JavaScript is client-side code. Trying to save files locally violates the browser security model.

tgreer 189 Made Her Cry Team Colleague

The CSS Print Profile specification may help:

http://www.w3.org/TR/2004/CR-css-print-20040225/#section-properties

tgreer 189 Made Her Cry Team Colleague

JavaScript cannot read a text file. You need to use server side code, such as ASP.NET or PHP, to process a file and render it to HTML.

However, you can store large text strings as JavaScript variables, and use the JavaScript document.write() method to write HTML strings.

tgreer 189 Made Her Cry Team Colleague

What objects/methods are you using to perform a save?

tgreer 189 Made Her Cry Team Colleague

Start what?
Make WHAT find a number?
Find a number where? In what context?

tgreer 189 Made Her Cry Team Colleague

I would use a Regular Expression:

function isURL(x)
{ return   REFindNoCase("^(((https?:|ftp:|gopher:)\/\/))[-[:alnum:]\?%,\.\/&##!@:=\+~_]+[A-Za-z0-9\/]$",x) NEQ 0;
}
tgreer 189 Made Her Cry Team Colleague

Why is my title "Junior Techie"?

tgreer 189 Made Her Cry Team Colleague

Can you please provide more detail. I'll make some assumptions since you're posting in the ASP.NET forum.

1st assumption: you already have your security figured out. Perhaps you're using Forms Authentication?

2nd assumption: the login link is an ASP.NET LinkButton or Button server control.

If both of those are correct, then on the OnAuthenticate event, change the LinkButton.Text property.

tgreer 189 Made Her Cry Team Colleague

This code is Internet Explorer ONLY. The object/method is "createTextRange".

The JavaScript function might look like:

function setCursorPos( x ) {

    var txtRange = x.createTextRange();
    txtRange.moveStart( "character", x.value.length - 2 );
    txtRange.moveEnd( "character", 0 );
    txtRange.select();
}

And you call it:

<form >
    <input type="text" onfocus="setCursorPos(this);" />
</form>

What this will do is move the cursor to the END of the current value of the textbox.

tgreer 189 Made Her Cry Team Colleague

You asked specifically about dragging and dropping. This is possible with Internet Explorer and JavaScript. Note: these events and methods are part of the IE DOM, they are not server-side ASP.NET.

The relevant event handlers:

ondragstart

This is the "starting event" for dragging. It initiates the drag, and it's also where you provide a "value" to move to the drag target.

ondrag

Fires the entire time you're dragging.

ondragenter, ondragover, ondragleave
You can basically know 1) They entered the target, 2) they are hovering around on the target and 3) they left the target without dropping.

ondragend

When the user drops the object, regardless of whether it is dropped on the drop target or not. Fires on the dragged object.

ondrop

Fires when the object is dropped on the drop target. When this happens, the ondrop event fires before the ondragend event.

To transfer data, there are two methods:

setData() and getData()

You should be able to figure out the rest. When the dragging starts, you setData. When it drops, you getData.

Again, this is only for IE!

Thomas D. Greer
http://www.tgreer.com

My standard plug: if this post helped, please support the site by clicking ads. My personal site is also advertiser supported. Click Ads!

tgreer 189 Made Her Cry Team Colleague

Hello, just joined. I program in ASP.NET, C#, PHP, all the web stuff (JavaScript, CSS). I'm also an expert in PostScript, PDF and print related technologies. I do contract training, programming, and consulting in the U.S. and Europe.

Home page: http://www.tgreer.com

I'm expanding my site's articles, and joined to answer questions, and get a pulse for hot topics and issues.

My chief personal hobby is playing my Taylor 514ce acoustic guitar.