A
A
Alexandra Maslova2019-01-11 10:05:02
JavaScript
Alexandra Maslova, 2019-01-11 10:05:02

Why does "JsHttpRequest.js" refuse to work after installing an SSL certificate on one page?

Good day!
I ran into the following problem, after installing an SSL certificate, "JsHttpRequest.js" stopped working (updating data on the page without reloading it), if you still allow the browser to execute this script, then the following messages of a similar plan pop up in the console.
"(index):1 Access to XMLHttpRequest at ' www.girudocentr.ru/buy/get_text_by_gorod/2/?PHPSES... ' (redirected from ' https://www.girudocentr.ru/buy/get_text_by_gorod/2.. . ') from origin ' https://www.girudocentr.ru ' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Tell me how to be and where to dig?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
Ivan Petrov, 2016-04-14
@r0hack

Maybe someone will need to do it this way, using Jquery!

// Изменение местоположения ползунка при вводиде данных в первый элемент input
      $("input#text1").focus(function(){
      	var value1=$("input#text1").val();
      	var value2=$("input#text").val();
          if(parseInt(value1) > parseInt(value2)){
      		value1 = value2;
      		$("input#text1").val(value1);
      	}
      	$("#slider-range").slider("values",0,value1);
      });
          
      // Изменение местоположения ползунка при вводиде данных в второй элемент input 	
       $("body").change(function(){
                      $("#text1").focus();
      	var value1=$("input#text1").val();
      	var value2=$("input#text").val();

      	if(parseInt(value1) > parseInt(value2)){
      		value2 = value1;
      		$("input#text").val(value2);
      	}
      	$("#slider-range").slider("values",1,value2);
      });

Briefly explained, after entering into the first field and clicking anywhere on the page, the value of the second field changes automatically and the focus is also transferred to the second field. And changing the coordinates in the slider is also set to the .focus() event. You can see here

A
Archakov Dennis, 2016-04-13
@archakov06

Your "script" gives 404

E
Eugene 222, 2016-04-13
@mik222

jQuery is not suitable for such tasks.
In short:
1. Build the model
2. Define a Render function
3. Map from one model to another
4. Hang the mapping on the onchange event
Google www.ractivejs.org

2
2cha.headz, 2019-01-11
@Alexandr94

Set up a redirect from http to https
Now being on https your requests are sent to http
joxi.ru/V2VNovkTxgx9w2

S
Sergey S., 2019-01-11
@seganim

header('Access-Control-Allow-Origin: *');
on the page you are referring to, at least.
In general, in the configs, allow access without authorization.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question