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 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2009
    Location
    Bangalore, India
    Posts
    42
    Thanks
    3
    Thanked 4 Times in 4 Posts

    Question Javascript Online designer

    Hi,

    I wanted to create something like: http://www.14kjewelry.net/virtual/designer.htm (this one looks horrible and only works on IE)

    And it's not difficult to make. But the difficult thing is that I want the design transmitted to a PHP page which creates a bitmap (using GD). The only solution I could think of is sending the x and y coordinates of each image in a POST request. How do I do that? Each browsers seems to render the "designer" page I've created a bit differently, so x and y coordinates are different in each browser.

    Sorry if you didn't understand me, I'm in a hurry.

    Thanks and Regards,
    The PHP Guy

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,023
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    But the *relative* coordinates of each image must be correct, browser to browser, no? So what do you care what the absolute coordinates are??

    In other words, what's the difference if you have this:
    main image x: 300, y: 240
    sub image1 x: 340, y: 280
    sub image2 x: 390, y: 320

    versus this:
    main image x: 260 y: 310
    sub image1 x: 300 y: 350
    sub image2 x: 350 y: 290

    ???

    Surely you wouldn't render the entire HTML page? Surely you'd start from the main image, as a background, and then overlay the sub images at the correct *relative* positions. So what's the difficulty??

  • #3
    New Coder
    Join Date
    Jun 2009
    Location
    Bangalore, India
    Posts
    42
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Thanks for the reply, but I'm using a different approach (download: http://www.mediafire.com/?lmej2qz2lj5)

    But I still have a few problems:

    IE renders the border a bit differently--border runs along the edge, not outside the div. (please use the test designer and drag a star to the top right corner to see what I'm talking about) How do I solve this problem?

    Can any of you please test this on older browsers/different platforms? I've tested it on the latest versions of FF, Opera, Chrome, Safari and IE, all on Win XP. Thanks in advance.

    What would be the best way to send the design to the server? The best way I could think of is to create a dynamic form with a hidden input element for each image in the work-area.

    How to use the test designer: click on any of the stars in the red box to make a copy of it in the blue box. Stars in the blue box can be moved (click-and-drag) and removed(right click or double click). Hover the mouse over a star to see the left and top CSS attributes in the debug text box.

    Thank you very much..

    The PHP Guy
    Last edited by The PHP Guy; 06-20-2009 at 04:55 PM.

  • #4
    New Coder
    Join Date
    Jun 2009
    Location
    Bangalore, India
    Posts
    42
    Thanks
    3
    Thanked 4 Times in 4 Posts
    anybody? please??

  • #5
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by The PHP Guy View Post
    anybody? please??
    This may be of use.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • Users who have thanked effpeetee for this post:

    The PHP Guy (06-23-2009)


  •  

    Tags for this Thread

    Posting Permissions

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