Well, the problem with the solution here is that I have to click twice
on a link: on the first click the url is updated in the browser and
nothing else happen; on the second, the handleClick function is
called.
See the Elsevier link here ttp://www.unifr.ch/dokpe/paperj/exhibit.html

Francois

On Mar 18, 7:15 pm, David Huynh <[email protected]> wrote:
> Francois wrote:
> > David,
> > Thanks for the advice. I believe I was not clear enough, since your
> > code update the url when one clicks on a link. I am looking for the
> > other direction: how to modify the exhibit when a link with # in it,
> > is used.
>
> > Using
> > "javascript:window.location='exhibit.html#fp_pub=Elsevier';applyRestrictions
> > ();" in href attribute of an "a" link do what I search. But I was
> > wondering if I could have normal url in href and have an exhibit event
> > which would call the applyRestrictions function.
>
> > Seehttp://www.unifr.ch/dokpe/paperj/exhibit.html
>
> > So is there a cleaner way to use the # trick ?
>
> Oh, I see. No, I can't think of a much cleaner way. This is just
> slightly better:
>
>     <a href="exhibit.html#fp_pub=Elsevier" onclick="return
> handleClick(event, 'fp_pub', 'Elsevier')"> ... </a>
>
>     function handleClick(evt, facetID, choice) {
>        ... restrict the facet yourself ...
>
>        document.location.hash=facetID + "=" + choice;
>        evt.preventDefault();
>        return false;
>     }
>
> I'm not sure if the last 3 lines of the function's body are necessary.
>
> David
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to