CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 31st, 2004, 04:02 PM
echo1 echo1 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 3 echo1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Apply css to a popup

Hi
I'm building a selectbox insead of using the common select tag.
I use the windows.createpopup() method to display the list of choise.
Differently to the div object the popup object is like a new window so it doesn't inherit the css style sheet I've attached to the main window.
I tought to attach it by using the addImport(url) method of the styleSheet object but it doesn't seem to work. Here it's my code, the show function it's called when the selectbox expands:

var Select_box = window.createPopup();
Select_box.document.styleSheets[0].addImport("URL('common/css/default_style.css');")

function show(element) {
if (Select_box.isOpen==false) {
Select_box.document.body.innerHTML = Select_box_content.innerHTML;
Select_box.document.body.className='selectbox';
Select_box.show(0, 18, 150, 50, element);
}
else {
Select_box.hide();
}
}

I've noticed that using the addImport method on the main window, and not on the instance of the select_box, with 0 index of the styleSheet the error doesn't occur but it doesn't also change the proprety. Tring using any other index value it gives me the usual error.
So how can I attach a style sheet to a popup created with the window.createpopup()?

Thank you

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Apply css to a popup


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT