Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Can you use RTE on same page with different forms
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedCan you use RTE on same page with different forms

 Post Reply Post Reply
Author
julia444 View Drop Down
Newbie
Newbie


Joined: 08 April 2007
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote julia444 Quote  Post ReplyReply Direct Link To This Post Topic: Can you use RTE on same page with different forms
    Posted: 23 May 2007 at 12:14am
 
I have an asp page which is for a news weblog. the way it is designed is that all the different views available are on one long page. There are 2 views, for an article to show. At the bottom of both is a form called "frm3" which is for posting comments. This form has a text area to which i added the RTE (see below)
 
On the same page, the same code below needs to be repeated. i copied and pasted it, but it returns an error on the public side. It only works if i use it in one form.
 
I need to be able to use it in both forms. Both are identical, and only one can be used at a time, as the article is either showing one or the other on the public side. But i think the server reads the whole page and sees 2 RTE's
 
How do i solve this problem? . I'm not html literate, so Thanks in advance for any help
 
 
 
 
 
 
 
  <% IF blLOGGED_IN = True THEN %>
        
          <br /><br />      
<body OnLoad="initialiseWebWizRTE();">
        <table width="430" bgcolor="yellow" cellpadding="2" cellspacing="0" border="0" ><tr>
         <td style="padding: 20px;">Membership details may be edited on next page.<br />
             <br />
                       
          
            
          <table align="center" width="400" cellpadding="2" cellspacing="0" border="0">
          <form action="_comments.asp?ID=<%=NID%>" method="post" name="frm3" id="frm3" onSubmit="return ValidateComment()">
          <tr>
           <td width="100">Name</td>
           <td width="300"><%=Session("PMMS_USERNAME")%></td>
          </tr><tr>
           <td>Country</td>
           <td width="300"><%=Session("PMMS_COUNTRY")%></td>
          </tr><tr>
           <td>*Subject</td>
           
           <td width="300"><input type="Text" name="subject" value="" maxlength="50" class="textbox" style="width: 100%"></td>
          </tr><tr>
          
          
          
          
     <%

 'Declare the ASP variables used
 Dim strFormName
 Dim strTextAreaName
 
 'ID tag name of the HTML form the textarea is within
 strFormName = "frm3"
 
 'ID tag name of HTML textarea being replaced
 strTextAreaName = "comment"
 
 %>       
       
 
 
  
  <td valign="top">*Comment</td>
            <td width="300"> <!-- include the Web Wiz Rich Text Editor -->
 <!--#include file="RTE_editor_inc.asp" --> <textarea name="comment" id="comment" rows="6" cols="50"  style="width: 100%;" class="textbox"></textarea>
           
   
           <input type="Checkbox" name="allowE" value="1" />
           receive emails from readers</td>
          </tr><tr>
           <td></td>
           <td><input type="Submit" value="Add Comment" /></td>
          </tr>
          <input type="Hidden" name="mode" value="set" /></form>
          </table>
          <br /><br />  
          <table cellpadding="2" cellspacing="0" width="100%"><tr>
           <td>* - these fields are mandatory.</td>
                  </tr></table>
          <br /><br />         </td>
        </tr></table>
          
    

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 2007 at 7:50am
You can only apply the RTE to one textarea on a page.
Back to Top
julia444 View Drop Down
Newbie
Newbie


Joined: 08 April 2007
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote julia444 Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 2007 at 8:11am
Originally posted by -boRg- -boRg- wrote:

You can only apply the RTE to one textarea on a page.
 
Hi BoRg
 
but they don't show at the same time, ie. people will either see one or the other,
 
If this is still impossible, then how do you get around this? I'm sure there are others with the same problem
 
Thank you for your help.
Back to Top
julia444 View Drop Down
Newbie
Newbie


Joined: 08 April 2007
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote julia444 Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2007 at 7:53am
Can someone please reply the query above?
 
I have a webpage on which i will use this, an ASP page, it's coded as follows:
 
An asp with a news article drawn from a database. There is a comments system at the bottom. You have to be logged in to post comments. There are 2 different layouts on the page, but only one shows at any one time. I want to add the RTE to both, but they will only ever show one depending on which page the article template is.
 
Can i add the code twice to the same page for this reason?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2007 at 8:02am

If both RTE enabled  textarea's are sent to the client browser it wouldn't work. If you use server side code to send only one RTE enabled textarea to the client browser it will work.
Back to Top
julia444 View Drop Down
Newbie
Newbie


Joined: 08 April 2007
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote julia444 Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2007 at 8:18am

      Borg

 
Thank you for replying. I'm not sure though, as i'm not html literate. Can you tell from the code below if it is server side? I did try adding the below to the other part in the webpage i think and it didn't work or something, but i'm willing to give it another shot, if someone can recommend something. I chose WEb wiz, because its ASP too. I only need a very simple RTE.
 
Here is the section of the page where it is used, and the other part is the same, only on a different template. Depending on which template the news article was posted from the database, one or the other will show.
 
--------------
 

          
     <%

 'Declare the ASP variables used
 Dim strFormName
 Dim strTextAreaName
 
 'ID tag name of the HTML form the textarea is within
 strFormName = "frm3"
 
 'ID tag name of HTML textarea being replaced
 strTextAreaName = "comment"
 
 %>       
       
 
 
  
  <td valign="top">*Comment</td>
            <td width="300"> <!-- include the Web Wiz Rich Text Editor -->
 <!--#include file="RTE_editor_inc.asp" --> <textarea name="comment" id="comment" rows="6" cols="50"  style="width: 100%;" class="textbox"></textarea>
           
   
           <input type="Checkbox" name="allowE" value="1" />
           receive emails from readers</td>
          </tr><tr>
           <td></td>
           <td><input type="Submit" value="Add Comment" /></td>
          </tr>
          <input type="Hidden" name="mode" value="set" /></form>
          </table>
          <br /><br />  
          <table cellpadding="2" cellspacing="0" width="100%"><tr>
           <td>* - these fields are mandatory.</td>
           <td align="right"><a href="http://www.website.asp?logout=True" target="_top">Click here to log out.</a></td>              
     
          </tr></table>
   </td>

         
   
         
      <% ELSE%>  
      

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 27 July 2007 at 8:38am
The simply way to tell, in your browser if you do a view source of the page does it show both RTE enabled textarea?

If not then it is not sending both to the client browser and you are handling the response sent to the client server side.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.