Solved

Modal Not Opening

Posted on 2014-03-02
11
255 Views
Last Modified: 2014-03-03
I am trying to open a modal on this page.
http://www.bricooper.net

This is the code.
<li class=''><a href="share.php">Share</a></li>

Open in new window


The modal is share.php but it doesnt open.  What am I doing wrong?  Thank you.
0
Comment
Question by:DS928
11 Comments
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 500 total points
ID: 39899570
What is the modal plugin you use? Is it simplemodal?  .. Try to include it in the main page and call the methods?
0
 
LVL 36

Assisted Solution

by:Loganathan Natarajan
Loganathan Natarajan earned 500 total points
ID: 39899571
You can look at the example with sample implementation, here, http://www.ericmmartin.com/projects/simplemodal-demos/
0
 

Author Comment

by:DS928
ID: 39899583
Yes it is simple modal.
I am looking over it now.
I am trying to open share.php and am using contact.js
index.html
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 39899596
You have to include the JS & CSS file to call the modal. Please download the source and check how to implement,  https://code.google.com/p/simplemodal/downloads/list

"download" simplemodal-demo-basic-1.4.4.zip
0
 

Author Comment

by:DS928
ID: 39899603
They are now included.

<script language='JavaScript' type='text/javascript' src='JS/contact.js'></script>
    <link rel="stylesheet" type="text/css" media="screen" href="CSS/contact.css" />

Open in new window


I think its this line.  I don't know what to call it.

<li class=''><a href="javascript:contact('share.php',440,520)">Share</a></li>

Open in new window

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 500 total points
ID: 39899642
I think you can follow the contact form way to include. Since you need to include the external page

http://www.ericmmartin.com/projects/simplemodal-demos/

here just download "CONTACT FORM" and check the options
0
 
LVL 52

Expert Comment

by:Julian Hansen
ID: 39899677
You can't create a modal dialog with window.open.

Modal dialogs are pseudo dialogs created with a an overlay div that covers the page on top of which is another div that contains the dialog - i.e. all elements in the same browser window with the impression of a dialog.

Your solution is opening another browser window - which will never be modal.

To open a modal - look at www.jqueryui.com specifically (http://jqueryui.com/dialog/)

The JQueryUI library works on top of Jquey and you can use it to create a themed popup modal dialog. There are samples on the link above.
0
 

Author Comment

by:DS928
ID: 39899707
I can see that I need a modal.  I am trying to use Simplemodal.  I have the js and the css loaded. But it won't open.  I tried the demo and it works but when I move it to my page it doesn't work.  Can it be a directory pointing to the wrong place?  Its "Share Bri"
index.html
0
 

Author Comment

by:DS928
ID: 39899732
Solved it was the ID of a Div.
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39899790
DS928, did you solve this yourself by catching your own coding error?  Or did the expert actually help you find this error?
0
 

Author Comment

by:DS928
ID: 39899911
A little bit of both.  I changed the name of the Div in the CSS to match the name of my Div.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now