Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Scripts

Like Tree1Likes
  • 1 Post By MarkR

Reply
 
LinkBack Thread Tools Display Modes
Old 11-11-2011, 03:29 AM   #1
Diamond Member
 
Phreaddee's Avatar
 
Join Date: Feb 2011
Location: Newcastle, Australia
Posts: 1,135
Default using javascript to create a radio button out of an anchor.

Hi.
not even sure if this is possible but...
I've got a client and they are using Business Catalyst as their CMS.
within the ecommerce section you can create attributes and have them listed as a radiobutton list, but to group similar products together can only be outputted as a crummy table (see below example output)
HTML Code:
<table cellspacing="0" class="productTable">
<tr>
<td class="productItem"><a href="/linktoproductA.html">groupedproduct-A</a></td>
</tr>
<tr>
<td class="productItem"><a href="/linktoproductB.html">groupedproduct-B</a></td>
</tr>
<tr>
<td class="productItem"><a href="/linktoproductC.html">groupedproduct-C</a></td>
</tr>
</table>
Personally I'd love to be able to remove the table entirely,
however at the very least I'd love to be able to modify the anchor to be outputted as a radiobutton
but is this even possible?
(even if it is purely visual so that it appears to work like a radio button but doesnt. - that'll keep the client happy.
any thoughts?

cheers
__________________
if (headhurts == "possibly") {
alert ("keep going!");
}
else if (headhurts == "yes") {
alert ("go to sleep");
}
else if (headhurts == "damn !@#$ mofo scripts...") {
alert ("give up and have a beer!");
}
else {
alert ("watch TV");
}
Phreaddee is offline   Reply With Quote


Old 11-12-2011, 06:30 PM   #2
Silver Member
 
Join Date: Jul 2011
Posts: 146
Default please clarify

Phreaddee, first time I've known you to ASK a question, since I've been here.

I don't quite understand what you want to do. Do you want a click on the radiobutton to display the associated link? Maybe a simple image of the desired effect would make it more clear.
__________________
space
Orchid Technical Services
Website Design/Development and Technical Support
DesignerBill is offline   Reply With Quote
Old 11-15-2011, 04:33 PM   #3
Silver Member
 
Join Date: Aug 2011
Posts: 100
Default

Hmm, we did something similar to this a while back but kind of faked it.


HTML Code:
<a href="#" title="Show/Hide">
<img src="/img/closed_icon.png" alt="Closed"/>
</a>


<img src="/img/closed_icon.png" alt="Closed"/>
or
<img src="/img/open_icon.png" alt="Open"/>
The images just look like radio buttons which are swapped using JS when clicked. It's cheating a bit but it was quick and easy.
Phreaddee likes this.
__________________
Mark R

Wubbleyou - Web Design Newcastle
A professional web design agency based in Newcastle upon Tyne servicing clients based throughout the U.K.

Home spray tan machine - Landlord Reviews
MarkR is offline   Reply With Quote
Old 11-16-2011, 02:15 AM   #4
Diamond Member
 
Phreaddee's Avatar
 
Join Date: Feb 2011
Location: Newcastle, Australia
Posts: 1,135
Default

Yes! U r a legend...
I think youve solved my problem!
__________________
if (headhurts == "possibly") {
alert ("keep going!");
}
else if (headhurts == "yes") {
alert ("go to sleep");
}
else if (headhurts == "damn !@#$ mofo scripts...") {
alert ("give up and have a beer!");
}
else {
alert ("watch TV");
}
Phreaddee is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:55 PM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.