x404.co.uk http://www.x404.co.uk/forum/ |
|
Quick JavaScript help http://www.x404.co.uk/forum/viewtopic.php?f=4&t=3556 |
Page 1 of 1 |
Author: | forquare1 [ Wed Oct 21, 2009 1:02 pm ] | |||||||||
Post subject: | Quick JavaScript help | |||||||||
Hi all, I'm using some code from Google to display my calendar on my site. The calendar has the page all to itself, so I want it to use that space. Here is the code that Google has given me:
As you can see, within the src attribute there is a width flag, and there is also a width and a height attribute as part of the iframe tag. What I want to do (I think) is grab how big the users window is, then place the width and height in the given places (probably best to take a few pixels off for good measure before hand too). Anyone know how I can achieve this? JavaScript is and option, as is PHP. If anyone could lend a hand that'd be great, Ben Edit: Page will be displayed here: http://www.hashbang0.com/calendar/ |
Author: | EddArmitage [ Wed Oct 21, 2009 1:12 pm ] |
Post subject: | Re: Quick JavaScript/PHP help |
I'm guessing it's got to be js, as php would involve lots of messy passing back and forth from server to client to server and back to the client. I'm not going to be much use, sorry ![]() |
Author: | forquare1 [ Wed Oct 21, 2009 1:30 pm ] | |||||||||
Post subject: | Re: Quick JavaScript help | |||||||||
Thanks for posting Edd. I suspected JS was going to 'cleaner', it does irk me that such a horrid thing must be used, but then again the calendar itself is all JS, so I suppose I should quit complaining... I've found this code:
(from http://www.javascripter.net/faq/browserw.htm ) Would this work for me? I've no idea how to wrap it up so the web server doesn't try and parse it like HTML, and I've no idea how to use the variables winW and winH in general HTML code... |
Author: | forquare1 [ Wed Oct 21, 2009 5:22 pm ] | |||||||||
Post subject: | Re: Quick JavaScript help | |||||||||
Solved ![]() It's a nasty hack, but it works well enough...
|
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |