CSS_Switcher: use with radio buttons or links
Posted: 02 January 2007 10:13 AM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  316
Joined  04-11-2006

I’ve gotten the CSS switcher working with the drop down select list, as per the code below [which is a straight mod of the documentation example]. 

<form action="" method="post">
    <
select name="css_skin" id="css_skin">
      <
option value="1">Default</option>
      <
option value="2">Low Vision</option>
      <
option value="3">Handheld</option>
    </
select>
    <
input type="submit" value="Set Style" />
    </
form>

I noticed one more advantage of this method over javascript style switchers - namely only one sheet is named in the final HTML - unlike the javascript version - where the other sheets must be named as alternatives.  This means that no HTTP requests are made for those alternate sheets on page loading - thus increasing load speed, especially if over a route with high latency!
.

My question is - is it possible to use the switcher with:
1) a form with a number of radio buttons
or
2) a list of links.

It seems that the plugin requires a single field item with a specific name/id, so I can’t quite see how to proceed.

Any hints/ideas very welcome - ideally without needing mods to the plugin!

Jan

 Signature 

OakenPage website works - doing simple things well

Profile
 
 
Posted: 03 January 2007 03:23 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  316
Joined  04-11-2006

Hah - I should have looked further than the forums!

There is a nice simple article in the wiki which shows how to use links with the css_switcher. grin

 Signature 

OakenPage website works - doing simple things well

Profile
 
 
Posted: 29 January 2007 10:16 AM   [ Ignore ]   [ # 2 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  134
Joined  08-23-2006

Thanks for the form input code example, just what I needed to get the switcher to work.
I would also like to use links instead. The wiki example way is trying to fetch the skin from the main EE installation (the page is on a second domain) and breaks everything, pulls in different weblogs and index pages. So if there is a way to get the links without using php as described in the wiki, I would really like to know!

 Signature 

Currently running EE 1.6.4 Build: 20080808

Profile
 
 
   
 
 
‹‹ AutoGlossary Plugin      Plugin: CSVee ››
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64939 Total Logged-in Users: 66
Total Topics: 81911 Total Anonymous Users: 51
Total Replies: 440326 Total Guests: 275
Total Posts: 522237    
Members ( View Memberlist )