hello dears friends develppers.
i have posted similar question but i didn't get solution and i tryed diferent way but nothing done and decide to comme back, anyway.
i have a div with id login-box inside i have login form.
i get a jquery tutorial and i made it popup to open the popup i have i link in page like this <a href="#login-box" class="login-window">Login / Sign In</a></p> but what i want is open it when user try to submit and he is not loginfor it i placed a javascript form validation:

function showloginbox()
var client=document.forms["formulaireajout"]["client"].value;
if (client==null || client=="")
   window.location = "#login-box";
  return false;

but on the search bar i get something like this www.domain.com/page.php#login-box
login-box don't apear help please.

Edited by chrisschristou

4 Years
Discussion Span
Last Post by sikander123

i tryed window.open(#login-box) it open the current page in new tab like this url.php#login-box and popup don't apear.
and i tryed window.opedialog nothing happen.
i have created my popup in jquery i just want to open it if client field is empty onSubmit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" href="css/jquery.fancybox.css"  />
<link rel="stylesheet" type="text/css" href="css/css.css" />

<script type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="js/jquery.mousewheel-3.0.6.pack.js"></script>
<script type="text/javascript" src="js/jquery.fancybox.js"></script>
<script type="text/javascript" src="js/jquery.fancybox-buttons.js"></script>
<script type="text/javascript" src="js/jquery.fancybox-thumbs.js"></script>
<script type="text/javascript" src="js/jquery.fancybox-media.js"></script>
<script type="text/javascript">
$(document).ready(function() {


                openEffect  : 'none',
                closeEffect : 'none',

                prevEffect : 'none',
                nextEffect : 'none',

                closeBtn  : false,

                helpers : {
                    title : {
                        type : 'inside'
                    buttons : {}

                afterLoad : function() {
                    this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');




<div class="wrapper">
    <div class="content">
     <h3>Button helper</h3>
        <a class="fancybox" data-fancybox-group="button"  href="images/Lighthouse.jpg"><img src="images/1_s.jpg" alt="#" /></a>

        <a class="fancybox" data-fancybox-group="button"  href="images/Penguins.jpg"><img src="images/2_s.jpg" alt="#" /></a>

        <a class="fancybox" data-fancybox-group="button"  href="images/3_b.jpg"><img src="images/3_s.jpg" alt="#" /></a>

        <a class="fancybox" data-fancybox-group="button"  href="images/4_b.jpg"><img src="images/4_s.jpg" alt="#" /></a>




this is the simple code for pop up image you can get help from this...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.