Is it possible to change the text of the page headers programmatically? Or have them linked to a service output?
Thanks,
Is it possible to change the text of the page headers programmatically? Or have them linked to a service output?
Thanks,
Here is how to do it programmatically:
code
($('h1').first().text('New header'));
/code
As for mapping, not yet possible.
How to change text of other page header?
What do you mean by "other page header"? What is other?
Hi,
if you use navigateTo("second_page","ajax"), and want change the second page's header, the first h1 tag is not the right one.
I use ($('h1[dsid="header_name"]').first().text("new text")) instead.
So I can use this?
($('h1').first().text(categoryName));
On the previous page, I need to set the value of categoryName and store it as a local storage variable.
Then "on load" run the javascript?
Yes, looks right.
how does the categoryName or the local storage value get read by the javascript variable?
To read from local storage:
localStorage.getItem('key');
Perfect!
($('h1').first().text(localStorage.getItem('categoryName')));
Thanks!