0

can I know that how to put a function in the google chart api to generate the qr code and redirect the url? Because it only shows the text instead of calling the function.

Here is my coding:

<img src="https://chart.googleapis.com/chart?chs=400x400&cht=qr&chl='qrcodeattendance(subject_id)'" title="" />

Below is my JavaScript function:

function qrcodeattendance(subject_id)
{
        window.location.href = "<?php echo site_url('attendance/qr_code_attendance/')?>"+subject_id; // redirect to student_attendance_detail
}
Adrian Lim
  • 35
  • 6
  • Does this answer your question? [What is the difference between client-side and server-side programming?](https://stackoverflow.com/questions/13840429/what-is-the-difference-between-client-side-and-server-side-programming) – Peter O. Dec 22 '21 at 05:52
  • Sorry for late reply, I already found the solution to solve my problem, thanks btw. – Adrian Lim Dec 23 '21 at 15:15

0 Answers0