Solved

Dhtml to perl

Posted on 1998-09-21
4
188 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

776 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