datadoit.com
|
| Posted: 07/12/2005, 5:51 PM |
|
CCS 2.3; PHP4; MySQL4
I'd like to create a frequently asked questions type of page that will have
questions at the top, with answers at the bottom of the page:
<grid 1>
Question 1
Question 2
Question 3
</grid 1>
<grid 2>
Question 1
Answer 1
Question 2
Answer 2
Question 3
Answer 3
</grid 2>
The FAQ questions and answers are in a data table. In grid 1, each of the
questions are links. What I'd like to do is have each of those links go to
a bookmark on the same page. I can use a 'faq_id' as the bookmark. What I
need to know is how to implement this in CodeCharge.
How can I set up the grid 1 link to go to a bookmark (ie:
mypage.php#{faq_id})?
How do I set up grid 2 to have a field (faq_id) be the bookmark?
Someone's had to have done this before. Wanna share? Thanks.
-MikeR
|
|
|
 |
DonB
|
| Posted: 07/13/2005, 7:33 PM |
|
I did this in a grid, so in the BeforeShowRow event I adjusted the Link
property to 'tack on' the bookmark. The Link itself was set up at design
time to point to the appropriate page (in your case it would be the current
page), then in the event code I added this:
TopicGrid->TopicSubject->SetLink( Eventcaller->TopicSubject.GetLink() . "#"
.. TopicGrid->Datasource->ds->Fields("TopicID");
which appends the bookmark, which was one of my datasource fields for the
grid. You could find a problem with this, if the link has parameters
attached to it (that is if the link will have
'?param=value&otherparam=othervalue' appended). Depending on when the
complete link is concatenated by CCS it is possible it might put the
octothorpe before the '?'. But I think it will be fine, just wanted to
throw in that caveat so you can watch out for it.
The correct syntax is http://domain?param=foo#bookmark so just be sure
things appear in the right order.
--
DonB
http://www.gotodon.com/ccbth
"datadoit.com" <mike@datadoit.com> wrote in message
news:db1oih$khh$1@news.codecharge.com...
> CCS 2.3; PHP4; MySQL4
>
> I'd like to create a frequently asked questions type of page that will
have
> questions at the top, with answers at the bottom of the page:
>
> <grid 1>
> Question 1
> Question 2
> Question 3
> </grid 1>
>
>
> <grid 2>
> Question 1
> Answer 1
>
> Question 2
> Answer 2
>
> Question 3
> Answer 3
> </grid 2>
>
> The FAQ questions and answers are in a data table. In grid 1, each of the
> questions are links. What I'd like to do is have each of those links go
to
> a bookmark on the same page. I can use a 'faq_id' as the bookmark. What
I
> need to know is how to implement this in CodeCharge.
>
> How can I set up the grid 1 link to go to a bookmark (ie:
> mypage.php#{faq_id})?
>
> How do I set up grid 2 to have a field (faq_id) be the bookmark?
>
> Someone's had to have done this before. Wanna share? Thanks.
>
> -MikeR
>
>
|
|
|
 |
|