Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Re: CGI parameter passing (was Aardvark)

by fpi (Monk)
on Mar 13, 2001 at 04:18 UTC ( [id://64023]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: CGI parameter passing (was Aardvark)
in thread CGI parameter passing (was Aardvark)

OK, since you addressed me, I will try to offer more help.

First of all, when you are continuing a discussion of the same question, keep it within the same thread and don't start a new one. There is no way we can follow your discussion otherwise. And go ahead and create a user ID for perlmonks - it costs nothing and the perlmonks users will probably look upon you more kindly if you had a name (not just "anonymous"), and they knew you were a newbie.

Having said that, you should know that some of the perlmonks users apparently have been trying to clean up the little thread mess that you left, with deletions of duplicate entries and keeping things organized. I assume that the original anonymous poster is NOT the same as rootkidd, and rootkidd is just trying to help out and repost your question that got deleted and lost otherwise. If so, thanks rootkidd- you got my vote. Now if rootkidd is the same as the original anonymous poster, then good, you are on the right track.

OK, back to your question. be assured that what you are trying to do is really easy, as long as you know both your perl and your html. Let's break this down:
-page1 = "page1 is a cgi script". cgi is the protocol, not the language. so what is your "cgi script"? a perl script that generates your form, or an html page with the form? this is important to know this because it is where you apparently want the timestamp to appear.
-page2 = an html page with a cgi form. correct?
-in between page1 and page2= I assume that the form tag on page1 calls a perl script which closes the alarm and redirects to page2, although it is probably not important to know that right now.
-in between page2 and the return to page1= a script which writes to the archive, puts a timestamp that appears in page1. Correct? And then redirects the user back to page1

You also really need to define what you mean by placing the timestamp "in a text field" versus "appending the file"? What file?? Page1? or some log or temporary file? This is important because there is no way to make a timestamp appear "in a text field" of a form in an html page if you are appending the timestamp to the bottom of that html page.

And are you appending to a list of timestamps, or only saving one timestamp? And does the timestamp really need to be within a form text field, or can the timestamp just be displayed on the webpage as simple text, just like all other text on the webpage??

Basically it's like this: if "text field" means a form text field, then the only way to dynamically set the value of the text field is if page1 is an html page generated by perl. But we still can't figure out if your page1 is a static html page or a web page generated by perl on demand.

But you also say that you are writing the timestamp to a file. If page1 is a static html page, then it is possible for the perl script to parse the html of page1 and plug (write) in the timestamp to the correct location, and then redirect the user to see the output of the newly-modified page1 html. This is an easy solution, but you need to know how to manually parse your specific html file and where and how to stick the timestamp - just as simple text in the proper location, or within the VALUE tag for a FORM element.

A third option, if page1 is static html, is to use Server-Side Includes (SSI), which is also really easy, but I am hesitant to get into this if you don't seem to have a grasp on the setup of your scripts. Basically with SSI, you just put the SSI tag in your page1 html of where you want the timestamp to appear. But you need to have SSI activated on your webserver, change the extenstion of your page1, and you need the perl script which will return the timestamp in the SSI call.

For the first and third options, it is also perfectly acceptable to write the timestamp to a file - a log file or a file that just saves the latest timestamp. then page1 would get its data from that logfile. In other words, this is one way of "passing" the info to page 1.

So we have solved nothing because there are still too many questions about what you are asking and what is your setup. If you continue this discussion, please "reply" to keep it in the same thread, and don't start a new thread. And seriously consider getting a user ID.
  • Comment on Re: Re: Re: CGI parameter passing (was Aardvark)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://64023]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-19 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found