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:
  #1  
Old May 4th, 2005, 02:01 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
function help

So I have this function but for some reason it doesn't work. It seems like it should but it keeps giving me an error every time 'onclick' can someone help me with this? I really dont see anything wrong.


Code:
 
<script language="javascript">
function resizeMe(action)
{
// By how much to resize it
resize_by = 50;
 
// Take the current_width and height and create integers from them for further "playing"
current_height = document.getElementById('message_inbox').style.hei  ght;
current_height = parseInt( current_height.substr(0, -2) );
 
// What to do
if ( action == 1 )
{//Enlarge
current_height += resize_by ;
}
else if ( action == 0 )
{//Shrink
current_height -= resize_by ;
}
 
// Apply the new dimensions to the element
document.getElementById('message_inbox').style.hei  ght = current_height + "px";
}
</script>


Code:
 
<table width='100%'>
<tr>
<td><iframe marginwidth="0" align="left" height="200px" width="100%" id='message_inbox' src="message.php?action=email_box" scrolling="yes" align=left frameborder=0 hspace=0 vspace=0> </iframe></td>
</tr>
<tr>
<td><a href="javascript:resizeMe(1)">Increase</a></td>
</tr>
<tr>
<td><a href="javascript:resizeMe(0)">Decrease</a></td>
</tr>
</table>

Reply With Quote
  #2  
Old May 4th, 2005, 08:31 PM
pmcnamee pmcnamee is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 13 pmcnamee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 12 m 52 sec
Reputation Power: 0
Can you please provide us with the exact error details?

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > function help


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 1 hosted by Hostway
Stay green...Green IT