Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-18-2012, 06:14 PM   PM User | #1
docco
New Coder

 
Join Date: Aug 2012
Posts: 72
Thanks: 18
Thanked 0 Times in 0 Posts
docco is an unknown quantity at this point
Do not have closer

Anyone can check what is wrong in my below code: the pop-up window have not a closer.

Code:
<html>
<head>
	<title>PNotify Testing</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
    <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/ui-lightness/jquery-ui.css" />

    <script type="text/javascript" src="jquery.pnotify.js"></script>
    <link type="text/css" rel="stylesheet" href="includes/bootstrap/css/bootstrap.normal.css" /> 
    <link type="text/css" rel="stylesheet" href="jquery.pnotify.default.css" />  
   
</head>                                                                                                                                                                        
<body>                                                                                                                                                                         
<script type="text/javascript">
function myAlert(txt){
$.pnotify({
				text:txt,
				hide: false,
				title: 'Regular Notice',
		});
}
</script>
<button onclick="myAlert('This is a test')" >Click me</button>                                                                                                                                                                                                                                                                                                                  
</body>        
</html>
docco is offline   Reply With Quote
Old 09-18-2012, 07:22 PM   PM User | #2
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 960
Thanks: 7
Thanked 100 Times in 100 Posts
WolfShade is an unknown quantity at this point
Check the documentation. In there should be the attribute that you need to include in order to have a way to close the notification.
__________________
^_^

If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
*
The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
WolfShade is offline   Reply With Quote
Old 09-19-2012, 03:53 AM   PM User | #3
docco
New Coder

 
Join Date: Aug 2012
Posts: 72
Thanks: 18
Thanked 0 Times in 0 Posts
docco is an unknown quantity at this point
Quote:
Originally Posted by WolfShade View Post
Check the documentation. In there should be the attribute that you need to include in order to have a way to close the notification.
The option closer=true by default, then we have not to state.
docco is offline   Reply With Quote
Old 09-19-2012, 10:22 AM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,703
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Do you have a live example for us? Could it be that just a close button image is missing or referenced wrongly?
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Old 09-20-2012, 09:00 AM   PM User | #5
docco
New Coder

 
Join Date: Aug 2012
Posts: 72
Thanks: 18
Thanked 0 Times in 0 Posts
docco is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
Do you have a live example for us? Could it be that just a close button image is missing or referenced wrongly?
I have posted all the html.
docco is offline   Reply With Quote
Old 09-20-2012, 01:10 PM   PM User | #6
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,335
Thanks: 13
Thanked 207 Times in 207 Posts
DanInMa is on a distinguished road
looked up the plugin. http://pinesframework.org/pnotify/
if your not getting qa clsoe button its most likely missing image issue. the versions that dont close on a timer all have close buttons added by default.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Old 09-20-2012, 04:45 PM   PM User | #7
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,703
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Quote:
Originally Posted by docco View Post
I have posted all the html.
That’s not helping because we still don’t have any images and/or your server setup etc. I asked for a live example for a reason.
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Old 09-20-2012, 05:30 PM   PM User | #8
docco
New Coder

 
Join Date: Aug 2012
Posts: 72
Thanks: 18
Thanked 0 Times in 0 Posts
docco is an unknown quantity at this point
Quote:
Originally Posted by DanInMa View Post
looked up the plugin. http://pinesframework.org/pnotify/
if your not getting qa clsoe button its most likely missing image issue. the versions that dont close on a timer all have close buttons added by default.
The closer is sign || X appeared when you mouse over the pop-up. I check and see no image for the closer.
docco is offline   Reply With Quote
Old 09-20-2012, 05:33 PM   PM User | #9
docco
New Coder

 
Join Date: Aug 2012
Posts: 72
Thanks: 18
Thanked 0 Times in 0 Posts
docco is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
That’s not helping because we still don’t have any images and/or your server setup etc. I asked for a live example for a reason.
This is not server-side task. It only a simple task on your PC: alert a message. Just download .css and .js from http://pinesframework.org/pnotify and enjoy.
Have you copied my code and run it?
docco is offline   Reply With Quote
Old 09-20-2012, 06:15 PM   PM User | #10
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,703
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
I didn’t say it is a server-side task but your server is serving the files, and your code alone – especially if I just copy it and run it in my browser – is still not telling us anything about whether images are involved or whatever else, and therefore it is more useful to see your live set-up. This is why I want a live example. The code you posted may be correct by itself but it doesn’t give any hints whether or not the file paths/locations are correct etc.
__________________
Don’t click this link!
VIPStephan is online now   Reply With Quote
Old 09-21-2012, 05:01 AM   PM User | #11
docco
New Coder

 
Join Date: Aug 2012
Posts: 72
Thanks: 18
Thanked 0 Times in 0 Posts
docco is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
I didn’t say it is a server-side task but your server is serving the files, and your code alone – especially if I just copy it and run it in my browser – is still not telling us anything about whether images are involved or whatever else, and therefore it is more useful to see your live set-up. This is why I want a live example. The code you posted may be correct by itself but it doesn’t give any hints whether or not the file paths/locations are correct etc.
Thank, I know you want to now detail to easy advise me. But that html file is all I do. Pnotify is built-in javascript and css, I already declare in head.
docco is offline   Reply With Quote
Old 09-22-2012, 03:22 AM   PM User | #12
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,461
Thanks: 52
Thanked 457 Times in 455 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
the closer image is ../img/glyphicons-halflings.png

do you have that?

or, as the instructions note,
Quote:
And if you choose to use jQuery UI for all your styling, include this line somewhere before your first notice:
$.pnotify.defaults.styling = "jqueryui";

Last edited by xelawho; 09-22-2012 at 03:41 AM..
xelawho is offline   Reply With Quote
Old 09-22-2012, 02:42 PM   PM User | #13
docco
New Coder

 
Join Date: Aug 2012
Posts: 72
Thanks: 18
Thanked 0 Times in 0 Posts
docco is an unknown quantity at this point
Quote:
Originally Posted by xelawho View Post
the closer image is ../img/glyphicons-halflings.png

do you have that?

or, as the instructions note,
No. it does not work
docco is offline   Reply With Quote
Old 09-22-2012, 02:51 PM   PM User | #14
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,461
Thanks: 52
Thanked 457 Times in 455 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
Interesting. Because it works on the demo site and it works on my machine.

Maybe there's something else going on in your super secret code?
xelawho is offline   Reply With Quote
Old 09-22-2012, 03:28 PM   PM User | #15
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,335
Thanks: 13
Thanked 207 Times in 207 Posts
DanInMa is on a distinguished road
ok try this. in your browser put in http://yoursiteurlhere.com/img/glyphicons-halflings.png

put your site address in that url and see if your image loads. if not you dont have it saved in the correct location and it will not show.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:38 PM.


Advertisement
Log in to turn off these ads.