Click here to Skip to main content
15,889,116 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: How do you code an application modal? Pin
charlieg7-Aug-17 14:16
charlieg7-Aug-17 14:16 
AnswerRe: How do you code an application modal? Pin
Richard Deeming8-Aug-17 10:03
mveRichard Deeming8-Aug-17 10:03 
GeneralRe: How do you code an application modal? Pin
Nathan Minier10-Aug-17 1:23
professionalNathan Minier10-Aug-17 1:23 
QuestionWhat is the best way, the web application responsive? Pin
Geeth Lochana1-Aug-17 14:15
Geeth Lochana1-Aug-17 14:15 
AnswerRe: What is the best way, the web application responsive? Pin
Richard MacCutchan1-Aug-17 21:16
mveRichard MacCutchan1-Aug-17 21:16 
GeneralRe: What is the best way, the web application responsive? Pin
Trần Văn Khương19-Sep-17 17:17
professionalTrần Văn Khương19-Sep-17 17:17 
AnswerRe: What is the best way, the web application responsive? Pin
ZurdoDev7-Aug-17 3:23
professionalZurdoDev7-Aug-17 3:23 
QuestionHow to make pop-up dialog-box responsive ? Pin
Member 133393981-Aug-17 0:46
Member 133393981-Aug-17 0:46 
I created a dialog box on my landing page that pop-ups when the page loads for only once, but the problem is it is not responsive.
//this is my css code
CSS
#mask {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9000;
  background-color: #000;
  display: none;
}

#boxes .window {
  position: absolute;
  left: 0;
  top: 0;
  width: 440px;
  height: 200px;
  display: none;
  z-index: 9999;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
}

#boxes #dialog {
  width: 750px;
  height: 300px;
  padding: 10px;
  background-color: #ffffff;
  font-family: 'Segoe UI Light', sans-serif;
  font-size: 15pt;
}

#popupfoot {
  font-size: 16pt;
  position: absolute;
  bottom: 0px;
  width: 250px;
  left: 250px;
}

@media screen and (min-width: 800px)
{
  #boxes.window{max-width: 500px; }
  #dialog{max-width: 700px;}
}


//this is my jquery
JavaScript
$(document).ready(function() {	

 //if the cookie hasLaunch is not set, then show the modal window
    if (!readCookie('hasLaunch')) {
        //launch it
        launchWindow('#dialog');        
        //then set the cookie, so next time the modal won't be displaying again.
        createCookie('hasLaunch', 1, 1);
    }

	
//if close button is clicked
$('.window .close').click(function (e) {
//Cancel the link behavior
e.preventDefault();

$('#mask').hide();
$('.window').hide();
});

});

function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}

function launchWindow(id) {

        //Get the screen height and width
        var maskHeight = $(document).height();
        var maskWidth = $(window).width();

        //Set heigth and width to mask to fill up the whole screen
        $('#mask').css({'width':maskWidth,'height':maskHeight});

        //transition effect     
        $('#mask').fadeIn(500);    
        $('#mask').fadeTo("slow",0.9);  

        //Get the window height and width
        var winH = $(window).height();
        var winW = $(window).width();

        //Set the popup window to center
        $(id).css('top',  winH/2-$(id).height()/2);
        $(id).css('left', winW/2-$(id).width()/2);

        //transition effect
        $(id).fadeIn(2000); 

}

//this is html code
HTML
  <div id="boxes">
  <div id="dialog" class="window">
    Welcome to GospelBox!!!
    <div id="popupfoot"> <a href="/content/about.html">  Okay </a> | <a  class="close" style="color:red;" href="#" >Skip this step </a> </div>
  </div>
  <div id="mask"></div>
</div>

Mark Vivian Das

AnswerRe: How to make pop-up dialog-box responsive ? Pin
Jochen Arndt1-Aug-17 1:04
professionalJochen Arndt1-Aug-17 1:04 
QuestionMessage Removed Pin
29-Jul-17 13:48
EuroValdes29-Jul-17 13:48 
Generalapp development Pin
Brahm Pratap Rana28-Jul-17 22:12
Brahm Pratap Rana28-Jul-17 22:12 
GeneralRe: app development Pin
Richard MacCutchan28-Jul-17 22:55
mveRichard MacCutchan28-Jul-17 22:55 
QuestionBulk Email web project project Pin
Jassim Rahma21-Jul-17 6:08
Jassim Rahma21-Jul-17 6:08 
QuestionAngularjs 1.5 - multi level tree node inside a drop down list Pin
chandra terli7-Jul-17 9:56
chandra terli7-Jul-17 9:56 
AnswerRe: Angularjs 1.5 - multi level tree node inside a drop down list Pin
Nathan Minier17-Jul-17 1:43
professionalNathan Minier17-Jul-17 1:43 
AnswerRe: Angularjs 1.5 - multi level tree node inside a drop down list Pin
BrunoFaitalaas17-Jul-17 21:41
BrunoFaitalaas17-Jul-17 21:41 
QuestionArray and Sub Array from PHP Pin
Jassim Rahma25-Jun-17 11:50
Jassim Rahma25-Jun-17 11:50 
AnswerRe: Array and Sub Array from PHP Pin
Planet Thomas4-Jul-17 1:19
Planet Thomas4-Jul-17 1:19 
QuestionRest API Versioning Pin
Abhinav S22-Jun-17 21:03
Abhinav S22-Jun-17 21:03 
AnswerRe: Rest API Versioning Pin
Richard Deeming23-Jun-17 1:43
mveRichard Deeming23-Jun-17 1:43 
GeneralRe: Rest API Versioning Pin
Abhinav S23-Jun-17 4:52
Abhinav S23-Jun-17 4:52 
QuestionOpen Snippingtool by HTML or by HTA Pin
Member 1326358621-Jun-17 9:58
Member 1326358621-Jun-17 9:58 
QuestionRe: Open Snippingtool by HTML or by HTA Pin
ZurdoDev21-Jun-17 10:25
professionalZurdoDev21-Jun-17 10:25 
AnswerRe: Open Snippingtool by HTML or by HTA Pin
Member 1326358621-Jun-17 11:41
Member 1326358621-Jun-17 11:41 
GeneralRe: Open Snippingtool by HTML or by HTA Pin
ZurdoDev22-Jun-17 1:18
professionalZurdoDev22-Jun-17 1:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.