Some refresh question

A

amerar

Hi All,

I have an HTML form which contains A LOT of Javascript. When
submitted, a Perl/CGI program parses the form, processes the data, and
reposts the new data onto the screen.

Problem is, not all the data gets reflected. In the form I have the
following Javascript include:

<script language="JavaScript1.2" src="$filename"
type="text/javascript"></script>

The file is updated by the Perl/CGI script. I've checked, and the file
is updated properly.

Also in the form is the following code:

<span onMouseOver="stm(Text[$i],Style[1])"
onMouseOut="htm()">$subject[$i]</span>

Basically, when you move the mouse over the lines displayed on the
screen, a small popup displays. It basically works. If I hit F5 to
refresh, all of the items display properly when the mouse moves over
them.

If I add new data using the form, although the file on disk is updated,
and if I look at the page source the information is there, when I move
the mouse over the menu, the newest item does not get the popup. I
need to hit F5 in order to refresh that........

So, is there something about having Javascript includes, and not
refreshing properly or something???
 
T

Thomas 'PointedEars' Lahn

I have an HTML form which contains A LOT of Javascript. When
submitted, a Perl/CGI program parses the form, processes the data, and
reposts the new data onto the screen.

The form is not parsed by it because the server-side program does not know
about any forms.
Problem is, not all the data gets reflected. In the form I have the
following Javascript include:

<script language="JavaScript1.2" src="$filename"
type="text/javascript"></script>

Omit the `language' attribute, it is deprecated and the used value is
error-prone. And so what? Unless this client-side script generates some
form controls or sets some variables/properties used later, it has exactly
no meaning regarding the submitted data. Whether it does remains a mystery
until you post its code.
The file is updated by the Perl/CGI script. I've checked, and the
file is updated properly.

There is no file, if you are using it in this way, it is a generated
resource that is served, but a data stream that has no reflection in
a filesystem.
Also in the form is the following code:

<span onMouseOver="stm(Text[$i],Style[1])"
onMouseOut="htm()">$subject[$i]</span>

This looks like server-side code, however you have a problem with
client-side scripting. (Or you did not tell about using JS/ECMAScript
server-side, too.)


PointedEars
 
A

amerar

Well, I'm not a Javascript programmer. So, tell me what you want me to
send you, or post, and I'll do that.

The scripts are rather lengthy, so posting them may be a bad
idea..........

What I want is that when the CGI script redraws the form, it also
refreshes the <script> data too.......
 
A

amerar

Well, I found a solution. Rather than including the script the way I
am doing, within the CGI script, I open the script file and print it to
the page within the <script> & </script> tags..........
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top