This topic is locked

Default value

1/22/2014 10:32:12 AM
TagEditor plugin support forum
T
Tim author

Hello,
Is it possible to set a default value for a TagEditor field? I set a session variable in the "Before display" event of the Add page and I'd like to use this as the default value of the TagEditor field. I thought maybe I could do it in the JavaScript OnLoad event so I tried this:
var to = Runner.getControl(pageid,'SendTo');
{

to.setValue(Session("To")

};
But it doesn't work. (Note that "SendTo" is the field name that has "Edit as" set to the TagEditor).
Is my java script wrong, or am I going about it wrong? Or can it not be done?
Thanks for your help.

Tim

admin 1/24/2014



Is my java script wrong, or am I going about it wrong?


Both.

  1. Syntax is incorrect, right parenthesis is missing. Use built-in syntax checker to make sure syntax is correct.
  2. You cannot simply use ASP session variables in Javascript. This article explains how to pass variables from ASP to Javascript:

    http://xlinesoft.com/asprunnerpro/docs/how_to_access_asp_variables.htm