Start a new topic

pass parameter to ARview

where can i use calljavascript and pass parameter ar.html from inex.html

function WikiAR(){


    

        wikitudePlugin.isDeviceSupported(

            onDeviceSupported,

            onDeviceNotSupported,

            [ "2d_tracking"]

        );

         app.wikitudePlugin.callJavaScript("getLang('" + langid + "');");


}

    // run on AR supported Devices


function onDeviceSupported() {

     //alert(langid);

//document.getElementById("wikilang").textContent=langid;

        wikitudePlugin.loadARchitectWorld(

            onARExperienceLoadedSuccessful, 

            onARExperienceLoadError,

            "www/ar.html",

            [ "2d_tracking"],

            {"camera_position": "back"}


        );

    }


Good morning,



for callJavaScript to work, the ARchitect world will have to be loaded first. So you will have to put the callJavaScript call to a place in your code where the wikitudePlugin.loadARchitectWorld has already completed successfully.



- Daniel

Index.html has a button invoke AR.html by function WIKIAR() 

from index page i want to pass parameter called langid to AR.html , how can i pass this parameter .

if  i use calljavascript where can i put it in code 


Thanks 



Hello Ayman,

I am afraid I do not exactly understand what you wish to achieve. Maybe this link will help you with your use case https://support.wikitude.com/support/search/topics?term=pass+parameter&authenticity_token=nJ11gfKuy6EdYriiSh%2Bg9Jz33Q1B5Na4XxUswv3xIeo%3D?

Otherwise, please share some more details.

Thanks
Eva

 

Login or Signup to post a comment