FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

OK, really easy html script...

 


KHO
l can't believe l forgot how to do this, l remember it was easy, and thats about it Neutral.

l need something that will make a text box that is scrollable, but the viewer of the page can't enter any text into it, only the stuff l provided is displayed Neutral. How can l do this? Oh, and i needs to be able to display html properly, cause there is no way l am going to go and format all of the text l need to put in here Neutral.
Stubru Freak
XHTML:
Code:
<textarea readonly="readonly"></textarea>


Old HTML: (Just for reference, you shouldn't use this)
Code:
<textarea readonly></textarea>


Just don't put a </textarea> tag in it!
KHO
Ya, l've used the text only part, but there is a ton of HTML in here that needs to be displayed (just used for placement, but theres alot of it) how can l make it so that it allows HTML inside of it?
mathiaus
replace '<' with '&lt;'. You may also wish to replace '>' with '&gt;' though just the former should work.

Other things to change if they dont work
& / &amp;
" / &quot;
KHO
And that will allow me to put HTML inside the text field? How does that work out?
mathiaus
displays it as html rather than parsing it as html! Wink
riv
But that won't work... By doing that, it'll just display "<b>Hello</b>" instead of displaying "Hello" in bold. I have no idea how you can do that though... Instead of a text area, can't you just use a frame, and another html file? If you want the scrolling part, you could just limit the size of the frame.

For example:
Code:
<frameset cols="100" rows="100" border="0">
   <frame src="*the external html file*"/>
  </frameset>


That would give you a texbox-like thing, with html.
KHO
no good with the &gt; and &lt; Neutral. Also, l'm on Myspace.com for it, so l can't have frames, any other suggestions?
Nyizsa
Try using an iframe. You can specify the size, so it will exactly look like a textbox. Specify your HTML file in the src= property, and it will be readonly by default. Plus your page will not use frames.
KHO
Once again, myspace does not allow frames
rohan2kool
What you want to do is use a rich text editing box. Please note that many browser don't support it. Opera 9, IE5+, NN 7.1+ and FF 0.6.1+ support it. Other's don't. Don't know about konquerer, Safari and rest...

See it here: http://www.kevinroth.com/rte/demo.htm ...
mathiaus
oh sorry I thought you wanted to show raw html Embarassed

anyway I's use a simple div or table. Set the height property and overflow to either scroll or auto.
Nyizsa
KHO wrote:
Once again, myspace does not allow frames

An iframe is not a frame actually. No <frameset> needed, just put the <iframe> tag in the <body> section, as you would do with an image. Give it a try at least!
mathiaus
an iframe is an 'Inline Frame' so it is a frame and is usually also blocked by most free webhosts for the same reasons normal/standard frames are.
Nyizsa
mathiaus wrote:
an iframe is an 'Inline Frame' so it is a frame and is usually also blocked by most free webhosts for the same reasons normal/standard frames are.

Sorry, didn't know that... I thought only frameset pages were forbidden.
Anyway, I have checked www.myspace.com, and it seems to be a profile- and fansite hosting rahter than normal web hosting.
riv
I think that mathiaus is right; An div section with overflow might be what you want...

Here's an example:
Code:

<div style="width: 100px; height: 100px; overflow: scroll">
Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here. Text goes here.
</div>


You can also change the overflow property to visible, hidden, auto, or inherit.
afracsass
Wow this is really great.
I was looking for exactly something like this.

Using a frameset gives me headache cause it's really annoying to refrence objects in the other frame or parent. One frame structure looks like much better.

Now i can replace many subframes with this tag. I don't like to use iframe either cause it behaves independently. it can not share the javascript code functions.

thanks alot!
Related topics

Navigation Script (javascript) Help Please!
Some easy html codes made by me for beginners.
Need a Download html script
HTML Tutorial.
html script links

Programming links, info, and tutorials
Play video in html
Looking for easy FormMail Script
[JS]Some must have Javascript and related stuffs-updated!!!!
A New Bulletin Board

Using php to change content of a .txt
what do you think about frontpage
Website Icons?
How To : Improve Your PHP Programming
To wlasnie my - Polacy
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.