A Conversation for Website Developer's Forum
Page refresh
C Hawke Started conversation Jan 20, 2003
OK, I'm sure this is easy, but 30 minutes of googling and I can't find an answer.
I have an ASP page with a dataset that the user has entered on a previous page, this is their last chance to change anything, each record has a "edit" link, that opens a pop up, that allows them to change the data - and yes I know this is liniting the accesibility but it is for a targetted audience.
When they change the data and close the pop up i need the main page to refresh the datasets.
I know it should be simple but simply can't suss it out.
Cheers
CH
Page refresh
Pastey Posted Jan 20, 2003
Probably nothte proper way of doing it, but what about putting an onClose event in the popup and getting that to refresh the dataset?
'fraid I'm not too good on asp, but that's what I'd try
Page refresh
C Hawke Posted Jan 20, 2003
Mmmm, nor me - does the pop up recognise the existance of recordsets on other pages? I thought a recordset was "enclosed" within each page as it were.
Cheers
CH
Page refresh
Pastey Posted Jan 20, 2003
Could well be. I use asp.net you see, and it's mostly all done for you.
In fact, it's pretty much a different language.
Page refresh
C Hawke Posted Jan 20, 2003
still very confused over what asp.net is all about, struggle as it is.
Cheers anyway.
CH
Page refresh
Pastey Posted Jan 20, 2003
asp.net is pretty much just another step in the direction of giving web pages the full functionality of normal coding. Most pages done in it have two pages that make them up, the "design", and the "code behind". The design uses an xml type structure to lay it all out, and all the programming code is shoved on a seperate page. Really easy to use.
Page refresh
C Hawke Posted Jan 20, 2003
given up.
Not using pop ups now, just another page, make the change, return to original, which of course refreshes.
But would still like to know if anyone else has any ideas.
Cheers
CH
Page refresh
Pastey Posted Jan 20, 2003
How about using Javascript? Stick in an onLossFocus (can't remember the proper one) to tell the script that the pop up is active, then a onFocus to reload the page if the pop up was activated?
Page refresh
C Hawke Posted Jan 20, 2003
tried the onfocus thing, but just kept on running all the time
In my searches I found that if you use a full URL in an address it forces a refresh, so used that method, but with no joy, anyway, all happy now, all this for a dozen or so people yuo may be bothered to fill in the online questionaire, in fact just for the few who change their minds after the initial questions.
CH
Page refresh
Researcher 178815 Posted Jan 20, 2003
Pastey, do you mean onBlur? That's the opposite to onFocus if that's what you're trying to remember
(Don't mind me, I know nothing about ASP/.net )
Page refresh
C Hawke Posted Jan 20, 2003
not sure which one Pastey meant, *I* tried the onfocus - I thought that that would run when the window re-took the focus when the popup was shut, but it seemed to run all the time, before even the popup was invoked.
Anyway all sorted now almost ready for user testing
CH
Page refresh
dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC Posted Jan 20, 2003
Ya ain't gettin' off so easy...
This works well for a web site we run, include this in a link or button (add a form.submit() to the button, and you can be sure people will click it to save their changes):
onClick="opener.location.href='[Your URL here]'; opener.focus(); window.close();"
Page refresh
C Hawke Posted Jan 20, 2003
S olet me get this right, this is on the popup.
It says when you click something, change the window that OPENed the pop up to a specific URL, Give that window the focus, and close the popup window?
If so
COOL
Now I have to try and work it in to my site.
Many thanks.
CH
Page refresh
dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC Posted Jan 21, 2003
Someone else wrote that bit of code, I just copied it, but that is what it does in practice. They also had a "return false" at the end, but I don't see why that would be necessary. Also, since the opener (or main window) has the focus, that final statement should logically close the main window (at least as I read it), but it doesn't. Go figure.
Page refresh
C Hawke Posted Jan 21, 2003
cool - the "opener" bit I hadn't seen before at all, a useful thing to remember, too busy to try at the moment, busy converting graphics from PDF to web format, for the document the questionaire is about, all before thursday.
No chance
CH
Key: Complain about this post
Page refresh
- 1: C Hawke (Jan 20, 2003)
- 2: Pastey (Jan 20, 2003)
- 3: C Hawke (Jan 20, 2003)
- 4: Pastey (Jan 20, 2003)
- 5: C Hawke (Jan 20, 2003)
- 6: Pastey (Jan 20, 2003)
- 7: C Hawke (Jan 20, 2003)
- 8: Pastey (Jan 20, 2003)
- 9: C Hawke (Jan 20, 2003)
- 10: Pastey (Jan 20, 2003)
- 11: C Hawke (Jan 20, 2003)
- 12: Researcher 178815 (Jan 20, 2003)
- 13: C Hawke (Jan 20, 2003)
- 14: dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC (Jan 20, 2003)
- 15: C Hawke (Jan 20, 2003)
- 16: dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC (Jan 21, 2003)
- 17: C Hawke (Jan 21, 2003)
More Conversations for Website Developer's Forum
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."