943,682 Members | Top Members by Rank

Ad:
  • ColdFusion Discussion Thread
  • Unsolved
  • Views: 2321
  • ColdFusion RSS
Jan 3rd, 2009
0

stop page refreshing

Expand Post »
hello

is there a way to stop a page refreshing in a browser? (wish i'd separated my sql from my displayed results and used a redirect, but i didn't and am just wondering if there is a quick way around preventing refreshing of a page, so as the sql doesn't run again)?

thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
onetwothree is offline Offline
4 posts
since Mar 2008
Jan 7th, 2009
0

Re: stop page refreshing

Hi,

If you stopped the page from refreshing how would it get the results in the first place? i don't really understand your question?

You would be better off creating methods in cfc's for your sql statements, separate your logic from your display output, always a good practice.

jedimatt
Reputation Points: 10
Solved Threads: 1
Newbie Poster
jedimatt is offline Offline
20 posts
since Jan 2009
Jan 8th, 2009
0

Re: stop page refreshing

thanks for your reply. yes with hindsight i should have separated the sql, but unfortunately i didn't think far enough ahead - i am quite new to this kind of thing, but you live and learn as they say...

(the results display when you first link to the page which contains the sql to insert data and then to display it - which was ok, until i refreshed the page and realised that this meant the sql would reinsert the data)

anyway, i am thinking now of testing somehow to see if the insert has been made, maybe using sql or making use of setting session variables - otherwise i'll have to go back and split the sql from the results i guess - 'guess' being the operative word - as i say i am quite new to all this!!

thanks again for your reply - it has at least confirmed what i new that my initial setup is not good!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
onetwothree is offline Offline
4 posts
since Mar 2008
Jan 8th, 2009
0

Re: stop page refreshing

Yeah, you don't want to prevent a page refresh. That takes quite a bit of JavaScript and quite frankly would annoy users. They don't want you to change their browsers behavior. Fix your code logic. Don't mess with browser hacks.
Reputation Points: 232
Solved Threads: 137
Practically a Master Poster
buddylee17 is offline Offline
665 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ColdFusion Forum Timeline: Date and Time
Next Thread in ColdFusion Forum Timeline: session level variables





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC