Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-03-21 04:58:39

willeffects
Xinha Authority
Registered: 2005-03-19
Posts: 130

javascript object access

OK So I'm creating a page that has 5 editors being created with

xinha_editors = xinha_editors ? xinha_editors :
      [
        'page1ID',
        'page2ID',
        'page3ID',
        'page4ID',
        'page5ID'
      ];

I have some external buttons that need to manipulate those forms, but I need to know how to get a reference to the editor object in a js function (ex 'page' + n + 'ID') so i can call insertHTML.  Can someone please enlighten me?  Thanks!

Offline

#2 2005-03-21 06:09:55

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: javascript object access

willeffects wrote:

OK So I'm creating a page that has 5 editors being created with

xinha_editors = xinha_editors ? xinha_editors :
      [
        'page1ID',
        'page2ID',
        'page3ID',
        'page4ID',
        'page5ID'
      ];

I have some external buttons that need to manipulate those forms, but I need to know how to get a reference to the editor object in a js function (ex 'page' + n + 'ID') so i can call insertHTML.  Can someone please enlighten me?  Thanks!

xinha_editors['page' + n + 'ID'].insertHTML()  - after you have done the make_editors call, xinha_editors actually contains the editors themselves.


James Sleeman

Offline

#3 2005-03-21 12:27:12

willeffects
Xinha Authority
Registered: 2005-03-19
Posts: 130

Re: javascript object access

Thanks that worked!  I assume getHTML is the function to use to get the current HTML of the editor?

Also, does anything need to be done on form submittal?  I have the controls on the page and enter in data, but when I submit the form nothing is passed for the textareas...

Thanks!

Offline

Board footer

Powered by FluxBB