Hello all, I have recently started using selenium and I have been trying to automating it using a little javascript.
The issue that I am having is trying to pass variable from Selenium to Javascript, but I have been unable to do it. I keep getting a variable not defined javascript error. I was wondering if someone can point me on the right path.

basically my script is like this:

Get a value from a table:
command: storeTable
Target: //td[2]/table.3.9
Value: SMSTemplate

Plug part of value from above table into a field in my html page:
Command: type
Target: phoneNumber
Value: javascript{var temp = new String(); temp =SMSTemplate.substring(3,7);}

I get the following error in the second command:
[error] Unexpected Exception: message -> SMSTemplate is not defined, fileName ->
chrome://selenium-ide/content/seleni...elenium-api.js, lineNumber ->
2482, stack -> ("javascript{var temp = new String(); temp
("javascript{var temp = new String(); temp
XULCommandEvent])@chrome://selenium-ide/content/selenium-ide.xul:1 , name ->

Thanks for the help.