Skip to content

Can i add text/html;ba64 as url?Β #24

@Gautammer

Description

@Gautammer

Like this?

var pageContent = '<html><head></head><body><form id="loginForm" action="' + url + '" method="post">' +
    '<input type="hidden" name="username" value="' + this.userName + '">' +
    '<input type="hidden" name="pwd" value="' + this.decryptedPass + '">' +
    '<input type="hidden" name="mobile_token" value="123xyz">' +
    '</form> <script type="text/javascript">document.getElementById("loginForm").submit();</script></body></html>';


  var pageContentUrl = 'data:text/html;base64,' + btoa(pageContent);
  
  InAppBrowser.open({
     url:pageContentUrl,
     headers:{
        backgroundColor:'#ffffff'
     },
     isPresentAfterPageLoad:true
  }).then(res=>{
    console.log(res);
  },err=>{
    console.log(err);
  })
  

Thanks :)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions