Page 1 of 2 12 LastLast
Results 1 to 15 of 30

Thread: Bad Links

  1. #1
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Bad Links

    4th Edit:

    Didn't see that I had set the attachment this time, so...

    3rd Edit -- "new" issue:

    The web page / code is attached in the zip file.

    The buttons work in Firefox, but NOT in IE (6).

    How come? Can anybody tell me what codes Firefox "sees" that IE "cannot"?

    Regards,
    Chuck Billow



    2nd Edit:

    Apologies... I THINK I found it....

    There was/is javascript that I "forgot"...

    The code in the header looks like:

    <script language="JavaScript">
    function goToURL() { window.location = "generalinfo.html"; }
    </script>

    and then, in the button code, there's

    <div align="center"><center><form action="index.html">
    <table><tr><td>
    </td></tr>
    <tr><td align=center>
    <button style="background-color:yellow" onClick="goToURL()">Return to Beginning of Story</button>
    </td></tr></table>
    </FORM>
    </center></div>

    Do I (apperently) need a "function goToURL() { window.location = "page"; line for any link I have on a button?

    Seems so...

    Regards,
    Chuck Billow




    Now I get a warning about "dangerous code"... is there any "safe" way around this, or is this just "the nature of the beast"?

    Edit:

    I must be going cray... I just tried the links locally, and the did NOT work.

    And I just went over this yesterday... but then, my memory could be going as well...

    the code for the button is:

    <div align="center"><center><form action="Duncanandme.html">
    <table><tr><td>
    </td></tr>
    <tr><td align=center>
    <button style="background-color:yellow">Duncan and Me</button>
    </td></tr></table>
    </FORM>
    </center></div>

    What the heck is wrong (now) as it worked when I was working out the bolding code (from Jerry)?

    CB


    ******************
    If I set up a web site locally, and al the files are in one folder, then I put the "PageTwo.html" link with no relative or absolute reference, but just the page name.

    This works fine locally.

    But then when I uploaded the files to the server (1and1) the buttons/links don't call the pages any more.

    How come? Shouldn't the direct page name work as a link?

    Regards,
    Chuck Billow
    Attached Files Attached Files
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Bad Links

    I'm having great difficulty in understanding the sequence of events and what is actually the issue. It would be easier to follow if you could make amendments to your post in a downward direction, or simply replied to your own post.
    Could you start again, listing the issues? - I can't make out what you've resolved and what you haven't.

  3. #3
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Bad Links

    Leif:

    >>
    amendments to your post in a downward direction, or simply replied to your own post.
    <<

    Sorry... yes I can do that...

    Here it is in a nut shell:

    ******************
    The web page / code is attached in the zip file.

    The buttons work in Firefox, but NOT in IE (6).

    How come? Can anybody tell me what codes Firefox "sees" that IE "cannot"?

    Regards,
    Charles
    Attached Files Attached Files
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Bad Links

    I'm not sure what you mean by "work" in this case. The page you posted does not actually have any JavaScript code to effectuate the button press. IE may be halting at that point. Firefox probably is, too; there's no reason for Firefox to be navigating in this page.

    In IE, you probably not viewing script errors. Turn those on under Tools>Internet Options...>Advanced, "Display a notification about every script error" (that's what it is called in IE6, if you are testing in IE7 the wording may have changed).

    If the goal is to go to the URL in the <form> tag, I think you might be better off using:

    <code><input type="submit" style="background-color:yellow; font-weight:bold" value="Donations and General Information"></code>

    which will submit the form. Both add the "?" to the end of the URL in Firefox; the solution to that is a lot more complicated.

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Bad Links

    Actually, I suggest styling links rather than using forms. Since you don't really need to submit form data, just link to a page. Please see the attached.
    Attached Files Attached Files

  6. #6
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Bad Links

    Jefferson:

    When I uploaded the initial pages yesterday ( http://www.imonit.us ) it all worked fine in Firefox, and still does.. (Source available).

    The very same thing does not in Firefox. I'm hesitant to change code in the page till I know the "how come" of TryOne.

    Regards,
    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  7. #7
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Bad Links

    Jefferson:

    I'm checking it now... thanks.

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  8. #8
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Bad Links

    Jefferson:

    That seemed to work *great*.

    I can't quite see where you made the "yellow" declaration, but I'll be looking some more... no question you've gone past my low-level exposure...

    I'm going to (try to) copy this to the other pages...

    Thanks,
    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  9. #9
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Bad Links

    Jefferson:

    Good Job!

    Works well, quick, and without a hitch.

    Lemme know when your holding a coding class!

    Thanks,
    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  10. #10
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Bad Links

    Jefferson:

    All is changed and uploaded...

    Do you have (access to) Firefox? Because when, using Firefox, you go to "Duncan's Story", and then hit "Return to the top of the story", look what happens to the links / text at the bottom?! It seems that it's only on/from that page, and only that link. I've looked over all the links, ??

    I can't find anything wrong, so what the heh?

    And here I thought I was all set!

    Regards,
    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  11. #11
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Bad Links

    Seems to be the post back to the top (index.html) from all pages... the rest seem in order (so far)...

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  12. #12
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Bad Links

    Chuck at the top of that page place this code:

    ....
    <head>
    <a name="top"></a>
    ......

    and then in the code that reads this:

    But we have another cause just as worthy.




    <p align="center">Return to top of the story</p>





    change it to:

    But we have another cause just as worthy.




    <p align="center">[b]Return to top of the story</p>





    This is called an anchor and allows you to navigate inside a page
    Jerry

  13. #13
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Bad Links

    Jerry:

    "Top of the story" in actually a misnomer... I really mean "Page One" (index.html)

    But I'm still getting screwed up code whenever I go back to index.html, from *any* of the other pages...

    Regards,
    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  14. #14
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Bad Links

    Jefferson/Jerry:

    It *appears* to be all set... I went in and changed the *text* used in the link back to index.html, and it seems that, somehow, that was it.

    Thanks to both of you for all the help... I've certainly learned from all this.


    Thanks,
    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  15. #15
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Bad Links

    I had a busy afternoon/evening yesterday, so I missed all of this.

    Regarding the color designation, you probably have figured this out by now, but you can specify colors using codes similar to #FFFF00 (yellow) which can be abbreviated to #FF0. This is sometimes easier than remembering which color names work; I recently was surprised when "cyan" didn't work. A site that makes it fairly easy to research color codes: VisiBone Webmaster's Color Lab.

    The attribute that converts a regular link into a "button style" link is <code>class="btn"</code> and that class is defined in the <style></style> section of the page. You can extract out the style rules into an external file and have a link in each of your pages to that file. This is a lot easier than updating five files when you want to make a font or color change; it's essential when you get to 20 pages or more. The syntax for linking to your style file would be: <code><link rel="stylesheet" type="text/css" href="duncanstyle.css"></code>. Note that within that file, you only have the contents between the <style></style> tags and not the <style></style> tags themselves.

    In looking at the page now, I wonder whether you might want to "fade" the background image a little? It distracts a bit from my reading of the text.

Page 1 of 2 12 LastLast

Posting Permissions

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