2 Replies Latest reply on Dec 6, 2012 11:26 AM by Gil1

    Interacting with existing HTML content - How?

    Gil1 Level 1

      I am treying to build a Facebbok connect app that will grab the name and email address from FB, and then fill a email subscription form automatically.

       

      I got the Facebook part working. Since I don't know how to add the form element inside EA I have that in the HTML that I create before staring with EA.

       

      The code of the form is:

      <form action="http://someurl.list-manage.com/subscribe/post" method="post">

              <input type="hidden" name="u" value="33a31e512f3b54d8f0db234f6">

              <input type="hidden" name="id" value="40ecd723418">

              <input type="text" name="MERGE1" id="MERGE1" size="25" value="*|MERGE1|*" class="edgeLoad-EDGE-467457915"/>   

              <input type="text" autocapitalize="off" autocorrect="off" name="MERGE0" id="MERGE0" size="25" value="*|MERGE0|*" class="edgeLoad-EDGE-467457915"/>   

              <input type="submit" value="Subscribe" class="edgeLoad-EDGE-467457915"/>

      </form>

       

      I can see the fileds in EA and move them around

       

      However, I cannot pass values to the input fields.

      For example, for input text with id: MERGE1 I am trying to do

      S('MERGE1').html('some value'); but it throws and error at run time. I guess since MERGE1 was created outside EA I need to reference it some other way.

      But How?

       

      So, 2 questions:

       

      1. How to reference elements that are in the existing HTML from within EA (like the case above)?

      2. How to create the whole form inside EA?  I know how to make the input elements, but not the form element.