Digital Point Forums
San Diego Personal Trainer

Go Back   Digital Point Forums > Design & Development > Programming > JavaScript
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old Apr 11th 2005, 11:04 pm
st3v1nsk1 st3v1nsk1 is offline
Peon
 
Join Date: Apr 2005
Posts: 1
st3v1nsk1 is on a distinguished road
setTimeout() problem

Hey all!


I've got a (small) problem. I've got a main window and an popup window. What I want to do is get the information from the popup window put it in an array in the session, close the popup window and refresh the main window.

For some reason I need to use the setTimeout function for all this. I've tried it without but then my information isn't processed quickly enough, so my main window refreshes but since the information isn't yet in the session, still the old data is displayed...

This is the code I'm trying to use:
php Code:
function reloadIt()
{
    opener.location = 'cases.php?doAddEmails=1';
}

function closePopup()
{
    window.close();
}

function doIt()
{
    setTimeout('reloadIt();',1000);
    setTimeout('closePopup();',1000);
}
I've connected this code to a button with 'onclick:doIt()'. But this code doesn't work for some reason... Can somebody help me finding out what I've done wrong?


Thanks in advance!

st3v1nsk1
Reply With Quote
  #2  
Old Apr 21st 2005, 1:03 pm
marty marty is offline
Champion of the Naaru
 
Join Date: Mar 2005
Posts: 154
marty is on a distinguished road
Hello st3v1nsk1,

So what exactly do you mean by not working?

I played around a little with your JavaScript and it looks to me like your closePopup() is trying to close the main window and not the pop up window.

Good luck...

Marty
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem inserting a form inside a table... cdx HTML & Website Design 3 Apr 29th 2006 8:36 am
PHPBB2 Problem cafedelbalkan vBulletin 17 Mar 12th 2005 10:13 am
Validation Problem LindaB Setup / Validation Help 2 Dec 28th 2004 11:18 am
Netscape Problem Smyrl HTML & Website Design 2 Nov 11th 2004 8:03 am
filtering problem Epsilon Google APIs 2 Mar 26th 2004 8:27 am


All times are GMT -8. The time now is 12:28 am.