[jQuery] Thickbox action back

2009-09-03 Thread ebru...@gmail.com

Hello,

I am using the Thickbox extension for jQuery. I have added a form
field to send data, but when there are errors he shows those in a list
but the form is gone. Is there a way to go a action back in the
Thickbox screen?

Erwin


[jQuery] Re: Thickbox action back

2009-09-03 Thread ebru...@gmail.com

I fount a solution myself.

On 3 sep, 19:56, "ebru...@gmail.com"  wrote:
> Hello,
>
> I am using the Thickbox extension for jQuery. I have added a form
> field to send data, but when there are errors he shows those in a list
> but the form is gone. Is there a way to go a action back in the
> Thickbox screen?
>
> Erwin


[jQuery] UI dialog uses old data

2009-12-14 Thread ebru...@gmail.com
Hello,

I am using the UI dialog plugin. People can edit there dns data off a
domain in this dialog.

When i uses it for the first time everything works fine. But when i
delete 2 of the three rows from the database he shows just one record,
this is oke, but when i submit the data he adds the old data to the
database again!

For some reason he rembers the old data there was the first time i
used the dialog. How is this possible?

My dialog code:

$(function() {
$('#dialog_dnsmanagement').dialog({
bgiframe: true,
resizable: true,
autoResize: true,
width:500,
modal: true,
overlay: {
backgroundColor: '#000',
opacity: 0.5
},
buttons: {
'Annuleren': function() {
$(this).dialog('destroy');
},
'Opslaan': function() {
$(this).dialog('destroy');

var options = {
type: 'POST',
cache: false,
target: '#alert_update_dns',
url: './ajax/ajaxDnsUpdate.php',
success: function(html){
$('#postresult').remove();
}
};

$('#form_dns_update').ajaxSubmit(options);

}
}
});
});

Regards,

Erwin


[jQuery] Re: UI dialog uses old data

2009-12-14 Thread ebru...@gmail.com
Then i think the problem is unique fields.

Thanks for your reply!

On 14 dec, 14:47, MorningZ  wrote:
> > "For some reason he rembers the old data"
>
> It's not remembering anything, it's simply reading the values
> again...  after you do your save/edit/whatever, use ".val()" and other
> things that set form field values and clear out what is there


[jQuery] Help creating a function

2009-02-03 Thread ebru...@gmail.com

Hello,

I have a site where i want to run a realtime check.

I have 6 form fields, when someone fills a number in jquery has to
check if he doesn't go over the max what he can fill in.

So for example he kan take 40 bags:
Field one he fills in 10
Field two he fills in 10
Field three he fills in 10
Field four he fills in 10
Field five he fills in 10
Field six he fills in 10

He wants to take 60 bags thats over the max he can take so there has
to show a messages on the website:
You can't take more then 40 bags you have selected 60 bags now!

If he takes 40 bags the only thing there has to showup is how much he
has filled in total.

Any one how can advise me on how to fix this.

Erwin


[jQuery] Re: Help creating a function

2009-02-03 Thread ebru...@gmail.com

Looking good Eric, i tied it out, but it doenst seem to work. I
already fixed the bug in the alert with the ' in it, but no reponse
when filling in alot of numbers.

On 3 feb, 17:48, Eric Garside  wrote:
> Sorry for that last post, wrong thread. :(
>
> Anyway, you could try something like this:
>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> $(function(){
>     $('form').submit(function(){
>         var num = 0, lim = $('#lim').val()*1;
>         $('input.counter').each(function(){
>             num += this.val()*1;
>         });
>         if (num > lim){
>             alert('You can't take more than ' + lim + ' bags, but you
> have selected ' + num + ' bags!');
>             return false;
>         }
>     });
>
> });
>
> On Feb 3, 11:33 am, Stephan Veigl  wrote:
>
>
>
> > Hi Erwin,
>
> > Of course you can code it by hand, but I would suggest that you take a
> > look at the various validation plugins for jQuery 
> > (e.g.http://plugins.jquery.com/project/validate) first.
>
> > by(e)
> > Stephan
>
> > 2009/2/3 ebru...@gmail.com :
>
> > > Hello,
>
> > > I have a site where i want to run a realtime check.
>
> > > I have 6 form fields, when someone fills a number in jquery has to
> > > check if he doesn't go over the max what he can fill in.
>
> > > So for example he kan take 40 bags:
> > > Field one he fills in 10
> > > Field two he fills in 10
> > > Field three he fills in 10
> > > Field four he fills in 10
> > > Field five he fills in 10
> > > Field six he fills in 10
>
> > > He wants to take 60 bags thats over the max he can take so there has
> > > to show a messages on the website:
> > > You can't take more then 40 bags you have selected 60 bags now!
>
> > > If he takes 40 bags the only thing there has to showup is how much he
> > > has filled in total.
>
> > > Any one how can advise me on how to fix this.
>
> > > Erwin- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -


[jQuery] Re: Help creating a function

2009-02-03 Thread ebru...@gmail.com

I get it now. I didn't add a submit button. Do you now if it's also
possible to use it without pressing on the submit so it would be a
realtime check.

On 3 feb, 19:08, Eric Garside  wrote:
> Ah, I'm pretty sure i missed wrapping the loop's "this" in a jQuery
> obj
>
> Try replacing this line:
> num += this.val()*1;
> with
> num += $(this).val()*1;
>
> Also, do an alert before and after the loop and just see what the
> values are:
> alert('Limit: ' + lim + "\nNum: " + num);
>
> On Feb 3, 12:58 pm, "ebru...@gmail.com"  wrote:
>
>
>
> > Looking good Eric, i tied it out, but it doenst seem to work. I
> > already fixed the bug in the alert with the ' in it, but no reponse
> > when filling in alot of numbers.
>
> > On 3 feb, 17:48, Eric Garside  wrote:
>
> > > Sorry for that last post, wrong thread. :(
>
> > > Anyway, you could try something like this:
>
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
>
> > > $(function(){
> > >     $('form').submit(function(){
> > >         var num = 0, lim = $('#lim').val()*1;
> > >         $('input.counter').each(function(){
> > >             num += this.val()*1;
> > >         });
> > >         if (num > lim){
> > >             alert('You can't take more than ' + lim + ' bags, but you
> > > have selected ' + num + ' bags!');
> > >             return false;
> > >         }
> > >     });
>
> > > });
>
> > > On Feb 3, 11:33 am, Stephan Veigl  wrote:
>
> > > > Hi Erwin,
>
> > > > Of course you can code it by hand, but I would suggest that you take a
> > > > look at the various validation plugins for jQuery 
> > > > (e.g.http://plugins.jquery.com/project/validate) first.
>
> > > > by(e)
> > > > Stephan
>
> > > > 2009/2/3 ebru...@gmail.com :
>
> > > > > Hello,
>
> > > > > I have a site where i want to run a realtime check.
>
> > > > > I have 6 form fields, when someone fills a number in jquery has to
> > > > > check if he doesn't go over the max what he can fill in.
>
> > > > > So for example he kan take 40 bags:
> > > > > Field one he fills in 10
> > > > > Field two he fills in 10
> > > > > Field three he fills in 10
> > > > > Field four he fills in 10
> > > > > Field five he fills in 10
> > > > > Field six he fills in 10
>
> > > > > He wants to take 60 bags thats over the max he can take so there has
> > > > > to show a messages on the website:
> > > > > You can't take more then 40 bags you have selected 60 bags now!
>
> > > > > If he takes 40 bags the only thing there has to showup is how much he
> > > > > has filled in total.
>
> > > > > Any one how can advise me on how to fix this.
>
> > > > > Erwin- Tekst uit oorspronkelijk bericht niet weergeven -
>
> > > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk 
> > > bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -


[jQuery] Re: Help creating a function

2009-02-03 Thread ebru...@gmail.com

Very nice work great. I really have to learn more jquery because it
works super.

On 3 feb, 21:06, Eric Garside  wrote:
> Change
> $('form').submit(function(){
> to
> $('input.counter').change(function(){
>
> This will prompt the check to run each time the user changes a value
> in any of the concerned fields.
>
> On Feb 3, 1:18 pm, "ebru...@gmail.com"  wrote:
>
>
>
> > I get it now. I didn't add a submit button. Do you now if it's also
> > possible to use it without pressing on the submit so it would be a
> > realtime check.
>
> > On 3 feb, 19:08, Eric Garside  wrote:
>
> > > Ah, I'm pretty sure i missed wrapping the loop's "this" in a jQuery
> > > obj
>
> > > Try replacing this line:
> > > num += this.val()*1;
> > > with
> > > num += $(this).val()*1;
>
> > > Also, do an alert before and after the loop and just see what the
> > > values are:
> > > alert('Limit: ' + lim + "\nNum: " + num);
>
> > > On Feb 3, 12:58 pm, "ebru...@gmail.com"  wrote:
>
> > > > Looking good Eric, i tied it out, but it doenst seem to work. I
> > > > already fixed the bug in the alert with the ' in it, but no reponse
> > > > when filling in alot of numbers.
>
> > > > On 3 feb, 17:48, Eric Garside  wrote:
>
> > > > > Sorry for that last post, wrong thread. :(
>
> > > > > Anyway, you could try something like this:
>
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
>
> > > > > $(function(){
> > > > >     $('form').submit(function(){
> > > > >         var num = 0, lim = $('#lim').val()*1;
> > > > >         $('input.counter').each(function(){
> > > > >             num += this.val()*1;
> > > > >         });
> > > > >         if (num > lim){
> > > > >             alert('You can't take more than ' + lim + ' bags, but you
> > > > > have selected ' + num + ' bags!');
> > > > >             return false;
> > > > >         }
> > > > >     });
>
> > > > > });
>
> > > > > On Feb 3, 11:33 am, Stephan Veigl  wrote:
>
> > > > > > Hi Erwin,
>
> > > > > > Of course you can code it by hand, but I would suggest that you 
> > > > > > take a
> > > > > > look at the various validation plugins for jQuery 
> > > > > > (e.g.http://plugins.jquery.com/project/validate) first.
>
> > > > > > by(e)
> > > > > > Stephan
>
> > > > > > 2009/2/3 ebru...@gmail.com :
>
> > > > > > > Hello,
>
> > > > > > > I have a site where i want to run a realtime check.
>
> > > > > > > I have 6 form fields, when someone fills a number in jquery has to
> > > > > > > check if he doesn't go over the max what he can fill in.
>
> > > > > > > So for example he kan take 40 bags:
> > > > > > > Field one he fills in 10
> > > > > > > Field two he fills in 10
> > > > > > > Field three he fills in 10
> > > > > > > Field four he fills in 10
> > > > > > > Field five he fills in 10
> > > > > > > Field six he fills in 10
>
> > > > > > > He wants to take 60 bags thats over the max he can take so there 
> > > > > > > has
> > > > > > > to show a messages on the website:
> > > > > > > You can't take more then 40 bags you have selected 60 bags now!
>
> > > > > > > If he takes 40 bags the only thing there has to showup is how 
> > > > > > > much he
> > > > > > > has filled in total.
>
> > > > > > > Any one how can advise me on how to fix this.
>
> > > > > > > Erwin- Tekst uit oorspronkelijk bericht niet weergeven -
>
> > > > > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit 
> > > > > oorspronkelijk bericht niet weergeven -
>
> > > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk 
> > > bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -


[jQuery] Map navigation

2009-02-05 Thread ebru...@gmail.com

Hello,

I am working on a map just like mmog games have like travian etc.

The map has 4 navigation buttons nord east south west. If someone
presses on it it loads the page again, i just want the map to move.

Is there some kind of plugin or a other simple way to fix this?

Erwin


[jQuery] Reporting forum messages using modal message

2009-02-17 Thread ebru...@gmail.com

Hello,

I am building a forum and i have a option where members can report bad
posts on the forum.

The script i am using is:
http://www.ericmmartin.com/projects/simplemodal/

Now i also want to add the ID of the messages to a hidden field. I now
have the following:



id = the messages id

In the 

$(document).ready(function () {
$('#basicModal input.basic, #basicModal 
a.basic').click(function (e)
{
e.preventDefault();
var messagesid = this.id;
$('#basicModalContent').modal({persist: true});
});
});

And finally the form to submit the messages:



Bericht melden

Voldoet een topic niet aan de regels van .nl meld het
dan via dit formulier. Vul hier onder een reden in aub.



 



How do i get the var messagesid = this.id; in a hidden field in the
form?

Any one how can assist me with this.

Erwin


[jQuery] Qty * price

2009-03-16 Thread ebru...@gmail.com

Hello,

I am working on a order form. I now have the following:


  
Knuffel
Aantal
Prijs
  
  
Aapje

€ 0.00 
  
  
Beertje

€ 0.00 
  
  
Hondje

€ 0.00 
  
  
Olifantje

€ 0.00 
  


What i want is to get the subtotal of a product and the total price.
Is there a easy way for this using jQuery?

0.00 would change in the price for the
product * qty == aantal_1

And

Totaalbedrag: € 0.00

would change in the total price of all the products.

Any one how can assist me in this?

Erwin


[jQuery] Re: Qty * price

2009-03-16 Thread ebru...@gmail.com

Hi martijn,

Thx for your reply i found 
http://www.pengoworks.com/workshop/jquery/calculation/calculation.plugin.htm
and that is exactly what i need. The same idea as what you are saying.

Erwin

On 16 mrt, 14:56, Martijn Houtman  wrote:
> On Mar 16, 2009, at 2:46 PM, ebru...@gmail.com wrote:
>
> > I am working on a order form. I now have the following:
> > *snip*
>
> > would change in the total price of all the products.
>
> > Any one how can assist me in this?
>
> What I would do is give the  an id, such as "price_table",  
> give each table row which contains an object a class "object" or  
> something (anything that stands out), then give each price  a  
> class, such as "object_price", and each quantity another class, such  
> as "object_quantity". Then do something like:
>
> var price = 0;
> $("#price_table > tr.object").each(function() {
>         price += parseFloat(this.find("div.object_price").html()) * parseInt
> (this.find("div.object_quantity").html());});
>
> $("#total_price").html(price);
>
> You get the general idea: use structured HTML, which makes it easy to  
> traverse/parse it.
>
> Regards,
> --
> Martijn.


[jQuery] Play video in modal messages

2009-03-26 Thread ebru...@gmail.com

Hello,

I want to show a youtube video in a modal messages but the video is
different on every link. So someone presses on the link

http://www.youtube.com/watch?
v=gNNVF8rJjrw" id="video" title="Bekijk de spoiler van
{$foo.aflevering}" class="basic">Bekijk de spoiler

It starts the following:

$(document).ready(function () {
$('#afleveringVideo input.basic, #afleveringVideo a.basic,
#video').click(function (e) {
e.preventDefault();
var url = $(this).attr("href");
alert(url);
$('input[name="berichtid"]').val(url);
$('#afleveringVideoModal').modal({persist: true});
});
});

And then it have to replace url_form_ahref into the url of the link:





Is this possible?

Erwin