How Would I Do This? Highlight Entire Text Box With One Click

Discussion in 'HTML & Website Design' started by airraid81, Sep 22, 2007.

  1. #1
    Sorry I couldn't come up with a good post title...

    Anyway, here's my problem. I run a sports site, and I have decided to do viral marketting by creating some banners of popular football players with my site on them for people to use in forums. That is a popular item among football fans who use forums. I also wanted to give them the code and turn the banner into a link to my site. Obviously some people are going to delete the link when they put it in their profile, but what would be the best way to keep it together? On imageshack.us, when they give you the code for your images, it is in a text box that highlights the entire code (including the link to imageshack) when you click on it. How do you do that? Are there any other ways to try to get people to keep your link in?
     
    airraid81, Sep 22, 2007 IP
  2. mds

    mds Active Member

    Messages:
    256
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    If i got that right you want the image to link to your site, then its this simple coding <a href="http://www.yourdomain.com"><img src="http://www.imageurl.gif"></a>
    Replace your domain and your imageurl appropriately.

    I would advice you to host your image a good private web server. I offer a private banner hosting if you need one.
    You can contact me if you need any other services including help with your browsing problems if you have any.

    Sorry i think i got you right now, i will come back with your answer soon. but let the reply above answer for others who might need it.
     
    mds, Sep 22, 2007 IP
  3. airraid81

    airraid81 Active Member

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #3
    I know how to do that. I'm wondering if there is anything I can do to encourage users to keep my link in.

    One thing I saw was that when Imageshack gives the code for it's images, they give the code in a text box. When you try to highlight any part of the code, the entire code is automatically highlighted. Obviously you can still change it when you paste it somewhere, but it has to help some. Wondering how to do that?
     
    airraid81, Sep 22, 2007 IP
  4. airraid81

    airraid81 Active Member

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Also, how much bandwidth do you think I need? My image host now provides 250 mb a month. Each banner is about 2/3 of a mb. I'm planning on making about 30.
     
    airraid81, Sep 22, 2007 IP
  5. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Not only does it highlight, it automatically copies so the next time the user hits CTRL+v it will paste the url that it copied. I know they use Javascript because when I have scripts turned off, it doesn't do it (okay, this is Photobucket not imageshack but they do the same thing).

    Maybe I can find it in their code... gimme a sec.

    *Okay, something like this:
    <input type="text" class="txtCode" name="fullsizecode6" id="fullsizecode6" value="http://s34.photobucket.com/albums/d136/schroedingerscat/?action=view&amp;current=jeanssitetemplate.png" readonly="readonly" onclick="trackCodeClick(event); copyToClipboard(this);">
    <br>
    <label for="urlcode6">Direct Link</label>
    <input type="text" class="txtCode" name="urlcode6" id="urlcode6" value="http://i34.photobucket.com/albums/d136/schroedingerscat/jeanssitetemplate.png" readonly="readonly" onclick="trackCodeClick(event); copyToClipboard(this);">

    They use a bunch of Js and I can't tell from code what it all does, so this might be the one: <script src="http://static.photobucket.com/include/js/thumbview_v6.0.33.js" type="text/javascript"></script> but you'd have to go to their page, view source, and check out each different js to find the right one.
     
    Stomme poes, Sep 22, 2007 IP