Jump to content
xisto Community

Recommended Posts

Hi everyone,

I have a tricky one here.

I have a widget I placed on a site, which, as usual, comprises a few lines of HTML and a line of Javascript.

It is a widget through which people can send requests to a radio station, and then it shows whether your request went through, or failed (in case the requested song does not exist in the repertoire list of the radio), in which case it emails the request to the radio station.

This is the HTML:

<form class="cc_request_form" data-username="ckhnsbvf">
<div data-type="result"></div>
Song artist: <input type="text"  name="request[artist]" size="40" maxlength="127" /><br />
Song title: <input type="text"  name="request[title]" size="40" maxlength="127" /><br />
Bestemd voor: <input type="text"  name="request[dedication]" size="40" maxlength="127" /><br />
Your name: <input type="text"  name="request[sender]" size="40" maxlength="127" /><br />
Uw e-mail adres: <input type="text"  name="request[email]" size="40" maxlength="127" /><br />
<input type="button" value="Verstuur aanvraag" data-type="submit" /><br />
</form>

And this is the Javascript:

<script language="javascript" type="text/javascript" src="http://solid33.streamupsolutions.com:2199/system/request.js"></script>

As usual, the Javascript is supposed to be inserted just before the </body> tag.

So far, so good, now for the issues: to begin with, I had to change the "http:" in the Javascript to "https:", or nothing would work.

Then, the widget started working intermittently, and now, it does not seem to do anything, except when you send a failed request, it shows your request went through sucessfully.

There is one more suspicion I have: the site in question uses Bootstrap (CDN version), would it be possible the Javascript conflicts with JQuery or something?

Before the </body> tag there is this reference to JQuery *which comes immediately after the Javascript for the widget):

<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>

I have also tried to put the widget Javascript after the above, no difference.

Does any of this make any sense or has anyone come across this before?

The widget can be seen working on https://www.vlaamseradio.tk/verzoek.html it is the form near the bottom.

Any help will be very much appreciated.

 

Share this post


Link to post
Share on other sites

Hi Yordan,

I think I did find a solution, and as far as I am aware it was most probably due to bootstrp and/or jQuery needing an update.

I did update both and the problem seemed to have gone.

 

That is the thing, of course, when your website is up and running and you don't need to add anything for a while.

Although, sometimes, with widgets that websites offer you, you have to be a bit careful too sometimes they don't update their code for ages andnit gets obsolete, mainly due to Javascript and/or jQuery getting more modern et al.

 

Anyway, I'm glad I've got it working now.

Thank you for stepping in anyway.

 

Share this post


Link to post
Share on other sites

Ouch!

That's the old problem, named downwards compatibility.

Serious software makers keep the new operating system, or the middle-ware program, strictly compatible with the old programs.

This means that each old piece of program has to continue working with the new operating system. Of course, the new software has new features the old programs did not know about, so the old programs will not take full benefit of the new things, but they have to continue working exactly as previously.

Else, from quality point of view, if old code do not work with the new systems, this is a quality regression, and this issue has to be fixed.

Of course, in our modern word, nobody cares about quality, end-user satisfaction, we will have to continue accepting these unacceptable features.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.