samedi 13 mars 2021

Change src with radio buttons

On my project Im trying to change src with my radio buttons.`

As you see from my codes Im trying to change 4 src. "imghali" and "qrimage" is working on my project. When I check my buttons (birinci1 and birinci2) "imghali" and "qrimage" src is changing. but "arhali" src (ar-button's src) is not changing.

What is wrong here ? any solution or suggestion would be great.

My Project Link

function Pris()
  {
  if ( document.getElementById("birinci1").checked 
    && document.getElementById ("ikinci1").checked )
    {
    document.getElementById("imghali").src   = "Hali/FinalResimler/hali1-80x200.png";
    document.getElementById("arhali").src    = "https://basebros.com/Hali/haliar/hali1-80x200.glb";
    document.getElementById("arhali").iosSrc = "Hali/haliar/hali1-80x200ios.usdz";
    document.getElementById("qrimage").src   = "Hali/qrcodes/haliqrsec1.png";
    }
  }
<ar-button id="arhali"
   src="https://basebros.com/Hali/haliar/hali1-80x200.glb"
   ios-src="Hali/haliar/hali1-80x200ios.usdz"
   title="3D-AR by BASE">
 
 <img class="arbuttonicon"  src="Assets/roboticon.png" alt="AR-icon">

 </ar-button>

`




Aucun commentaire:

Enregistrer un commentaire