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!

Feelin' Loopy

Status
Not open for further replies.

pixiesfb

Programmer
Apr 27, 2001
62
US

When I submit the form, the database is updated properly.

When I cflocation back to the form, form should show updated info instantly. It does. However, the last field does not show updated info, even though Database is updated.
If I push Update again, correct info shows, and if I push Update again old info shows, and so on (like a toggle effect). If I push the browser's "Refresh" button, all is good, I can push the Update button many times and the correct results always show.

This is very strange, none of my co-workers can figure it out either.

The code is below.


<cfquery datasource=&quot;IPOFAQ&quot; name=&quot;faqlist&quot;>
SELECT id, question, questionorder
FROM FAQinfo
Where code = '#changeorderCode#'
order by questionorder
</cfquery>

<form action=&quot;admin_FAQchangeorder.cfm?changeorderCode=#changeorderCode#&update=yes&quot; method=&quot;post&quot; >

</cfoutput>
<table width=&quot;620&quot; border=&quot;0&quot; cellspacing=&quot;2&quot; cellpadding=&quot;4&quot; align=&quot;CENTER&quot;>
<tr>
<td colspan=2><input type=&quot;Submit&quot; value=&quot;Update&quot;></td>
</tr>
<cfoutput query=&quot;faqlist&quot;>
<tr bgcolor=&quot;eeeeee&quot; valign=&quot;TOP&quot;>
<td class=&quot;verdsmall&quot; nowrap>
<input type=&quot;Text&quot; name=&quot;x_#id#&quot; value=&quot;#questionorder#&quot; size=&quot;3&quot;></td>
<td><font class=&quot;verdsmall&quot;>#replace(question, chr(10), &quot;<br>&quot;, &quot;ALL&quot;)#</font></td>
</tr>
</cfoutput>
</table>
</form>
</cfif>
<cfelse>

<cfloop index=&quot;i&quot; from=1 to=&quot;#listlen(form.fieldnames)#&quot;>
<cfoutput>
<cfset varID=&quot;#removechars(listgetat(form.fieldnames,i,&quot;,&quot;), 1, 2)#&quot;>
<cfset varQ=&quot;#evaluate(listgetat(form.fieldnames,i,&quot;,&quot;))#&quot;>

<cfquery name=&quot;qryUpdateList&quot; datasource=&quot;ipofaq&quot;>
UPDATE faqinfo
set
QuestionOrder= '#varQ#'
Where id= #varID#
</cfquery>
</cfoutput>
</cfloop>

<cflocation url=&quot;admin_FAQchangeorder.cfm?changeorderCode=#changeorderCode#&quot;>
 

Just a shot in the dark, have you checked your browser cache? this kind of on again off again stuff is almost always cache related. I would try turning the cache off entirely and trying it again. That would at least let you know where the problem was. Then we could work on a solution.

Have fun. Sounds like a winner of a glitch. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top