I created an application using GAS and HTML service. It works on Safari and Chrome on mac, using different logins for a google apps account, but for the same accounts, it does not run on any of the browsers in windows machine.
Regards, Arjun
Code to load the page
function doGet(e) {
Logger.log( Utilities.jsonStringify(e) );
if (!e.parameter.page | e.parameter['page'] == 'index'){
var template = HtmlService.createTemplateFromFile('index');
var htmlOutput = template.evaluate()
.setSandboxMode(HtmlService.SandboxMode.IFRAME);
return htmlOutput;
}
return HtmlService.createTemplateFromFile(e.parameter['page']).evaluate();
}
The page that is not loading
<style type="text/css">
#header {
height:100px;
background:Green;
font-size:300%;
color: Black;
align-content: centre;
}
body
{
padding: 50px;
}
.animate
{
transition: all 0.1s;
-webkit-transition: all 0.1s;
}
.action-button
{
position: relative;
padding: 10px 40px;
margin: 0px 10px 10px 0px;
float: left;
border-radius: 10px;
font-family: 'Pacifico', cursive;
font-size: 25px;
color: #FFF;
text-decoration: none;
}
.blue
{
background-color: #3498DB;
border-bottom: 5px solid #2980B9;
text-shadow: 0px -2px #2980B9;
}
.red
{
background-color: #E74C3C;
border-bottom: 5px solid #BD3E31;
text-shadow: 0px -2px #BD3E31;
}
.green
{
background-color: #82BF56;
border-bottom: 5px solid #669644;
text-shadow: 0px -2px #669644;
}
.yellow
{
background-color: #F2CF66;
border-bottom: 5px solid #D1B358;
text-shadow: 0px -2px #D1B358;
}
.action-button:active
{
transform: translate(0px,5px);
-webkit-transform: translate(0px,5px);
border-bottom: 1px solid;
}
</style>
<!-- display header -->
<div id="header">Green Leaf Airconditioning Services LLC</div>
<!-- Set up the div for users only and not supervisors -->
<? var logged_user = getcurruser(); ?>
<label><?=logged_user?></label>
<div id='users'>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=timesheet'> <input type='button' name='formload' value="Time Sheet" class="action-button animate blue"></a></p>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=expclaim'> <input type='button' name='formload' value="Expense Claim" class="action-button animate blue"></a></p>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=leaveapp'> <input type='button' name='formload' value="Leave Request" class="action-button animate blue"></a></p>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=tktrequest'> <input type='button' name='formload' value="Ticket Request" class="action-button animate blue"></a></p>
</div>
<div id='status'>
<!-- some options will be increased later -->
<!-- <p><?var url = getScriptUrl();?><a href='<?=url?>?page=timesheet'> <input type='button' name='formload' value="Time Sheet" class="action-button animate blue"></a></p> -->
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=expclaimstatus'> <input type='button' name='formload' value="Expense Claim Status" class="action-button animate blue"></a></p>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=leavestatus'> <input type='button' name='formload' value="Leave Status" class="action-button animate blue"></a></p>
<p><?var url = getScriptUrl();?><a href='<?=url?>?page=tktstatus'> <input type='button' name='formload' value="Ticket Status" class="action-button animate blue"></a></p>
</div>
<!-- show this when the user is also a supervisor -->
<div id='supervisors'>
</div>
It works on any browser on the mac but does not work on any browser in windows.
Aucun commentaire:
Enregistrer un commentaire