Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 07:37:16 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155467 Posts in 21707 Topics by 7732 Members
Latest Member: DarrellDD
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Adding HTML or Code Section  (Read 692 times)
itsnick

Offline Offline

Posts: 24


WWW
« on: November 21, 2008, 08:33:42 PM »

I am trying to add a hidden <textarea>tag with one <div> in it to the individual pages I created through the web administration.  I cannot just add this html to the index.php file because each textarea contains different text for each page.

I tried going to the page in the admin and clicking on source and adding the HTML code.  When I did this it filters my <div> tag and left the <textarea> tag alone.

Also I tried adding a code section to the page, but it's not there when I go to view page source in my browser.

In short, I need to edit or add html to the individual pages and not sure on the correct way of doing this.

Any help greatly appreciated.
Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4884



« Reply #1 on: November 22, 2008, 12:19:41 AM »

Hello.

please try a section of type "code" and put the following code in it:
Code:
echo '<div>';

This should do the trick.

Best Regards,
Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
marathoner

Offline Offline

Posts: 495


« Reply #2 on: November 22, 2008, 12:22:42 AM »

I don't understand exactly what you want to do. Is your page (or section) a WYSIWYG, Code, or Form type? If WYSIWYG, which WYSIWYG editor are you using? I tried to insert a TEXTAREA wrapped in a DIV in a WYSIWYG section using FCKEditor and it works fine.

Also, since the TEXTAREA tag is used for text, I don't believe you can put a DIV inside of the TEXTBOX without it being displayed as part of the text.

Normally, you would use a TEXTAREA tag in a form and not a WYSIWYG section.
Logged
vyni

Offline Offline

Posts: 566


« Reply #3 on: November 22, 2008, 10:08:35 AM »

Hi itsnick,

best solution will be if You get the code2-module (find it here). Install it in Your webserver and add a section of type code2.
Than choose html from the drop-down in admin-backend and insert Your html-code.

regards from Himberg, next to Vienna
Logged

PS: Falls jemand eine Idee hat was zu tun ist und mir das erklären könnt - geh bitte davon aus dass ich ahnungslos bin, was php und so betrifft. Ich kann grad was lesen, kopieren und einfügen,  ungefähr verfolgen und glauben.
itsnick

Offline Offline

Posts: 24


WWW
« Reply #4 on: November 22, 2008, 08:50:20 PM »

Thanks everyone for your replies,  the code2 module is working for my needs. 

Though this seems like overkill just to add a little html.

Thanks again
Logged
spida

Offline Offline

Posts: 203


« Reply #5 on: November 24, 2008, 03:13:33 PM »

Hi itsnick,

I wonder what you want to achieve. <textarea> is a form element, you shouldn't use it anywhere else in html. Moreover, a <div> in a textarea does not make any sense at all, there simply is no such markup. Sounds to me like you need some help with basic html, no offence meant. And anyway, what Stefek suggested would be the simplest and absolutely working solution.

Cheers,
spida
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!