![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Folks, I have a script that pops a calendar up - its a generic script that I use across some of my webapps - I would like the script to be intelligent enough to set its fonts and other colours to be the same as the parent window that requested the window.open in the first place. How do I do this? My webapp users are majority IE7 but a few of us prefer Firefox2 so something that is near cross-browser compatable would be great. |
#3
| |||
| |||
|
|
I would like the script to be intelligent enough to set its fonts and other colours to be the same as the parent window |
#4
| |||
| |||
|
|
I have a script that pops a calendar up |
#5
| |||
| |||
|
|
Randell D. wrote: I have a script that pops a calendar up Bah. I hate those. If I were you I'd let the user just enter the date and make the parsing very tolerant. Any fans of mile-long pop-ups for country names or credit card expiration dates out there? |
#6
| |||
| |||
|
|
On Tue, 21 Aug 2007 12:23:45 +0200, Robert Latest <boblatest (AT) yahoo (DOT) com wrote: Randell D. wrote: I have a script that pops a calendar up Bah. I hate those. If I were you I'd let the user just enter the date and make the parsing very tolerant. Any fans of mile-long pop-ups for country names or credit card expiration dates out there? My favourite is a double option: enter the date manually or click a little button next to it to click it/'browse to it' in an inline calender pop up, which fills the manual inputs. |
#7
| |||
| |||
|
|
The script pops the window up. The content of the window is what? Some html file? If so, just put a link to the wanted stylesheet in it. Thanks, but the popup is dynamically created (the calendar is in a |
#8
| |||
| |||
|
|
Folks, I have a script that pops a calendar up - its a generic script that I use across some of my webapps - I would like the script to be intelligent enough to set its fonts and other colours to be the same as the parent window that requested the window.open in the first place. How do I do this? My webapp users are majority IE7 but a few of us prefer Firefox2 so something that is near cross-browser compatable would be great. |
#9
| |||
| |||
|
|
On Mon, 20 Aug 2007 14:03:07 -0700, "Randell D." fiprojects.... (AT) gmail (DOT) com> wrote: I would like the script to be intelligent enough to set its fonts and other colours to be the same as the parent window Intelligence is bad here: it's harder to implement, and the user might have switched it (client-side JS) off. |
|
Instead, do it server-side. Just embed the same link to the same stylesheet in both pages. If you want some level of customisation within the site, keep the stylesheet the same but change an overall class within this. This is more robust - at least it falls back to some default if it doesn't get subclassed correctly. Easiest way to do it is still largely server-side, by passing the "context" as a command line parameter. No - this won't work for me either as my child window is dynamically |
#10
| |||
| |||
|
|
On Aug 20, 11:03 pm, "Randell D." <fiprojects.... (AT) gmail (DOT) com> wrote: Folks, I have a script that pops a calendar up - its a generic script that I use across some of my webapps - I would like the script to be intelligent enough to set its fonts and other colours to be the same as the parent window that requested the window.open in the first place. How do I do this? My webapp users are majority IE7 but a few of us prefer Firefox2 so something that is near cross-browser compatable would be great. I have included folk from the javascript community this time around as the solutions suggested by the stylesheet group is not what I am looking for. Thus - can someone tell me how a child window can take the CSS of its parent opening window? |
![]() |
| Thread Tools | |
| Display Modes | |
| |