|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Enthusiast
![]() Join Date: Jul 2008
Location: PT
Posts: 47
|
Hello!
I'm stuck in an error while trying to destroy an iframe, and I need some help. Here is what I have: JavaScript Code:
I always get this error: iframeId is not defined setTimeout('iframeId.parentNode.removeChild(iframeId)', 250); I dont understand why. Any help is hightly appreciated! Thank you very much. ![]() |
|
|
|
|
|
#2 |
|
Follow Me On Twitter: @djg
![]() ![]() Join Date: Aug 2000
Location: Philadephia, PA
Posts: 18,683
|
iframeId is declared as a local var of the fileUpload function, and isn't in scope within the anonymous function you assigned to eventhandler. Either pass it in or make it a global, or use document.getElementById within the event handler to get at it there.
|
|
|
|
|
|
#3 |
|
SitePoint Enthusiast
![]() Join Date: Jul 2008
Location: PT
Posts: 47
|
Thank you for your reply Dan!
I ended up removing the parentNode.removeChild! I just notice that it's not needed. ![]() |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 16:15.











Linear Mode
