Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Embedding sound on website!

  1. #11
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Titties
    Should this change be made within all the sub-sites???

    I dont really understand what the difference is (or understand the code at all)
    OK. The answer is yes, but you really don't need to worry about it. The changes are improvements, but if you don't want the hassle, don't bother. The advice was more for the future, along the lines of; what you did works, but here's how to do it better.

    There is one thing that this shows though: it tends to be easier to manage scripts when you place them in external files, especially when they are used in more than one document. You would just need to change one file and the update affects anything that uses the script automatically.

    As i said the rollover and banner image changes was made with Imageready [...]
    Sorry, I missed that.

    You said something about "no such image with the name or id attribute value(...), so the browser throws an error"
    If you look at the img elements in the markup (for example, line 131) you'll see that some of them have a name attribute:

    HTML Code:
    <IMG NAME="Index_03" SRC="images/Index_03.jpg" WIDTH=490 HEIGHT=100 ALT="">
    This attribute value can be used by a script to find an image within the document, and if you look at the changeImages calls, you'll see that 'Index_03' is the first argument. However, at the end of these calls, you'll also find 'Index_34' and a filename with the same name, but no img element within the markup has a matching name attribute so the script errors out when it tries to use something that doesn't exist.

    Mike

  2. #12
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Thanks again Mike. I just wanted to jump in here with another thought getting back to the use of the frameset - give the frameset page a title:
    HTML Code:
    <html>
    <head>
    <TITLE>Welcome to the home of Titties</TITLE>
    </head>
    
    
    <frameset rows="100%,1px" border="0" framespacing="0">
    <frame frameborder="0" noresize="noresize" src="intro.html">
    <frame frameborder="0" style="visibility:invisible;" noresize="noresize" src="sound.html">
    </frameset>
    
    
    
    </html>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #13
    Join Date
    Jul 2005
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    but if you don't want the hassle, don't bother
    There's allways room for improvements


    it tends to be easier to manage scripts when you place them in external files
    I have started to realise that, especially with the "slide-in" menu, which will be differing from subpage to subpage; here i can just refer to the same file with the .js extension. ehm javascript file^^

    Ok, i can see that it must be making errors when it is referring to an element that doesnt exist... that would be kinda unlogical..

    So the name attribute is a kind of a label/reference to an image within the code?
    ie. when i have to use a picture/image severel times, then if i give it a name and the location folder/url for the image, then i can just give the name the second, third... n'th place i want to use that specific picture without the need of typing the location folder n times?

  4. #14
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    So the name attribute is a kind of a label/reference to an image within the code?
    Yes but, generally only in the javascript code. In html code you need to refer to the image's location. There are some special cases where these rules can be bent but, it is usually a bad idea. One should always bear in mind that some folks just won't/can't use javascript to view your page so, it is courteous to at least have the basic html code include an image wherever there is a spot for one.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #15
    Join Date
    Jul 2005
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    it is courteous to at least have the basic html code include an image wherever there is a spot for one.
    ok, i'll keep that in mind.

    well guys, thank you for all your help. I really appriciate it..

    Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •