Forums: Default value - Forums

Jump to content

Page 1 of 1

Default value Is it possible to set default

#1 User is offline   timnorvel 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 255
  • Joined: 21-September 07

Posted 22 January 2014 - 03:32 PM

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
0

#2 User is offline   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15889
  • Joined: 03-February 03

Posted 24 January 2014 - 04:37 PM

View Posttimnorvel, on 22 January 2014 - 10:32 AM, said:

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...p_variables.htm
Best regards,
Sergey Kornilov
0

Page 1 of 1


Fast Reply