Html ? buttons and links

<button name=“NYPOST” value=“submit” type=“submit”> <img src="/images/nypost.GIF" alt=“New York Post”></button>

Can some tell me, where I would put the url in the above to make the button actually work ?

a href does not wanna work on the above , so far that I have noticed.

Thanks

Declan

If you want to make a limage a link the way to do it would be:

<a href=“your link here”><img src=“your pic here”></a>

If you are trying to have a link submit a form, your best bet is to use javascript.

<form name=“myForm”>
form contents
<a href="#" onClick=“document.myForm.submit();”><img src="/images/nypost.GIF" alt=“New York Post”></a>
</form>

Note that if they have Javascript disabled, they won’t be able to submit the form.

http://javascript.internet.com/forms/submit-link.html

No , I may be using the wrong code, as per the example on the OP

But when I use netscape6 code , i get the gifs to show up and link to where I want , but not the look I want

The look I want , is the bottom button on the navigation bar, but so far I have not been able to get it to link

www.manticore.ca

Declan

Well, what’s the button supposed to do? There’s no form built into the frame that would do anything. It’ll help us come up with ideas if we know what you want to have happen.

OK - if you’re trying to use a button as a link, again you need to use JavaScript and the onClick event.

<button onClick=“window.location=‘http://www.nypost.com/’;”><img src="/images/nypost.GIF" alt=“New York Post”></button>

This may send just that frame to the form - if it does, you just need to change “window.” to “window.parent.” (I believe).

http://javascript.internet.com/buttons/button-link.html

http://javascript.internet.com/ is a good source of JavaScript examples.

Or, you can just edit your graphics to look like buttons.

Thanks Magog , I am mostly grooving now

The only thing that I am looking at that java site , is to target the frame that I want. Changing the window , to parent worked , which is great for the links that I had opening in new windows, now I just have to find out how to do the target=“Content” that I had in html code.

Thanks for all the replies so far

Declan

“window.parent.content” should reference the frame “content” from the nav bar (the parent part references the top HTML document, and the content references the content frame within the top HTML document). “top.content” should work as well.

Again, note that this will not work if JavaScript is turned off. Making them button-like images and using the <a href=“link”><img src=“image” alt=“name”></a> (as netscape 6 described) is more browser friendly.

And a pet peeve of mine - JavaScript is different from java. JavaScript is a client-side languange, java is a compiled language.

And a pet peeve of mine: JavaScript is NOT a client-side language. You can write server-side Javascript (e.g. ASP). JavaScript is frequently used on the client-side because browser support for it is more ubiquitous than other client-side script engines like VBScript, but it’s not inherently or solely a client-side technology. You can write client-side applets in Java; does that make Java a client-side language?

micco, your point is entirely accurate, and you’re clearly one who knows his stuff. However, I’m sure you’ll agree that in fact the vast majority of javascript programs are used on the client-side, and also that not all web servers natively support javascript. In fact the most-used one (apache on linux) doesn’t without a great deal of effort.

I’ve written CGI in bash, but I wouldn’t consider it a CGI language.

I do however agree that java can be considered as much a client-side language as a server-side one.

I was simply responding to a pedantic inaccurate comment. That poster was trying to make a fine-point distinction but made it incorrectly and I thought it was worth noting. I hope I’m not being pedantic myself, but I’ve seen the sudden clarity some coders get when they finally understand the distinction between the framework (e.g. ASP or CGI) and the language (e.g. VBScript or Perl) and the fact that the two are completely separate issues. Once they understand that separation, they look at design in a different way, and you can’t really do good design until you do. Personally, I’d never write server-side code in Javascript (though I’ve seen it done and had to fix it), but I think it’s worth spending the pixels to correct the original inaccuracy if it helps magog understand that distinction better.

Oh, and just to be responsive, I certainly do agree that the vast majority of Javascript is client side and that most web servers won’t support it natively (though they don’t support a lot of other things we tack on either).

True micco, I mispoke. I was refering to most common usage. You could use JavaScript as server-side, just like you could use Java as client side. But if 99% of the usage happens on one framework, the language tends to become the framework (I note that you do it yourself in your previous statement - ASP is a language, running on a windows IIS framework). It’s shorthand.
Again, I guess it’s different levels of pedanticness.

ASP is not a language. That’s the whole point I was trying to make. ASP is an interface analogous to CGI. You can write ASP scripts in a variety of languages like VBScript, Perlscript, and Javascript and ASP provides the interface to the server and server-level objects like Session, Request and Response. There is no ASP syntax just like there is no CGI syntax. There is syntax in specific languages for dealing with the services and objects that ASP and CGI provide.

<ModeSelections>
    <UltraPedantic>ON</UltraPedantic>
</ModeSelections>

Shouldn’t that be pedanticity??

<ModeSelections>
    <UltraPedantic>OFF</UltraPedantic>
</ModeSelections>

:smiley: