The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Text field stretcher

4 posters

Go down

Text field stretcher Empty Text field stretcher

Post by Cman August 5th 2009, 9:09 pm

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

Text field stretcher Screen25
View Larger > https://i.servimg.com/u/f89/13/99/54/90/screen25.jpg
Cman
Cman
Forumember

Male Posts : 681
Reputation : 5
Language : English
Location : Florida

http://firealarmsrme.org/

Back to top Go down

Text field stretcher Empty Re: Text field stretcher

Post by Cman August 14th 2009, 1:55 am

bump
Cman
Cman
Forumember

Male Posts : 681
Reputation : 5
Language : English
Location : Florida

http://firealarmsrme.org/

Back to top Go down

Text field stretcher Empty Re: Text field stretcher

Post by Etana August 14th 2009, 1:36 pm

Hello,


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;" />
And the javascript needed for that is :

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);
   }
}
Cordially.
Etana
Etana
Forumember

Male Posts : 98
Reputation : 0
Language : French - English

http://kiniiri.forumactif.com/

Back to top Go down

Text field stretcher Empty Re: Text field stretcher

Post by Cman August 15th 2009, 8:05 pm

I was just wanting a code for an iframe that can extend.
Cman
Cman
Forumember

Male Posts : 681
Reputation : 5
Language : English
Location : Florida

http://firealarmsrme.org/

Back to top Go down

Text field stretcher Empty Re: Text field stretcher

Post by Seven August 16th 2009, 7:28 am

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"

Wink

have fun with ur frame
avatar
Seven
Forumember

Posts : 60
Reputation : 0
Language : English

Back to top Go down

Text field stretcher Empty Re: Text field stretcher

Post by Cman August 16th 2009, 9:48 pm

Well, I am not the best with coding...lol Smile. Can I have just one HTML code I can insert that will make it appear?
Cman
Cman
Forumember

Male Posts : 681
Reputation : 5
Language : English
Location : Florida

http://firealarmsrme.org/

Back to top Go down

Text field stretcher Empty Re: Text field stretcher

Post by RoNo August 17th 2009, 1:07 am

Cman, I've used it for a 484 song *music player Cool
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&amp;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&amp;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>
Replace the "<object> </object>" section with your content/code.
RoNo
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

Text field stretcher Empty Re: Text field stretcher

Post by Cman August 21st 2009, 1:14 am

that is good, but it doesn't move
Cman
Cman
Forumember

Male Posts : 681
Reputation : 5
Language : English
Location : Florida

http://firealarmsrme.org/

Back to top Go down

Text field stretcher Empty Re: Text field stretcher

Post by RoNo August 21st 2009, 5:59 am

As I mentioned above... I had to use forum header and footer
when creating a widget to get it to work correctly.
Text field stretcher Hideout-stretch01s

Text field stretcher Hideout-stretch02s
RoNo
RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

Text field stretcher Empty Re: Text field stretcher

Post by Seven August 21st 2009, 9:21 am

484 songs ._. Thats generally low lol xD

My LimeWire has over 2400 songs ._.

And I know all the lyrics to about... 1800 Very Happy
avatar
Seven
Forumember

Posts : 60
Reputation : 0
Language : English

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum