Need help Lightbox issue PLEASE im BEGGING

2 replies
I posted this in web design I hope I don't get flagged for spamming but no one is answering.

I come to you programming whizes for your help I hope someone has a solution here it goes copy & paste time

ok it appears the light box works when this bit of code is at the top

Code:
<div>
          <ul>
   <li><a href="#" id="button">Service Times</a> </li>
          </ul>
               </div>
it links to this

Code:
       
                <!--Popup window-->
        <div id="popupContact"> <a id="popupContactClose"  href="#"><img src="Church Best/img/window-close.png"  /></a>
            <div id="main-content">
                    <h1 class="replace">Contact Us </h1>
                    <p>If you need to contact us fill out this form and we will get back to you.</p>

                
                <form action="Church Best/contact.php" id="contactform" method="post">
                    <p class="label_name">Name</p>
                    <p class="input_form"><input type="text" name="Name" /></p>
                    
                    <p class="label_name">Email</p>
                    <p class="input_form"><input type="text" name="Email" /></p>
                    
                    <p class="label_name">Message</p>
                    <p class="input_form"  id="textarea"><textarea name="Message" rows="5" cols="4"  id="message_input"></textarea></p>
                    
                    <p id="submit"><input type="submit"  value="Send Message" name="submitButton" class="btn1" /></p>
                    <p id="success">Your message was sent!</p>
                </form>
                <div id="error-msg">
                    <p class="error wrong_name">Please enter your name</p>
                    <p class="error wrong_email">Please enter valid email address</p>
                    <p class="error wrong_message">Please enter your message</p>
                </div>



                </div>
            </div>
        </div>
        <div id="backgroundPopup"></div>
    </div>
when the first bit of code is inside the body for example

Code:
<div class="divider"></div>
        <h3 class="replace">Prayer Request</h3>
                  <p class="left">Can We Pray For You? <br/>
                        Get Prayer From All of Us</p>
                     
                     
                   <div>
          <ul>
   <li><a href="#" id="button">Service Times</a> </li>
          </ul>
               </div>        
          
                    
                    
                    
                    <div class="clear"></div>
                </div>
            </div>
It wont work, It works at the top but when other code surrounds it the lightbox wont appear,

Let me give you an example. go to this link

Church Of The New Covenant

If you notice when you click the first service times lightbox appears, the second one does nothing.

Is there a logical explanation for this I REALLY COULD USE THE HELP ASAP thanks...
#begging #issue #lightbox
  • Profile picture of the author Jonas B
    didnt look deep into... but i saw your ids are all 'button'.. this isn't correct because ids have to be unique..

    This might be the problem why it only works with the first one only. Try to give it class button instead and change in your popup.js #button to .button
    Signature
    Proud owner of the most flexible mobile app builder. Check it out at http://bit.ly/hybrica!
    Mobile Web Expert & Android Developer
    {{ DiscussionBoard.errors[4832022].message }}
    • Profile picture of the author andrejvasso
      @OP: how many threads did you create regarding this problem??

      Originally Posted by Jonas B View Post

      didnt look deep into... but i saw your ids are all 'button'.. this isn't correct because ids have to be unique..

      This might be the problem why it only works with the first one only. Try to give it class button instead and change in your popup.js #button to .button
      Anyways, what Jonas said is completely true and I suspect that its the error you were looking for. (I already said that in a previous post of yours).

      You can either try to use a class (you can use the same class as often as you want in one page) instead of the id, or you simply add different ids to the click handler like shown in my answer to your previous post.
      {{ DiscussionBoard.errors[4832659].message }}

Trending Topics