Search

I want to use static xhtml pages with javascript to create an array of data. This data must then be put into a symphony site on another subdomain as an entry (like a message event).

What are my options to go from some JS data to a prefilled form (visible, or very quickly automatically submitted)? A simple POST is not possible because the pages are static.

I considered:

  • writing to a cookie (session is obviously not possible clientside)
  • some AJAX
  • a url string, and using the symphony restfull api

I remember the paypal extension mentioning something of a JS forward, is this related at all?

I must admit I don’t understand what you’re trying to do, but a form POST to a Symphony event would work if you created the form DOM with your JavaScript array.

So on adomainwithoutserversidescripting.com/JSform I would create the form with JS exactly as the form on the symphony page and then POST it with the form action=”mysymphonydomain.com/myformpage” and this would create a successfull entry across domains?

Yes. But it would have to be a full browser POST, not AJAX.

I guess you’ll also be able to use jQuery.post().

Not if you are crossing to another domain: native XMLHttpRequest calls are same-domain only. Unless you’ve modified your browser settings. You could always try JSONP if you’re desperate.

Oh, I didn’t read the subdomain part. Sorry, jQuery.post() is out then.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details