[Javascript] Name attribute for link

Nazir Wasim Ahmed nazirwa at sakinfotech.co.in
Sun Nov 30 21:43:11 CST 2003


Hi Roger,

I followed ur suggestion. It worked fine.
Thanx for ur help.

Nazir

> -----Original Message-----
> From: javascript-bounces at LaTech.edu
> [mailto:javascript-bounces at LaTech.edu]On Behalf Of Roger Roelofs
> Sent: Saturday, November 29, 2003 7:32 PM
> To: [JavaScript List]
> Subject: Re: [Javascript] Name attribute for link
>
>
> Nazir,
>
> Google is your friend.  I typed "css style switcher js" and got dozens
> of scripts that do what you want.  Here's number one, also arguably the
> most famous one.  <http://www.alistapart.com/articles/alternate/>
>
> Your stylesheet is not inside a form, so you don't want to say
> document.forms... You want to either give your link tag an id and use
> document.getElementbyId, or use the script from a list apart and scan
> all the link tags for the title you're looking for (that is the better
> solution).
>
>
> On Nov 29, 2003, at 4:43 AM, Nazir Wasim Ahmed wrote:
>
> > Hi All,
> >  
> > How can i change the stylesheet name(href) of my page dynamically?
> > I need to change the stylesheet name when a combo is selected..
> >  
> > I tried giving something like
> > <link href="" name="mylink">
> >  
> > and then on body load i tried changing the href to another location
> > document.forms[0].mylink.href="\someotherlocation";
> >
> Roger,
>
> Roger Roelofs
> Datacomp Appraisal Services
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>




More information about the Javascript mailing list