Bootstrap Modal in Appex

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

Bootstrap Modal in Appex

Maarten Mostert-2
Hi,

 

I have the following line of html I need to modal in javascript in order to get the closing cross in my bootstrap modal dialog.

 

<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>

 

Bootstrap uses >&times;  in order to show the multiplication cross character

 

I use the following script to make the buttton.

 

var aModalTopCloseButton = this.elementNameClass("button","close");
      aModalTopCloseButton.setAttribute("data-dismiss", "modal");
var aSpan1 = document.createElement("span"); 
      aSpan1.setAttribute("aria-hidden", "true");
      aSpan1.appendChild(document.createTextNode("&times"));

 

aModalTopCloseButton.appendChild(aSpan1 );
aModalTopCloseButton.appendChild(this.spanWithClassText("sr-only","Close") ); 

 

The above however doesn't work it'll show me the modal like this.
While it should look like this:

 

I am pritty sure there is a small detail I don't get.

 

Thanks for any help.

 

 

Maarten MOSTERT

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Bootstrap Modal in Appex

jtuchel
I think you should just add the semicolon and a space at tehe end of the text node, just like in the html code

Am 02.04.2015 14:26 schrieb Maarten Mostert <[hidden email]>:

>
> Hi,
>
>  
>
> I have the following line of html I need to modal in javascript in order to get the closing cross in my bootstrap modal dialog.
>
>  
>
> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
>
>  
>
> Bootstrap uses >&times;  in order to show the multiplication cross character
>
>  
>
> I use the following script to make the buttton.
>
>  
>
> var aModalTopCloseButton = this.elementNameClass("button","close");
>       aModalTopCloseButton.setAttribute("data-dismiss", "modal");
> var aSpan1 = document.createElement("span"); 
>       aSpan1.setAttribute("aria-hidden", "true");
>       aSpan1.appendChild(document.createTextNode("&times"));
>
>  
>
> aModalTopCloseButton.appendChild(aSpan1 );
> aModalTopCloseButton.appendChild(this.spanWithClassText("sr-only","Close") ); 
>
>  
>
> The above however doesn't work it'll show me the modal like this.
> https://www.dropbox.com/s/m504ar91d4bhe3f/2015-04-02_14-13-50.png?dl=0
> While it should look like this:
> https://www.dropbox.com/s/3x7izhemm4r7e8q/2015-04-02_14-14-50.png?dl=0
>
>  
>
> I am pritty sure there is a small detail I don't get.
>
>  
>
> Thanks for any help.
>
>  
>
>  
>
> Maarten MOSTERT
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside