jquery popup box

Some times, the web page needs a pop-up modal box whenever the additional information requires. In those cases, the additional modal supported by jquery will be helpful. I have designed the modal box script with the jquery library and the code is given below.

DEMO PAGE
Thank you very much for visiting this page. We have been trying our best for maintaining this website with markets trends and new rate analysis up to the mark. However, it is difficult to achieve the best without your support and encouragement. Needless to say that with your support only, we have reached this stage and do hope the same co-operation in future.
  • For further information, kindly submit your comments / remarks/ suggestions/ complaints /opinions through this online feedback Form. We at PIPERATE.COM value your inputs and constructive comments. And if required, necessary corrective actions will be taken accordingly, if deemed fit.
  • PIPERATE.COM hereby confirm that your E-mails and other personal details shall not be used for the commercial purpose nor disclosed for any other such activity. For further details, please refer the DISCLAIMER.

Hope you enjoyed best the source code is given below. If you have confusion, kindly mail me so that I will try to rectify the code through contact form.
<html> <head> <style type="text/css"> </style> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/ jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript"> //initialize the 3 popup css class names - create more if needed var matchClass=['popup1','popup2','popup3']; //Set your 3 basic sizes and options for the class names above - create more if needed var popup1 = 'width=300,height=200,toolbar=0,menubar=0,location=0,status=1,scrollbars=1, resizable=1,left=20,top=20'; var popup2 = 'width=400,height=400,toolbar=0,menubar=0,location=0,status=1,scrollbars=1, resizable=1,left=20,top=20'; var popup3 = 'width=600,height=450,toolbar=0,menubar=0,location=0,status=1,scrollbars=1, resizable=1,left=20,top=20'; //The pop-up function function tfpop(){ var x = 0; var popClass; //Cycle through the class names while(x < matchClass.length){ popClass = "'."+matchClass[x]+"'"; //Attach the clicks to the popup classes $(eval(popClass)).click(function() { //Get the destination URL and the class popup specs var popurl = $(this).attr('href'); var popupSpecs = $(this).attr('class'); //Create a "unique" name for the window using a random number var popupName = Math.floor(Math.random()*10000001); //Opens the pop-up window according to the specified specs newwindow=window.open(popurl,popupName,eval(popupSpecs)); return false; }); x++; } } //Wait until the page loads to call the function $(function() { tfpop(); }); </script> </head> <body> <h3> DEMO PAGE</h3> ..................... ....TEST GOES ON..... ..................... For further details, please refer the <b><a href="http://www.piperate.com/disc.html" class="popup2">DISCLAIMER.</a></b> </body> </html>

No comments:

Click Here To add Comment

Post a Comment