JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old May 3rd, 2005, 12:11 PM
Jr- Jr- is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 3 Jr- User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 19 sec
Reputation Power: 0
Change iFrame height onClick

Ok, I have asked EVERYwhere and looked at every no-name forum post on the net and NOone knows...
How can I make an iFrame increment or deincrement with an onClick event? I unfortunately know nothing about JavaScript other then the fact that I've seen this done on a <textarea> box. I just want one button to 'increase' the iFrame height and another to 'decrease' the height.

Reply With Quote
  #2  
Old May 5th, 2005, 01:14 AM
j3n0va_cHiLd j3n0va_cHiLd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 3 j3n0va_cHiLd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m 10 sec
Reputation Power: 0
Quote:
Originally Posted by Jr-
Ok, I have asked EVERYwhere and looked at every no-name forum post on the net and NOone knows...





How can I make an iFrame increment or deincrement with an onClick event? I unfortunately know nothing about JavaScript other then the fact that I've seen this done on a <textarea> box. I just want one button to 'increase' the iFrame height and another to 'decrease' the height.




Very simple stuff...

if you want to specify the height for the iFrame each time, using this..

Code:
 
<script language="javascript">
function changeframe()
{
	var new_height = prompt ('enter the new height for the frame');
	document.getElementById('myframe').height = new_height;
}
</script>
 
...
 
<iframe src="page.html" width="200" height="200" name="myframe"></iframe>


With this, if you want to make it any different you should be able to just alter the code

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Change iFrame height onClick


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 4 hosted by Hostway