Jump to content

How can i do a Slider?


cenourinha

Recommended Posts

For what i can understand they are using a Option Type: Quantity field in their system. They use this and they use the slider to adjust the "count" field but what i don't understand is how they automatically update the result:

 

<div class="yui-skin-sam">

<div id="slider-bg" class="yui-h-slider" tabindex="-1" title="Slider">

<div id="slider-thumb" class="yui-slider-thumb"><img src="https://teamspeak.cc/images/thumb-fader.gif"></div>

</div>

 

<br/>

<p><input autocomplete="off" id="configoption[11]" name="configoption[11]" type="text" value="5" size="4" maxlength="4" /> <span id="slider-value"></span> slots x $0.39 <b><span id="total-cost">Type # of slots and press Enter.</span></b></p>

</div>

Link to comment
Share on other sites

Yes, i know how to use the YUI Library, but i can't understand how to insert the bold code in whmcs fields

This is what I was referring to when I stated it depended on your coding skill. If you knew how JS worked, as well as the YUI, you'd know it states what field to edit when updating based on the slider. IE:

(function() {
10 var Event = YAHOO.util.Event,
11 Dom = YAHOO.util.Dom,
12 lang = YAHOO.lang,
13 slider,
14 bg="slider-bg", thumb="slider-thumb", totalarea="total-cost", valuearea="slider-value", textfield="configoption[11]" 

Then in the page:

<p><input type="text" maxlength="4" size="4" value="5" name="configoption[11]" id="configoption[11]" autocomplete="off"/> <span id="slider-value">5</span> slots x $0.39 <b><span id="total-cost">= $1.95 USD</span></b></p>

 

If after this it's still unclear, you should probably hire someone to assist.

Hope that helps.

Link to comment
Share on other sites

I know how js works... but this way i will need to edit the input field for "Quantity" in order to add the <span id="slider-value">5</span> and <span id="total-cost">= $1.95 USD</span>. How can i do this without making it general... i mean, with the possibility of creating another "Quantity" fields without this <span> tags.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated