Легкие диалоговые окна
Хочу поделиться с вами маленьким скриптиком для создания простых всплывающих окон: подсказок, ошибок, да чего угодно.
Скрипт представляет из себя три с половиной килобайт кода. Оформление блоков настраивается с помощью css — так что поставил скрипт и забыл ;-)
Необходимая вещь для минималистов вроде меня, это, вполне реальная, замена громоздким библиотекам.
Использование dialog box
Подключаем сам скрипт и его оформление, вставив следующий код между тегами <head></head>:
<link rel="stylesheet" type="text/css" href="dialog_box.css" />
<script type="text/javascript" src="dialog_box.js"></script>
Окно вызывается при помощи функции showDialog
showDialog('Заголовок','Содержание блока','Имя блока(используется для оформления)')
Пример со ссылкой:
<a href="#" onclick="showDialog('Ошибка','Ошибка и в Африке ошибка :-).','error')">Ошибиться</a>
Используйте на здоровье! ;-)
Посмотреть пример использования
(обновлено 28 апреля)
(английский)

Кайф ) Классные =)
Я дико извиняюсь, но где бы сам скрипт глянуть?
Вроде же ссылки дал ;-)
Это не диалоговые окна, а информационные. :) Ибо диалога с пользователем они не ведут )))
В примере есть ссылка «Подтвердиться». Но в открывающемся «окне» нет никаких кнопок кроме как закрыть.
Вопрос.
Можно ли в отрывающемся «окне» делать кнопки? И если да, то как их потом обрабатывать.
P.S.
Скрипт не смотрел, так как нужно срочно уходить.
Возможно прописывать в тело окна кнопки, и обрабатывать их любым способов будь то javasctipt или просто get-запрос — все зависит от Вашей сообразительности ;-)
Спасибо боьшое – помог сабж :)
Фотки при клике удобнее так показывать, чем во всплывающих окнах ;)
Мне больше нравятся маленькие как в гугле – не так бросаются в глаза + на них не обязательно реагировать и закрывать
Но иногда надо заставить пользователя обратить на что-то внимание, как бы это ужасно не звучало…
В IE6 замечен баг с тегом и этими диалоговыми окнами…
select всегда поверх этого диалогового окна. Это очень удручает… Когда уже этот устаревший браузер умрет… Кто знает как поправить?
Автор обновил скрипт, попробуйте скачать новую версию.
Возможно там проблема уже решена, ссылку в посте поправил.
Решение было принято отнюдь не однозначное.
В конец body добавлялся прозрачный iframe покрывающий всю видимую область контента и скрывающий select с глаз долой. Ну IE6 и прико-о-ол :)
Решение найдено в исходниках ThickBox 3.1 (http://jquery.com/demo/thickbox/ ) ;-)
wsr, спасибо что отписались, думаю многие читатели будут благодарны Вам за эту наводку ;-)
вот если бы еще перетаскивать их можно было
И «Легкие диалоговые окна» плавно превратились в Ajax :)
Огромное спасибище автору за такую вещь!
Ибо стандартные окна, выскакивающие (в прямом смысле слова) на пользователя, уже попросту раздражают. Хотелось чего-то более элегантного… =))) В общем, ещё раз спасибо, пойду юзать в своём блоге! :))
good article, my partner and i undoubtedly enjoy this site, go on this
I simply want to tell you that I’m very new to blogging and site-building and really loved your blog. Likely I’m planning to bookmark your website . You certainly have excellent well written articles. Thanks a lot for revealing your web page.
Wow, amazing blog site structure! The length of time are you currently writing a blog with regard to? you create blogging look straightforward. The general search of your respective internet site is fantastic, plus the content material!…
I was very pleased to find this web-site.I wanted to thanks for your time for this wonderful read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you blog post.
This is the right blog for anyone who wants to find out about this topic. You realize so much its almost hard to argue with you (not that I actually would want…HaHa). You definitely put a new spin on a topic thats been written about for years. Great stuff, just great!
But wanna remark that you have a very decent web site , I enjoy the design it really stands out.
I regard something really special in this site.
There is clearly a great deal to know about this. I believe you produced various very good points in capabilities also.
You are my inhalation , I have few blogs and occasionally run out from to brand : (.
Awsome post and straight to the point. I am not sure if this is truly the best place to ask but do you guys have any ideea where to employ some professional writers? Thx :)
Very interesting points you have noted, thank you for putting up.
I do not even know how I ended up here, but I thought this post was great. I don’t know who you are but certainly you are going to a famous blogger if you are not already
You made some decent points there. I looked on the internet for the issue and found most individuals will go along with with your website.
To the level and penned well, thanks for your data
Regards for all your efforts that you have put in this. very interesting information. «The worth of a book is to be measured by what you can carry away from it.» by James Bryce.
You developed some decent points there. I looked on the net for any dilemma and located most individuals goes along with together together with your website.
I do believe all of the concepts you have offered on your post. They’re really convincing and can certainly work. Still, the posts are too short for novices. May just you please prolong them a bit from next time? Thanks for the post.
Great ¡V I should certainly pronounce, impressed with your website. I had no trouble navigating through all tabs and related information ended up being truly easy to do to access. I recently found what I hoped for before you know it in the least. Quite unusual. Is likely to appreciate it for those who add forums or anything, web site theme . a tones way for your client to communicate. Nice task..
You have noted very interesting details ! ps nice internet site . «We make ourselves a ladder out of our vices if we trample the vices themselves underfoot.» by Saint Augustine.
You are a very bright individual!
I am not sure where you’re getting your information, but great topic. I needs to spend some time learning much more or understanding more. Thanks for excellent information I was looking for this info for my mission.
There is noticeably plenty of dollars to comprehend this. I suppose you created specific good points in functions also.
It’s vital to get yourself a specialized decides your buzzing in the ears before you begin getting rid of them. The majority of the ringing in the ears will also be suggestive of more severe concerns. Furthermore, when the examination is just not ringing ears, then you will want to help medicate or treat it in a very different fashion than you should ringing in the ears. Lots of people that have ringing ears come across respite from their own issue by utilizing noise treatment method. There is a straightforward try that you may concept when appear treatment method will help you manage the ringing in ears. Tune your own airwaves between not one but two stations. You need to notice a new stationary appear for those who have tuned the idea among areas. Should the fixed sound through the radio stations goggles the tinnitus as well as makes it less obvious (partially covers the idea), subsequently audio therapy is likely to help your condition.
Hi, Neat post. There’s a problem together with your web site in web explorer, could check this¡K IE nonetheless is the market chief and a good part of other people will omit your fantastic writing because of this problem.
I really like your writing style, great information, appreciate it for putting up : D.
You are my breathing in, I own few blogs and rarely run out from to brand.
I do trust all of the concepts you have presented in your post. They are very convincing and will certainly work. Nonetheless, the posts are very brief for starters. May just you please lengthen them a little from next time? Thank you for the post.
I do trust all of the concepts you’ve introduced for your post. They’re really convincing and can definitely work. Still, the posts are too short for beginners. May you please lengthen them a little from subsequent time? Thank you for the post.
You have observed very interesting points! ps nice internet site.
WONDERFUL Post.thanks for share..more wait .. …
Oh my goodness! an amazing article dude. Thank you However I am experiencing issue with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting identical rss problem? Anyone who knows kindly respond. Thnkx
I’d have to check with you here. Which isn’t something I often do! I get pleasure from studying a post that can make individuals think. Also, thanks for allowing me to comment!
Some truly quality articles on this website , bookmarked .
Its great as your other articles : D, thankyou for posting . «In the spider-web of facts, many a truth is strangled.» by Paul Eldridge.