Text field stretcher
4 posters
Page 1 of 1
Text field stretcher
I noticed how on this forum..there was an iframe for the chatbox...then I looked close and noticed that there was something on the bottom right corner to stretch the iframe...can I have the code for that?
http://parrotstest.forumotion.net/index.htm
View Larger > https://i.servimg.com/u/f89/13/99/54/90/screen25.jpg
http://parrotstest.forumotion.net/index.htm
View Larger > https://i.servimg.com/u/f89/13/99/54/90/screen25.jpg
Re: Text field stretcher
Hello,
The code is :
The code is :
- Code:
<img src="http://2img.net/i/fa/resize.gif" onmousedown="javascript:resizeElement(event, 'chatbox_top');" alt="" style="cursor:se-resize; float: right;" />
- Code:
// Resize functions
var elem;
var divHeight;
var mouseX;
var mouseY;
function returnNumber (str) {
var result = '';
for (i = 0; i < str.length; i++) {
if ((str.charAt(i) * 1) >= 0 && (str.charAt(i) * 1) <= 9)
result += str.charAt(i);
else
return result *1;
}
return result*1;
}
function resizeElement (event, id) {
var el;
var x, y;
elem = document.getElementById(id);
if (document.all) {
mouseX = window.event.clientX + document.body.scrollLeft;
mouseY = window.event.clientY + document.body.scrollTop;
}
else {
mouseX = event.clientX + window.scrollX;
mouseY = event.clientY + window.scrollY;
}
divHeight = elem.style.height;
if (isNaN(divHeight)) divHeight = returnNumber(divHeight);
if (document.all) {
document.attachEvent("onmousemove", resize);
document.attachEvent("onmouseup", stopResize);
window.event.cancelBubble = true;
window.event.returnValue = false;
}
else {
document.addEventListener("mousemove", resize, true);
document.addEventListener("mouseup", stopResize, true);
event.preventDefault();
}
}
function resize(event) {
var x, y;
var minHeight = 100;
if (document.all) {
x = window.event.clientX + document.body.scrollLeft;
y = window.event.clientY + document.body.scrollTop;
}
else {
x = event.clientX + window.scrollX;
y = event.clientY + window.scrollY;
}
if (divHeight + y - mouseY < minHeight)
elem.style.height = minHeight + "px";
else
elem.style.height = (divHeight + y - mouseY) + "px";
if (document.all) {
window.event.cancelBubble = true;
window.event.returnValue = false;
}
else
event.preventDefault();
}
function stopResize(event) {
if (document.all) {
document.detachEvent("onmousemove", resize);
document.detachEvent("onmouseup", stopResize);
}
else {
document.removeEventListener("mousemove", resize, true);
document.removeEventListener("mouseup", stopResize, true);
}
}
Re: Text field stretcher
It's not as easy at it looks, that IS what you need. it's a javascript frame, and javascript often involves long code for stuff that may seem like it just needs a
(example) frame-stretch="true"
have fun with ur frame
(example) frame-stretch="true"
have fun with ur frame
Seven- Forumember
- Posts : 60
Reputation : 0
Language : English
Re: Text field stretcher
Well, I am not the best with coding...lol . Can I have just one HTML code I can insert that will make it appear?
Re: Text field stretcher
Cman, I've used it for a 484 song *music player
Had to use forum header & footer for for it to work right.
Invision seems to work best. Acts a bit odd with phpbb3.
You could try it with your version. (phpbb2?)
Had to use forum header & footer for for it to work right.
Invision seems to work best. Acts a bit odd with phpbb3.
You could try it with your version. (phpbb2?)
- Code:
<center><table width="600px" height="" cellpadding="5" cellspacing="0" border="0px" bordercolor="#CCCCCC" bgcolor="#CADCEB"><tr><td>
<div class="panel row1"><div class="inner"><span class="corners-top"><span></span></span><div id="cp-main" class="ucp-main"><strong><strong><br></strong></strong><div class="panel"><div class="inner"><span class="corners-top"><span></span></span>
<div id="chatbox_bottom" style="height: 195px;width: 100%">
<object style="font-family: verdana;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="xpsf_player" align="middle" height="100%" width="100%"><param name="movie" value="http://hideout.com.br/player/xspf_player.swf?playlist_url=http://hideout.com.br/shows/allshows.xspf&autoplay=true"><param name="quality" value="high"><param name="bgcolor" value="#ffffff"><embed src="http://hideout.com.br/player/xspf_player.swf?playlist_url=http://hideout.com.br/shows/allshows.xspf&autoplay=true" quality="high" bgcolor="#ECF3F7" name="xpsf_player" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="center" height="100%" width="100%"></object>
</div><img src="http://2img.net/i/fa/resize.gif" onmousedown="javascript:resizeElement(event, 'chatbox_bottom');" alt="" style="cursor: se-resize; float: right;"></strong></strong><div class="clear"></div><span class="corners-bottom"><span></span></span></div></td></tr></table>
Re: Text field stretcher
484 songs ._. Thats generally low lol xD
My LimeWire has over 2400 songs ._.
And I know all the lyrics to about... 1800
My LimeWire has over 2400 songs ._.
And I know all the lyrics to about... 1800
Seven- Forumember
- Posts : 60
Reputation : 0
Language : English
Similar topics
» Problem with width of text field
» Text field profile field as a widget
» Text field outline.
» Enriched Text Field in Profile
» Colorize text - profile field.
» Text field profile field as a widget
» Text field outline.
» Enriched Text Field in Profile
» Colorize text - profile field.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum