tgreer 189 Made Her Cry Team Colleague

Just start by researching "doctype". Learn what a doctype is, and which one you should use.

After you've got that figured out, adjust your code accordingly. You may find you don't need to test for different browsers at all.

If you do, find a better, more thorough "browser sniffer" script.

tgreer 189 Made Her Cry Team Colleague

"circleLayer" is defined inside conditionals, and none of your conditionals test for FireFox.

You only test for Netscape and Internet Explorer, based on deprecated DOM objects (document.layers).

Your page is also missing a DOCTYPE declaration, so no test is really going to be valid, and no code will be dependable.

Start by fixing the DOCTYPE issue, then you may not need to do a browser test.

tgreer 189 Made Her Cry Team Colleague

Not here - you'd need to post in the PHP forum. Start a thread asking about HTML Form processing basics.

tgreer 189 Made Her Cry Team Colleague

Martin,

This area is for MV customers to use to enhance your web pages and take advantage of web-based tools that MV is providing. Note that some areas are off-limits to non-MV customers.

So you may or may not have permission to use that script, even though it's posted on a website. In such cases, it is far better to contact the author of the script for permission and support.

As an alternate method, give them a form to fill. The form posts to a PHP, ASP, or ASP.NET program that stores the results in the database. You would have a page you could browse to which retrieves and formats this information - no need for any email at all.

tgreer 189 Made Her Cry Team Colleague

I think these are a little off, though close.

First, the link you posted is wrong!

<a href="somepage.htm</a>

Should be:

<a href="somepage.htm">Link to somepage</a>

If you want a Javascript function to run when the user clicks the link, you code the "onclick" attribute:

<a href="somepage.htm" onclick="myFunc();">Link to somepage</a>

Now, here's the question. What do you want that script to do? I'm going to assume that you want the user to be able to "OK" or "Cancel" the navigation. In that case, the function will need to RETURN a true or false value. In order for the link to handle that, you need to add the "return" keyword to the link. Let's also pass in a message to display:

<a href="somepage.htm" onclick="return myFunc('Are you sure?');">Link to somepage</a>

Now for the function itself:

<script type="text/javascript">
function myFunc(msg)
{
  result = confirm(msg);
  return result;
}
</script>

Why does that work? Because the "confirm" dialog returns "true" if the user clicks "ok", and "false" if they click "cancel". That value, true or false, is stored in "result". The function "returns" the result value back to the link (actually, back to the event handling the link, minor detail).

If it receives "true", it follows the link. If it receives "false", it cancels the link.

In fact, the code within the function could be shortened to just:

<script type="text/javascript">
function myFunc(msg)
{
return = confirm(msg);
}
</script>

And if that's all you need to do, you don't …

tgreer 189 Made Her Cry Team Colleague

YOU created a function called "write" in the code you posted. Add a document.close() statement to it.

function write()
{
  if (document.mytext == null)
  {
	document.writeln("There used to be no text here.");
	document.close();
  }
}

I also posted corrections to the code and formatted it in a style I use to align brackets and make the code easier to maintain.

tgreer 189 Made Her Cry Team Colleague

After your final "document.write()" statement, inside your "Write" function.

tgreer 189 Made Her Cry Team Colleague

When serving ANYTHING over the web, mime-types come into play. You're telling the server to tell the browser that you're serving this-type-of-file, and the browser decides, based upon the user's configuration choices, how to handle that file.

I can't think of any way you can force your users' browsers to launch Acrobat as an external application, or even, for that matter, that Acrobat Reader should open the PDF instead of Acrobat Professional or any other of the dozens of PDF parsers available that a user may have chosen instead of Reader.

tgreer 189 Made Her Cry Team Colleague

That's the "how", as to "why", you have to let the browser know you are done re-writing the document, so it can render it. If you don't do a "document.close()", you'll get varying, unexpected results from one browser to another.

tgreer 189 Made Her Cry Team Colleague

This is about the 5th post you've made on this topic. I understand how frustating it can be when no one answers your question. There might be valid reasons why you don't get an answer. I, for example, don't know PERL, and I also tend to skim past messages with giant code listings.

Also, from what I can tell from your posts, this is an on-going project that has had several issues. A forum is best for getting answers to very specific issues. People don't like to get wrapped up in others' nightmares, if you know what I mean!

So my advice is to try to isolate a specifiic problem, research that problem, and if there are still questions, post a short message, with your simplified code section that illustrates the problem. You might get better answers that way.

tgreer 189 Made Her Cry Team Colleague

I'm trying to understand what problem you have. Are you saying that you don't know how to format the "script" tags? Or that you don't know what to put in the "src" for the tag?

tgreer 189 Made Her Cry Team Colleague

You need to access and modify the style collection. document.getElementById("nm1Textbox").style.color = "red";

tgreer 189 Made Her Cry Team Colleague

Yes, the problem is that the border underlines the complete "box" that the H2 would normally fill. The image comes along and alters the text, but the border is already drawn and ignores that. It's a small rendering problem, same would say a bug.

The fix is to force the H2 to display a certain way. Add display: table-cell; to your style declaration for the H2. That fixes it in FireFox, IE still has a bug, but not as dramatic. You can play with other values for "display" to see if one works better for you.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Untitled</title></head><body>
<div style="width: 700px;">
<img src="nokia9300.jpg" alt="" style="padding: 10px; float: right;" border="0" height="281" width="336">
<h2 style="border-bottom: 1px solid red; display: table-cell;">Analysis: Paid search results often not worth the click</h2>
</div>

</body>
</html>
tgreer 189 Made Her Cry Team Colleague

You cannot. JavaScript is client-side, Perl is server-side. The only thing a web page can do is request a Perl-driven page, and the Request is either GET (pass the values on the querystring) or Post (pass the values in a Form).

So a typical technique is to have a hidden element on the form, set its value via Javascript, and then submit the form.

tgreer 189 Made Her Cry Team Colleague

You don't. Forms are meant to be processed by a server side language, which will process the results (store them in a database? do calculations with them? etc.) and return a new HTML stream.

HTML itself CANNOT process a form. So your action tag, submitting back to an HTML file, won't do anything at all.

The missing piece is "server side language". Pick one: my vote/recommendation is for PHP. Daniweb has a very good PHP forum, btw.

tgreer 189 Made Her Cry Team Colleague

That's one error... see if that fixes it. Since you haven't posted any code, and we can't save the "complete" page, with graphics, etc. it's hard for us to experiment/troubleshoot.

If that doesn't fix the issue, I'd start experimenting with the "display" CSS attribute.

tgreer 189 Made Her Cry Team Colleague

The point, though, is that applications can access an MDB file (Access database), without the user having to own Access.

SQL Server, while the superior database, isn't portable in that regard. I'm so used to developing for enterprises and web applications, that I forget that not everyone has dedicated database servers.

For a portable, desktop, application, I think Lord Soth makes a valid point.

tgreer 189 Made Her Cry Team Colleague

This isn't an HTML/JavaScript question. You should ask in the appropriate server-side forum for whichever server-side language you're using.

tgreer 189 Made Her Cry Team Colleague

Because JavaScript isn't strongly-typed... and the default type of textboxes and labels is a string.

tgreer 189 Made Her Cry Team Colleague

Yeah... I wondered how/why it got bumped. No big deal.

tgreer 189 Made Her Cry Team Colleague

Do a web-search for "favicon".

tgreer 189 Made Her Cry Team Colleague

Has anyone played with the ASP.NET 2.0 Menu control? Most of the samples I see deal with the SiteMapPath and Master Pages. Can this control be used for a simple DHTML-style dropdown menu? Like the suckerfish menus, or functionally equivalent to daniweb's main menus?

One would think so, but the databindings seem strange to me.

tgreer 189 Made Her Cry Team Colleague

...and in fact, the FireFox implementation is much stricter about adhering to standards. So, if it isn't working in FireFox, but is in IE, you either have a custom unsupported IE CSS thing (like a filter, not part of the CSS standard), or in fact your CSS is broken and IE is in a roundabout way giving you want you want, anyway.

Which DOCTYPE are you using? That's the first step in resolving browser inconsistencies: use a proper doctype.

tgreer 189 Made Her Cry Team Colleague

Every major browser has a built-in JavaScript interpreter. You don't have to "download it" from anywhere. You may have inadvertently turned it off - check your various security options in your browser.

tgreer 189 Made Her Cry Team Colleague

Please elaborate on your question... I don't know which part of my response you don't understand.

tgreer 189 Made Her Cry Team Colleague

The various document.write methods are depcrecated, and will no longer work in the newer HTML doctypes.

One thing that many forget to do when using document.write(), is to close the document! Be sure you use a document.close() statement at the appropriate spot.

tgreer 189 Made Her Cry Team Colleague

Internet Explorer has had a long-time bug with select elements and z-index. Talk to your mod "Troy" about it, I know he's done a lot of research and has developed some workarounds.

tgreer 189 Made Her Cry Team Colleague

Sam. No one is angry. I made what I thought were appropriate suggestions: start with a book, or online examples.

Another suggestion: since this is a professional forum, please use proper spelling and punctuation.

tgreer 189 Made Her Cry Team Colleague

You shouldn't be using code that contains document.write() statements. That's deprecated and may or may not work based upon doctype.

I haven't looked at Google Adsense code since... nevermind. Awhile. And since it's being provided, you might be break all sorts of rules if you modified it.

In general, you'd have a div where you wanted the ad. You'd have a script to retrieve the ad image/link code. You'd place that script at the very bottom of your page. Then you'd have a script after that, which alters the content of the div, placing the ad within it.

If their code uses document.write(), though, that approach wouldn't work.

tgreer 189 Made Her Cry Team Colleague

But JavaScript doesn't have to be loaded first. It could just as easily be the LAST thing you run on the page. Also, you can code it as a separate request via AJAX/XMLHTTPRequest.

What do Frames/Iframes do to SEO?

tgreer 189 Made Her Cry Team Colleague

Mainly personal preference, though I would guess SQL Server is faster than Access.

Also, in terms of overall support, I think you'll find higher quantity and quality support/articles discussion for SQL Server than Access.

Plus, in C#, there are specific namespaces for SQL Server, whereas with Access, you'd have to go through ODBC.

tgreer 189 Made Her Cry Team Colleague

JavaScript. I'd think interpreting/running a script wouldn't be that much slower than loading an entire IFRAME. Plus, IFRAMES... I just never cared for frames.

tgreer 189 Made Her Cry Team Colleague

What kind of "idea" do you need? No one here is going to code this for you. My idea would be: get started. As with any application, start with the data model.

If you don't know what a data model is, or don't know how to code ASP.NET, I would politely suggest that you are in over your head, and need to buy a book, or spend some time looking at code samples on MSDN.

tgreer 189 Made Her Cry Team Colleague

You've double-posted this. Please stick to one thread. Since you've asked this in ASP.NET and I've already responded there, perhaps the VB.NET moderator could close/delete this thread?

tgreer 189 Made Her Cry Team Colleague

For C#, I recommend their newest database creation, SQL Server Express 2005. It's a destop version of SQL Server:

http://msdn.microsoft.com/vstudio/express/sql/

tgreer 189 Made Her Cry Team Colleague

Did you follow all the prerequisites for installing the .NET Framework? All the updates, patches, etc. that Microsoft's site details?

Did you check the error on MSDN? With what results?

tgreer 189 Made Her Cry Team Colleague

That is not correct. BBCode is NOT an "implementation of HTML". That would require that it have it's own DTD or schema, doctype, etc. It isn't particularly simple, either, as it relies on PHP Regular Expressions. While powerful, regex isn't simple!

BBCode is short for "Bulletin Board Code", and is a tool developed, in PHP, and adopted by most if not all forum software vendors.

tgreer 189 Made Her Cry Team Colleague

That's the same question, isn't it? YOU, as a user, control the appearance, to some extent, or your personal browser. That's as it should be. So, yes, you can turn off the various toolbar options using the "View" menu.

However, you, as a developer, cannot force the browser of the people who visit your page, to turn toolbars on or off, except under certain circumstances, namely, if you open a new window via a script (search for "window.open()" on the web). In that case, you can control whether or not the toolbar, resize widgets, and scrollbars appear on the new window.

tgreer 189 Made Her Cry Team Colleague

You cannot. The buttons (I take it you mean the browser buttons on the toolbar?) cannot be disabled via JavaScript.

tgreer 189 Made Her Cry Team Colleague

You can use JavaScript, but that's not the best option, as it forces another server round-trip during the page load.

tgreer 189 Made Her Cry Team Colleague

I don't know a thing about FrontPage, so if there's a nifty button to press to accomplish this, someone else will have to chime in.

You're asking in the HTML/JavaScript/CSS forum... but I'll just assume that's because you're lumping all web development together as "HTML". The best answer for your task, though, is to use a server-side include, rather than a script.

A server-side include looks like a comment. In fact, it's a specially-formatted comment that looks like this, for including an HTML file in every page:

<!--#include virtual="/path/to/your/file.html" -->

Note: your web server must be configured to support SSI, so check with your web hosting company. In almost all cases, part of that configuration requires that your files have an ".shtml" extension, rather than ".html".

Another Note: each page that needs to include the file, will need the include directive. However, when you change the code within the header or footer, every page that includes it will get the new version.

tgreer 189 Made Her Cry Team Colleague

Yep: Float is one of those attributes that basically works in conjunction wiht other elements set to float and/or clear.

tgreer 189 Made Her Cry Team Colleague

We're venturing off into another discussion. I don't know the particulars of the OP's environment or application, but in general, I say "hands off" on anything that is in the User Model. This includes such often-requested items as auto-sizing a window, auto-printing a page, disabling certain script warnings, obscuring or making "View Source" difficult, and replacing or editing the context menu.

This link should be of interest to you in regard to adding to context menu(s):

http://msdn.microsoft.com/workshop/browser/ext/tutorials/context.asp

tgreer 189 Made Her Cry Team Colleague

So, what are your buttons? Are they input type="button" , or are they hyperlinks styled to look like buttons?

tgreer 189 Made Her Cry Team Colleague

Wait... I know IE provides an "oncontextmenu" event handler. I'm not sure about FireFox.

You could code that in the body, as so:

<body oncontextmenu="return false;">

However, this is where I make my standard plea/warning: users expect that when they right-click, they get a context menu. I, for example, routinely use it to access "back". It's faster than mousing up to the top of the browser. Disabling or co-opting features that users have come to expect violates a basic application design principle, and should be avoided, in my opinion.

So unless you have a very compelling reason for doing this, I would suggest that you leave it alone.

tgreer 189 Made Her Cry Team Colleague

I think you'll have to code to the Event object, which has cross-browser issues. But the Event object is created when any event occurs, and you might be able to tell if a click was a left or a right click and code accordingly. So my first thought would be to research the JavaScript "Event" object.

tgreer 189 Made Her Cry Team Colleague

Ok, let me rephrase: Using cross-browser JavaScript, CSS and HTML (the focus of this forum), I do not believe it is possible to code a system to automatically batch-print multiple Excel spreadsheets in an Intranet environment.

ActiveX is deprecated, Microsoft has moved onto .NET, but sure, if you wanted to do some IE-only activeX-cum-Excel-cum-VBA-cum-vbscript ASP thing, it might be possible. That's outside my area of expertise, so I'll bow out of this thread.

tgreer 189 Made Her Cry Team Colleague

What I mean by "user function", is that printing is something a web program cannot "force". It's up to the user... I don't think you can code a "batch print" feature into a web application.

tgreer 189 Made Her Cry Team Colleague

Print these files? Where? If you want the USER to download/print the XLS, all you can do, reallly, is serve it back to them. Printing is a user function, and something you cannot "force" to happen, particularly with a streamed file. They may not even have Excel installed on their system.

tgreer 189 Made Her Cry Team Colleague

BBcode is interpreted and rendered into HTML by PHP.