By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,401 Members | 793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,401 IT Pros & Developers. It's quick & easy.

Some refresh question

P: n/a
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???

Jan 26 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
am****@iwc.net wrote:
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
Jan 26 '06 #2

P: n/a

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.......

Jan 26 '06 #3

P: n/a
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..........

Jan 26 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.