tgreer 189 Made Her Cry Team Colleague

I suppose you could create a file named "folder" that did some sort of re-direct. Or create a virtual mapping in your server configuration. But why? You're seeing perfectly normal behavior. In any case, you should ask in the "Server Configuration" forum, as JavaScript programming cannot help you with this.

tgreer 189 Made Her Cry Team Colleague

I'm not sure I understand the problem. If you use the URL:

www.mydomain.com/folder

Then you're requesting a file named "folder" in the root folder of that domain. When you use the URL:

www.mydomain.com/folder/

Then you're asking for the index file, which can be various files depending on server configuration, but is usually "index.html", from the "folder" sub-folder of that domain.

This is normal, accurate behavior and doesn't indicate any error.

tgreer 189 Made Her Cry Team Colleague

Probably due to having elements, JavaScript functions, etc. all with the same name. That's just a guess.

tgreer 189 Made Her Cry Team Colleague

The current slew of animated ADs cause performance issues. I notice my system fan starts running faster and louder if I stay on a page with say, sharks with bullseyes on them.

And for a site wanting to have a more professional appearance, I question the wisdom of featuring dancing cartoon alligators.

tgreer 189 Made Her Cry Team Colleague

You can't, I don't believe, use ASP to perform file IO on an external JS file. You can use ASP to author an inline script, however.

tgreer 189 Made Her Cry Team Colleague

No, not a mapped drive by drive letter, only by UNC path. And the drive permissions will have to be assigned to the Administrator, rather than to "some user of the domain". At least, that was my experience.

tgreer 189 Made Her Cry Team Colleague

Absolutely not. If you want to learn HTML, CSS, and JavaScript, I will gladly help. We'll use the forum to do so. If you want to copy scripts, not understand them, and have people email you the "fixes", you're in the wrong spot!

tgreer 189 Made Her Cry Team Colleague

The grid is in a frame, so it can't fill up "the entire page". It will be framed. The parent page has no doctype. The frame page has an incomplete doctype. You can't resolve CSS and cross-browser issues until you first specify a proper and complete doctype.

tgreer 189 Made Her Cry Team Colleague

Research the "target" attribute of hyperlinks.

tgreer 189 Made Her Cry Team Colleague

Do a web-search on "favicon".

tgreer 189 Made Her Cry Team Colleague

It can't be done with HTML, CSS or JavaScript, the topics covered in this forum. What akadez is referring to are some possible techniques in ASP.NET, a server-side language. Daniweb has an ASP.NET forum, if you code in that language.

tgreer 189 Made Her Cry Team Colleague

Hello, welcome to the forum. Please do us all the favor of using complete sentences with proper spelling and punctuation. "Abbreviated" speech is strongly discouraged.

An "id selector" will apply to a specific element, the element with that id. They start with a "#" sign.

So in this style declaration, the second paragraph would apply the style.

<html>
<head>
  <title>ID selector</title>
  <style type="text/css">
    #myStyle { letter-spacing: 0.3em }
  </style>
</head>
<body>
   <p id="noStyle">Normal width</p>
   <p id="myStyle">Wide text</p>
</body>
</html>

A class selector on the other hand, is generic, and can be applied to multiple elements of differing types. Class declaractions begin with a ".", and are applied using an element's "class" attribute:

<html>
<head>
  <title>ID selector</title>
  <style type="text/css">
    #myStyle { letter-spacing: 0.3em };
    .greenStyle { color: green };
  </style>
</head>
<body>
   <h1 class="greenStyle">Everything is Green</h1>
   <p id="noStyle" class="greenStyle">Normal width</p>
   <p id="myStyle" class="greenStyle">Wide text</p>
</body>
</html>

Note that ID selectors are more specific in the cascading hierarchy. Thus if the "myStyle" declaration also specified a color, the "myStyle" paragraph would be that color rather than green.

tgreer 189 Made Her Cry Team Colleague

Hi. I moved this to the "server configuration" forum, since I think you'll get better responses there.

tgreer 189 Made Her Cry Team Colleague

You're welcome. Thanks for the nice follow-up post.

tgreer 189 Made Her Cry Team Colleague

Try this link: http://www.onestat.com/html/aboutus_pressbox31.html , they track resolutions. Even though 1024x768 is the most common, my own rule-of-thumb is to code for the next down on the list (800x600), just to make the site workable for the largest number of people.

tgreer 189 Made Her Cry Team Colleague

I imagine it wasn't a coincidence. We'll have to see what he says, but I imagine he followed a link from my site to daniweb, and posted the question knowing I was here. Wishful thinking on his part, perhaps, because I'm not much interested in taking that little example and fleshing it out to a complete, dynamic program.

You're welcome to take a crack at it, though.

tgreer 189 Made Her Cry Team Colleague

Yes, the Java forum. JavaScript is client-side. It will only run in a client browser. In other words, you can't make YOUR JavaScript run in someone else's page.

tgreer 189 Made Her Cry Team Colleague

T. Greer happens to be a member of Daniweb. In fact he moderates this forum. In actual fact, he's me. I haven't looked at that example in quite awhile. I removed your attachment because I have it on good authority the author doesn't wish the code distributed.

However, please reply with your own code listing of the mods you've made. I'm not entirely clear what you're wanting to do. Modifying the code to support any/all select/text input combos on the page would be quite a task, one I'm not willing to do for free!

IE has a bug with z-index and SELECT controls, so you'll never "make it work" until they fix it.

tgreer 189 Made Her Cry Team Colleague

Jake,

That depends really on what language you're using. You mention both Java and JavaScript. They aren't interchangeable, and are indeed very different languages.

Plus, I'm not clear on your question. No language will let you "access" a password protected page. What exactly are you trying to do, and with which programming language?

tgreer 189 Made Her Cry Team Colleague

You'll have to navigate the hierarchy. For example, use the document.images collection.

I made the decision long ago that I simply wasn't going to worry myself, or add huge development overhead, to supporting old browers, particularly for corporate development projects and/or sites. Use a strict DOCTYPE, code to that standard, cut down on the fancy stuff, and use server-side code as much as possible.

tgreer 189 Made Her Cry Team Colleague

JavaScript cannot do that. It has no way to read/write info to the server, since it's a client-side language. You'll need a server-side program to implement a "hit counter".

tgreer 189 Made Her Cry Team Colleague

Please define "counter". In programming terms, a counter is simple a variable that is incremented, perhaps within a loop. Yes, JavaScript can do that.

tgreer 189 Made Her Cry Team Colleague

function imgOpen(imgS, width, height) {
rand_id='image'+(Math.round(Math.random()*100000));
outf="<html><head><style>body{margin:0px;}</style></head><body leftmargin=0 topmargin=0><img src=\""+imgS+"\"></body></html>";
iopen="iwin=self.open('"+imgS+"', '"+rand_id+"', 'width="+width+", height="+height+",toolbar=0,resizable=0');"+
"iwin.document.write('"+outf+"');iwin.document.close();"+"iwin.focus();";
eval(iopen);
}

tgreer 189 Made Her Cry Team Colleague

Add it to the end of the function that writes the HTML into the new window. It can be the next statement after the final document.write().

tgreer 189 Made Her Cry Team Colleague

Your function needs a "document.close()" statement.

tgreer 189 Made Her Cry Team Colleague

I'm sure we'll talk further. I'm investigating CMS systems for a site I run. I'd welcome any advice you have, though I'll start another thread in a relevant forum when the time comes.

tgreer 189 Made Her Cry Team Colleague

I work/travel all over, but am well-pleased to call Kansas, USA, home. The cost-of-living is so low, it's almost shameful. I pay around $900.00/month to OWN a home that I newly built. 4 bedrooms, 3 full bathrooms, 2 levels, attached garage, large yard/lawn full of trees. Jealous? Well, if so, just remember, it's Kansas. No mountains, no ocean, flat and dusty. Though, I've never been tempted to move. That is until I spent a week in Silkeborg, Denmark. That is a beautiful place.

tgreer 189 Made Her Cry Team Colleague

Jared,

No problem. I don't agree to avoid strict doctypes. In fact, I often code strict XHTML. It minimizies cross-browser issues. In fact, you should start with the strictest doctype, then if, and only if, you absolutey need some tag or property not in the strict doctype, should you seek an alternative.

For example, on some sites I use XHTML Transitional, only because I want to use the "target='_blank'" property in my hyperlinks.

tgreer 189 Made Her Cry Team Colleague

That doesn't validate in strict XHTML, for example. The proper way to achieve centering is as I explained in my prior post. Use CSS margin for block-level elements. For inline elements, you can use text-align.

tgreer 189 Made Her Cry Team Colleague

HTML comes in many flavors, including the XHTML subsets. Each "type" of HTML includes various allowable elements and properties. A browser needs to know which type of HTML your document uses, thus, the "DOCTYPE". If no DOCTYPE is provided, the browser will fall into what is know as "quirks" mode, meaning, they will do whatever the designers of the browser set as the default for any given element. This causes the differences one sees between IE and FF. To prevent this, you must specify a proper, complete doctype. We can't tell you which you should use, because we don't know which HTML specification was used to code the page.

Referece: http://www.htmlhelp.com/reference/html40/html/doctype.html

tgreer 189 Made Her Cry Team Colleague

"web.config" is scoped to a particular directory. You use it to override machine.config for a particular application or application sub-folder. Sorry for not answering sooner; there is an ASP.NET sub-forum that you might want to use for these types of questions in the future.

tgreer 189 Made Her Cry Team Colleague

You have to explain exactly what it is you want. You cannot scroll, as far as I know, the inner contents of a DIV element. However, you can scroll the browser window, using the "scrollTo()" method.

You can know the size of an element, using it's "clientHeight" property, for example, and its position on the page, using offsetTop & offsetParent.

Here's a simplistic example of scrolling:

<html>
<head>
<script type="text/javascript">

function myScroll()
{
  x = document.getElementById("myDiv");
  h= x.clientHeight;
  self.scrollTo(0,h);
}

</script>
</head>
<body onload="myScroll();">
<div id="myDiv">
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 
Donec tristique lectus sit amet est. Vivamus sit amet lacus. 
Morbi convallis sem nec lectus. 
Nullam in odio ac augue porttitor semper. 
Nam leo. Morbi varius molestie felis. Etiam egestas. 
Donec vitae mauris vitae nisi gravida pharetra. In molestie eros eu tellus. 
Suspendisse a mi vitae nulla vehicula lacinia. 
Ut pellentesque lobortis ipsum. Quisque a leo. Curabitur tincidunt. 
Fusce est velit, condimentum sed, convallis in, blandit hendrerit, eros.
</p>
</div>
</body>
</html>

I simply measure the clientHeight of the DIV element, and tell the browser to scroll to that position. This doesn't take into account that the DIV might be nested, etc. You'll need to use the offsetTop and offsetParent properties to make the code robust. Search for those terms, you should easily find everything you need, which is why I didn't spell it all out for the previous poster.

tgreer 189 Made Her Cry Team Colleague

The page has no DOCTYPE. That's where you have to start. Once you have a valid DOCTYPE, then you can begin to narrow down the problems.

tgreer 189 Made Her Cry Team Colleague

I'm working on a series of enciphered and encrypted messages, to be posted here and there, as kind of a "treasure hunt" for crypto fans. The idea is very similar to what Dan Brown did with his site in conjunction with the release of The DaVinci Code.

tgreer 189 Made Her Cry Team Colleague

I'm sorry, I don't understand your reply. There is no way the code above would return the value "123" for the "myCounter" integer. If there are 3 checkboxes, the value would be "3" after the loop completes.

tgreer 189 Made Her Cry Team Colleague

Coudn't you just add a counter to your logic?

[B]int myCounter = 0;[/B]
foreach (DataGridItem spriden_ID in dgEmployees.Items)
{
  CheckBox cbSpriden = (CheckBox) spriden_ID.FindControl("cbSpriden");
  if (cbSpriden.Checked)
  {
    //Stuff to add to db here
    [B]myCounter++;[/B]
  }
  else
  {
    lblStatus.Text ="Scheduling failed: " + addCourses.ErrorMessage;
  }
}
tgreer 189 Made Her Cry Team Colleague
tgreer 189 Made Her Cry Team Colleague

For all who like logic puzzles, thought experiments, etc.: I've posted a couple of blog entries on my favorite logic puzzles. I'd love to collect some more! One of them discusses the classic "Locker Problem", and the other is a weighing problem. The entries give the answers... I'm most interested in discussing how one approaches the problems, and particularly practical applications.

I hope to see you in the "blog".

tgreer 189 Made Her Cry Team Colleague

You can't get the WEB SERVER date/time with JavaScript, since JavaScript is client-side. However, you can use JavaScript's date() method(s) to get the Web Browser/client date.

tgreer 189 Made Her Cry Team Colleague

It's very simple. If you have a single form on the page, then this hyperlink would submit it:

<a href="#" onclick="document.forms[0].submit();">Submit form</a>

There are a couple of variations. I prefer to refer to all HTML elements via their ID property. So if you give your form an ID, like:

<form id="myForm" method="post" action="myFormProcessor.php">

then your hyperlink could be:

<a href="#" onclick="document.getElementById('myForm').submit();">Submit form</a>

Lastly, if you don't like having that href, you can also code it:

<a href="javascript:document.forms[0].submit();">Submit form</a>
tgreer 189 Made Her Cry Team Colleague

So, in fact you DO want to POST a FORM, you just don't want an "ugly button". Right? Then either style the button using CSS, or code almost any other HTML element, such as a hyperlink, to fire the form's "submit()" method.

(You might have had more answers, sooner, if you'd posted in the HTML/JavaScript forum rather than PHP.)

tgreer 189 Made Her Cry Team Colleague

Well, I'm understandably curious. What was your "case"? How did you get a human to respond to you? In my situation, I emailed them immediately, asking what clicks were fraudulent, could they be filtered out, etc. The response was an auto-reply basically telling me to go away and never bother them again. So, another email, explaining what I thought happened (pretty much what I wrote upstream in the thread),with another form email response, similarly shutting me down.

Again, I'm cynical, but I have to imagine you got a favorable response due to your growth rate. Google is a business, and you make them a lot of money, I imagine. Someone saw that potential and decided to intervene and overrule their vaunted, flawless, secret algorithm.

I also find fault with the fact that they shut me out of my account, and yet somehow they don't have the technology to stop serving the ads. I had to manually remove the AdSense code, because even though I was somehow guilty of generating fraudulent clicks, they continued to serve ads to my site. It was alright for them to continue to make money from my site, but not for me to do so.

The system is seriously flawed. That said, though, I'm a hypocrite - given a hearing ear and a reinstatement, I'd host them again.

So my advice is, use it. See what happens. But don't be surprised if 2 days before the check is cut you get an …

tgreer 189 Made Her Cry Team Colleague

Those are all issues. Google doesn't publish or discuss how they determine fraudulent clicks, there is no discussion or recourse, and no one there will respond to any questions about the issue. The decision is final and permanent. Plus, the decision seems to come after your site has built up some speed, and always towards the end of the month when you have a large payment pending, according to many of the accounts. That was true in my case.

I'm sorry, I'm extremely cynical about the AdSense program, and refuse to click any AdSense ads, anywhere, ever.

tgreer 189 Made Her Cry Team Colleague

They aren't the same. An event is an event. A "delegate" assigns a particular event handler to an object instance. Thus, when an object event happens, the proper procedure/method is called.

An example might help. I frequently code things so that a single method is called for all instances of a class. No matter which button is clicked, call my generic "button_click" method. That method will use the event arguments to determine which button was actually clicked.

In order to assign all button click events to a single method, I have to code the delegates.

tgreer 189 Made Her Cry Team Colleague

Read the horror stories of those who've been summarily "banned" from Google's AdSense program. I shrugged them off as the whines and complaints of those who were caught with their hands in the cookie jar, until it happened to me on a poetry forum I used to run.

I put up flyers in a lot of the local coffee shops / 'net cafes that I frequent. I do a lot of my work in these places, and used my laptop to check my AdSense account. Apparently any hits I got from OTHER PEOPLE from those locales were then seen as fraudulent clicks, and it was "sayanora". Either that, or the geographic density (most hits coming from my home town) caused suspicion. I'll never know, because Google won't say.

Now, that site didn't make me much money - the ads basically covered the hosting fee, which is all I wanted.

However, the ban isn't just for that site, the ban is for ME. So that means my commercial site(s), and any potential commercial sites, are also banned from participation.

tgreer 189 Made Her Cry Team Colleague

Let's see what you've already coded.

tgreer 189 Made Her Cry Team Colleague

Define "rotating". Do you mean, load a series of images (place different images "sequentially" or "in a rotating series"?

Or, do you physically want to change the "angle" of an image? IE has some filters for this, but they definitely aren't cross-browser.

tgreer 189 Made Her Cry Team Colleague

I'm working with C#, and Adobe Acrobat 6.0 Professional. Acrobat exposes a COM Automation server with a few top-level objects. It's easy enough to create instances of those objects, by getting their Type via the .GetTypeFromProgID() method, and then using Activator.CreateInstance().

// Create an Acrobat Application object
Type AcrobatAppType;
AcrobatAppType = Type.GetTypeFromProgID("AcroExch.App");
Acrobat.CAcroApp oAdobeApp = (Acrobat.CAcroApp)Activator.CreateInstance(AcrobatAppType);

// Create an Acrobat Document object;
Type AcrobatPDDocType;
AcrobatPDDocType = Type.GetTypeFromProgID("AcroExch.PDDoc");
Acrobat.CAcroPDDoc oAdobePDDoc = (Acrobat.CAcroPDDoc)Activator.CreateInstance(AcrobatPDDocType);

// Create an Acrobat AV Document object;
Type AcrobatAvType;
AcrobatAvType = Type.GetTypeFromProgID("AcroExch.AVDoc");
Acrobat.CAcroAVDoc oAdobeAVDoc = (Acrobat.CAcroAVDoc)Activator.CreateInstance(AcrobatAvType);

However, there are other objects that can only be created by calling a method of one of these top-level objects. For example, Acrobat's built-in JavaScript engine can be returned via the "GetJSObject()" method of the PDDoc object.

This code, for example, compiles and runs:

object oAcrobatJSobj = oAdobePDDoc.GetJSObject();

However, since this object isn't strongly typed, it isn't really useful. I can't call any of its inherent methods or properties.

How can you type and instantiate such an object?

tgreer 189 Made Her Cry Team Colleague

This is a HUGE topic. I work in printing/publishing, and code PostScript, so I've written my share of text justificaiton routines.

Simple approach: adjust the whitespace between words

Better approach: adjust the majority of the whitespace between words, the rest between individual spaces. I use 80/20, it seems to be the most balanced.

Sophisticated approach: add hyphenation. <-- may take years to get right!

tgreer 189 Made Her Cry Team Colleague

Not really. Reading between the lines, I suspect that you're trying to "optimize" your website so that it's listed "high" in a search engine. There's an entire industry that's grown up around this, called SEO. Daniweb has some SEO-related sections, you might post there.

Websites artificially manipulate search engines, search engines tune their algorithms, then we commercialize the whole thing with ads... what a mess. Sorry, I'm a cynic.