PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WEBDEV 2024 → Using HTML bookmarks in a dynamic page???
Using HTML bookmarks in a dynamic page???
Started by CCordes, Apr., 30 2014 3:13 AM - 4 replies
Registered member
68 messages
Posted on April, 30 2014 - 3:13 AM
Is this possible?
In normal HTML, I can set a bookmark in the page by using a simple anchor <a name="mybookmark">
and then jump to it by using a link - <a href="#mybookmark">Click here for bookmark</a>
or from another page in the site - <a href="/otherpage#mybookmark">Click here for book mark on the other page</a>

Is there a way to do this in WB? - I tried DisplayPage("#bookmark") but it seriously breaks the server.

I'm sure that I am just missing something simple.

TIA,
Chris C

--
Sometimes waiting is the best way forward...
Posted on April, 30 2014 - 11:55 AM
Hi Chris

a simple search on "Anchor" in the help let you find pageposition as the
answer to your question

Best regards


--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

WXShowroom.com is available: Show your projects!
More information on http://www.fabriceharari.com

Contact me at:
Email: fabrice@fabriceharari.com
Skype ID: fabriceharari
Tel # in the USA: +1 985 746 1422
Tel # in France: +33 970 444 445 (local number 0970 444 445)


On 4/29/2014 7:13 PM, ccordes wrote:
Is this possible?
In normal HTML, I can set a bookmark in the page by using a simple
anchor <a name="mybookmark">
and then jump to it by using a link - <a href="#mybookmark">Click here
for bookmark</a>
or from another page in the site - <a href="/otherpage#mybookmark">Click
here for book mark on the other page</a>

Is there a way to do this in WB? - I tried DisplayPage("#bookmark") but
it seriously breaks the server.

I'm sure that I am just missing something simple.

TIA,
Chris C

--
Sometimes waiting is the best way forward...
Registered member
68 messages
Posted on May, 01 2014 - 4:26 PM
Thanks Fabrice,

It looks like you can not have an anchor with a name <a name="bookmark" /> ...
... and get to it using WB commands or a link <a href="#bookmark">Click here</a>.


The PagePosition command will point to a specific row# of a looper or a specific control by name.

To position the page to a looper row, I need to do something like this?-
rownum = looperseek(ATT_bookmark_value,selectedvalue)
PagePosition(Looper_Content,rownum)

OR
add a Static as an anchor with a name - STC_Bookmark
and then use PagePosition("",STC_Bookmark) to reposition the page.

But I cannot dynamically create content with bookmarks and then get to the bookmarks?

An extension of this idea - can I not use glinks in a combo in WB?
So that, as items are added to a page, I can add an identifier to a combo and glink the row number or created static control to position to them later?
JAT

TIA
Chris C

--
Sometimes waiting is the best way forward...
Posted on May, 02 2014 - 1:57 PM
Hi Chris

either you use th high level webdev functions (pageposition, a looper,
and your content is reachable easily) or you use html code (html field
with html content where you can do whatever you want, including an html
anchor)... But in that cas, YOU are in charge of coding the low level

Now glink is not supported in browser code, but I have been using a
glink like functionality on browser for a long time:

- to add a false glink: add 100 spaces (the unbreakble one) and your
value at the end of your combo label
- your value is invisible, but here
- when you retrieve the combo value, the "glink" is a the end

and guess what ? That's what we were doing in windev a long time ago,
before they added the glink function :D

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXShowroom.com is available: Show your projects!
More information on http://www.fabriceharari.com


On 5/1/2014 8:26 AM, ccordes wrote:
Thanks Fabrice,

It looks like you can not have an anchor with a name <a name="bookmark"
/> ...
.... and get to it using WB commands or a link <a href="#bookmark">Click
here</a>.


The PagePosition command will point to a specific row# of a looper or a
specific control by name.
To position the page to a looper row, I need to do something like this?-
rownum = looperseek(ATT_bookmark_value,selectedvalue)
PagePosition(Looper_Content,rownum)

OR
add a Static as an anchor with a name - STC_Bookmark
and then use PagePosition("",STC_Bookmark) to reposition the page.

But I cannot dynamically create content with bookmarks and then get to
the bookmarks?

An extension of this idea - can I not use glinks in a combo in WB?
So that, as items are added to a page, I can add an identifier to a
combo and glink the row number or created static control to position to
them later?
JAT

TIA
Chris C

--
Sometimes waiting is the best way forward...
Registered member
68 messages
Posted on May, 02 2014 - 4:54 PM
I used an associative array alongside the combo to hold the record numbers.
Create the array element when the combo line is added.

Your way is more direct! I'll remember that one.

Thanks

--
Sometimes waiting is the best way forward...