A Conversation for Website Developer's Forum

Page refresh

Post 1

C Hawke

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

Post 2

Pastey

ASP or ASP.net?

smiley - rose


Page refresh

Post 3

C Hawke

ASP in particular VBscript.

Cheers

CH


Page refresh

Post 4

Pastey

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 smiley - smiley

smiley - rose


Page refresh

Post 5

C Hawke

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

Post 6

Pastey

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.

smiley - rose


Page refresh

Post 7

C Hawke

still very confused over what asp.net is all about, struggle as it is.

Cheers anyway.

CH


Page refresh

Post 8

Pastey

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.

smiley - rose


Page refresh

Post 9

C Hawke

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

Post 10

Pastey

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?

smiley - rose


Page refresh

Post 11

C Hawke

tried the onfocus thing, but just kept on running all the time smiley - sadface

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.

smiley - biggrin

CH


Page refresh

Post 12

Researcher 178815

Pastey, do you mean onBlur? That's the opposite to onFocus if that's what you're trying to remember smiley - smiley

(Don't mind me, I know nothing about ASP/.net smiley - winkeye)


Page refresh

Post 13

C Hawke

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 smiley - biggrin almost ready for user testing smiley - sadface

CH


Page refresh

Post 14

dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC

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();"

smiley - dog


Page refresh

Post 15

C Hawke

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

smiley - biggrin

Now I have to try and work it in to my site.

Many thanks.

CH


Page refresh

Post 16

dElaphant (and Zeppo his dog (and Gummo, Zeppos dog)) - Left my apostrophes at the BBC

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.
smiley - dog


Page refresh

Post 17

C Hawke

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 smiley - biggrin

CH


Key: Complain about this post