Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Tieing htmlAREA into PHP text fields.


Goanna

Recommended Posts

Okay, I didnt think this would be hard. I used two files I already have that include htmlAREA's wysiwig editor. I wanted to ad it to the text field of another application. I used the two existing files as a guide and now I am trying to install it, but it doesnt work. I double checked I had the top part of the ap linked to the right folders, and then I tried all different variations of the second part.

 

?>
         <tr><?php echo tep_draw_form('language', FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir'] . '&filename=' . $HTTP_GET_VARS['filename'] . '&action=save'); ?>
           <td><table border="0" cellspacing="0" cellpadding="2">
             <tr>
               <td class="main"><b><?php echo $HTTP_GET_VARS['filename']; ?></b></td>
             </tr>
             <tr>
               
   <td class="main"><?php echo tep_draw_textarea_field('file_contents', 'soft', '80', '20', $file_contents, (($file_writeable) ? '' : 'readonly')); ?>
   <br>
   <script language="JavaScript1.2" defer>('define_mainpage[<?php echo $file_contents[$i]["id"] ?>]');</script>    </td>
             </tr>
             <tr>
               <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
             </tr>
             <tr>
               <td align="right"><?php if ($file_writeable) { echo tep_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . tep_href_link(FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $HTTP_GET_VARS['lngdir']) . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; } ?></td>
             </tr>
           </table></td>
         </form></tr>
<?php

 

That is a segment I am working with. I beleive the area right above <script language is the actual text input area. I located the java script right beneath that and tried everything from define_mainpage to tep_draw_textarea and some other things. I cannot get it to work.

 

If anyone can tell me what I need to do in order to get this working, it will be greatly apreciated. Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...