Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Aug 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    image user can customise, layered, mask, javascript?

    Hi,
    I have a script that preloads several images and displays an image that is selected by the user using a drop down box. The problem is that I need these images to be shown at the same time like its layered or masked?

    I start with an image of an iphone 5.
    The the user can select a colour home button from drop down box and that colour is an image of a home button that then gets placed in front of original image to give the appearance of an iPhone with a coloured home button.

    So i have lots of images of separate parts of the overall picture and i want the user to select which images can be seen...

    Any help or advice would be appreciated, I have understanding in various programming lang but not very good with javascript

    Thank You in advanvce

  • #2
    Regular Coder Lerura's Avatar
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    947
    Thanks
    0
    Thanked 130 Times in 129 Posts
    This sub-forum is for Completed JavaScripts ready to use.
    Please use the main javascript forum for questions/help, or if one of the other sub-forums suits your query, use that.

  • #3
    New to the CF scene
    Join Date
    Aug 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ah soz. Thanks

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,930
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    Moved to the appropriate section.

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,688
    Thanks
    80
    Thanked 4,655 Times in 4,617 Posts
    I'm not sure what the question really is. If your overlaying images are ".gif" or ".png" (".jpg" does NOT allow this!) then they can have "transparency". This means, for example, that even though all images are rectangular you could have a blue circle where all outside the circle is transparent. If you then overlaid this blue circle on any other image (or even on the HTML page directly) then whatever is "behind" the png/gif image will show through the transparency.

    So the only "tricks" involved here are that you need to make sure your overlay images use transparency appropriately and then ensure that your JS code (or CSS, though it doesn't sound like that will do the trick for you) positions the overlay image(s) at the rignt spot(s) on the main background image. (And the background image can be a ".jpg".)

    If that's not what you are asking about, then I think you should take it again, from the top.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #6
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    3,020
    Thanks
    56
    Thanked 566 Times in 563 Posts
    cross-posted and answered here: layered image user can customise javascript?

  • #7
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,688
    Thanks
    80
    Thanked 4,655 Times in 4,617 Posts
    Well, the cross posting is horrible. He should be banned from both forums for cross posting (okay, okay, not for the first couple of offenses).

    But I don't think Vic's answer in that other forum is really what he is looking for.

    None of Vic's images use any transparency so how would they work as a "home" button to be placed over an iPhone image?? And Vic doesn't show how to determine the correct positioning for an overlaid image.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #8
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,930
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    Well, how are we gonna proceed here now? Are we going back and forth between forums now?

    I suggest since Vic is also a member here on CF and has been the only one to reply there on WD, and, as a super moderator on that forum, has the power to close the thread, he should close it there and we continue this here altogether.

  • #9
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,688
    Thanks
    80
    Thanked 4,655 Times in 4,617 Posts
    Yes, or vice versa. Though I'm much in favor of Stephan's choice. <grin/>

    Anyway, I really feel Vic misunderstood the question in that other forum and I don't see how we can proceed until CollinsJr clarifies his request.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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