Appex: Bootstrap Buttons

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Appex: Bootstrap Buttons

Maarten Mostert-2
Hi,
I am bit puzzled with the interactions here:
I use Bootstrap to build a website, and I implement the following theme: http://wrapbootstrap.com/preview/WB0DN19X0  
On one of my pages I like to enter an input field with a submit button.

I started with the event-source example that comes with Appex to copy the behavior, but I am getting stuck.

My page looks like this.


The red submit button is the one I try to get to work, the buttons below are the ones copied from the example that work just fine.

I make the button with following code:

var aButtonGroup = this.elementNameClass("div", "form-group");
var aButtonColum =  this.elementNameClass("label", "col-sm-offset-3 col-sm-8");

var aButton  =this.elementNameClass("button", "btn btn-default");
aButton.setAttribute("type", "submit");
aButton.appendChild(document.createTextNode("Submit"));
aButton.setAttribute(« id", "theButton");
// next does not work
aButton.setAttribute("onclick", "this.runWorkflow()");
//aButton.setAttribute("data-target", "#demo");
 
/* this does not work either
$('#theButton').on('click', function (e) { alert("ok");   });
 */

// neither does this

button.click(function () {
self.syncMessageToServer(« sent-message », "hi");
});

I tried all possible ways to get to action the button but each time a question mark is added to the url and $t gets undefined


 Any hints are welcome.

Regards,

@+Maarten,





.



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Appex: Bootstrap Buttons

Christian Haider

Maybe this is the problem?

 

var aButton  =this.elementNameClass("button", "btn btn-default");

            aButton.setAttribute("type", "submit");

            aButton.appendChild(document.createTextNode("Submit"));

            aButton.setAttribute(« id", "theButton");

// next does not work

            aButton.setAttribute("onclick", "this.runWorkflow()");

            //aButton.setAttribute("data-target", "#demo");

 

Christian


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Appex: Bootstrap Buttons

Maarten Mostert

Actually the right code is as follows:

 

var anIput =this.elementNameClass("input", "form-control");
anIput.setAttribute("type", "email");
anIput.setAttribute("id", "inputEmailValue");
anIput.setAttribute("placeholder", "MyEmail");
aColum.appendChild(anIput);
aColum.appendChild(this.elementNameClass("i", "fa fa-envelope form-control-feedback"));
aFormGroup.appendChild(aColum);
aHorizontalForm.appendChild(aFormGroup);

var aButtonGroup = this.elementNameClass("div", "form-group");
var aButtonColum = this.elementNameClass("label", "col-sm-offset-3 col-sm-8");

var submitButton = this.elementNameClass("a", "btn btn-default");
submitButton.setAttribute("href", "/register");
submitButton.addEventListener('click', function(event){
var anEmail = $( "#inputEmailValue" ).val();
$t.application.asyncMessageToServer("set-message",anEmail);
});
submitButton.appendChild(document.createTextNode("Submit"));

aButtonColum.appendChild(submitButton);

 

Regards,

 

Maarten MOSTERT

 

 

28 Av Alphonse Denis

83400 Hyères, France

+33 676411296 

http://stakepoint.com/

 



> "Christian Haider" <[hidden email]> |

Maybe this is the problem?

 

var aButton  =this.elementNameClass("button", "btn btn-default");

            aButton.setAttribute("type", "submit");

            aButton.appendChild(document.createTextNode("Submit"));

            aButton.setAttribute(« id", "theButton");

// next does not work

            aButton.setAttribute("onclick", "this.runWorkflow()");

            //aButton.setAttribute("data-target", "#demo");

 

Christian


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc