Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Cloud Application Architecture Patterns: Designing, Building, and Modernizing for the Cloud
this week in the
Cloud/Virtualization
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Paul Clapham
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Saloon Keepers:
Tim Holloway
Carey Brown
Roland Mueller
Piet Souris
Bartenders:
Forum:
HTML Pages with CSS and JavaScript
Changing Parent CSS from Popup
Marc Luzietti
Ranch Hand
Posts: 84
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I'm trying to hide a style on the popup window's parent. It's not working.
function hideParentClock2() { try { var style2 = window.opener.getElementById('cover'); style2.display = "none"; } catch(e) { } setTimeout("self.close()",5); }
Support Kathy Sierra
Eric Pascarello
author
Posts: 15385
6
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Are you getting an error message if you remove the try catch? What does the error message say?
If you have Firefox, install the
firebug extension
. It will make you life easier to debug JavaScript errors.
Eric
Marc Luzietti
Ranch Hand
Posts: 84
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I tried a different route, and called a function on the window.opener
thanks
Support Kathy Sierra
Eric Pascarello
author
Posts: 15385
6
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Wow, I see the issue
var style2 = window.opener.getElementById('cover')
.style
;
style2.display = "none";
or
var style2 = window.opener.getElementById('cover');
style2
.style
.display = "none";
Eric
Marc Luzietti
Ranch Hand
Posts: 84
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The first one didn't work. That was my original solution. I added an alert to display style2 and it was undefined. When I cut style from it, I got [object]
The second one might work.
Support Kathy Sierra
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
getting stored values from form
post forms and window.reload()
Popup form, parent form
How to Get JSF inputText Value to JavaScript?
Reload problem
More...