Jump to content

Maximum The Receiver Does Not Work


gecekule

Recommended Posts

Hello,

 

maximum the receiver does not work

 

What could be the problem?

Could you help me?

 

Video: http://www.teklif.uzayforum.com/swf.html

 

<script type="text/javascript">
function baslangic(status)
{
status=!status;   
textler=document.getElementsByName("secilen_receiver_sayisi[]");
for(x=0;x<textler.length;x++){
textler[x].disabled = status;
}
}
function isaretle(){
marka=document.getElementsByName("secilenreceivermarka_id[]");
sayi=document.getElementsByName("secilen_receiver_sayisi[]");
for(x=0;x<marka.length;x++){
sayi[x].disabled=!marka[x].checked;
}
}
function kontrol(){
marka=document.getElementsByName("secilenreceivermarka_id[]");
sayi=document.getElementsByName("secilen_receiver_sayisi[]");
for(x=0;x<marka.length;x++){
if(marka[x].checked==true&&(sayi[x].value><?=$maximum_receiver?>||sayi[x].value==""||sayi[x].value<1||sayi[x].value.search(/\d/g)<0)){
alert("Receiver seçme isteğe bağlıdır.\n\nEğer bir marka seçtiniz ise miktarıda seçmelisiniz ve toplam daire sayınız olan <?=$maximum_receiver?> adet geçmemeniz gerekiyor.");
return false;
}
}
return true;
}
</script>

 

Thanks

Link to comment
Share on other sites

Hello again,

 

The rule : The amount of products can be max 21(sample).

 

This Javascript gives a warning about rule above for one value.

 

I want that;

 

The Javascript must give a warning for total choosing values.

1. value="5"

2. value="10"

3. value="8"

=23 are great than 21. (It must give a warning)

 

Thanks

Link to comment
Share on other sites

Google is a wonderful thing. I'm not going to do it for you. I told you what you need to use, now it's up to you to do it.

 

Capturing events with addEventListener() and the keyup event, as well as preventing default actions, and a simple if statement with an HTML modification.

 

4 lines of code (ignoring bracket lines)

or 6 lines for alternative to warning when it's good

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.