473,473 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Form to my perl-script

2 New Member
I have a script that change a gpx-file. Some of the commands has to be deleted.
Expand|Select|Wrap|Line Numbers
  1. $filename = "tourfile.gpx";
  2. local ($^I, @ARGV) = ('.bak', $filename);
  3. while (<>) {
  4.   print unless m|<extensions>| .. m|</extensions>|;        
  5. }
  6.  
This script deletes the "excentions" commands.
I want to make a form so I can load the filename to the script true this form.
After the file has been made I want to rename it to a xml-file.

Can somebody help me?
Feb 22 '10 #1
3 1369
numberwhun
3,509 Recognized Expert Moderator Specialist
If you create a form to have someone input a script name, then you have to have to worry about cgi and such. Why not just take the script and modify it to accept an argument to the script? Would that be a possibility?
Feb 22 '10 #2
pknudsen
2 New Member
I show here the (a part) of the source of my program:
Expand|Select|Wrap|Line Numbers
  1.    <script src="loadgpx.4.js" type="text/javascript"></script>
  2.         <script type="text/javascript">
  3.         //<![CDATA[
  4.  
  5.         var MyMap;
  6.  
  7.         function LoadGPXFileIntoGoogleMap(map, filename)
  8.         {
  9.             // Remove any existing overlays from the map.
  10.             map.clearOverlays();
  11.  
  12.             var request = GXmlHttp.create();
  13.             request.open("GET", filename, true);
  14.             request.onreadystatechange = function()
  15.             {
  16.                 if (request.readyState == 4)
  17.                 {
  18.                     parser = new GPXParser(request.responseXML, map);
  19.                     parser.SetTrackColour("#ff0000");                    // Set the track line colour
  20.                     parser.SetTrackWidth(5);                            // Set the track line width
  21.                     parser.SetMinTrackPointDelta(0.001);                // Set the minimum distance between track points
  22.                     parser.CenterAndZoom(request.responseXML, G_HYBRID_MAP); // Center and Zoom the map over all the points.
  23.                     parser.AddTrackpointsToMap();                        // Add the trackpoints
  24.                     parser.AddWaypointsToMap();                            // Add the waypoints
  25.                 }
  26.             }
  27.             request.send(null);
  28.         }
  29.  
  30.         function onLoad()
  31.         {
  32.             MyMap = new GMap2(document.getElementById("map"));
  33.             MyMap.addControl(new GLargeMapControl());
  34.             MyMap.addControl(new GMapTypeControl());
  35.             LoadGPXFileIntoGoogleMap(MyMap, "blog/2005-07/gurreso2.gpx");
  36.         }
  37.  
  38.         //]]>
  39.         </script>
  40.     </head>
  41.     <body onload="onLoad()">
  42.         <div id="map" style="width: 100%; height: 100%;"></div>
  43.     </body>
  44. </html>
  45.  
I have experienced that I don't need the "<excentions>"-statement.
I need to load the gpx-file into the code through a inputform AND rename it to a .xml-file.
Maybe I don't need to rename, but it only works if I start to rename the gpx-file.

Can anybody help me?
Feb 23 '10 #3
numberwhun
3,509 Recognized Expert Moderator Specialist
You need to really learn to use code tags. They are required around code you post into the forums. If you do not know how to use them, then please read #11 here.


Looking closer at the code, now that you have provided it, this is not Perl, but is instead Javascript. I am moving this to the javascript forum.

Regards,

Jeff
Feb 23 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: william c | last post by:
I don't really know PHP that well. I'm fixing a Perl program that accesses a db after getting form input from a PHP page. If the server-side validation fails I'd like to reload the form with all...
1
by: Robert V | last post by:
Hi all, I could use some help programming on of my Perl script to handle different submit buttons within the same form. Here is what I have so far. A user goes to a Web form and inputs some data...
4
by: GO | last post by:
I have a custom Perl application (programmed by myself) that is used to rename files. For some reason, within the last month, it is no longer working properly. Prior to this I've been using it for...
1
by: Mark | last post by:
I'm no Perl expert so I basically copied this code from a tutorial and I'm not totally clear how it works. However, I am having trouble accessing the POST variables that are posted to my page from...
3
by: John | last post by:
Dear all, It been more than 3 days I am trying to debug this program, I interpret it using activePerl and it is giving (perl -wc code_process.pl) no error syntax but when I put it online, change...
13
by: Nathaniel Maier | last post by:
Hi. How can I send form results to an email address based on what the user selects? e.g. not to the same address all the time, and not to all addresses, but to the one that the user selects. How...
5
by: strutsng | last post by:
I want to clarify the concept of submitting the form to the web server. PHP is just an example here, it applies to any web programming languages. On page1.php, <form name="myform"...
5
by: olaamussah | last post by:
Hi, i just started learning perl which i would use for my uni. project unfortunately. Well, this is a simple user login page i tried to create but i cant get it to work. Can someone please check this...
2
by: anusha.vempati9 | last post by:
Hi All, I am calling a cgi file from a perl module. The cgi file contains the HTML form and some HTML fields(like check boxes). In my logic, I am trying to submit the form and calling the same...
4
by: Perl Beginner | last post by:
Hello, I have written a VB program (VB 6.0) that is basically a GUI for the user to select from various buttons to run other executable files (which I wrote in Perl). When the Perl executable is...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.