Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-19-2009, 05:38 PM   PM User | #1
The PHP Guy
New Coder

 
Join Date: Jun 2009
Location: Bangalore, India
Posts: 42
Thanks: 3
Thanked 4 Times in 4 Posts
The PHP Guy is on a distinguished road
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
The PHP Guy is offline   Reply With Quote
Old 06-20-2009, 04:20 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,249
Thanks: 59
Thanked 3,999 Times in 3,968 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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??
Old Pedant is offline   Reply With Quote
Old 06-20-2009, 04:37 PM   PM User | #3
The PHP Guy
New Coder

 
Join Date: Jun 2009
Location: Bangalore, India
Posts: 42
Thanks: 3
Thanked 4 Times in 4 Posts
The PHP Guy is on a distinguished road
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..
The PHP Guy is offline   Reply With Quote
Old 06-22-2009, 05:56 PM   PM User | #4
The PHP Guy
New Coder

 
Join Date: Jun 2009
Location: Bangalore, India
Posts: 42
Thanks: 3
Thanked 4 Times in 4 Posts
The PHP Guy is on a distinguished road
anybody? please??
The PHP Guy is offline   Reply With Quote
Old 06-22-2009, 06:05 PM   PM User | #5
effpeetee
Senior Coder

 
effpeetee's Avatar
 
Join Date: Feb 2007
Location: Clapham Junction - London SW
Posts: 4,884
Thanks: 228
Thanked 204 Times in 203 Posts
effpeetee is an unknown quantity at this point
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.
effpeetee is offline   Reply With Quote
Users who have thanked effpeetee for this post:
The PHP Guy (06-23-2009)
Reply

Bookmarks

Tags
designer, images, javascript

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:50 AM.


Advertisement
Log in to turn off these ads.