stop page refreshing

Reply

Join Date: Mar 2008
Posts: 4
Reputation: onetwothree is an unknown quantity at this point 
Solved Threads: 0
onetwothree onetwothree is offline Offline
Newbie Poster

stop page refreshing

 
0
  #1
Jan 3rd, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 20
Reputation: jedimatt is an unknown quantity at this point 
Solved Threads: 1
jedimatt jedimatt is offline Offline
Newbie Poster

Re: stop page refreshing

 
0
  #2
Jan 7th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 4
Reputation: onetwothree is an unknown quantity at this point 
Solved Threads: 0
onetwothree onetwothree is offline Offline
Newbie Poster

Re: stop page refreshing

 
0
  #3
Jan 8th, 2009
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!
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 596
Reputation: buddylee17 has a spectacular aura about buddylee17 has a spectacular aura about 
Solved Threads: 125
buddylee17's Avatar
buddylee17 buddylee17 is offline Offline
Posting Pro

Re: stop page refreshing

 
0
  #4
Jan 8th, 2009
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.
Lost time is never found again.
- Benjamin Franklin
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC