Solved

Dhtml to perl

Posted on 1998-09-21
4
189 Views
Last Modified: 2010-04-09
I am dynamically reassigning the positions of some graphics on a web page with the mouse but after I am done I would like to be able to send the position coordinates( with a submit button) to a perl script to be stored so that these rearranged pages could be reloaded by calling the script to dynamically output the page with the coordinates which had been stored previously. Is this doable?
0
Comment
Question by:guadalupe
  • 2
4 Comments
 
LVL 3

Author Comment

by:guadalupe
ID: 1838010
Edited text of question
0
 
LVL 8

Accepted Solution

by:
jbirk earned 200 total points
ID: 1838011
This might be do-able, but it depends on when you want the co-ordinates to be submitted.  On some event or at a time interval?  Will this submitting refresh the screen or does it need to happen in the background (invisible frame).  Also, you will probably need to record the IP address in the cgi script so you know which saved coordinates to use.  Then when the user loads the page it will check to see if their IP address accessed this page within the last xx minutes (whatever the time period is) and loads the page with the dynamic locations set to what was saved.
And saving them would involve an IP and date stamp followed by the list of coordinates.

This is all do-able, but can be very complicated, and it depends on you knowledge of Perl as well (can you do this stuff in Perl?)  I can help with Perl, but you might get better help for that aspect via the cgi section.  I CAN do a good job in helping you with the rest of setting this up.

Good luck!
-Josh
0
 
LVL 28

Expert Comment

by:sybe
ID: 1838012
It seems to me not so hard, although I dob't know enough of DHTML to answer it easily:

A perl script, means that a form is submitted, right ?

So in the form there should be some hidden fields, each for an image position.

The "onSubmit" call a JS-function that puts the cureent positions of the images in the hidden fields, and then the form is submitted.

When perl returns some values, it includes the values for "current position" that it receives.

But...... this all is very complicated, if you want to same page to re-appear after a submit, then it's better to use a "hidden frame" to which the form is submitted. It leaves the current page untouched, and you could evt. process the return data using javascript.

0
 
LVL 3

Author Comment

by:guadalupe
ID: 1838013
Thanks for the responses.  Yes it is a tricky one but not as much as you think.  The point is to allow people to "save" a page setup and the recall it at a latter date and only upon specific request.  Therefore a user name/ip address will probably be the way to go for storage/retreval of the data.  The real stubling block for me was the passing of the x,y to the script but as suggested I think the way to go is hidden fields with a JAVA script which assigns the x,y coordinates into the hidden name/value pairs.  This JAVA could be run at the onClick event of the submit button which should process before the action executes (i.e. the actual submission of the names/values to the script)  While I do feel confident that I can pull it off I would love any feedback especially pitfalls to watch for.  Also please let me know if anyone wants the final resulting script.  (though you may have to wait as other design priorities call)  Thanks Jason  
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question