tgreer 189 Made Her Cry Team Colleague

I'm still not seeing/understanding this. DIV elements do not have a "URL" attribute, so your example doesn't make sense to me.

Ignoring all of that, can we "abstract" your question this way:

How do I change the attribute of an element, based on a variable passed into a function?

My answer would be, assuming you have a variable "getid" that corresponds to the ID of the element you wish to modify: document.getElementById(getid).attributeName = "attributeValue"; If that doesn't work, you can try the DOM method "setAttribute()".

tgreer 189 Made Her Cry Team Colleague

You already are... the variable is passed into "getid", and then subsequently into "rowid". I don't know what "menu" you're passing it into. I see a "window.open" command, is your menu a page in a new window? Then simply include your "getid" variable as a querystring parameter in the URL for the new window.

The new window can also refer to variables in the parent window using the "self.parent.getid" syntax.

Your scripts are a bit sloppy: some missing semi-colons, and also, it's good practice to enclose procedure bodies in curly-braces (including your if/else conditional statements).

tgreer 189 Made Her Cry Team Colleague

I plan on placing all the files in the same directory so structure won't be a problem, and I hope to use the value from the database to identify the filename via variable.

How would you suggest doing this in a feasable manner? I could type each url out (which is about 100 char ea) * 800 files = 8,000 characters (aka chances for a typo).

When you say "How would you suggest doing this", what does the word "this" refer to? You already say you have a ProdNum field in some database table to refer to a filename. So... what's the question?

Type each URL out? Why? Where? You say the URL is already in the database.

Is there a way I could copy/paste to each of the cells in the DB a script or a way of pulling the value and inserting it into the <a href> statement?

" Is there a way I could copy/paste to each of the cells in the DB a script" is not a meaningful sentence fragment.

"way of pulling the value and inserting it into the <a href> statement? " Use a SQL query. Use the data retrieved to set the value of your Link object(s).

Sorry, you're going to need to be clearer and more specific.

tgreer 189 Made Her Cry Team Colleague

"Director" is indeed the industry-standard application for CD, DVD, or kiosk-type interactive applications.

I just don't know what else we can tell you! There isn't a magic-bullet application that will allow you to create elaborate, rich-media, data-driven presentations based on clicking-through a few wizards.

Such work is hard, and that's why such applications are developed by skilled, trained, creative professionals. If you're unwilling/unable to undertake this yourself, you might consider hiring someone to do this for you. PM me if you're interested, and I can refer you to a few.

tgreer 189 Made Her Cry Team Colleague

Please use code tags. Please post in the correct forum.

tgreer 189 Made Her Cry Team Colleague

Of course, if your goal is to simply avoid the need to MANUALLY add the class to the first paragraph, then you can write a script to do it for you.

Consider this test page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>T.Greer Adjacent Sibling Test</title>

<style type="text/css">

h1
{
  margin: 0;
  text-align: left;
  font-family: Verdana;
  FONT-SIZE: 10pt;
  COLOR: #000;
  text-decoration: none;
  font-weight: bold;
  padding-left: 25px;
  padding-top: 15px;
  padding-bottom: 15px;
  padding-right: 0px;
}

p
{
  margin: 0;
  text-align: justify;
  width: 475px;
  font-family: Verdana;
  font-size: 7pt;
  color: #000;
  text-decoration: none;
  padding-left: 25px;
  padding-top: 5px;
  padding-bottom: 10px;
  padding-right: 0px;
}

h1 + p:first-letter
{
  color:red;
  margin-left:20px;
  font-size:xx-large;
}

.ie_p
{
  margin: 0;
  text-align: justify;
  width: 475px;
  font-family: Verdana;
  font-size: 7pt;
  color: #000;
  text-decoration: none;
  padding-left: 25px;
  padding-top: 5px;
  padding-bottom: 10px;
  padding-right: 0px;
}

.ie_p:first-letter
{
  color:red;
  margin-left:20px;
  font-size:xx-large;
}


</style>

<script type="text/javascript">
function doChangeClassName()
{
    var x = document.getElementsByTagName('div');
    for (var i=0;i<x.length;i++)
    {
        x[i].childNodes[1].className = "ie_p";
    }
}
</script>

</head>

<body>
<div>
<h1>First Headline</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur id urna. Ut et tellus quis leo commodo condimentum. Nam augue neque, venenatis ut, auctor sed, sagittis id, lorem. Suspendisse porttitor eleifend felis. Sed et lacus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam sodales, lectus sit amet fermentum malesuada, magna diam porta turpis, a volutpat ante tellus nec tortor. Vestibulum cursus nibh vel dui. Proin quis massa facilisis risus gravida eleifend. Nunc vel eros eget …
tgreer 189 Made Her Cry Team Colleague

A quick search reveals this technote.

tgreer 189 Made Her Cry Team Colleague

What you've done is exactly correct: you've implemented the "Adjacent Sibling" selector (the plus sign) and the CSS2 "first-letter" pseudo-class.

It should work perfectly, and does in FireFox. What you've discovered is yet another IE bug: it doesn't support Adjacent Sibling Selectors. You might say that IE is a pain in the Adjacent Sibling Selector.

tgreer 189 Made Her Cry Team Colleague

Your first post said you wanted your application to "reside on CD". That's different than creating a product that can "install itself onto any system...".

EVERY application requires something to run it. For example, C# and VB.NET programs need the .NET Framework. HTML/JavaScript/CSS need a browser, Visual Basic 6 needs a vbrun dll, and yep, Director/Flash programs need a "player" application.

If you want to create an interactive CD/DVD, then yes, Director is your product. If you want to create a stand-alone application with a CD-based installer, then I suggest using the C# language.

However, neither of these have much to do with HTML/Javascript/CSS, so this thread is off-topic.

tgreer 189 Made Her Cry Team Colleague

If you truly believe that, then you understand Dani, and me, about as well as you understand the programming involved in what you're asking.

You began this thread talking about one thing, then attempted to refute the objections to your naive suggestion by pointing at something else entirely.

So, just because Dani doesn't want to attempt to implement the unrealistic first suggestion, nor the ineffectual second suggestion, doesn't mean she's "brainwashed". In fact, I suggest you re-read her posts within this thread, as they obviously didn't sink in the first time.

Also, notice how I'm addressing you directly. That's what grown-ups do. So while I find your clumsy, juvenile flame-baiting personal asides mildly amusing (kind of a like a Three Stooges rerun), I'm going to have to ask you to stop.

Either: come up with some realistic, on-topic suggestions, address personal issues to me (that's what PM is for), or stop posting in this thread. If you keep posting about "tgreer" in your messages, I'm going to have to start charging you a usage fee.

Also, this will be my last posting in this thread, as everything that can be said, has been said. So if you really want to slam back, I'll graciously allow you the last word: have at it. I would just ask that you put some thought into the reply. I can appreciate a really well-constructed, witty, sarcastic message, so... take your time, perhaps seek the advice …

tgreer 189 Made Her Cry Team Colleague
alert = document.getElementById("divObjectId").style.display;
tgreer 189 Made Her Cry Team Colleague

You could leave the list as is. Place all of your images in their own absolutely-positioned DIV element. Just stack them on top of each other.

Use "onmouseover" and "onmouseout" to control either the CSS "visibility" or CSS "display" attribute of the appropiate image.

Your script should store the ID of the "current" image in a variable, so that the script can toggle it back off.

tgreer 189 Made Her Cry Team Colleague

The problem is related to absolute vs. relative positioning. "Absolute" doesn't really mean "absolute", it means, "relative to the nearest parent element which is absolutely-positioned, but disregarding that parent element's content". A mouthful, I know.

What's happening is... equally hard to explain. An experiment helps.

#leftMenu ul li img
{
position:absolute;
top:340px;
left:20px;
height:100px;
width:100px;
}

Change the position to "relative". You can see that your image is PART OF the "li" element. It's position will be influenced by it. Technically, the li is relatively-positioned, so the img should still be absolute relative to the body, but this is a LIST, and so obeys its own box model (it's like its own private page, in a sense). Saying it another way, the LI element is seen as the parent of the image, acting as if the LI was absolutely positioned, even though it isn't. So, the image's "top" will always be relative to the LI's position. Said a third way: the natural order of the the elements of a list will always supercede and/or influence CSS positioning.

Your choices:

Take the images out of the MENU. Have a separate DIV, and use Javascript to position the proper image within that DIV.

-or-

Don't use a LIST for your menu. That will make your pop-outs much more difficult.

I attempt to explain CSS positioning in this article. When you read the part about Absolute Position, just keep in mind that your LI …

tgreer 189 Made Her Cry Team Colleague

As I said:

Many professionals use Director. Many also author HTML, with embedded Flash as needed.

tgreer 189 Made Her Cry Team Colleague

This isn't an HTML/Javascript/CSS question, though, such a project could have HTML elements.

You're right, Web-browser Javascript doesn't interact with databases. Other products, though, could include their own JavaScript engine (for example. Adobe Acrobat has a Javascript parser and DOM).

Many professionals use Director. Many also author HTML, with embedded Flash as needed.

tgreer 189 Made Her Cry Team Colleague

Does anyone have a good example of how to use this method? All of the MSDN examples I could find are useless because:

  1. they show a hard-coded size for the byte array
  2. they show writing the output to the Console

Ridiculous. I have a file that contains some binary image data (PCL format) that is base64 encoded. I simply need to read that, decode it back to raw binary, and write it out to a file.

All my attempts run, but do not produce usable output.

tgreer 189 Made Her Cry Team Colleague

The last suggestion is the best. An anchor tag with the href set to "#" will navigate to the TOP of the page when clicked, which isn't quite the same thing as "go nowhere".

Similarly, using an empty JavaScript is... well, silly, in my opinion.

So I second IAMMATT's suggestion: just style a normal element, such as span, to display the hand cursor.

However, here's my standard scold: When a user sees their cursor turn to a hand, they expect that clicking will DO SOMETHING, in particular, that they will navigate somewhere.

So, creating an element that gives the hand cursor but that does nothing, violates the User Model, which is very nearly always a bad, bad idea.

EDIT: I re-read your original post. You want a hyperlink that runs a Javascript when clicked, so the <a href="javascript[B]:myFunction();">Run your function</a>[/B] is the proper method for this.

tgreer 189 Made Her Cry Team Colleague

There is no simple "code". HTML Frames have been around for years, since the very early days. I suggest you start with the official documentation, and as you write your code and hit difficulties, come back to ask specific questions.

tgreer 189 Made Her Cry Team Colleague

There are two searches that can be done, the web itself, or the site. If you search the web, the results appear on a google page framed by the site.

tgreer 189 Made Her Cry Team Colleague

Very ugly! Great, one more OS/Browser combo to add to the mix when coding sites.

tgreer 189 Made Her Cry Team Colleague

Re-read Dani's post #29, which explains why a hack like that isn't feasible here. Also, that's a far cry from you originally asked for:

So, you just look for a list of programming syntax in their post, and either ask them to use code tags, or automagically add them. Or automatically spit out a message, please enclose code with
[kode][/kode] tags. How hard can it be?

The answer, once more, is: very, very hard to do this correctly. And very, very confusing and inelegant to do it the wrong way.

tgreer 189 Made Her Cry Team Colleague

Glad I could help!

tgreer 189 Made Her Cry Team Colleague

Entia non sunt multiplicanda praeter necessitatem.

Occam's Razor applies to this discussion. Either cprogramming:

A. has written an advanced AI to parse each and every post, sensing the presence of code and automatically applying code tags, on an advanced high-speed server so that delays aren't noticed, and are using it on their website rather than making a fortune by selling this technology elsewhere...

or,

B. they moderate their posts and educate their users.

Now, which hypothesis do we eliminate?

iamthewee, I have nothing against you personally. As far as I know this is the first thread we've shared. I agree that I am irritated by posts without code tags, and aggresively moderate in those forums under my review.

But ignoring the explanations of experienced coders/forum operators, telling them they don't know what they're talking about, implying that we have an obligation to implement your suggestion etc. etc. is not the way to handle the issue.

I truly am open to suggestions about this, as it is an issue that affects me. Truly, if there is a magic bullet, I'd want to use it! But a code parser is not a workable solution, period.

So, I echo Dani: does anyone have OTHER suggestions?

tgreer 189 Made Her Cry Team Colleague

Actually, I repeat the suggestion... I think the thread should be closed and all the posts after Dani's post #13 be deleted. Once an issue has been considered, and addressed, which this one has, then there is no reason for the thread to continue. All you get is useless posts like this one. :)

tgreer 189 Made Her Cry Team Colleague

cprogramming doesn't use a parser. They just tell people to use the code tags. Evidence, this thread:

http://cboard.cprogramming.com/showthread.php?t=78438

If they were using a parser, all the code fragments would be "parsed" into code tags.

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

iamthewee: the issue has been addressed. I addressed it. Dani addressed it. What's up with me is your attitude, and insistence that "something be done!", particularly in the face of rational reasons why what you ask cannot be done.

But by all means, keep the suggestions coming.

P.S. If you have an issue with a person, it is best to address that person. Asking Dani "what's up with tgreer" is about as rational as asking her to implement 10,000+ lines of code to insert code tags. :)

P.P.S. If you're going to quote someone, please use the quote tags. Dani, what would be cool is implementing PHP code to sense quotes and automagically insert quote tags. Get right on that, would you?

tgreer 189 Made Her Cry Team Colleague

Scared? What possible confluence of events would cause me to be scared by this thread?

I'd say it'd have to be done with php, never used it before tho so I'm not sure what's involved. Heh heh.

Right. I, on the other hand, do. So does Dani. We've both expressed how difficult this would be. It might even neccesitate another dedicated server.

So, you just look for a list of programming syntax in their post...

Oh, that's all. Just look for programming syntax! Why didn't I think of that? Again... it's a nice idea, but totally impractical, case closed.

Situation? Resolved? So you've escalated your idea to a "situation that needs resolving"? Interesting. May I suggest another viewpoint? You made a suggestion, it was considered, found to be not-workable, and thus rejected. Thanks for the suggestion, let's close the thread, folks.

tgreer 189 Made Her Cry Team Colleague

You need to use the onkeypress event.

<input 
  onkeypress="JavaScript:return key(event);"
  id="myTxt" />
tgreer 189 Made Her Cry Team Colleague

But, what is your actual question? It's lost in run-on sentences and code postings.

Going just from your thread title: you can set the action tag of a form by retrieving the form (the method depends of course on your DOCTYPE), and setting the "action" attribute to a string.

tgreer 189 Made Her Cry Team Colleague

Yep, that's what I said: hyperlink an image :)

tgreer 189 Made Her Cry Team Colleague

You have to specify an input element of type "file", and then you have to have server-side code to handle the uploaded file. One without the other is meaningless. Which server-side language do you use?

tgreer 189 Made Her Cry Team Colleague

The two major browsers, in conjunction with a properly-declared doctype, have two different Event models.

I'm not sure that you want to handle every keystroke. A regular expression might be the better way to validate this.

In any case, something like this:

function key(e)
{
  var keycode;
  if (navigator.appName == "Microsoft Internet Explorer")
  { keycode = e.keyCode; }
  else
  { keycode = e.which; }

  if (isNaN(keycode))
  {
    alert("Please enter a number.");
  }
}
tgreer 189 Made Her Cry Team Colleague

Well, you don't show any DOCTYPE, so we, and your browser, have no idea of which Document Object Model to use. "document.Textbox" may or may not be meaningful in any particular browser's default HTML version/DOM.

You simply must declare a proper DOCTYPE, and then work within that Object Model.

Both "document.getElementById()" and "document.getElementByName()" are perfectly valid methods within their DOMs.

tgreer 189 Made Her Cry Team Colleague

You want to add a CD to your site? I'm sorry, I have no way of answering that question... I don't even understand the question. Start over...

tgreer 189 Made Her Cry Team Colleague

That would require cross-browser scripting, and that's something you couldn't force on another site. Sorry, not possible.

tgreer 189 Made Her Cry Team Colleague

Please use code tags. Please use English, including proper punctuation, spelling, and grammer, as far as possible.

I personally found your message incomprehensible... what does "used the onsubmit and onradiochanged both give errors function not part of form" mean??

tgreer 189 Made Her Cry Team Colleague

Hyperlink an image.

<a href="http://www.jscode.com/js_auto_bookmark.shtml" alt="bookmark"><img src="myImage.gif" alt="bookmark" /></a>
tgreer 189 Made Her Cry Team Colleague

I'm not mad, so no apology necessary. I just know from experience that you learn better by figuring things out yourself. This forum is a great resource for pointers in the right direction, so there was nothing wrong with starting the thread and asking some questions. You have to follow-up on the answers, though!

I hope your project turns out well.

tgreer 189 Made Her Cry Team Colleague

This isn't feasible. I'm an experienced JavaScript coder, and the overhead just to include a script that could parse every post and detect code (and code fragments) would be astronomical!

The place to do it, if it all, would be server-side, in PHP. But we're a forum, not a code-parsing service. I think you're seriously underestimating what it would take to "detect code". And it would never be 100% accurate, so could potentially cause more problems than it would solve.

I would politely suggest that this thread be closed, or at the very least, to stop pestering Dani to implement a feature that isn't feasible.

tgreer 189 Made Her Cry Team Colleague

All of the information you need is in the link I provided above. With all due respect, I encourage you to do some of this work yourself. That's why I pointed you to the reference, rather than writing the code for you.

If you click that link, you'll see a complete list of every date-related Javascript method. Clicking "getMonth()" shows you detailed documenation about that method, including sample code for converting the month-number to a month name.

tgreer 189 Made Her Cry Team Colleague

You would use the various methods and properties of the Date() object to return just the portions you need:

http://www.w3schools.com/jsref/jsref_obj_date.asp

Or, you can use JavaScript's String() ojbect or RegEx to modify the string you display.

tgreer 189 Made Her Cry Team Colleague

1. Select the text you want hyperlinked.
2. Click the hyperlink control widget.
3. Click "OK".

tgreer 189 Made Her Cry Team Colleague

I mean, if you're asking a question about ASP, then you need to ask your question in the ASP forum:

http://www.daniweb.com/techtalkforums/forum62.html

There is no way to secure a website using only client-side code, which is the focus of this forum.

tgreer 189 Made Her Cry Team Colleague

No problem - I don't we have a section dealing with BBCode, so don't worry about it.

tgreer 189 Made Her Cry Team Colleague

Not here! Try our "Webmaster Marketplace", under the "Site Management" category.

tgreer 189 Made Her Cry Team Colleague

That's forum BBCODE, not HTML. So I'll assume you mean exactly what you say, and you need to know how to place a hyperlinked image within a forum message: Just nest them:

http://www.tgreer.com/tgroup.png

[URL="http://www.tgreer.com"][IMG]http://www.tgreer.com/tgroup.png[/IMG][/URL]

Of course, the same works with regular HTML: place your img tags inside your anchor tags.

tgreer 189 Made Her Cry Team Colleague

The "document.write" statement is deprecated in most new doctypes.

However, with a loose (or no) doctype, this should work. Where is the script running? It needs to run in the <HEAD> section of your page.

Give us a link?

tgreer 189 Made Her Cry Team Colleague

Post in the ASP forum. There's nothing you can do with HTML or client-side script.

tgreer 189 Made Her Cry Team Colleague

You might be able to place a validation object in the datagrid.

If that doesn't work, you'll have to write a Javascript script to iterate through the controls.

With ASP.NET, it's best to not fight it and do everything server-side. Sad, but true.