Dear Antonio,
Can you please help me to understand what I am doing wrong?
If I change a static variable in the router module, I don't see the change in the "VIEW" module.
But if I insert the code directly into the mod_harbour prg instead of VIEW, then everything fits.
What mistake am I making here?
Thank you in advance and best regards
Otto
I test with GENESIS.
Router function
...
cbreadcrumbneu := "***" + cbreadcrumbneu + "***"
return View( cRoute )
view( "body" )
...
<a id="title" class="navbar-brand mr-auto" style="color:white;padding-left:30px;">{{ breadcrumbs() }}</a>
...
function BuildEdit
...
cHtml += '{{ breadcrumbs() }}'
...
views static variables
views static variables
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
Re: views static variables
Dear Antonio,
I'm sorry. I found my mistake.
I first query breadcrumbs before calling the router which sets the variable.
Best regards,
Otto
I'm sorry. I found my mistake.
I first query breadcrumbs before calling the router which sets the variable.
Best regards,
Otto
Code: Select all
<!-- Page Content -->
<div id="content">
<img src="./assets/img/winhotelqr.svg" width="300px"/>
<p></p>
<span style="font-size:30px;cursor:pointer" id="open" onclick="openNav()">☰ NAV open</span>
<nav class="navbar navbar-expand-lg navbar-inverse" style="background-color:{{GetColor2()}};border:0px;">
<a id="title" class="navbar-brand mr-auto" style="color:white;padding-left:30px;">{{ breadcrumbs() }}</a>
{{ cRouteGesamt() }}
<div class="nav-item" style="color:white;display:inline-block;cursor:pointer;" onclick="Logout();">
<a class="nav-link" style="color:white;" style="cursor:pointer;">{{GetUserName()}}
<i class="fa fa-sign-out" style="padding-left:15px;"></i></a>
</div>
</nav>
{{Router()}}
</div>
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
Re: views static variables
Hello,
Using document.read and innerHTML helped.
---------------------------------------------------------------------------------------------------
In this context, I also googled the following question:
Can you have multiple $(document).ready(function(){ … }); sections?
You can have multiple ones, but it's not always the neatest thing to do. Try not to overuse them, as it will seriously affect readability. Other than that , it's perfectly legal.
https://stackoverflow.com/questions/132 ... n-sections
Best regards,
Otto
Using document.read and innerHTML helped.
Code: Select all
<script>
$(document).ready(function() {
document.getElementById('title').innerHTML='{{ breadcrumbs() }}' ;
});
</script>
In this context, I also googled the following question:
Can you have multiple $(document).ready(function(){ … }); sections?
You can have multiple ones, but it's not always the neatest thing to do. Try not to overuse them, as it will seriously affect readability. Other than that , it's perfectly legal.
https://stackoverflow.com/questions/132 ... n-sections
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: views static variables
Great
Thank you for sharing it
Thank you for sharing it