Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

HTML

Options
  • 16-06-2012 5:23pm
    #1
    Registered Users Posts: 1,880 ✭✭✭


    I've built a large website to show off my movie collection, i used dreamweaver CS3, but I also used Collectorz Movie Collector which can build webpages, it was the collectorz html code that I used as without it, it would have taken me several months to create the website

    here a snippet of the code:
    <tr>
    <td valign="top">
    <a href="images/34621f.jpg" title="3:10 To Yuma" id="thumbimage">
    <img src="images/34621t.jpg"/>
    </a>
    </td>

    when you hover the mouse pointer over an image i have a popup displaying the name, but if a person clicks the image it takes you to "This webpage is not found". The destination image does not exist, i removed it earlier on to keep the filesize down.

    Can i add code or remove some so the image cannot be clicked?

    Thanks.


Comments

  • Closed Accounts Posts: 34,809 ✭✭✭✭smash


    Just remove the link. (a href tag)


  • Registered Users Posts: 1,880 ✭✭✭johndoe99


    i tried that earlier, but tooltip would no longer work.

    But i've solved it now, i had to alter another tag.

    Thanks for your help.


  • Registered Users Posts: 1,880 ✭✭✭johndoe99


    actually do you know of a way:

    to disable the href tag within the page, so that i do not have to remove or alter each tag, as i have 3000+ href tags


  • Registered Users Posts: 1,757 ✭✭✭Deliverance XXV


    To disable the href tag you would need to out something like # where the target address is.
    Another better practise option if you just want the tooltip would be to use spans - something like:

    [HTML]
    <tr>
    <td valign="top">
    <span title="3:10">
    <img src="images/34621t.jpg"/>
    </span>
    </td>
    </tr>
    [/HTML]


  • Registered Users Posts: 1,880 ✭✭✭johndoe99


    i've fixed it, don't know how this worked, but i removed the a
    <a href="images/59454f.jpg" title=".45" id="thumbimage">

    to:
    <href="images/59454f.jpg" title=".45" id="thumbimage">

    the tooltip still works and the image cannot be clicked. Just as i wanted.


  • Advertisement
  • Registered Users Posts: 11,980 ✭✭✭✭Giblet


    No, that's just wrong

    <img src="whatever.jpg" title="My Title" alt="My Alt Text" />


  • Registered Users Posts: 1,880 ✭✭✭johndoe99


    what i did the other day does not work, a hard refresh showed me that.

    I'm going to have to edit each line manually:
    <a href="images/34621f.jpg" title="3:10 To Yuma" id="thumbimage">
    <img src="images/34621t.jpg"/>

    to:
    <img src="images/79791t.jpg" title="3:10 To Yuma"/>


  • Closed Accounts Posts: 27,857 ✭✭✭✭Dave!


    You can probably disable the links using Javascript. I'm on my phone so can't do it now. Dunmo if it would interfere with some other functionality you've got going on though. But editing 3000+ links manually is crazy.


  • Registered Users Posts: 1,757 ✭✭✭Deliverance XXV


    Best thing to do with editing 3000+ links in a webpage is to open the files in notepad++ and use the find/replace function on the section of text where your links you want edited are.

    In the 'find' field enter a search term like <a href
    and in the replace field use something like <span and </a> with </span> that will replace all the links with spans. Something like that would be a quick fix. Keep copies of the original files in case you overwrite something that you can't see (by accident) and you can just revert to the original files in that instance. Or just do them all manually :)


  • Registered Users Posts: 1,880 ✭✭✭johndoe99


    i tried span on a backup copy, but it somehow messed up my borders, which i have, my website is basically images of covers in columns and rows of 5x5.

    I used find/replace though to bring down the "title=" to the src line, which has enabled me to just cut and paste without any keyboard use and ive done about 400 lines in the past hour.

    But thanks for all your help lads it has given me other ideas.


  • Advertisement
  • Registered Users Posts: 11,980 ✭✭✭✭Giblet


    You really need to move to using a database + some sort of server based web framework and use templates instead.


  • Closed Accounts Posts: 3,513 ✭✭✭donalg1


    I would also try using Notepad++ to change them, especially if they are all on the same page or together on a couple of pages as you could select blocks of the code at a time and change them all at once.


  • Registered Users Posts: 1,082 ✭✭✭Feathers


    donalg1 wrote: »
    I would also try using Notepad++ to change them, especially if they are all on the same page or together on a couple of pages as you could select blocks of the code at a time and change them all at once.

    If I remember correctly, doesn't notepad++ allow you to do a find/replace across all files under a folder structure as well. OP, this is where you have the opportunity to learn some regular expressions ;)


  • Closed Accounts Posts: 3,513 ✭✭✭donalg1


    Feathers wrote: »
    donalg1 wrote: »
    I would also try using Notepad++ to change them, especially if they are all on the same page or together on a couple of pages as you could select blocks of the code at a time and change them all at once.

    If I remember correctly, doesn't notepad++ allow you to do a find/replace across all files under a folder structure as well. OP, this is where you have the opportunity to learn some regular expressions ;)

    I have never tried that but I would imagine it would knowing notepad++ and its usability. There is so much it can do that nobody could know it all!


  • Registered Users Posts: 1,880 ✭✭✭johndoe99


    Giblet wrote: »
    You really need to move to using a database + some sort of server based web framework and use templates instead.
    its just a website for showing off my blu-ray and DVD collection, i 'm uploading to my UPC webspace. So just building a standard website.
    donalg1 wrote: »
    I would also try using Notepad++ to change them, especially if they are all on the same page or together on a couple of pages as you could select blocks of the code at a time and change them all at once.

    Had a look at notepad++ but the find/replace function is no good as the title= is different for each line of code.

    i've finished editing about 70% of the code manually at the moment.


  • Registered Users Posts: 2,467 ✭✭✭SweetCaliber


    The easiest way to do it:

    [PHP]
    <tr>
    <td valign="top">
    <a onClick="return false;" href="images/34621f.jpg" title="3:10 To Yuma" id="thumbimage">
    <img src="images/34621t.jpg"/>
    </a>
    </td>
    [/PHP]

    Just add the

    [PHP]
    onClick="return false;"
    [/PHP]

    To the a href and it will prevent it from forwarding the user to the page specified. If you don't need the url then put the a href="#" or the a href="javascript:void();"


  • Registered Users Posts: 6,511 ✭✭✭daymobrew


    johndoe99 wrote: »
    Had a look at notepad++ but the find/replace function is no good as the title= is different for each line of code.
    Notepad++ has regular expression support so it could have handled different 'title' strings.


  • Registered Users Posts: 1,880 ✭✭✭johndoe99


    lee3155 wrote: »
    The easiest way to do it:

    [PHP]
    <tr>
    <td valign="top">
    <a onClick="return false;" href="images/34621f.jpg" title="3:10 To Yuma" id="thumbimage">
    <img src="images/34621t.jpg"/>
    </a>
    </td>
    [/PHP]

    Just add the

    [PHP]
    onClick="return false;"
    [/PHP]

    To the a href and it will prevent it from forwarding the user to the page specified. If you don't need the url then put the a href="#" or the a href="javascript:void();"


    that bloody worked :D:D:D. Thanks


  • Registered Users Posts: 1,880 ✭✭✭johndoe99


    just a big thanks to you all, website is up and working great.


  • Registered Users Posts: 114 ✭✭Wanchor


    Sorry to be late to the party but HTML has a 'base' tag. I think it could work perfectly in this case (that is, if it overrides links). Anyway, here it is:

    http://www.w3schools.com/tags/tag_base.asp

    W3Schools is fine for HTML..


  • Advertisement
  • Registered Users Posts: 597 ✭✭✭yeraulone


    Feathers wrote: »
    If I remember correctly, doesn't notepad++ allow you to do a find/replace across all files under a folder structure as well. OP, this is where you have the opportunity to learn some regular expressions ;)

    Sublime will let you do this. Its a much better editor than notepad++ IMO.


Advertisement