[thelist] Avoid "#" and "onclick" in "<a href"

ben morrison morrison.ben at gmail.com
Fri Mar 24 10:47:06 CST 2006


On 3/24/06, Stefan Schwarzer <st.schwarzer at geois.de> wrote:
> Hi there,
>
 ...
>
> I guess I could put some of the code I use in the onclick-tag into a
> separate javascript function. But still, I don't see how I can avoid
> the "#"-reference.
>

> <a class="linksWhite2" href="#"
> onclick="document.formGeneric.selectedLanguage.value='en';
> document.formGeneric.action='<?=$currentPage;?>';
> document.formGeneric.submit();">English</a>&nbsp;|
> <a class="linksWhite2" href="#"
> onclick="document.formGeneric.selectedLanguage.value='fr';
> document.formGeneric.action='<?=$currentPage;?>';
> document.formGeneric.submit();">Français</a>&nbsp;
>
>
> <a class="linkBlueSmall" href="#"
> onclick="document.formGeneric.action='index_advanced.php';
> document.formGeneric.selectedLanguage='en';
> document.formGeneric.submit();" title="Specify your search by
> limiting it to selected themes, regions or date of
> updates."><b>Advanced Search</b></a>
>

Would this be better to use a select box to choose your options? easy
to update, easy to code.

Not the answer your after, but sometimes a different approach is needed.

ben



More information about the thelist mailing list