196 comments found.
Hello, I am interested too, how to send input text, password to a php file (url). I mean if I have name “user”, hidden item “act” with value “ok” and age “age” how can i send them to “index.php”?
Any help is greately appreciated.
Thanks.
Hi, I’ll upload an example soon!
Hey there.
First off, gotta say I’m loving the script. It’s a fantastic piece of code and I’m hoping to use it a lot on my website.
I’m having one small problem though where I’ve created a modal window to act as a login form but I can’t get the information to go to an external php file.
Any help would be appreciated.
Please contact me via email, I can’t paste code here. Thanks.
Thanks, but that does not function for me.
I would like to use a link to open a window modal so that the user connects himself.
I think that it is necessary to use the function post?
Here my last test:
<a href="#" id="example3">Example 3</a>
<script type="text/javascript">
$('#example3').click(function() {
$.msgbox('Login', {
type : "prompt",
inputs : [
{type: "text", name: "username", value: "", label: "Username:", required: true},
{type: "password", name: "password", value: "", label: "Password:", required: true}
],
buttons : [
{type: "submit", name: "submit", value: "OK"},
{type: "cancel", value: "Exit"}
]
}, function(onclick) {
if (onclick) {
$.post("test.php", {
action: "login", username: "", password: ""
});
}
});
return false; //this do the trick
});
</script>
You think that it is possible?
Thanks, Mick
Please don’t open more threads. You can reply your own thread. Contact me via email and explain me what do you want to do in detail. Thanks.
Hello,
You received my email?
Thanks! Mick
I think that I found my error:
$ (“#test’”) .send is not have function
How to define the function ?
Thanks ! Mick
Make sure your form have the id=”test”
<form action="#" id="test" method="post">
<input name="name" type="text" value="" />
<input type="submit" value="Send" />
</form>
<script type="text/javascript">
$('#test').submit(function() {
$.msgbox('Please confirm.', {
type : 'confirm'
}, function(buttonPressed) {
if (buttonPressed) {
// do things
$('#test').send();
}
});
return false;
});
</script>
My form also uses a value hidden.
It is possible to add :
inputs : [ {type: “hidden”, name: “action”, value: “connect”},
Thank you for your assistance.
Mick
Hello,
$(’#test’).submit(function() { $.msgbox(‘Please confirm.’, { type : ‘confirm’ }, function(buttonPressed) { if (buttonPressed) { // do things $(’#test’).send(); } }); return false; //this do the trick });I use your example, but how to add the value action form ?
form action=”?” method=”post”
Thank you for your assistance.
Mick
Can it work with uploadify?
Edit: Oh nvm, used your newer jQuery.min only and it all works, never mind me 
One other item for the wish list:
an option that specifies the default button.
Thanks again for the great work!
Great stuff! Easy implementation.
Two suggestions (by no means deal breakers):
Open jquery.msgbox.css and paste the code below:
.jquery-msgbox-buttons button,
.jquery-msgbox-buttons input
{
margin-left:10px;
cursor:pointer;
min-width:85px;
padding:0 14px 2px;
height:24px;
}
and it will work in Safari.
Great work but the buttons are ugly in Safari/Chrome for Mac OS: http://bit.ly/aWXyoB
.jquery-msgbox-buttons button {
padding:4px 8px;
}
?
Sorry but I don’t have a Mac so I can’t test it.
Some of the best work I have seen. Great work, and nice generator!!
Hi aeroalquimia,
very great work. Is ther any possibility to convert it to MooTools?
No, Sorry.
I absolutely love this but I have a problem with it I’m hoping you can help me work out.
When I use this for an onclick event for anything there’s never an issue. However I am making a form that I validate simply for empty fields and when I call it, it all works fine in all other browsers except for IE.
Actually it still works, the box comes down and all, but the dark light overlay will not cover the entire back screen, only the part after the end of my main table.
Do you know why this is?
Try it here: http://ittilt.dk/loop/
Just hit one of the two buttons with emtpy fields. (note that I only test in IE8 ).
Your html doesn’t have a DocType:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Read more here.
Please accept my apologies for bothering you about this. I would like you to know that I am currently dealing with a bad case of the flu… Yup, I’m sticking to that as an excuse, thanks man 
No problem
I’m here to help you.
Very well done. I appreciate the care that you put in to give the behavior of the box a more organic feel. Not just in the way it drops in but also in the fact that when you scroll it isn’t just sitting on top of other content but has to “catch up” to the user as if to say “Hey, don’t forget I’m still here waiting for your response!”
The color of text message in msgbox uses css of my site, how can I change the color of text to black?
.jquery-msgbox {
color: #000000;
}
I don’t know too much about jQuery, but any chance you could release a version that works with jQuery easing for when the message box appears? That could be really neat.
If it’s easy to integrate with easing and you have some time to explain, please let me know.
Thanks
I tried to replace a simple confirm() on my form button with this and couldn’t do it. It auto submit the form directly or don’t submit it at all. Don’t buy this if you’re not very good at javascript. I loose 3 hours of my time trying to do what a confirm() can do in 1 line.
<form method="post" id="test">
...
<input type="submit" />
</form>
<script>
$('#test').submit(function() {
$.msgbox('Please confirm.', {
type : 'confirm'
}, function(buttonPressed) {
if (buttonPressed) {
// do things
$('#test').send();
}
});
return false; //this do the trick
});
</script>
Quoting BaylorRae
The buttons look like the old style aqua pill buttons. The custom button style is not showing up.
(Safari, Mac OS X 10 .6)
Really great, bookmarked for next project!
Great script, but how can I script a msgbox when a page loads?. I’ve tried just
$(document).ready(function() { $.msgbox('test'); } but this produces a script error.
Yes, the code below works fine:
$(document).ready(function() {
$.msgbox('test');
});
Have you tried using this with a standard SharePoint page? Trying to use $.msgbox in in the $(document).ready() fails with an error in your code.
Also, with IE8 + SharePoint, the dark background doesn’t work, it shows only if you scroll to the bottom of the page – so that’s seems to be a bug.
Also (!), is there anyway to disable the box animation if I want to? I would think this would be a useful option to have.
I don’t know about sharepoint, but it sounds like you don’t have jquery properly installed.