Category : javascript

I want to create a quiz with some questions($_SESSION[‘allquestions’]). Now I want to add a progress bar for some nice visuals why I used this code: <?php if($_SESSION[‘answeredquestions’]>0){ $goal=$_SESSION[‘allquestions’]; $done=$_SESSION[‘answeredquestions’]; echo $done/$goal;} ?> <body class="small-container text-center " style="font-family: ‘Times New Roman’, Times, serif; font-size: 40px; color:#45A29E;"> <div class="progress"> <div class="progress-bar" role="progressbar" style="width: 10%;" aria-valuenow="25" aria-valuemin="0" ..

Read more

i want to set amount using javascript variable. here is what i’m doing, $.ajax({ url: "{{url(‘myurl’)}}", data: data, cache: false, processData: false, contentType: false, type: ‘POST’, success: function (result) { var amt = result; console.log(amt); var options = { "key": "KEY", "amount": amt, "currency": "INR", "name": "Test Name", "description": "Test Transaction", "image": "", "order_id":"Order1" , ..

Read more

Here is my code, How we translate the Swal String into English? Best way for Translating? Thankyou in Advance. function send_message() { var message = $(‘#message’).val(); if (message == ”) { **swal(‘Veuillez √©crire un texte’);** } else { $.ajax({ url: site_url + "customer/add_message/", type: ‘POST’, data: { message: message, owner_id: ‘<?php echo $property->owner_id; ?>’, project_id: ..

Read more

We have generated stream id but when we pass stream id to getstream function then we are getting domain exception error. I have attached following code… public function index1(){ $opentok = new OpenTok($this->config->item(‘opentok_key’), $this->config->item(‘opentok_secret’)); $sessionId = "1_MX40NOTI2NH5-MTYzMjQ4MDI5MDY1Nn5tNTg0aHpSRjdoTTdDb1pHUDNKYUZuSGR-fg"; $streamId = "cf91b5ac-f995-4f77-9c5a-23cf14325720"; // print_r($streamId); exit(); $stream = $opentok->getStream($sessionId, $streamId); // print_r($stream); exit(); // // Stream properties // ..

Read more