Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape mistery

Status
Not open for further replies.

Silvano

Programmer
Jul 16, 2001
386
US
Hi all,

I have a problem that I really hope someone here can help me solve. I have a cf application that for some strange reason when executed in netscape 6 will enter the values twice in the database. That is as the query is executed two times. I am 100% sure that no browser detection is being used (same template is executed in IE and NN) and the query is not in any kind of loop or something similar. Have anyone had the problem like that? I can not find the logical explanation for what is happening here.

thanks in advance
Sylvano
dsylvano@hotmail.com
 
Are you writing any headers or anything on the page you post to? It sounds like Netscape is "refreshing" itself on the page it posts to and would cause the double posting.

What I found helpful to prevent duplicate entries, is create a "middle" page that inserts or updates the data, and then do a cflocation to the page the user sees after posting -- on that page, it looks up the record that was inserted/posted and prevents a duplicate from being entered.

HTH,
Tim P.
 
I think my question may be related, so I'm piggy-backing on this one. I have a header that is CFINCLUDEd in my Application.cfm that contains several graphics. I'm trying to make my site Netscape-compatible, and I've noticed that in Netscape, sometimes, the graphics don't all appear. If I hit "Reload" several times, eventually, they all show up. Other times, when I hit "Reload", some of the images will disappear, then re-appear, again, eventually, all with display. What can I do about this? Calista :-X
Jedi Knight,
Champion of the Force
 
no Tim, I have no headers on the page. I have removed everything and anything that I thought might cause netscape to do this. And yes, it is behaving as it is parsing the page twice. As for taking everything out on the separate template, I would reeeeaally like to find another solution... :(

I don't see the relation in either case - the template is being processed on the cf server, that is not related to browser, then, how and why is query executed twice??? the template then served to either browser... netscape is not reloading the template so that also is not the problem...

i dunno, i guess i'm just gonna shoot my self and save me the misery... Sylvano
dsylvano@hotmail.com
 
another thing I have noticed here is that the time stamp is the same for both entries. I guess that eliminates the reloading of the template by the netscape as reloading will take at least one second.

I have also tried Tim's suggestion to insert "middle" template with the queries - still the same, when the query is executed by the netscape, I have duplicate entry Sylvano
dsylvano@hotmail.com
 
calista, i have found out why the values are being entered twice in my application (netscape is submitting the form twice), and for your problem with the images, if you open Edit>Preferences, you will find Privacy and Security>Images option where Netscape has quite a few options that will control loading of the images (once or once per session etc.); maybe there is the solution for your problem with netscape... :) Sylvano
dsylvano@hotmail.com
 
Sylvano -- you said you figured out that Netscape was submitting the form twice -- how did you fix that and what was the problem (is it a bug?)

Just curious...

tim P.
 
well, i've used JavaScript to verify and submit the form:

<script>
verify form fields code...

if (verified) {document.form.submit()}

</script>


and in the form:

<form action=&quot;submitPage.cfm&quot; name=&quot;frmName&quot;...

and in netscape 6 the form was submitted twice; once I reversed the flow in the JavaScript and used if (!verified) to set some fields and forget about the rest, everything works fine....

oh well, you know how it is....
Sylvano
dsylvano@hotmail.com
 
Hey, Sylvano! I did as you suggested and looked under Preferences. All I saw was an option to accept or reject all images. There is also an option to compare the current page to the cached page, which I have set to check each time. BTW, I have NS 6.2. Thanks for the info! Calista :-X
Jedi Knight,
Champion of the Force
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top