Click here to Skip to main content
15,886,806 members

How do I load specific part of my page on my static google site

JigarModi asked:

Open original thread
I have created a static site on Google Sites. Now based on my requirements, I have to restrict the access of this site to particular users. So I have used Sharing and Permissions feature and restricted the access to limited users. It is a page containing some FAQs. Now what I need to do is, based on the question, I directly provide link of my static page, such that particular question part is navigated and shown to user. I have used anchor tag of html and I am using "name" property in this anchor tag. And when I want to show the user particular question on this page, I give the url of the page with "#name" appended in the URL. Now if the user is logged into his Google account, then he is shown that particular portion of the page, but if he is not logged in, google asks him to login and after login, he is not shown that particular part of the page (as used in URL using #name) but is shown the page from top.

For e.g. consider this demo page
https://sites.google.com/site/jmdemosite/home

If I want to navigate to FAQ5, I am using the link
https://sites.google.com/site/jmdemosite/home#t5

If the user is logged into Google account, he is shown FAQ5 directly. But if he is not logged in, he is asked to login and then he is shown the page from top.

I have tried many things using Google App Script and inserting html box (using jquery in it), but Google is not allowing me to redirect to particular part to the page.

Has anyone encountered similar problem and found a solution?
Tags: GoogleApp

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900