Good morning fellow monday slaves..today's issue.

N

nathan

I've got a page with DB data displayed, and a link beside each record
to update the corresponding record. When the update icon is clicked, a
popup with the data comes up, once the user is finished updating, when
they click submit, I have the following code:

<input type="button" onClick="opener.location.reload(); self.close()"
value="Refresh and close">

My problem with this is that it refreshed the parent too quickly for
the data to have made it's way to the DB, since it requires a manual
refresh once the child has closed to properly display the updated
data.

It is possible to set a timer for this? Thanks in advance for your
help.
 
S

steve stevo

<input type="button" onClick="setTimeout(opener.location.reload();
self.close();,500)" value="Refresh and close">
 
L

Lasse Reichstein Nielsen

steve stevo said:
<input type="button" onClick="setTimeout(opener.location.reload();
self.close();,500)" value="Refresh and close">

Syntax error. Try either:
onClick="setTimeout(function(){opener.location.reload(); self.close();},500)"
or
onClick="setTimeout('opener.location.reload(); self.close();',500)"

Please trim yuor quotes and reply below the quotes.
/L
 
N

nathan

Thank you gentlemen.


Lasse Reichstein Nielsen said:
Syntax error. Try either:
onClick="setTimeout(function(){opener.location.reload(); self.close();},500)"
or
onClick="setTimeout('opener.location.reload(); self.close();',500)"

Please trim yuor quotes and reply below the quotes.
/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top