MattEvans 473 Veteran Poster Team Colleague Featured Poster

VI is by far the most productive editor out there once you get to know it for many purposes

Well. the resultant productivity of an editor has got to be a combination of its ease of use and its functionality... and unless I'm in the dark here, I know of no features in VI that make it any more than a text editor - please correct me if it does have mystical hidden features.
But even if it does; it is certainly not easy or friendly to use. I used it for a very short time and only to edit configuration files... then I pressed some key combination and it opens everything in write-lock mode =P
I'd rather use MSDOS edit, it's got a nice old-school color scheme and drop down menus ^_-

I agree with this but I don't use dreamweaver's FTP I just like a good simple one like Filezilla

Dreamweaver's FTP aint so nice... but it's certainly handy if you're doing something big, and your local directory structure exactly matches the one you want on your webserver. If I don't intend to use the FTP in Dreamweaver, I don't use Dreamweaver =P

I think, coloring in code keywords/tags is the biggest must. I can't easily interpret any language if it's all shown in black and white.

Everything you do in Dreamweaver though, has to be done by 'hand'. Until computer's know what we want them to do from our brainwave patterns and do …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

O_o maybe javascript doesn't do what you think it does... or maybe that's too incomplete a code snippet to see what your trying to do. forms.question[1] doesn't look like a DOM object reference.. and it wont neccessarily relate to any input element(s) on your HTML page...

what is the HTML code you are using?

MattEvans 473 Veteran Poster Team Colleague Featured Poster

you shouldn't access the response text until it is 'there',

what you should do is either wait for the request to reach the ready state 4 (best achieved by using an event listener), or set the request to syncronous, by setting the last argument in an 'open' method to false:

xmlHttp.open("GET", url, true);
<any code here will be executed as soon as the open method has been called 
xmlHttp.open("GET", url, false);
<any code here will be executed when the request is finished.

is there any reason you want to access the responseText before it has finished?

MattEvans 473 Veteran Poster Team Colleague Featured Poster

using proper tools like VI.

Is that a joke? There's certainly nothing to gain in using an outdated tool over a modern one...
VI annoys the flip out of me.

All I look for in an "editor" is a directory listing on the side, the ability to open more than one file at a time, a built in FTP/CVS client, and maybe autocoloring/autoindent of code.

Dreamweaver has these things, so Dreamweaver is good as a glorified Notepad with extras.

Whatever Dreamweaver does 'automatically'; it doesn't do it because you want or need it to, it does it because someone decided to put that feature in Dreamweaver, and so anything Dreamweaver can 'provide' you, has been 'provided' to the thousands+ of people who also use Dreamweaver.

If you want something even half original, use "Code View" all the time, and unless you want a tonne of extra work, don't even go into "Design View" :- it doesn't give a good representation of how a page will actually look in a browser.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

but, that aside... A div is basically a block of something. It's rectangular, and is comparable with a paragraph. Indeed, if you don't style a div, you might mistake it for a paragraph:

<div>sentance</div>
<div>sentance</div>
looks remarkably similar to..
<p>sentance</p>
<p>sentance</p>

Unlike a paragraph, a div has been designed to be separable from its surrounding markup, by that, I mean it can be moved around. Either laterally, and remaining relative to its siblings (floating) or arbitrarily (positioning). Setting a div to float left: <div style="float:left">la</div> will cause it to behave much like a span element. A span element is an inline element, (that is it doesn't break the layout of text it is a part of. Other inline elements include Bold, talic, and nderline tags, or [A]nchors.)

Floating a div to the left will cause other divs (or text, or anything) logically "after" it in your HTML to be displayed to its right. Floating a div to the right <div style="float:right">la</div> will cause anything logically after it in your HTML to be displayed to its left:

<div style="float:right;"> a complete sentance</div>
<div style="float:right;">This will become</div>

A div that is not floated to the right will appear in exactly the same place as if the floating elements didn't exist. In this case, it will cause the second floating element to 'clear' the first; but only because both floating elements are the same height.

<div style="float:right;"> a complete sentance</div>
<div>breakdown</div>
<div style="float:right;">This will become</div>

To 'esacape' from a …

roryt commented: Very useful and a great post +3
MattEvans 473 Veteran Poster Team Colleague Featured Poster

However div tags etc. with CSS were made especially for web page layouts

Apparently so... But they don't do some things that tables do... importantly they don't really have a logical relationship to their hierachal siblings, (and sometimes even their parents/children).

Tables are better for certain elements of layouts; and there's certainly no harm in making tabular data attractive... Table's often aren't the most suitable thing for an entire page's layout... But if they are; it's not really a question of what something was or wasn't designed for, it's a question of how well it does what.

Table's have probably been around since before CSS existed.. they have something of a time-honed reliability that DIV's haven't yet acquired.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Quantra is a very nice editor... it has its own micro-FTP client kind of like Dreamweaver's... and it colours in all kinds of code...

If I'm on Windows I use EditPlus2... simple and effective.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

you'll want to use a form, and some inputs:

http://www.w3.org/TR/html4/interact/forms.html
http://www.cs.tut.fi/~jkorpela/forms/cgic.html

as for a space in text, i'm guessing you don't mean a line break because you're using them (<br/>)... If you put alot of spaces, HTML converts them into one space, so use an entity: &nbsp; for a non breakingspace and &emsp; for a normal space.... or &thinsp; for a thin space...

I usually use &nbsp;... eg:

[B]This[/B]&nbsp;&nbsp;&nbsp;&nbsp;[B]text[/B]&nbsp;&nbsp;&nbsp;[B]will[/B]&nbsp;&nbsp;&nbsp;[B]have[/B]&nbsp;&nbsp;&nbsp;[B]big[/B]&nbsp;&nbsp;&nbsp;[B]spaces[/B]
MattEvans 473 Veteran Poster Team Colleague Featured Poster

this page would seem to say yes:

http://www.w3.org/TR/css3-hyperlinks/

bear in mind, most browsers have only got css2; and that specification seems to relate to css3.

you can do it with javascript if your stuck..

MattEvans 473 Veteran Poster Team Colleague Featured Poster

prefererably between some script tags in your markup somewhere, or in a linked javascript file... even better, you could put it in a handy library of JavaScript functions for graphing things.... but only if you have NOTHING better to do.

As vishesh said; you should probably learn the basics of JavaScript and the HTML DOM.... W3C sites are helpful to begin with:

http://www.w3schools.com/htmldom/default.asp
http://www.w3schools.com/js/default.asp
http://www.w3schools.com/js/js_obj_htmldom.asp

read through those tutorials in order (for each one, keep clicking the 'next' button until you think you know it, or you hit the end).

occasionally, when a tutorial says "try it yourself", give it a try (you can do it on the site).

once you know what that bit of script does (which you will) you will know how to use it, and hopefully where to put it...

MattEvans 473 Veteran Poster Team Colleague Featured Poster

that doesn't look like good HTML...elements like "html" and "head" need to contain some data.... you're missing a body (which isn't neccessarily 'wrong', but it's good practice to have one).. and this indicates an illegal construct somewhere :

</TABLE>

</TABLE>

it's never possible to close one table and then another straight away... there's gotta be a cell and a row and preferably a tbody element between a table and any kind of content.

for "showing a percent" (using Javascript):

function setLengthPercent(ident,percent){
  document.getElementById(ident).style.width=percent+"%";
}

that will give you some funky variable-length bars... if you put them in a fixed width element, and float them to the left or to the right; they will be even funky-er.

for a default radio selection...

first of all, give each radio a meaningful value: <input name="radiobutton" type="radio" value="radiobutton"> for all of them isn't going to mean much to you when you want to use the data. it's correct to give them all the same name, but give them each a relevant value.

and then, to set a default:

<input name="radiobutton" type="radio" value="something_relevant" checked="yes">
MattEvans 473 Veteran Poster Team Colleague Featured Poster

descriptive urls are beneficial for more than just SEO... it's quite common to use PHP or otherwise to serve up pages by an ID... personally, I don't like that.

methinks a good folder hierachy is something to aim for... if each folder has a short, meaningful name, it means you can give someone an URL to a page deep in your hierachy that describes itself.

A bit of subdomain-ing and request-level URL rewriting doesn't go too badly either... as long as you do it consistantly...

My site has a number of forums, each one's on it's own subdomain, each group is a folder, each board is a folder of each group, each topic is a folder of each board, (and in actual fact each reply is a folder in each topic, but that's never seen)... that kind of organisation is necessary for my processing system; and each folder is named automatically... so for example:

http://www.home.(not-telling).net/help/tos/advertising/

means "in the home forum, in the tos (terms of service) board of the help group... is a topic about advertising."

medon't think that's too much information in an URL, and medont think URLs are that important to search engines... the word "Google" didn't mean anything, (especially not anything about search engines); until someone put it in the oxford dictionary.... But nonetheless, Google comes in at number 2 (of unpaid links) in a Google search for "search engine"...

Amusingly, number 1 is MSN search :lol:

MattEvans 473 Veteran Poster Team Colleague Featured Poster

For my personal site, I use Unleashed:Revised. I have a reseller account, so I suppose I'm a hosting provider =P. I gotta say, Unleashed:Revised are good. Very well priced, very good customer service, very good features, and no sense of "host control"...

Which leads me to.. FastHosts. Which is where we host alot of sites at work... I've gotta say Fasthosts is the biggest pile of **** I've ever encounterd.

Here's a run-down of problems (we use their Windows/IIS packages, I don't know about their Unix packages).
- They advertise support for PHP, Perl, and compiled CGI...
- Perl doesn't work well because they run CGI scripts on a different server, and that means a Perl script can't access its immediate filesystem: it's stuck on an unrelated server >_<. That is a windows problem, but they don't provide any workarounds.
- Compiled CGI (C++) doesn't seem to work atall, and would probably hit the same locality problems as Perl scripts.
- They outright refuse to add extensions to PHP apparently because of "security". That includes extensions produced BY PHP. PHP would have been a viable alternative for accessing the local filesystem, because it runs in a slightly different way to Perl and C++. As it is, any things we need that are already implemented in optional PHP extensions need to be coded manually.
- The CGI server goes down often, and for extended periods of time (greater than 10 mins)
- We …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

If you code with the intention of splitting functions accross servers, you won't find it as difficult to split a site... Spreading things out adds a security risk unless you're carefull, but somethings don't matter so much...

Images on a separate server seems quite nice, maybe even cacheable pages on another server could work... Personally I'd try to keep script and database on the same server. Otherwise, you might lose any speed benefit you could gain because one server has to "call" the other to get hold of information...

If you own your equipment, you can run "script elements" as services to minimize the time a single request cycle takes... If you don't own your own equipment, you can usually solve alot of speed and load problems by optimizing code and caching...

If space is your biggest issue; buy more. If memory is your biggest issue; buy more. If speed is your biggest issue; upgrade. If your site is really huge, you could get a dedicated custom system: lots of highspec computers, all on a local network, and all servers.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

I find if i'm using Dreamweaver it's just to add colors to my code =P, and same with any editor to be honest. I don't even like functions that auto-close tags or auto "fix" my markup... generally they don't have a clue what I'm trying to do and cause more trouble than they're worth...

Dreamweavers generated code is substantially better than MS Word's.. but it's still somewhat inefficient, and if you don't know what your code is because you've laid down a page using WYSIWYG tools, you wont have a clue how to fix that code if a problem arrises.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

eeek >_< i hate those buttons!

if you've just spent umpteen minutes finding information and filling out a form; would you EVER want to reset it rather than submit it?

how about this one?

<input type="reset" value="Submit!">

EDIT: :lol:

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Thank you very much!!! You gave me a solution that envolves javascript that is interesting...
ho!, and sorry about my english...

mine is a javascript solution aswell, but it's all squashed into one parameter line. you could expand it to:

<script type="text/javascript">
function checkclear(what){
if(!what._haschanged){
  what.value=''
};
what._haschanged=true;
}
</code>

<input type="text" value="Click here to clear text" onfocus="checkclear(this)"/>

and then use "checkclear(this)" as the onfocus property for all text inputs that you want to have the same behaviour.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

well, i can't see them because I don't have windows media player. perhaps you'd get more "playability" in general if you use (admitadly, somewhat larger) mpeg files.

EDIT: I tell a lie, I am watching the panda video right now; but only by downloading it first. The link seems to be valid, but try this out: http://cit.ucsf.edu/embedmedia/step1.php for generating embed code for WMV files... You usually embed the actual Windows Media Player object and give it a file to view... The <EMBED> tag is quite old and has been replaced in modern HTML with the <OBJECT> tag.

otherwise, they should work if the user has WMP and the browser plugin installed, and if there is a WMV file in the location your markup indicates it to be in.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

that code is actually not too bad, i had a quick look at it yesterday... it's more secure than just "put a javascript index infront of private files" it works because no outsider knows the filename of the private file: and the encrypted password is used in the name of the private file... EDIT: the password isn't stored but a password that doesn't match up with the filename after a relatively simple 1-way cryptogram won't open any pages.

it might prove totally unmanageable for more than one or two pages though, and it's not a perfectly secure solution.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

onClick will work on most elements, onfocus is more appropriate for a text input, as tabbing to a field also counts as focus...

try:

<input type="text" value="Click here to clear text" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;"/>

it will only clear the text once.. i assume you want to actually put something in the text afterwards,,

MattEvans 473 Veteran Poster Team Colleague Featured Poster

hmm.. it should in theory be easier in a one-file-per-message system: there's one less parse operation to perform, and that's replaced with reading in all the files in a given directory...

http://www.qmail.org/man/man5/maildir.html
http://www.qmail.org/man/man5/envelopes.html
http://www.qmail.org/man/man5/qmail-log.html

reading the qmail-log manual leads me to believe it's very volatile o_O, but it may provide a notification of a bounced message without waiting for a notification email from your mailserver.

if you have a specified email address (or inbox) to forward, at delivery-level, all failed notifcations from your mail server to (they definately have common subject lines), it will make the job of working out what data is important easier.

there is a PHP POP module, someone has written a wrapper for it aswell:

http://www.phpclasses.org/browse/package/2.html

but... if your message folder is local to your script, that does seem like uneccessary overhead.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

ftp://www.dc-pc.org/dc-pc.org isn't neccessarily the same as http://www.dc-pc.org/dc-pc.org ... on my server, my FTP access to my document root directory is ftp://fusiongroupuk.com/public_html/ and my domain http://www.fusiongroupuk.com/ goes into that directory. That's configured in some file somewhere on my host's server. If I was to put files in a different folder on my home directory, I wouldn't be able to see them in a browser =P

Are you saying, if you put a file called index.html in that ftp://www.dc-pc.org/dc-pc.org folder, that you cannot access it from http://www.dc-pc.org/index.html? If that is the case, then there is something strange going on...

If you put a subdirectory into your document root (Whatever that may be called), then it is accessed as a subdirectory of the domain. For example, i have a folder called /home/fusion/public_html/testbed/... I access that from a browser as http://www.fusiongroupuk.com/testbed... After the document root part, the directory structure is pretty "normal"

You could print out a path statement with some PHP or Perl... Or even some SSI-HTML... ^_-

So to recap, this is a conventional shared server setup on unix, the actual setup may differ vastly, for the most part, the only important bit is your home directory and beyond.. on a windows server, it'll be similar, but with C:\ instead of \ (server root), and maybe Documents and Settings instead of home... as long as the server sticks with a convention, you're oK:

MattEvans 473 Veteran Poster Team Colleague Featured Poster

well, here's a solution... it uses a Timer, so it's not optimal... but it should work on all browsers...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
<style type="text/css">
* { margin: 0; padding: 0;}
</style>
<script type="text/javascript">
function lock_iFrame(named){
  var thisTimer = setTimeout("resize_iFrame('"+named+"')", 1000);
  return thisTimer;
}
function resize_iFrame(named){
  siFrameID = named;
  var targetFrame = document.getElementById(siFrameID);
  targetFrame.height = getHeight() - targetFrame.offsetTop;
}
/*This code is adapted from code in the example at http://www.howtocreate.co.uk/tutorials/javascript/browserwindow. Check it out, it's quite informative*/
function getHeight() {
  var myHeight = 0;
  if(typeof(window.innerHeight)=='number'){
    //Non-IE
    myHeight = window.innerHeight;
  }else if(document.documentElement && document.documentElement.clientHeight){
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  }else if(document.body && document.body.clientHeight){
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  return myHeight;
}

</script>
</head>
<body onLoad="lock_iFrame('Original');">
<h1>Careers</h1>
<IFRAME name=Original id=Original frameborder=0 style="width:100%;" 
src='http://www.recruitingcenter.net/clients/sybron/publicjobs/' >
</IFRAME>
</body>
</html>

EDIT: This code isn't really network-dependant; so it should work in a local file. I've tested it in a local file on Opera and Firefox 2.. I don't have IE on this computer so I can't test it there...

MattEvans 473 Veteran Poster Team Colleague Featured Poster

unless you provide at least a sniff more information, even some conjecture will be a waste of time.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

you can't really "stop" people taking content that you put out on the web, at least not by software... even if you use javascript to protect your images, there's nothing to stop a theif disabling javascript, or connecting to your site using a filesystem client rather than a browser.

disabling save as.. is impossible aswell for the same reasons... and because even if you DID disable save as, most browsers will automaically save content temporarily regardless of cache rules..

about the best thing you could do would be to generate your page entirely from javascript... that way there will be no physical document to save. but.. if your worried about pagerank, i doubt that's going to be much help to you in the long run...

the best thing to do is probably build up a list of who "steals" your content regularly and go through the intellectual property courts..

MattEvans 473 Veteran Poster Team Colleague Featured Poster

erm... that script seems to work based on a naming convention.. it's searching for iframes thta have IDs like "iFrame_[name]", where [name] is a value in an array called sTitleArray...

if you only have one iframe change the javascript code to:

function resize_iFrames(){
for (var i=0; i<sTitleArray.length; i++){
siFrameID = "Your iframe id"
// DOM (used to set height of iFrame on this page)
var oDOMiFrame = document.getElementById(siFrameID); 


//DHTML (used to get DIV inside of iFrame)
var oDHTMLiFrame = document.frames[siFrameID];
var oDHTMLiFrameDocument = oDHTMLiFrame.document

var oDOMiFrameDocument = oDOMiFrame.document
// wait til document's data is completely loaded then resize iFrame surrounding it
while (oDHTMLiFrameDocument.readyState != "complete" ) {} 
var oDIVwholePage = oDHTMLiFrameDocument.all['DIVwholePage']; // dhtml object model
// You can NOT get oDIVwholePage using DOM. That is, you can't get it using oDOMiFrameDocument.getElementById('DIVwholePage').
// MUST use DHTML model to GET the DIV inside the document inside the iFrame::: oDHTMLiFrame.window.document.all['DIVwholePage']
// MUST use DOM model to set the height of the iFrame!!! DHTML does not let me set height
oDOMiFrame.height = oDIVwholePage.offsetHeight+20;

}
}

(remove the greyed out parts, change the ID to the ID of your frame.

That code also seems to resize the iFrame relative to its contents... you may want to change the section in blue to:

oDOMiFrame.height = document.height;
[B]OR..[/B]
oDOMiFrame.height = window.height;

you may want to check out the table halfway down this page to find out which "height" you want...
http://www.quirksmode.org/js/doctypes.html

MattEvans 473 Veteran Poster Team Colleague Featured Poster

well... it depends on your mailbox format... on my server, an "inbox" is stored in a single file (every new message is appended to the end of that file). and each of my "official" inboxes has its own file... to make head and/or tail of that, i'd have to read the file, split out each individual message, and parse the headers... if your mailbox is different, the format of stored messages may be different.

if your mailbox is "offshore", i.e. not on the server where you want to perform the check, you'll need to make a POP3 or similar connection to ge hold of the mail.. I know Perl offers handy modules for that purpose, for PHP... the same probably applies.

here's an insightful snippet from my "root" inbox file (/home/fusion/mail/inbox)

From MAILER-DAEMON Fri Dec  1 15:37:46 2006
Date: 01 Dec 2006 15:37:46 +0000
From: Mail System Internal Data <MAILER-DAEMON@{hidden}>
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
Message-ID: <1164987489@{hidden}>
X-IMAP: 1156397484 0000000411
Status: RO

This text is part of the internal format of your mail folder, and is not
a real message.  It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.

From {hidden} Mon Dec 04 23:26:52 2006
Return-path: <{hidden}>
Envelope-to: {hidden}
Delivery-date: Mon, 04 Dec 2006 23:26:52 +0000
Received: from [201.78.244.18] (helo=gabriel)
	by {hidden} with esmtp (Exim 4.52)
	id 1GrNDN-0000hq-0m
	for {hidden}; Mon, 04 Dec …
MattEvans 473 Veteran Poster Team Colleague Featured Poster

have you checked the IE7 security settings? I'm assuming "SESSION" is represented by cookies... IE7 has some pretty funky cookie rules...

MattEvans 473 Veteran Poster Team Colleague Featured Poster

are you using the server as a "real" server or as a localhost testing server? with a localhost server, just peek into your httpd.conf file, and set the "Listen" value to something else on 127.0.0.1... (and then restart apache)

I was installing apache, and ended up with 3 instances of the server running.. So, I set the first to "Listen 127.0.0.1:80", the second to "Listen 127.0.0.1:81" and the third to "Listen 127.0.0.1:82"...

obviously, to access each server, i had to use http://localhost:81 http://localhost:82 for the ones that weren't on port 80....

only reason I had that going is because I couldn't be bothered to restart my box... in general when I run apache I try and get it on 127.0.0.1:80....

did you run an apache instance and couldn't stop it?

do you run a firewall? if you do, you may need to allow apache to listen to a port.

do you run *nix? if you do, you need to be a superuser to start apache,,

EDT: oooh yeah.. the actual error would be helpful ^_-

MattEvans 473 Veteran Poster Team Colleague Featured Poster

1 hour! never in my admitadly short life have I encountered a website that spent an hour loading an object (dynamically created or otherwise)... are you sure that a request->1 hour wait->response system is the correct idea? if the PDF contains time-related data, perhaps it would be better to click a button to start the process, and come back later to download it?

methinks a single HTTP request would timeout if the response took an hour... O_o

MattEvans 473 Veteran Poster Team Colleague Featured Poster

100% height doesn't really mean anything in standards compatible mode... (XHTML Transitional is one of those modes).. It means 100% of the parent object height... So if the parent object ( a body element) has no height (the height of a body element is usually the height of its contents), then the height of the iframe will be the default iframe height, which then occupies 100% of the body element's height... you could try setting the body height to 100% (i.e. <body style="height:100%;">).. I've heard that can work in some cases, but it seems a bit nonsensical...

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Hmm.. Conventionally, your document root folder (i.e. the folder that is addressed by the domain http://www.dc-pc.org) is one level underneath the folder that you have ftp access to. Usually that folder is called something like "public_html" or "htdocs"... The folder above that gives you an extra space to store things that can't (and in some cases shouldn't) be accessed directly using the HTTP protocol.

That means, on a page in your document root folder, ../ can't go anywhere...

Domain is not equal to folder... the domain ends up directed to a folder on your server, typically a few levels deep. On a unix server your actual "folder" will be something like: /home/dc-pc.org/.. but that only means anything on that server.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

An irrelevant example
Look at this forum. It has lots of pages, and they're all dynamic. look at a single post. for a few hours you're allowed to edit your post. I won't claim to know exactly what's going on behind the scenes; but: the scripting language used here is PHP. I imagine that an SQL or similar database is used to store data. The data in the database is split into tables, rows, and cells. Lets assume this topic occupies a table, each post occupies a row, and a row contains, a message column, a date column and a userid column.

When i make a post, a PHP script reads in my post, derives my userid and the date, connects to the database, and writes a row (if i made a reply) or a table (if i made a topic). then, it rebuilds the HTML page for this topic (post285696.html). A rebuild involves acquiring all neccessary values from the database, and saving them in an HTML page along with HTML code. The headers, footers, sidebars, adverts etc are added in that stage (the forum index are also rebuilt at this point). As a user, I don't see that happening, I just see a new topic on a page, and a link in the forum, and I'm happy.

So, why not just write a HTML page? why bother writing to a database atall?
If the only record of my topic is an HTML file, the …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

well. you'll also need a way of maintaining "state", that is, keeping track of what a person has been doing and usually whether they are allowed to do something else.

one of the more standard ways of knowing who a user is involves setting a cookie for that user:

- providing the user with a log in form.
- in a script; checking the users name and password (for one user thats easy), then writing a random value in a cookie to the user, that represents a "session".
- every time the user tries to do something, check if that random value in their cookie is the correct one. the more frequently you change the value, the more secure the site is.

a "secret form" is just asking for trouble =P... the amount of hackers out there looking for vulnerabilities in sites is thankfully quite tiny.. but they are there, apparently.

there are other ways of authentication; in fact ASP provides a whole set of tools for doing it (mostly cookie based). I don't write ASP so I can't really help you with specifics...

the simplest authentication is asking the owner to provide their password EVERY TIME they try to make a change. if changes are rare, this isn't too much of a problem.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

As far as the cookies go, that wouldn't work, because cookies are sent to the user from the server (with the understanding that the end user is not supposed to be able to modify the contents of them).

You can set cookies anytime using JavaScript. you can even set a cookie and read the value straight back...

But you can't (shouldn't) use JavaScript and can't (just can't) use cookies to update huge sections of pages. Usually the complexity of what you're trying to make dynamic will influence your decision... For products a database is probably a good idea... that or XML and some XSLT... >_>.. damn, I've gotta stop advocating XSLT... feels like I do it at least twice a week.

Try and classify every aspect of the products in question, then figure out the best way of representing those objects.. then figure out whether to generate pages when they are requested or generate pages when things change... most "dynamic" sites do a bit of both.

This is all very conceptual airy speek: you'll need a working knowledge of at least one server side programming language or methodology... if you have used ASP you'll no doubt find it easier to stick with that.

A few general tips:

- The way to get data from users is via forms (ignoring Javascript methods)
- You have to collect form data in a script
- Things only exist if you create them
- You should …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

oooh.. 2003. i've only ever used VB6.

in VB6 there are lots of mouse events (mousemove,mouseup,mousedown,click). usually i use the mousemove event for "drawing" > set a flag "drawing" to true, and while "drawing" is true, draw a line between where the mouse was and where the mouse is; so, similar to QVeen72's idea :- but I'd draw directly to the surface rather than place a line object. check out the lineto() and moveto() API functions..

http://edais.mvps.org/Tutorials/Graphics/GFXch7.html

there may be native "line() or drawLine()" function in a picturebox control (or maybe on a device context if VB2003 has that concept yet).

MattEvans 473 Veteran Poster Team Colleague Featured Poster

but it is highly unlikely they can program computers.

I wouldn't be so sure! There's a device in development that can interface with a human brain (motor control area), and someone whos paralysed (or just interested in the idea) can move a mouse around and select things. With a bit of work on the resolution of the device; i suppose you could map a full keyboard ^_- Just a brain controlled mouse would be convenient.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

which event do you use to draw? and does your PictureBox use AutoRedraw or do you manually refresh it? and which version of VB are you using?

MattEvans 473 Veteran Poster Team Colleague Featured Poster

well. that's definately JavaScript; and the reason it doesn't work well in all browsers is because all browsers have a different idea of what the relationship between windows, frames and documents is. Often, it's just a case of a different object containing the information...

This is code that works for me, (well; I've never had a problem with it on any browser; that's not to say it's going to work on every browser):

function center(object){
	object.style.top = (getVScroll() + (getHeight()/2))-(object.offsetHeight/2);
}

Looking at it, I'm quite suprised it's never had a problem; but anyway: the way I use that code is to position an absolutely positioned object one time only... To make an object scroll as the scrollbar does, you could use some interpolator math based on the distance between the center of the scrolled window and the center of the object at any time (which is what they do on the vue site to make the bar "gracefully" slide up and down), or you could have the image "snap" into the center always (like this: http://www.siteexperts.com/tips/functions/ts08/page3.asp).

However, you need to make the thing move as the user moves. For that, you need either an event listener or an event invoker. An event listener is the nicest way; they are feedback interfaces that are activated as a response to user or system events, Event invokers are the opposite - at it's roughest, an event invoker just repeatadly sets values in an object (usually using a …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

that should definately work in IE 6+... what's the problem exactly? is the page in your link the updated one? if it is i can report it's not working in Opera either...

are you sure the cell has vertical align set to bottom? different browsers have a different idea of how to divide up "unclaimed space" in tables, especially when you use abnormal tables (i.e. tables with cells that span across rows)... however, if you use vertical-align:bottom; that shouldn't be an issue o_O

MattEvans 473 Veteran Poster Team Colleague Featured Poster

I don't like HTML as it stands because it's so... static.

I never really got into HTML because of that aspect alone. I like things to be very flexible, and very abstract.

I like to establish a set of rules, and have things obey those rules. I like website pages to grow themselves; from little seeds of information.

I really got into writing HTML when I found out about XSLT ^_-

And now I build pages from data using a Perl-interpretted markup language I wrote meself.

If you're likely to have to do lots of things that look the same, but contain different data; learn XSLT.

If you want pages to look the same and change over time (based on input from over the web), learn PHP. And hey, learn XSLT aswell: there's a PHP XSLT module* ^_-

The best way to learn is to start doing something that you have only a faint idea of how to do... The harder it is, the more you'll learn.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

put the "image" in another table row, at the same cell (column) position of the navigation bar. set the vertical-align of that cell to "bottom" either by CSS or an inline style (i.e. "vertical-align:bottom;"). Adjust colspan and rowspan in other cells accordingly.

Alternatevely; set the image style to "position:absolute;bottom:0px;", and it should always stick to the bottom of the document.... You'd probably then want to replace the image with a placeholder <div> element, at the same height of the picture, or the image will cover up the bottom of your navigation bar when the content on the page isn't vertically lengthly.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

there are specific "hacks" and general hack methods, but needing to hack is often a sign of a deeper underlying issue.

do you use a doctype? (some) problems with CSS can be solved by using an up-to-date document type specification... if something looks ok in Firefox, Opera and the like, but not in IE, sometimes it's a doctype issue, sometimes its an IE issue, sometimes it's a developer choice issue.

can't really help you more than that.

oh, that and some links:
http://www.noscope.com/journal/2005/01/showing-css-to-ie-only-the-underscore-hack
http://alistapart.com/stories/doctype/
http://www.htmlhelp.com/tools/validator/doctype.html
http://www.quirksmode.org/css/condcom.html

MattEvans 473 Veteran Poster Team Colleague Featured Poster

create a public/global variable called "stopped", set it to false when you start the loop.

inside the loop put:

if(stopped){
  break;
}

then when you press "cancel" set the stopped variable to true.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

or PHP ^_- or SSI(ServerSideIncludes/SHTML).

if it's just a static header, I'd probably use SSI

MattEvans 473 Veteran Poster Team Colleague Featured Poster

it should only show up if you access an image file by a direct URL to the image itself: http://yourdomain.tld/image.png , you get a funny lil square with some arrows and a "thing" in the opposite corner aswell.

that's MSIE's standard way of dealing with image-type responses. Would you rather it attempted to download the image instead? =P

...So... to get rid of it... make loads of HTML pages with just <img> tags ^_-

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Ahh... solved it... Seems on my server I have to put everything in the eval block, pull the resultant object out of the eval block, AND explicitly define just where the eval is...

Something like this:

sub loadup{
	my($fuser,$objectname) = @_;
	my($fullname) = "qsi_$objectname";

	my($lib) = "use lib '/home/fusion/public_html/fuse-cgi/';";
	my($get) = "use Fuse::Handlers::Quasi::$fullname;";
	my($ret) = "return (Fuse::Handlers::Quasi::$fullname->new())";

	my($local_object) = eval($lib.$get.$ret);

	$local_object->{my_owner} = $fuser;
	die($@) if $@;
	$local_object->unpack();
}
MattEvans 473 Veteran Poster Team Colleague Featured Poster

is it possible, to use, or otherwise import and access the class in a .pm file by a suggested name (this would be after compilation)...

here's the lowdown, I've been working on a project for a while now, it is an XML processor. One of the parts of a process may involve reading a process definition file, these files rarely change. The time to parse out that type of file is only neccessary while the file is in a development stage; that is, once the process instructions are decided, the same file could be represented as a series of instructions in Perl.

So, I've made those files optionally compilable, (I should note, this project is online, so I compile the files online aswell). Compilation involves reading an XML nodetree and turning it into a series of statements to build a Perl object structure.. And that object can then be "imported" into another XML file, in place of a statement to parse and process the original process instruction XML file.

Anyway, all is good, except for one thing, I can't seem to get a "use" block to work in an eval statement when I'm testing this online. On my PC, that seems to work fine.... o_O.

Is there any other way to do this, without importing all of the files in my "compiled objects" folder everytime I run a process (all processes go through the same controller)... If you can interpret what I'm doing at the moment, …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Appear on Beauty and the Geek, and lose...

ha, that's gotta top it.

although, surely it's more geeky to win? ;)

MattEvans 473 Veteran Poster Team Colleague Featured Poster

well, providing a depth is more complex than always importing the same piece of page and expecting it to link relatively (and correctly).

you could even work out the depth automatically from the environment vars.

either way; you may run into a problem if the site has subdomains. ^_-