Questions tagged [toastr]

toastr is a JavaScript library for non-blocking notifications. It uses jQuery and the goal is to create a simple core library that can be customized and extended.

toastr is a JavaScript library for non-blocking notifications. It uses jQuery and the goal is to create a simple core library that can be customized and extended.

You can see a demo here

Stack Snippet Starter Pack

HTML:

<link href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.2/toastr.css" rel="stylesheet"/>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.js"></script>

JavaScript:

toastr.success("Hello World", "Toaster Title")
348 questions
0
votes
1 answer

How do I keep toastr.js notifications open when I load the next page?

I'm working with asp.net ASPX pages. I've put toastr.js on my MasterPage. It works properly. I'm using it on a page with a Save button that stays on the same page like so: ScriptManager.RegisterStartupScript(this, this.GetType(), "toastr",…
Kristopher
  • 819
  • 14
  • 31
0
votes
1 answer

Using toastr in AngularJS for confirmation dialog

I am somewhat of a noob to Angular. Inside one of my controllers, I am setting some global options on toastr and invoking a toastr method exposed via a factory (tndNotifier). This seems to work fine, but what I do not like is the fact that when I…
Rai
  • 394
  • 5
  • 23
0
votes
1 answer

Disable Toastr (John Papa) Notifications for prod

I am using John Papa's Teastr library for notifications for my angular project. Is there any configuration provided by the library that can be configured to turn on or off the toasts. I tried looking into the API, but couldn't find anything. One way…
Vatsal
  • 2,068
  • 4
  • 21
  • 24
0
votes
2 answers

Error: [$injector:unpr] Unknown provider: toastrProvider <- toastr <- toaster

I have an Angular service built in TypeScript that injects toastr as a dependency and I get the following error: Error: [$injector:unpr] Unknown provider: toastrProvider <- toastr <- toaster Here is the service: module app { 'use strict'; …
Ron Saylor
  • 381
  • 6
  • 19
0
votes
0 answers

Toastr js with Master content pages in UpdatePanel

I have included Toastr.js file for notifications in my project but it does not seems to work in content page with update panel. What's the solution for this issue? I am calling the below static function from my content pages which is running…
Paresh J
  • 2,401
  • 3
  • 24
  • 31
0
votes
1 answer

Using toastr in a cron job

I'm using laravel toastr feature (link here). I just want to ask if it's possible or is there any way to have the toastr functionality inside a cron job then throw the toastr result in the web page? Also I dont want to use any web socket. I'm just…
Wondering Coder
  • 1,652
  • 9
  • 31
  • 51
0
votes
1 answer

Toastr info not appearing on my screen

I am using typescript to create a very simple web application. Right now, all it will do is create a rectangle and display an informational toast of the area. Unfortunately, the toast never appears. The line of code is executed and there are no…
Matt Zappitello
  • 785
  • 2
  • 11
  • 30
0
votes
1 answer

Toastr throws TypeError for toastr.info('msg')

I am trying out toastr but I keep getting a strange TypeError that does not make any sense to me. TypeError: Cannot read property 'extend' of undefined at getOptions (http://localhost:3000/bower_components/toastr/toastr.js:391:25) I had my project…
Piotr Zakrzewski
  • 3,591
  • 6
  • 26
  • 28
0
votes
1 answer

Show toaster notification only when login is successfull

I want to show a Toast notification in my Asp.Net website when a user clicks the Login button after providing the user name and password. If the login is successfull, a welcome toast notification should appear. Right now I have following code in my…
WAQ
  • 2,556
  • 6
  • 45
  • 86
0
votes
1 answer

How to dynamically set a property in jquery?

I am using toastr and want to set the options with a json object that is returned from ajax call. I am having some trouble setting the options property and value dynamically. Here is sample code: if(data.toast){ $.each(data.toast,…
itsGlen
  • 40
  • 6
0
votes
1 answer

AngularJS, RequireJS, toastr

I'am trying to add toastr to my app and get error "ReferenceError: toastr is not defined" Here is my requirejs config: requirejs.config({ baseUrl: 'scripts/lib', waitSeconds: 200, paths: { 'jquery': 'jquery/jquery-1.10.2', 'toastr':…
MaxD
  • 254
  • 1
  • 3
  • 14
0
votes
1 answer

toastr message box appears but without text

I have the following code: The box shows up but it is blank and has no text in it. How do I fix…
Philip7899
  • 4,599
  • 4
  • 55
  • 114
0
votes
1 answer

Toastr Alert Asp.Net Vb

Im trying to do some alert messages on a web form in visual studio vb, but it keeps giving me this error when i try and code it dynamically in the action method "only content controls are allowed directly in a content page that contains content…
Johnn5er
  • 97
  • 4
  • 15
0
votes
1 answer

How to add a AJAX submit form inside a notification without reloading the page?

I am using the jQuery plugin for notifications toastr js (http://codeseven.github.io/toastr/) and I am trying to add a contact form in the notification balloon and when submitted to use AJAX. Even though that the form is working outside the…
EnexoOnoma
  • 8,454
  • 18
  • 94
  • 179
0
votes
1 answer

Is it possible to set timeouts individually for Toastr?

Can you make one toastr last for 30 seconds while the rest stay for the default amount of time? I can't seem to figure out if it's possible. I've tried the following: toastr.info('Message here', 'Title', {'timeout':…
user2986242
  • 477
  • 1
  • 5
  • 19