• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Reply to: Cool Wall

Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "Cool Wall"

Collapse

  • TheBigYinJames
    replied
    Originally posted by TheBigYinJames View Post
    I've added a picture find feature that saves you going to search for images, it does it for you.

    Leave a comment:


  • TheBigYinJames
    replied
    Originally posted by NickFitz View Post
    There's something funky going on in your mouseup handler: if I go to a pic, mousedown, and mouseup without moving, the image frame is moved 5 pixels up and 10 pixels left. If I drag, a similar shift left and up from the drag end position is seen upon drop, presumably by the same amount.
    Yeh it's a rounding error. When you move an image, it does a percentage calculation across the width and height of the screen. This is so it still spreads all the images out over whatever screen width and height you view the wall on. If I used absolute pixel positions, different screen sizes would mess it up. Since I store the percentages as integers, you're always going to get a few pixels worth of rounding.

    Unfortunately it does always seem to be in the upwards/leftwards direction (due to truncation rather than rounding, I suppose) I'll look into it when I'm at ClientCo next week

    Leave a comment:


  • NickFitz
    replied
    There's something funky going on in your mouseup handler: if I go to a pic, mousedown, and mouseup without moving, the image frame is moved 5 pixels up and 10 pixels left. If I drag, a similar shift left and up from the drag end position is seen upon drop, presumably by the same amount.

    On one occasion it seemed that it moved up 6 pixels, not 5, which might imply a rounding error somewhere. Not sure though...

    Oh, this was in Safari 3 and Firefox 2 on OS X, BTW.

    Leave a comment:


  • Advocate
    replied
    Originally posted by TheBigYinJames View Post
    I should set up a "Clarkson's Tight Jeans' wall with categories ranging from "gonad squashing" to "tent flapping"
    Who's going to search for those pictures?

    Leave a comment:


  • TheBigYinJames
    replied
    Originally posted by Advocate View Post
    Post it in, Clarkson can use it in his "I was on the web and i found THIS.." link.
    I should set up a "Clarkson's Tight Jeans' wall with categories ranging from "gonad squashing" to "tent flapping"

    Leave a comment:


  • Advocate
    replied
    Post it in, Clarkson can use it in his "I was on the web and i found THIS.." link.

    Leave a comment:


  • TheBigYinJames
    replied
    Originally posted by Money Money Money View Post
    Thats quite good fun that!

    You should send a link to clarkson!

    With a bit of work I'm sure you could get it put on the Top Gear page of the bbc website.

    May need parental control though!
    Like a lot of my side projects, I get bored of them after a while - when they don't make me any money But maybe the Beeb would want it for the Top Gear website.

    Leave a comment:


  • Money Money Money
    replied
    Thats quite good fun that!

    You should send a link to clarkson!

    With a bit of work I'm sure you could get it put on the Top Gear page of the bbc website.

    May need parental control though!

    Leave a comment:


  • TheBigYinJames
    replied
    Originally posted by NickFitz View Post
    In the long run it might be best to have the server retrieve pics, thumbnail them to a suitable size, and serve them yourself rather than deep-linking - although this could end up using a fair bit of space. Then there's copyright issues...
    Yes, I see you added a huge ape pic. I was against storing the images for all the reasons you gave above, but mostly space and bandwidth from my webserver.

    My advice on the 'add new pic' dialogue is to use images from Google's image cache of results, since they are dinky enough to fit nicely on the page.

    I will look at resizing the image on the fly, though.

    Leave a comment:


  • NickFitz
    replied
    You might want to look into limiting the size of pictures - a bit of CSS specifying max-width and max-height would probably be good enough for modern browsers (though not IE6) although it could mess up aspect ratios in certain circumstances - maybe inspecting the image dimensions and adding inline width and height attributes to the image element would be better (though don't tell the WaSP I said that).

    In the long run it might be best to have the server retrieve pics, thumbnail them to a suitable size, and serve them yourself rather than deep-linking - although this could end up using a fair bit of space. Then there's copyright issues...

    Leave a comment:


  • TheBigYinJames
    replied
    Originally posted by NickFitz View Post
    Remember, JavaScript functions are objects....[snip].
    Ta, I'll look into it. I just cobbled together bits of AJAX script that I knew were working, it's very much a hash job.

    Leave a comment:


  • TheBigYinJames
    replied
    Originally posted by voodooflux View Post
    Looks good, although Seven of Nine and Number 6 are hotter than indicated
    If I don't get bored with it, I was going to add a "make me a version of this" so you could drag and drop them where you want, and then be able to flick back and forward between theirs and yours.

    At the moment, you can only drag photos around on walls you create yourself (after registering + logging in)

    Leave a comment:


  • NickFitz
    replied
    Remember, JavaScript functions are objects. So if you change

    Code:
    function sendData(theData)
    {
        ajaxFunction('callbacks.pl',theData,'receiveData');
    }
    to

    Code:
    function sendData(theData)
    {
        ajaxFunction('callbacks.pl',theData,receiveData); // removed quotes on last argument
    }
    then

    Code:
     xmlHttp.onreadystatechange=function()
      {
        if(xmlHttp.readyState==4)
        {
          eval(AJAXreceivingFunction + "('" + xmlHttp.responseText.replace(/'/gi,"\'") + "')");
        }
      }
    can be replaced with

    Code:
     xmlHttp.onreadystatechange=function()
      {
        if(xmlHttp.readyState==4)
        {
          AJAXreceivingFunction(xmlHttp.responseText.replace(/'/gi,"\'")); // no eval
        }
      }
    removing the need for an "eval", which is a Good Thing - "eval" actually has to kick off a whole new script engine instance, initialise it, and pass it the string to be parsed and executed, whereas a function reference can merely be executed using ( [which is actually defined in the language spec as the function invocation operator IIRC].

    Check out Eric Lippert's post Eval is Evil, Part One for more details - he worked on the Microsoft scripting engines when they were first developed about ten years ago, and the execution model remains the same.

    Leave a comment:


  • voodooflux
    replied
    Looks good, although Seven of Nine and Number 6 are hotter than indicated

    Leave a comment:


  • Bear
    replied
    Originally posted by TheBigYinJames View Post
    Yeh I probably should point out it won't work on screens the size of postage stamps.
    Thanks for letting me know

    Leave a comment:

Working...
X