Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pop up widget through script

I am looking forward to create a popup window, see the attached screenshot.

enter image description here

Details: - Anyone can add this pop up to their website using a script, that i will share. - This script/pop up will be later used in the chat application that i am creating

Issues: How do i create this pop up windows script and share this script with other users incase they want to add this pop up to their website.

My question is for the UI part(pop up) and not how the chat will work.

like image 370
Sengottaian Karthik Avatar asked Feb 15 '16 06:02

Sengottaian Karthik


People also ask

How to show popup using jQuery?

Popup basics To create a popup, add the data-role="popup" attribute to a div with the popup contents. Then create a link with the href set to the id of the popup div, and add the attribute data-rel="popup" to tell the framework to open the popup when the link is tapped.

What is a popup widget?

Popup Widget Lets You Use Widgets On Your Homescreen Without Having To Look At Them.


1 Answers

I am just providing the layout alone which dynamically creates an iframe in an existing html page. using which you can add you contents.

<html>
<head>
</head>
<body>
</body>
<script>
var ifrm = document.createElement("iframe");
ifrm.style="width: 280px; max-height: 100%; height: 338px; position: fixed; bottom: 0px; right: 3px; text-align: left; z-index: 2147483647; border: 0px none; border-radius: 4px 4px 0px 0px; box-shadow: 0px 0px 5px  rgb(51, 51, 51);";
document.body.appendChild(ifrm);
</script>    
</html>
like image 67
Sunil Bharath Avatar answered Oct 21 '22 12:10

Sunil Bharath