SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jun 2004
    Location
    Florida
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I pass this information

    Hello everyone,
    I need help please. I'm setting a shopping cart. The following row is generated from the cart when product A is displayed in the product information webpage. The text box is empty. The customer will write inside the style number of the product. Because the product contains many styles, I want to create a popup with pictures of all styles, input type radio, so the customer can choose one style, and when click submit, the popup close and the value selected is entered inside this text box. How can I do this.

    <tr>
    <td class="boxText"><br><input type="text" name ="id[txt_7]" size="32" maxlength="255" value=""></td>
    </tr>

    I really appreciate any help.
    thanks
    bill

  2. #2
    masquerading Nick's Avatar
    Join Date
    Jun 2003
    Location
    East Coast
    Posts
    2,215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe a popup box might not be such a good idea - a lot of people now have popup blockers. With a critical piece of information like that, you really want to be sure that it is getting displayed to the user. How about putting the style selector underneath of the rest, and creating an anchor link that will point to it? If you would like to do it that way, I can create the JS code for you
    Nick . all that we see or seem, is but a dream within a dream
    Show someone you care, send them a virtual flower.
    Good deals on men's watches

  3. #3
    SitePoint Member
    Join Date
    Jun 2004
    Location
    Florida
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you possibility,
    One reason is that main page could be a little big in size because of about 20 additional images that needs to load. But anyway, could be possible to enter the style selected automatically in a text box field which is generated by the cart?
    thanks
    bill

  4. #4
    &#083;itePoint Aficionado JVLB's Avatar
    Join Date
    Jan 2002
    Location
    N 44 56.537' W 123 3.683'
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A radio button group is stored as an array. See if this helps:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>Untitled</title>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript">
    function bldRad(){
    var radWin=window.open("","","height=300px,width=200px");
    radWin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"'+
    '"http://www.w3.org/TR/html4/strict.dtd"><html>'+
    '<head><title>Radio Window<\/title><meta http-equiv="content-type" content="text/html; charset=iso-8859-1">'+
    '<scr'+'ipt type="text/javascript">function sendVal(v){var ln=v.length;for(var i=0;i<ln;i++){'+
    'if(v[i].checked)opener.document.frmOne.taOne.value=v[i].value;self.close();}}<\/scr'+'ipt>'+
    '<\/head><body><form action="" onclick="sendVal(this.radOne)">'+
    '<input type="radio" name="radOne" value="one" \/>One'+
    '<input type="radio" name="radOne" value="two" \/>Two'+
    '<input type="radio" name="radOne" value="three" \/>Three <\/form><\/body><\/html>');
    radWin.document.close();
    }
    </script>
    </head>
    <body onload="bldRad();">
    <form action="" name="frmOne">
    <p>
    <textarea name="taOne" rows="4" cols="20"></textarea>
    </p>
    </form>
    </body>
    </html>

  5. #5
    masquerading Nick's Avatar
    Join Date
    Jun 2003
    Location
    East Coast
    Posts
    2,215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wtg2004
    Thank you possibility,
    But anyway, could be possible to enter the style selected automatically in a text box field which is generated by the cart?
    thanks
    bill
    Say again? I'm not exactly sure what you mean...
    Nick . all that we see or seem, is but a dream within a dream
    Show someone you care, send them a virtual flower.
    Good deals on men's watches


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •