Welcome, Guest. Please login or register.

Author Topic: HTML help?  (Read 2494 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline WilseTopic starter

HTML help?
« on: March 28, 2003, 09:17:09 AM »
Can any of you tell this HTML begginer how to set a link which, when clicked, will download a .wav file?

Thanks in advance,

Offline whabang

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 7270
    • Show only replies by whabang
Re: HTML help?
« Reply #1 on: March 28, 2003, 09:22:11 AM »
eh?
bapp
Beating the dead horse since 2002.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: HTML help?
« Reply #2 on: March 28, 2003, 09:31:00 AM »
Moring geezers,

Whabangs code is perfectly ok for the job. However, it actually depends how your browser is set up - if your MIME settings recognise .wav, it may just play the wave in situ.

Still, you can always shift/right click the link (depending on browser) and opt to save the target, so not really a problem.

Download handlers for different files are often written in in scripting languages, such as javascript. Not much use if your new to the area though :-)
int p; // A
 

Offline WilseTopic starter

Re: HTML help?
« Reply #3 on: March 28, 2003, 10:08:42 AM »
Quote

whabang wrote:
eh?
bapp


I'll try it tonight, cheers.

Offline WilseTopic starter

Re: HTML help?
« Reply #4 on: March 28, 2003, 10:12:27 AM »
Quote
Whabangs code is perfectly ok for the job.


Well, I already have this code, minus the 'bapp' part and it does play from the location.
What's 'bapp', anyway?

Offline carls

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1047
    • Show only replies by carls
Re: HTML help?
« Reply #5 on: March 28, 2003, 10:39:46 AM »
The bapp part is what the link text should say :-)

click here to download a .wav file

Writing a download manager is pretty tedious work and really not motivated just for a wav file. Most computer-savvy people know that they should right-click. For those who don't, just add a simple descriptive text ("right click to download").

Here's a quick reference if you're completely new to HTML: HTML Quick Reference
Amiga: Too weird to live, too rare to die.
 

Offline xaccrocheur

  • Sr. Member
  • ****
  • Join Date: Jun 2002
  • Posts: 430
    • Show only replies by xaccrocheur
Re: HTML help?
« Reply #6 on: March 28, 2003, 10:43:15 AM »
Quote

Wilse wrote:
Quote
Whabangs code is perfectly ok for the job.


Well, I already have this code, minus the 'bapp' part and it does play from the location.
What's 'bapp', anyway?


Damn, Wilse, think with your head (the hairy thing on the top  :-P ) just LOOK at the code.
HTML is a simple END-&-START delimited language. In that case, the tag used is the "A" one, one of the most common, used to link the entity enclosed to a file or location or whatever. BTW be careful and make sure that it points to something that EXISTS. In this very case your "filename.wav" has to live in the same dir as your HTML page file, witch is quite not tidy.

See ? It has a that starts, and that closes it. Whatever is in within the opening en end tags are affected, that is by clicking on the element the user will execute the action.
The syntax is always the same, if you open a

you close it with a

, simple as that.

Now go away  :rtfm:

pX

PS : A last word about your very issue : If what you want when a visitor clicks on your link (a text, image, anything) is some fancy custom player, maybe you should look towards Flash
 

Offline WilseTopic starter

Re: HTML help?
« Reply #7 on: March 28, 2003, 10:51:16 AM »
Quote
The bapp part is what the link text should say


D'Oh!

I haven't woken up yet! :-P
Quote
Writing a download manager is pretty tedious work and really not motivated just for a wav file. Most computer-savvy people know that they should right-click. For those who don't, just add a simple descriptive text ("right click to download").


That's what I'll do, cheers.

Offline Jope

Re: HTML help?
« Reply #8 on: March 28, 2003, 10:58:14 AM »
Quote

Wilse wrote:
Well, I already have this code, minus the 'bapp' part and it does play from the location.
What's 'bapp', anyway?


The anchor tag needs some text .. if you don't specify it, you either won't have anything to click on, or depending on the browser, you'll probably have a short line that represents the link.

So: THIS IS THE TEXT THAT APPEARS AS THE LINK ON THE PAGE

Please check out www.w3.org.. You can teach yourself HTML very nicely by reading the specs and trying it out by writing some small pages, saving them to your hd and then opening them with your browser. There's even a 10min tutorial!

And regarding the above url.. Please, don't ask for more directions, that url is already one link deep into the site. You should find everything you need under that page, just dig around and then enjoy the feeling you get from finding something out by yourself!

Hmm, well, one hint.. The current version of HTML is HTML 4.01 .. you should be able to find the link to the spec now.

Also, once you get more experience, whenever you find a page and wonder how they did it, just Read The Source, Luke!

Good luck in your quest, HTML isn't very hard to learn, just don't give up if you don't immediately find something you're looking for.. :-)
 

Offline TurboLaban

  • Newbie
  • *
  • Join Date: May 2002
  • Posts: 21
    • Show only replies by TurboLaban
    • http://home.c2i.net/ghisdal/
Re: HTML help?
« Reply #9 on: March 28, 2003, 12:00:25 PM »
Take a look here for a nice listing of available elements in html 4: http://www.w3.org/TR/REC-html40/index/elements.html
You can click on the element name to get more information, as well as some examples :)
 

Offline BouncingAyatollah

  • Sr. Member
  • ****
  • Join Date: Feb 2002
  • Posts: 341
    • Show only replies by BouncingAyatollah
Re: HTML help?
« Reply #10 on: March 28, 2003, 12:24:26 PM »
Be mindful of the environment the server the HTML will end up on. If the server is *nix-ey (like linux/Sun etc...) filenames are case sensitive so if you make a link

Click here

and the file you upload from WinBloat or Amiga is called MyFile.wav the link won't work. Same goes for links to other pages. Remember this when you start learning or your first projects will have lots of seemingly broken-for-no-reason links!

Also ".." means parent directory and "." means current, use forward slashes as delimiters, with no starting slash the ref references from where the HTML file is, so to reference a file in the directory above the referencing HTML you'd use

Click here
\\"Whose souls, albeit in a cloudy memory, yet seek back their good,
but, like drunk men, know not the road home.\\" -- BOETHIUS
 

Offline whabang

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 7270
    • Show only replies by whabang
Re: HTML help?
« Reply #11 on: March 28, 2003, 01:24:51 PM »
Quote

You never stopped searching... :-D  :-D  :-D
Beating the dead horse since 2002.
 

Offline WilseTopic starter

Re: HTML help?
« Reply #12 on: March 28, 2003, 06:45:33 PM »
Quote

whabang wrote:
Quote

You never stopped searching... :-D  :-D  :-D


:lol:


BTW, thanks everyone. It's working now.