Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Passing info from cftextarea within a Flash form to a Javascript function

New Here ,
Aug 27, 2009 Aug 27, 2009

I am wondering if there is any way to pass the data of a cftextarea within a flash form to a javascript function on the same page? I am trying to implement a spell checking feature onto a flash form. I am sure that my spell checking code works, as it correctly spell checks when I am in a non-flash cfform area.

I have tried linking the javascript function to the form info through this convention:

document.form.TextAreaName

Unfortunately I have had no success. Any help on this issue would be very much appreciated.

Thanks,

AeroNicko

861
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 27, 2009 Aug 27, 2009
LATEST

Ok, so I am pretty sure my problem is being caused by me not passing the flash variable of the cftextarea correctly within my getURL link to the Javascript.

Here is what I am doing:

In the head of my .cfm file, I set up the javascript to create the spell check pop up window and pass the text to be edited.

<!--- Code to set up call to Spell Checker (Javascript) (NAB 8/27/09) --->
<script src="../Spellchecking/spellerpages-0.5.1/speller/spellChecker.js" language="javascript"></script>
   
    <script language="javascript" type="text/javascript">
function openSpellChecker() {
    // get the textarea we're going to check
    var txt = document.activity.Summary;
    // give the spellChecker object a reference to our textarea
    // pass any number of text objects as arguments to the constructor:
    var speller = new spellChecker( txt );
    // kick it off
    speller.openChecker();
}
</script>

Within my flash cfform (named activity), I set up my text area:

<cftextarea name="Summary" id="Summary" maxlength="1000" tooltip="Summarize your entry here.  The field has a 1000 character limit.  This summary is included in the generated End of the Week reports." onChange="submitTemporary('Summary', Summary.text);requiredContent('summary');" onFocus="if(detailsBox.height>60){detailsBox.height=60;summaryBox.height=220;}"></cftextarea>

And then I create a button that handles the calling of the javascript function:

<cfinput type="button" style="#buttonstyle#" name="SpellCheck" value="Spell Check" onClick="getURL('javascript:openSpellChecker();')">

When I click on the button, I know that the javascript is working, as it pops up the spell checker window. After the window pops up though, it hangs and acts like nothing is being passed to it.

On the site I found the method of calling a javascript function in a flash form, they said something about passing any form variables within the getURL function call. How would I do that? I have tried passing document.form.name, but have had no success.

Once again, THANK YOU soo much for any guidance!

Site I got linking info from:

http://blog.codefidelity.com/?p=15

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources