So following the execellent advice from my last thread i created some variables and passed them to some js.
I now need to pass the url of a file upload to the js.
$fields->addFieldToTab("Root.Content.Embed", new FileIFrameField('GPSXML', 'Upload and Attach Document'));
public function init() {
parent::init();
Requirements::themedCSS("layout");
Requirements::themedCSS("typography");
Requirements::themedCSS("form");
Requirements::javascriptTemplate('mysite/javascript/maps.js', array(
'GPSXML' => $this->GPSXML.URL
));
}
This doesnt seem to pass anything over to the js the alert box for $GPSXML just shows blank. I'm guessing i need to parse out the url as a string? any ideas?
thx guys