Link to home
Start Free TrialLog in
Avatar of fbharat
fbharat

asked on

SSL certificate in javascript

Hi

I am making an AJAX call in javascript to a https request. AT first i do not get any data nor does chrome ask/shows warning to install the certificate. If i hit the url https://... once in chrome and says proceed, there after the call to the https request in javascript works fine. How do i impose that message to come using javascript.
Avatar of leakim971
leakim971
Flag of Guadeloupe image

did you try an hidden iframe?

<iframe style="position:absolute;height:1px;width:1px;top:-200px" src="https://..."></iframe>
Avatar of fbharat
fbharat

ASKER

I am making an ajax call in javascript to an https:// resource.

thanks
bharat
I understood you want to throw the warning so I propose to you to do that inserting an iframe pointing to this https site
Avatar of fbharat

ASKER

I am not pointing to an https site. I am making an ajax call in javascript to a https resource. I get the JSON data , parse it and display in a div. Please see the code in the sample file
This does not work till i get the https url in browser and say proceed.
samplecode.txt
did you tried my suggestion?
It's this a certificate generated by you or from a certificate entity?
Avatar of fbharat

ASKER

leakim971

can you please tell me how to implement your solution/suggestion for an ajax call. Did you had a look at the sample code i had send you

thanks
bharat
can you please tell me how to implement your solution/suggestion for an ajax call

You still not follow me :
Just place the iframe in the body tag to throw the warning box.
Using the iframe I hope you get the warning just like you get it when you open the page in your browser when you said : If i hit the url https://... once in chrome and says proceed
Avatar of fbharat

ASKER

But i cannot give the src attribute in iframe. I am retrieving JSON data by making AJAX call to https://. If i give src="https://" in iframe it will not get me the results. I am getting data from https request , formattting it and displaying in div.

Thats what i said can you give me the exact code

thanks
bharat
To provide you the exact code I need the exact url?
Or at least one using this domain, protocol and ssl
ASKER CERTIFIED SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So yes, put an iframe tag in your site with that url and make the css for the iframe 0
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Something's changed as your certificate is now valid! :) Works now i gather?

http://jsbin.com/EDARAvO/1/edit