tgreer 189 Made Her Cry Team Colleague

Two techniques for you:

Put your ENTIRE TABLE into an outer table, with one row, and one cell. Set that cell to "align=center":

<html>
<head></head>
<body>
<table>
<tr>
<td align="center">

<!- your inner table HERE ->

</td>
</tr>
</body>
</html>

The second technique is to assign a proper doctype (you need to learn about doctypes), and use CSS. The CSS style, applied to your main containers (like the body tag) would be "margin: 0 auto". This means "0" top margin, and "automatic" left/right margins.

tgreer 189 Made Her Cry Team Colleague

Well, we've given both viewpoints in this thread, allowing you to advertise your system :). So I'll leave it at that and let the Invisible Hand decide.

tgreer 189 Made Her Cry Team Colleague

Whoops! I see that same article has also been posted as a daniweb code snippet:

http://www.daniweb.com/code/snippet293.html

tgreer 189 Made Her Cry Team Colleague

I think what you're describing is called "screen scraping". There's an article on my site specifically about PHP screen scraping: http://www.tgreer.com/class_http_php.html

Of course, support DaniWeb. If you'd like to discuss that article, you can do so in this thread. The article author is also a DaniWeb member.

tgreer 189 Made Her Cry Team Colleague

If I have a forum with content related to a specific service or product, then why do I need to have my forum "hosted" in another forum? I already HAVE a forum.

If on the other hand I'm hosting a forum that is more or less "public", I'm doing so for two reasons. One of those reasons, let's be honest, is to generate ad revenue. I don't want "my" content hosted on someone else's system. Doing so would dilute the value of my forum and thus it's attractiveness to advertisers. (The other reason I run forums is because I'm genuinely interested in the topic.)

What you're describing sounds closely related to what the blog world calls "trackbacks". I hate those, too.

Another way to look at this is to realize that a forum isn't JUST content, it's also identity and community.

If I "hosted" a forum on a system like you describe, I'm in essence allowing other forum operators to have my content MINUS the identity I've striven to create and the community that generates that content. I just can't imagine why I'd want to do that.

tgreer 189 Made Her Cry Team Colleague

I would have a very negative feeling about any system that "imported" content from one of the forums I operate, into their own system. In fact the very thought makes me want to have a long talk with my lawyer.

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

You can have a different CSS style sheet for several different resolutions. You can detect the screen resolution via the "screen" object.

tgreer 189 Made Her Cry Team Colleague

Not much. There are actually lots of things you CAN do, but it's questionable whether you SHOULD. My rule of thumb is to design a site for an 800x600 browser. That's plenty of room, and most people have their screens at 1024x768 now.

tgreer 189 Made Her Cry Team Colleague

Hidden variables would work. The ASP.NET ViewState mechanism is just a hidden variable.

In HTML, you simply create: <input type="hidden" id="myHiddenVar"> To set it's value in javascript: document.getElementById("myHiddenVar").value = "myValue" In ASP.NET code-behind, you use the Request object to retrieve the value.

So many ASP.NET programmers waste hours trying to find the "ASP.NET" way to do things, even though the "right" way has been around since the web's inception. Whenever I'm confronted with the stereotypical ASP.NET-induced brain-lock, I try to clear my mind of all Microsoft knowledge (I call it "blue fuzz"), and ask how I'd do this with just regular HTML/JavaScript. That usually produces an answer. Barring that, I try to use Request/Response objects on the server, ViewState variables or Session variables, and only as a last resort look at dynamic ASP.NET Web Controls.

My site has a view articles on ASP.NET topics that might be helpful. Of course keep ASP.NET discussions right here on DaniWeb.

tgreer 189 Made Her Cry Team Colleague

I don't think so. I'd like to be pleasantly surprised to the contrary by another poster, but my first reaction is "no".

tgreer 189 Made Her Cry Team Colleague

I'm not sure if you're asking a question, or providing a helpful tip. Also, you mention "Java" but posting in the JavaScript forum.

Please provide a bit more explanation of your intent so we can either help you, or move your post to the correct forum.

tgreer 189 Made Her Cry Team Colleague

Gotcha. One processor, HT. It's a Dell Inspiron 9100. Device manager shows a processor 0 and a processor 1.

tgreer 189 Made Her Cry Team Colleague

I can't be more clear until you be more clear.

What is "dw"?

I'm sorry, but not sure what it is you're asking.

tgreer 189 Made Her Cry Team Colleague

I think I understand. You want to

1) query the database for a recordset
2) retrieve the student's name from a field in the recordset
3) display that name on the web page
4) the name should somehow "move", perhaps scrolling across the screen?

You do the first 3 steps in ASP.NET. Someone here can help you with that. I code ASP.NET, but only in C#.

You'd have to do step 4 with client-side code. JavaScript. Post a separate question in the JavaScript/DHTML forum.

tgreer 189 Made Her Cry Team Colleague

I just got a new laptop. It has dual Intel Pentium P4 2.8G processors installed.

I'm running Windows XP Professional.

My question is, does XP really use two processors? How? At what point are both processors being used? Under heavy load? At all times?

Is there a way to assign certain processes or programs to run on specific processors?

tgreer 189 Made Her Cry Team Colleague

Just a note, the webbrowser control is in fact an ecapsulation of the Internet Explorer browser. This allows you to do some unique things. For example, the html you display could contain hyperlinks, and you can overload the Navigate event. So when a user clicks a hyperlink, instead of navigating, you can do whatever you like.

One application I wrote was to display PDF phone statements, with live hyperlinks (I used PostScript and pdfMark programming to create the PDFs w/ hyperlinks).

The PDF was displayed in a web browser control on a windows form. When the call center operator clicked on a given line in the statement, the code captured that event and link to run a query, popping up the call details in a new window.

This let the phone company use the PDF of the exact statement the customer recieved, as an interface back to call data.

tgreer 189 Made Her Cry Team Colleague

If you want an animated STATUS BAR, or PROGRESS BAR, something that dynamically informs the user that the database query or update is 50% done, you simply cannot.

The web, even ASP.NET, is challenge-response. The user only sees something new when the server-side code is complete.

One workaround is to spawn a new process, which periodically updates a table to indiciate it's progress. You set the browser to refresh every so often, each time it does, the server-side code checks the progress by reading the "update" table value.

When it's complete, the user gets the results.

Sorry if this didn't answer your question; I didn't quite understand the question.

tgreer 189 Made Her Cry Team Colleague

I'm having a hard time comprehending the source behind your page. I don't even see the image tags for the problem images. Evidently one of the scripts dynamically builds those tags?

Could you strip the page down to JUST the problem images and relevant scripts, and post the scaled-down code here?

tgreer 189 Made Her Cry Team Colleague

When you say "controls", do you mean ASP.NET Server Controls? When you say "drag and drop", do you mean, you want the client to be able to drag and drop things in the context of the final page? Or are you asking how to use your development IDE? What development IDE are you using?

You question isn't nearly specific enough to generate much in the way of responses.

tgreer 189 Made Her Cry Team Colleague

You don't need the "javascript:" in the onclick attribute. Other than that, I'd need to know more about the specific problem. You might need full URLs rather than just filenames for "success.html" and "failure.html". What error are you getting?

tgreer 189 Made Her Cry Team Colleague

My point was simply, if you're posting a technical question in a web development forum, you have to use terminology that web developers use. The term "layer" means lots of things in lots of contexts. In the context of HTML development, "layer" was a proprietary element Netscape introduced, which was deprecated several years ago (considerably more than 5 minutes).

If you want to programmaticaly set the visibility of div elements, then it would make the most sense to ask "how do I set the visibility of a div element". People wanting to ask a similar question would be more likely to find this thread in the future, a key benefit to using a forum site.

Your originating link would contain a querystring:

<a href="myDestination.html?activeDiv=myDiv2">link</a>

The myDestination page would have an onload script which parsed the querystring, using location.search, to set the myDiv2 style visibility to "visible".

document.getElementById("myDiv2").style.visibility = visible;

tgreer 189 Made Her Cry Team Colleague

Something like this, in the code-behind. This is code that creates an in-memory graphic, but you could just as well retrieve the image from a database:

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace charts
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Image Image1;

private void Page_Load(object sender, System.EventArgs e)
{
DisplayLine();
Image1.ImageUrl = Server.MapPath("")+"temp.jpg";

}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void DisplayLine()
{
Bitmap b =new Bitmap(250,250);
b.Save(Server.MapPath("")+"temp.jpg",ImageFormat.Jpeg);
Graphics g = Graphics.FromImage(b);
g.Clear(Color.White);
Pen p = new Pen(Color.Blue);
g.DrawLine(p,10,240,240,240);
b.Save(Server.MapPath("")+"temp.jpg",ImageFormat.Jpeg);
}
}
}

That code SAVES the image. To SERVE the image, instead, you could use:

Response.ContentType = "image/jpeg";
b.Save(Response.OutputStream, ImageFormat.Jpeg);

Then to use this code inside of another HTML and/or WebForm page, set the img src to the image producing page.

tgreer 189 Made Her Cry Team Colleague

No, the technique is to create a webform/aspx application that retrieves an image from the database, and streams it out.

Then, the image CONSUMER application would have an img tag. The "src" attribute is set to the image PRODUCER application.

So if you a red and a blue image, you might have a src as such:

<img src=:http://www.belama.org/imageSelect.aspx?img=red">

The imageSelect.aspx would use the querystring to retrieve the "red" image from the database and stream it back.

tgreer 189 Made Her Cry Team Colleague

What authentication model are you using? Did you add the ASPNET user account to your ASP.NET application?

tgreer 189 Made Her Cry Team Colleague

I moved to Web Hosting, Server configuration. Your question isn't a scripting question, and I think the folks most qualifed to answer the question will be in this forum instead.

tgreer 189 Made Her Cry Team Colleague

You set the image into the HTTP response stream, setting the proper MIME type, of course. Do an internet search for "image response stream".

This question might have been answered sooner if it were posted in the Web Development | ASP.NET forum.

tgreer 189 Made Her Cry Team Colleague

Troy is absolutely correct. From your code posting, I can see that your server-side language is JSP. JavaScript is client-side. There is nothing you can do CLIENT-SIDE to build an array from data that exists on the SERVER.

Therefore I'm moving this thread to the JSP forum. I wish you well.

tgreer 189 Made Her Cry Team Colleague

You can dymanically load images with ASP.NET. I'm not sure why you'd need an "include", by which I guess you mean an SSI (server-side-include). Your ASP.NET WebForm code-behind file will use standard programming to render image controls.

Or, you can encode all your image selection logic in a separate WebForm, and set the src attributes of your img element to that WebForm.

tgreer 189 Made Her Cry Team Colleague

That's only the case with locally loaded HTML files. Once you publish to a website, your users will not get that message.

tgreer 189 Made Her Cry Team Colleague

ASP.NET is completely different. For every HTML element, ASP.NET has a "server control" that emits that HTML. So you can't have an ASP.NET server control that would emit "ASP" code for further processing via an ISAPI.DLL.

Sorry, but you just can't mix the two.

tgreer 189 Made Her Cry Team Colleague

You can't mix ASP and ASP.NET.

tgreer 189 Made Her Cry Team Colleague

"Layer" is not a standard term for web development. If you're referring to a div element, you should use the term "div" or "block-level element".

How are you positioning the element? Via CSS? Or with JavaScript?

tgreer 189 Made Her Cry Team Colleague

"Layer" is an outmoded Netscape term. I'm very fluent in DHTML. A "div" element is just that - a div element. Referring to it as a "layer" is bound to cause confusion. That's why I had to ask you want YOU meant by "layer".

Visibility of any particular element, including div elements, can be set with the appropriate CSS style applied: visibility: hidden, or visibility: visible.

tgreer 189 Made Her Cry Team Colleague

Please, please, please, folks, listen to what I'm saying: it's just a sound file. Someone made the mistake of saving it with a ".txt" extension. Then they put it on a web-server.

If you want to do the same thing, then just create a sound file and give it the ".txt" extension. It's a silly thing to do, but it certainly isn't tough!

If your real question is "how do I create a sound file?" there are dozens of programs out there to do just that.

But in any case, none of this is related to JavaScript or DHTML, so please close this thread and perhaps post a question on a more relevant forum.

tgreer 189 Made Her Cry Team Colleague

There is no such thing as a text music file. Period. There are text files. There a music files. To create music file, you'll need softeware that creates music files. To serve a music file over the web, you'll need to use the proper mime type for the music file format.

tgreer 189 Made Her Cry Team Colleague

The JavaScript window.print() method simply passes a print request to the underlying OS, which will bring up a dialog box. The user will select portrait or landscape from that box. In other words, print orientation is up to the user, as it should be in my opinion.

tgreer 189 Made Her Cry Team Colleague

Yep. That site is mal-formed. The "txt" extension has been given to a sound file. Firefox simply prompts you to open the file or save it.

tgreer 189 Made Her Cry Team Colleague

First, you can enable a different color (and lots of other things), by using the :hover CSS psuedo tag. If you do so on a hyperlink, then you're all done: the CSS provides the hover effect, and the hyperlink takes care of clicking to a new URL. No Javascript required, I might note.

Example, this code makes anchor tags look like buttons:

<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>
tgreer 189 Made Her Cry Team Colleague

This is for a site concept I'm working on.

Can multiple AdSense publishers exist on a single page? For example, imagine a site that I run, on which YOU contribute.

If you contribute an article, I want the article page to have MY Google Ads at the top, and YOUR Google Ads in the page.

To enable this, each contributer would have their Google "id" stored in the site's database.

I have a question into Google about the legality of this, but haven't had a reply.

Thoughts?

tgreer 189 Made Her Cry Team Colleague

Yes, you're correct. It is much slower in FireFox. I'm running Windows XP, SP2, English.

If you can strip down a sample page that includes ONLY your news scroller, and post it here, I will do what I can to help.

tgreer 189 Made Her Cry Team Colleague

What is a "hover box"? When you say you "want it to go to another URL", what is the "it"?

What's wrong with a standard hyperlink?

tgreer 189 Made Her Cry Team Colleague

This probably isn't a JavaScript problem. It could be a problem on your machine. Does anyone else experience the problem on your site?

tgreer 189 Made Her Cry Team Colleague

Since you're learning, which is fantastic, I won't give you a complete answer. I think you should research "Regular Expressions", often referred to as "regex".

tgreer 189 Made Her Cry Team Colleague

If you have a programming question, I could probably help. If you want a premade menu script, there are lots of them out there. The Google Ads associated with this thread might be a good place to start.

tgreer 189 Made Her Cry Team Colleague

Sorry, I don't understand the question.

tgreer 189 Made Her Cry Team Colleague

You have to define the "that" in your "how to do that" phrase :). Give me a step-by-step from a user's perspective. They would see what? Then do what? What's supposed to happen then?

I can only speak with any degree of authority about JavaScript. The JSCRIPT and VBScript Microsoft aberrations aren't my "thing".

tgreer 189 Made Her Cry Team Colleague

I've often wanted a true blog/forum hybrid. I know exactly what I want, until I try to describe it!

I think I basically want a forum, but one that doesn't look so rigidly structured as a forum. Also, I want something a bit more user-oriented, than topic-oriented.

I'd like a site experience where someone could look for things and discuss things on a topical basis, but also go to the site to see what "Joe" has had to say lately.

I thought a really robust blog site would do it, but when I look at the blog software, so many of them use DIFFERENT software for their "support forum"!

So, I think a customizable, robust, forum system, where I could dynamically collect a user's postings into a "blog-like" page, would be good.

I want bloggy forum, as opposed to a forumy blog. Suggestions? Experiences?

tgreer 189 Made Her Cry Team Colleague

If you want to programmatically perform a page refresh, the JavaScript code is "window.refresh()".

You need to tie that code to a specific Event. I can't advise on which element/event without knowing more about your situation.

tgreer 189 Made Her Cry Team Colleague

I don't see how the value "30.0" is contained in the URL. But I assume you'll be passing in key-value pairs on the QueryString?

The JavaScript object you'll use is the "location" object. It returns the URL. It has further properties, that return just portions of the URL. Combine the location object with the .Search method, and you can parse your URL however you would like.