Jump to content

modern theme tld check - disable jQuery fade effect


cluster

Recommended Posts

if it's set to fast (which I think it is), that's 200ms - even if you change it to 1, it's not going to save you a great deal of time.

 

I would imagine the bigger factor, if it's slow, would be the number of additional TLDs that are being looked up - reducing that number would probably make it faster than any change you could make to jquery.

Link to comment
Share on other sites

if it's set to fast (which I think it is), that's 200ms - even if you change it to 1, it's not going to save you a great deal of time.

 

I would imagine the bigger factor, if it's slow, would be the number of additional TLDs that are being looked up - reducing that number would probably make it faster than any change you could make to jquery.

 

 

here are more details ;)

I use my own check form with extensions as a dropdown menu, so only selected extension should be checked ...

the problem is that some extensions does not work or better gives me a not available result

If I use an URL with product ID and check the same domain name in the cart domain-check it works

maybe the response or delay for the check is too slow in addomain.tpl check

 

I have removed the check from addomain.tpl and use hidden fields instead, from my own form the post goes to:

<form onsubmit="checkAvailability();return false">
<input type="hidden" value="{$sld}" id="inputDomain" />
<input type="hidden" name="tld" id="inputTld" value="{$tld}" />
</form>

 

sometimes it works, sometimes not ... strange

Edited by cluster
Link to comment
Share on other sites

where can I set the time?

 

   <script language="javascript">
       var regType = '{$domain}';
       function checkAvailability() {
           var btnLookupText = jQuery("#btnCheckAvailability").html();
           jQuery("#btnCheckAvailability").html('<i class="fa fa-spinner fa-spin"></i>');
           jQuery.post("cart.php", { ajax: 1, a: "domainoptions", sld: jQuery("#inputDomain").val(), tld: jQuery("#inputTld").val(), checktype: regType },
               function(data) {
                   jQuery("#domainresults").html(data);
                   if (!jQuery("#domainresults").is(":visible")) {
                       jQuery("#domainresults").hide().removeClass('hidden').slideDown();
                   }
                   jQuery("#btnCheckAvailability").html(btnLookupText);
               }
           );
       }
       function cancelcheck() {
           jQuery("#inputDomain").focus();
           jQuery("#domainresults").fadeOut();
       }
       {if $sld}
           jQuery(document).ready(function() {
               checkAvailability();
           });
       {/if}
   </script>

Link to comment
Share on other sites

not solved yet ...

 

it happens again, only with the domain extension of my country

 

I guess there is a timeout or delay from Jquery effect or the whois server in my case is too close and answers to quick and give a false result ...

 

where can I set the response time of the jquery whois lookup or effect while checking a domain name?

Link to comment
Share on other sites

it's a bug ...

 

I have tested with my integration code from backend and original whmcs files

 

f.ex. fsdfsdfsdfsdf.lu

 

If I post from external form the result shows

 

Sorry, fsdfsdfsdfsdf.lu is already taken

 

and now ... the domain name is still filled in the whmcs adddomain page

 

if I click the search button I get

 

Congratulations, fsdfsdfsdfsdf.lu is available!

 

but this happens only if a .lu extension is selected

Link to comment
Share on other sites

you may want to consider editing your bug report...

 

http://forum.whmcs.com/showthread.php?107295-false-result-for-lu-domain-check-from-external-form

 

as it is, it's virtually useless for Nate to test - you've basically said that you have an external form and it's giving incorrect results - but you haven't shared the code used in the form that's causing the error... so how is Nate supposed to test the issue? how does he know whether the bug lies with your code or elsewhere ? :roll:

 

also the GET parameter does not work with .lu

 

cart.php?a=add&domain=register&sld=dsfsdfsaffkkkkdeewr&tld=.lu

i'm not sure how you're testing this... if I paste the URL into the browser, then it automatically searches for the domain and says it's available... also, i've echoed the GET tld to the screen and it displays ".lu".

 

if I use the Domain Ordering integration code, then it still works and says its available - the Get variable isn't passed but that's obviously because it's no longer in the URL... it's doing that for all TLDs, not just .lu

 

there could be any number of reasons why the external form code isn't working, but without seeing the code - how are we to know?

 

if this is only affecting one TLD, i'd be inclined to think that it's something specific about the code, or you're running into an issue with the .lu whois.

Link to comment
Share on other sites

you may want to consider editing your bug report...

 

http://forum.whmcs.com/showthread.php?107295-false-result-for-lu-domain-check-from-external-form

 

as it is, it's virtually useless for Nate to test - you've basically said that you have an external form and it's giving incorrect results - but you haven't shared the code used in the form that's causing the error... so how is Nate supposed to test the issue? how does he know whether the bug lies with your code or elsewhere ? :roll:

 

 

i'm not sure how you're testing this... if I paste the URL into the browser, then it automatically searches for the domain and says it's available... also, i've echoed the GET tld to the screen and it displays ".lu".

 

if I use the Domain Ordering integration code, then it still works and says its available - the Get variable isn't passed but that's obviously because it's no longer in the URL... it's doing that for all TLDs, not just .lu

 

there could be any number of reasons why the external form code isn't working, but without seeing the code - how are we to know?

 

if this is only affecting one TLD, i'd be inclined to think that it's something specific about the code, or you're running into an issue with the .lu whois.

 

Hi brian,

the bug report has been updated, because a GET string check also fails:

cart.php?a=add&domain=register&sld=dsfsdfsaffkkkkdeewr&tld=.lu

 

it seems it happens only with .lu extension

I have no idea what the reason is, maybe the submission is delayed because of jquery ...

any other domain ext are working, so it's not the form when the GET string also shows already taken

 

...

what happens if Maximum query rate reached ...

will it show already taken?

... edit ...

 

no, it is not a maximum query rate issue

whmcs (get string check) shows already taken but our currently production system (without whmcs) with the same IP address shows available

Edited by cluster
Link to comment
Share on other sites

The bug report has been updated, because a GET string check also fails:

cart.php?a=add&domain=register&sld=dsfsdfsaffkkkkdeewr&tld=.lu

 

it seems it happens only with .lu extension

I think it works fine - how are you testing whether the GET string check works or fails ?

Link to comment
Share on other sites

I use the string in my address bar of latest firefox (ubuntu) ...

it also fails if I empty the browsercache, history and session cookies

 

https://www.mydomain.tld/clients/cart.php?a=add&domain=register&sld=dsfsdfsaffkkkkdeewr&tld=.lu

 

Is there any other way to get a checked domain into the cart?

I could use my own whois check if there is no other solution yet.

Edited by cluster
Link to comment
Share on other sites

I use the string in my address bar of latest firefox (ubuntu) ...

i'm trying it in Firefox too (Windows though)...

 

try it without using & for & - the following should successfully search for the domain...

 

https://www.mydomain.tld/clients/cart.php?a=add&domain=register&sld=dsfsdfsaffkkkkdeewr&tld=.lu

Link to comment
Share on other sites

so far it works w/ suggestions enabled ...

 

because of the delayed results in modern theme ...

I'm trying to add a loading image to addomain.tpl by using the loading class from css, but it does not work ...

what I'm doing wrong?

 

<form onsubmit="checkAvailability();return false">
<div class="loading">
<img src="templates/orderforms/modern/ajax_progress.gif" alt="loading">
</div> 
...
</form>

 

### edit ###

solved by hiding the loader image w/ Jquery

$('#loading').hide();

Edited by cluster
Link to comment
Share on other sites

thanks Brian, now it works w/ Jquery hide

<div id="loadingimg">
<img src="templates/orderforms/modern/ajax_progress.gif" alt="">
</div>  

....

jQuery("#domainresults").html(data);
if (!jQuery("#domainresults").is(":visible")) {
jQuery("#domainresults").hide().removeClass('hidden').slideDown();
$('#loadingimg').hide();

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated