Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Remember me

Go Back   Tutorialized ForumsWeb Design & DevelopmentJavascript

Add This Thread To:   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
Unread Tutorialized Forums Sponsor:
Old December 6th, 2011, 03:28 AM
carlbrooks carlbrooks is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
Join Date: Nov 2011
Posts: 3 carlbrooks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 50 sec
Reputation Power: 0
How to display spinner buttons in another table

I have a spinner where user enters in their value or uses the buttons to increase or decrease the value. When the user is happy with the value in the spinner the user submits the value. The value would then appears in another table inside a textbox.

What my question is, is that how can I get it so that when user submits value in the other table that the spinner buttons are also displayed in the other table so that except the value is in a textbox, it is displayed in a spinner which operates exactly the same as the spinner in the previous table?

Below is code where the value from the first spinner is retireved and oututted into another table into a textbox:

   function insertQuestion(form) {   
    	var row = document.createElement("tr");
    	var cell,
            alertErrors = "",
            qnum = 1;
         cell = document.createElement("td");
         cell.className = "weight";
         input = document.createElement("input"); = "weight_" + qnum;
         input.onkeypress = "return isNumberKey(event)";
         input.value = form.textWeight.value;

Below is html code which shows 3 tables, first table is where the user enters in the value of the answer weight in the spinner, second table is the submit button (Add Question) and third table is where the value is displayed after submission of the first spinner.

    <form id="enter" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" method="post" onsubmit="return validateForm(this);" >
    <div id="detailsBlock">
    <table id="answerWeight">
         <th colspan="3">
         Answer Weight
    <td class="spinner">Weight: <input type="text" class="spinnerWeight" name="textWeight" id="txtWeight" />%</td>
    <td><button class="scrollBtn" id="btnWeightUp" type="button"><img src="Images/black_uppointing_triangle.png" alt="Increase" /></button>
    <button class="scrollBtn" id="btnWeightDown" type="button"><img src="Images/black_downpointing_triangle.png" alt="Decrease" /></button></td>
    <table id="questionBtn" align="center">
    <input id="addQuestionBtn" name="addQuestion" type="button" value="Add Question" onClick="insertQuestion(this.form)" />
    <table id="qandatbl" border="1">
        <th class="qid">Question No</th>
        <th class="question">Question</th>
        <th class="option">Option Type</th>
        <th class="answer">Answer</th>
        <th class="weight">Weight</th>

Hoefully that is all the information you require. If you want more information then just add a comment to me. Thank you.

Reply With Quote

Viewing: Tutorialized ForumsWeb Design & DevelopmentJavascript > How to display spinner buttons in another table

Developer Shed Advertisers and Affiliates

Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.

© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap