Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alertify not defined #213

Closed
babaxx opened this issue Mar 21, 2014 · 8 comments
Closed

alertify not defined #213

babaxx opened this issue Mar 21, 2014 · 8 comments

Comments

@babaxx
Copy link

babaxx commented Mar 21, 2014

Hello,

I develop a website in asp.net and I wanted to add alertify on it.
The problem is that I insert alertify.min.js (and the css core and default) and when I want to call alertify, I have an error saying "alertify is not defined".
It considers that alertify does not exist as if I had not inserted it in the page.

I guess there is something making a conflict but I don't know what...

For information, I use a scriptManager (it activates AJAX for ASP.NET) and I use many jQuery scripts.
Could it be the source of this problem?
I spent a lot of time on it, but I didn't find anything conclusive...

Can you help me please?

@jcoz1968
Copy link

I use it in aspnet all the time. Try using the browser's developer tools JavaScript console you see if you see an exception.

-----Original Message-----
From: "babaxx" notifications@github.com
Sent: ‎3/‎21/‎2014 11:54 AM
To: "fabien-d/alertify.js" alertify.js@noreply.github.com
Subject: [alertify.js] alertify not defined (#213)

Hello,
I develop a website in asp.net and I wanted to add alertify on it.
The problem is that I insert alertify.min.js (and the css core and default) and when I want to call alertify, I have an error saying "alertify is not defined".
It considers that alertify does not exist as if I had not inserted it in the page.
I guess there is something making a conflict but I don't know what...
For information, I use a scriptManager (it activates AJAX for ASP.NET) and I use many jQuery scripts.
Could it be the source of this problem?
I spent a lot of time on it, but I didn't find anything conclusive...
Can you help me please?

Reply to this email directly or view it on GitHub.

@babaxx
Copy link
Author

babaxx commented Mar 21, 2014

The error in the console is "alertify not defined".
It's like I don't put the script into the page... But when I look at the source code, it's there.

For example I made a simple html page with an alertify call at the loading. It works.
I copy-paste the exact same thing in my MasterPage, I have this message in the console…

@jcoz1968
Copy link

Maybe call page.header.databind in master page load event

babaxx notifications@github.com wrote:

The error in the console is "alertify not defined".
It's like I don't put the script into the page... But when I look at the source code, it's there.

For example I made a simple html page with an alertify call at the loading. It works.
I copy-paste the exact same thing in my MasterPage, I have this message in the console…


Reply to this email directly or view it on GitHub.

@jcoz1968
Copy link

Also make sure your path is right if your child view is in a different folder. For example use tilde instead of ../

babaxx notifications@github.com wrote:

The error in the console is "alertify not defined".
It's like I don't put the script into the page... But when I look at the source code, it's there.

For example I made a simple html page with an alertify call at the loading. It works.
I copy-paste the exact same thing in my MasterPage, I have this message in the console…


Reply to this email directly or view it on GitHub.

@babaxx
Copy link
Author

babaxx commented Mar 22, 2014

Thank you for your answers.

The point is that I'm sure of the path given though when I looked at the source code I clicked on the link to be sure.
I even tried to put the alertify source code directly in the page between script tags and… no changes…

@fabien-d
Copy link
Owner

I don't know much about .NET environments, but a few quick things to check -

  1. Could there be another script that is interfering? If you remove all other JS files, does the problem remain?
  2. Double and triple check the path
  3. Are you using AMD (e.g. requirejs)? That would prevent alertify from getting attached to the window object causing it to be undefined.

@babaxx
Copy link
Author

babaxx commented Mar 24, 2014

I found what was the source of the problem, but I don't really know why...

In my page I had jquery.mobile.customized.min.js.
As soon as I commented it, alertify worked...

@babaxx babaxx closed this as completed Mar 24, 2014
@jcoz1968
Copy link

Good to hear you found it.

From: babaxx [mailto:notifications@github.com]
Sent: Monday, March 24, 2014 8:24 AM
To: fabien-d/alertify.js
Cc: jcoz1968
Subject: Re: [alertify.js] alertify not defined (#213)

I found what was the source of the problem, but I don't really know why...

In my page I had jquery.mobile.customized.min.js.
As soon as I commented it, alertify worked...


Reply to this email directly or view it on GitHub #213 (comment) . https://github.com/notifications/beacon/1767949__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMTI4NjYzMCwiZGF0YSI6eyJpZCI6MjgyNDAxNTN9fQ==--fe33530242d3f4da6e628a68dbf402d20c94f71e.gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants