VinceGledhill Posted October 4, 2011 Share Posted October 4, 2011 Hi People. Thanks for all the help on here in the past, you have been brilliant. I run the airfield cards.com website and have a script in the output page that is as follows. To Embed this Card into your website, cut and paste the following code: <input name="generate" value="<? echo "<iframe src='http://www.airfieldcards.com/php/courtesy_card.php?id=".$id. "' ></iframe>";?>"> Now the way it shows on the site is like this <iframe src='http://www.airfieldcards.com/php/courtesy_card.php?id=165' ></iframe> So, I look at the iframe code from google that should be cut and pasted into a website (obviously it's working code from google) <iframe width="700" height="1500" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.uk/maps/ms?msa=0&msid=203054009368331462137.0004aa731e7de2e86a0e0&ie=UTF8&t=h&vpsrc=0&ll=53.800651,-4.042969&spn=80.03397,61.435547&z=4&output=embed"></iframe><br /><small>View <a href="http://maps.google.co.uk/maps/ms?msa=0&msid=203054009368331462137.0004aa731e7de2e86a0e0&ie=UTF8&t=h&vpsrc=0&ll=53.800651,-4.042969&spn=80.03397,61.435547&z=4&source=embed" style="color:#0000FF;text-align:left">AirfieldCards.com</a> in a larger map</small> Now I have tried to take the code from the google iframe (width/height/scrolling/etc) and paste it into my source but it doesn't work. Here's how I have done it. To Embed this Card into your website, cut and paste the following code: <input name="generate" value="<? echo "<iframe width="700" height="1500" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src='http://www.airfieldcards.com/php/courtesy_card.php?id=".$id. "' ></iframe>";?>"> Can someone please modify my fist lot of code so that I have the correct height and width settings (700 x 1500) Thanks in advance Regards Vince Gledhill Quote Link to comment https://forums.phpfreaks.com/topic/248409-how-do-i-add-the-width-and-height-to-an-iframe-in-my-code/ Share on other sites More sharing options...
mikesta707 Posted October 4, 2011 Share Posted October 4, 2011 Hmm well what size is it with that code? I don't see any mistakes at first glance. Is there perhaps a style or other html directive somewhere in your code that alters the size of the iframe? Quote Link to comment https://forums.phpfreaks.com/topic/248409-how-do-i-add-the-width-and-height-to-an-iframe-in-my-code/#findComment-1275665 Share on other sites More sharing options...
VinceGledhill Posted October 4, 2011 Author Share Posted October 4, 2011 All I get with the third above is a blank results. No card showing up at all. Quote Link to comment https://forums.phpfreaks.com/topic/248409-how-do-i-add-the-width-and-height-to-an-iframe-in-my-code/#findComment-1275673 Share on other sites More sharing options...
QuickOldCar Posted October 5, 2011 Share Posted October 5, 2011 You can do this. To Embed this Card into your website, cut and paste the following code: <textarea rows="5" cols="40" id="embed_code"><iframe width="700" height="1500" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.airfieldcards.com/php/courtesy_card.php?id=<?php echo $id;?>"</iframe></textarea> Quote Link to comment https://forums.phpfreaks.com/topic/248409-how-do-i-add-the-width-and-height-to-an-iframe-in-my-code/#findComment-1275902 Share on other sites More sharing options...
VinceGledhill Posted October 5, 2011 Author Share Posted October 5, 2011 Brilliant, thanks Quick Old Car. That worked a treat. Cheers. Quote Link to comment https://forums.phpfreaks.com/topic/248409-how-do-i-add-the-width-and-height-to-an-iframe-in-my-code/#findComment-1276171 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.