[Seaside] Appex: Bootstrap Buttons

Maarten Mostert maarten.mostert at wanadoo.fr
Fri Mar 13 23:57:06 UTC 2015


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 <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.

https://www.dropbox.com/s/eu7fdwxqoxu09ei/2015-03-13_19-34-30.png?dl=0 <https://www.dropbox.com/s/eu7fdwxqoxu09ei/2015-03-13_19-34-30.png?dl=0>

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

https://www.dropbox.com/s/v27vwaagz0puwuv/2015-03-13_19-50-05.png?dl=0 <https://www.dropbox.com/s/v27vwaagz0puwuv/2015-03-13_19-50-05.png?dl=0>

 Any hints are welcome.

Regards,

@+Maarten,





.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150314/d7c4d2f4/attachment-0001.htm


More information about the seaside mailing list