Jump to content

Search the Community

Showing results for tags 'supportdrop-down'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hello everyone, I am having some trouble with some drop-down boxes, here is the code: <div class='content_box'> <h3>Currency converter</h3> <form id='buy_form' action='?page=place_order' method='post'> <table id='exchanger'> <tr><td> <p><b>Currency I have:</b></p> <div class='currbox_wrapper'> <div id='incurrency' class='currbox' onclick='javascript:rolldown_in();'> <div class='currbox_right'> <b class='currcode'>BBQ</b> <img src='images/arrow_down.png' /> </div> <img class='currflag' src='images/bbq_flag.png' /> <span class='currname'>BBQCoin</span> </div> <div id='currsel_in'> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>BBQ</b> </div> <img class='currflag' src='images/bbq_flag.png' /> <span class='currname'>BBQCoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>BTC</b> </div> <img class='currflag' src='images/btc_flag.png' /> <span class='currname'>Bitcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>CLC</b> </div> <img class='currflag' src='images/clc_flag.png' /> <span class='currname'>Coiledcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>DVC</b> </div> <img class='currflag' src='images/dvc_flag.png' /> <span class='currname'>Devcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>FBX</b> </div> <img class='currflag' src='images/fbx_flag.png' /> <span class='currname'>Fairbrix</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>GGD</b> </div> <img class='currflag' src='images/ggd_flag.png' /> <span class='currname'>GeistGeld</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>GPC</b> </div> <img class='currflag' src='images/gpc_flag.png' /> <span class='currname'>Groupcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>IXC</b> </div> <img class='currflag' src='images/ixc_flag.png' /> <span class='currname'>IXCoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>LQC</b> </div> <img class='currflag' src='images/lqc_flag.png' /> <span class='currname'>Liquidcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>LTC</b> </div> <img class='currflag' src='images/ltc_flag.png' /> <span class='currname'>Litecoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>NMC</b> </div> <img class='currflag' src='images/nmc_flag.png' /> <span class='currname'>Namecoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>PPC</b> </div> <img class='currflag' src='images/ppc_flag.png' /> <span class='currname'>PPCoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>RUC</b> </div> <img class='currflag' src='images/ruc_flag.png' /> <span class='currname'>RuCoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>SLC</b> </div> <img class='currflag' src='images/slc_flag.png' /> <span class='currname'>Solidcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_in(this, true);'> <div class='currbox_right'> <b class='currcode'>TRC</b> </div> <img class='currflag' src='images/trc_flag.png' /> <span class='currname'>Terracoin</span> </div> </div> </div> </td> <td> <p><b>Currency I want:</b></p> <div class='currbox_wrapper'> <div id='outcurrency' class='currbox' onclick='javascript:rolldown_out();'> <div class='currbox_right'> <b class='currcode'>BTC</b> <img src='images/arrow_down.png' /> </div> <img class='currflag' src='images/btc_flag.png' /> <span class='currname'>Bitcoin</span> </div> <div id='currsel_out'> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>BBQ</b> </div> <img class='currflag' src='images/bbq_flag.png' /> <span class='currname'>BBQCoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>BTC</b> </div> <img class='currflag' src='images/btc_flag.png' /> <span class='currname'>Bitcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>CLC</b> </div> <img class='currflag' src='images/clc_flag.png' /> <span class='currname'>Coiledcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>DVC</b> </div> <img class='currflag' src='images/dvc_flag.png' /> <span class='currname'>Devcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>FBX</b> </div> <img class='currflag' src='images/fbx_flag.png' /> <span class='currname'>Fairbrix</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>GGD</b> </div> <img class='currflag' src='images/ggd_flag.png' /> <span class='currname'>GeistGeld</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>GPC</b> </div> <img class='currflag' src='images/gpc_flag.png' /> <span class='currname'>Groupcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>IXC</b> </div> <img class='currflag' src='images/ixc_flag.png' /> <span class='currname'>IXCoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>LQC</b> </div> <img class='currflag' src='images/lqc_flag.png' /> <span class='currname'>Liquidcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>LTC</b> </div> <img class='currflag' src='images/ltc_flag.png' /> <span class='currname'>Litecoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>NMC</b> </div> <img class='currflag' src='images/nmc_flag.png' /> <span class='currname'>Namecoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>PPC</b> </div> <img class='currflag' src='images/ppc_flag.png' /> <span class='currname'>PPCoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>RUC</b> </div> <img class='currflag' src='images/ruc_flag.png' /> <span class='currname'>RuCoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>SLC</b> </div> <img class='currflag' src='images/slc_flag.png' /> <span class='currname'>Solidcoin</span> </div> <div class='currsel_entry' onclick='javascript:select_currency_out(this, true);'> <div class='currbox_right'> <b class='currcode'>TRC</b> </div> <img class='currflag' src='images/trc_flag.png' /> <span class='currname'>Terracoin</span> </div> </div> </div> </td> </tr> <tr> <td> <input id='inamount' name='amount' class='curramount' type="text" size="20" value="" onkeyup='typed_amount_in();'> </td> <td> <input id='outamount' name='want_amount' class='curramount' type="text" size="20" value="" onkeyup='typed_amount_out();'> </td> </tr> <?php if ($loggedin) { ?> <tr><td></td><td> <input type='hidden' name='csrf_token' value="<?php echo $_SESSION['csrf_token']; ?>" /> <input type='hidden' name='type' value='' /> <input type='hidden' name='want_type' value='' /> <input type='submit' onclick='return buy_clicked();' value='Buy' /> </td></tr> <?php } ?> </table> </form> <?php if ($loggedin) { ?> <center><p> Use the above to give you an indication of the current exchange rates. </p> <?php show_balances($indent=true); ?> <p> Select the currency you wish to buy on the right, then click Buy. </p> <p>There is a 0.1% trading fee.</p></center> <?php } else { ?> <p> To begin trading you will need an OpenID account. </p> <p>If you do not have an OpenID login then we recommend <a href="https://www.myopenid.com/">MyOpenID</a>. <?php } ?> </div> <div class='content_box'> <h3>Crypto-Currencies</h3> <p> Crypto-currencies are a new form of currency which varies from traditional currencies in the fact that they are decentralized, safer to use and transactions can be conducted anonymously.<br /><br />To learn more, visit some of our sister sites:</p> <a href="http://bitcointalk.org", target="blank">Bitcoin Talk</a><br /><a href="http://forum.rucoin.us" target="blank">RuCoin Forum</a><br /><a href="http://forum.litecoin.net" target="blank">Litecoin Forum</a><br /><a href="http://ppcointalk.org" target="blank">PPCoin Talk</a> </p> </div> <div class='content_box'> <h3>Contact info</h3> <p>support@crypto-exchange.us</p> </div> I am unable to actually select most of the elements in the boxes. The correct items show, but they will not select. The items that do work are the same for both sides. For both drop-down boxes I am able to select BTC, LTC, PPC and RUC, the rest show in the drop-down list but will not select... Here is the back-end supporting code for this page: function set_curr_block(elem, currency, textname) { elem.children('.currflag').attr('src', 'images/'.concat(currency).concat('_flag.png')); elem.children('.currname').text(textname); elem.children('.currbox_right').children('.currcode').text(currency); } function set_currency(elem, currency) { switch(currency) { case 'bbq': set_curr_block(elem, 'bbq', 'BBQCoin'); break; case 'btc': set_curr_block(elem, 'btc', 'Bitcoin'); break; case 'clc': set_curr_block(elem, 'clc', 'Coiledcoin'); break; case 'dvc': set_curr_block(elem, 'dvc', 'Devcoin'); break; case 'fbx': set_curr_block(elem, 'fbx', 'Fairbrix'); break; case 'ggd': set_curr_block(elem, 'ggd', 'GeistGeld'); break; case 'gpc': set_curr_block(elem, 'gpc', 'Groupcoin'); break; case 'ixc': set_curr_block(elem, 'ixc', 'IXCoin'); break; case 'lqc': set_curr_block(elem, 'lqc', 'Liquidcoin'); break; case 'ltc': set_curr_block(elem, 'ltc', 'Litecoin'); break; case 'nmc': set_curr_block(elem, 'nmc', 'Namecoin'); break; case 'ppc': set_curr_block(elem, 'ppc', 'PPCoin'); break; case 'ruc': set_curr_block(elem, 'ruc', 'RuCoin'); break; case 'slc': set_curr_block(elem, 'slc', 'Solidcoin'); break; case 'trc': set_curr_block(elem, 'trc', 'Terracoin'); break; } } function set_currency_in(currency) { ic = $('#incurrency'); set_currency(ic, currency); } function set_currency_out(currency) { ic = $('#outcurrency'); set_currency(ic, currency); } function rolldown(cs, ic) { if (cs.css('visibility') == 'hidden') { cs.position({ my: "left top", at: "left bottom", of: ic }); cs.css('visibility', 'visible'); } else cs.css('visibility', 'hidden'); } function hide_rolldown(cs) { cs.css('visibility', 'hidden'); } function rolldown_in() { rolldown($('#currsel_in'), '#incurrency'); hide_rolldown($('#currsel_out')); } function rolldown_out() { rolldown($('#currsel_out'), '#outcurrency'); hide_rolldown($('#currsel_in')); } function select_currency_in(caller) { $('#currsel_in').css('visibility', 'hidden'); curr = jQuery('.currcode', caller).text(); curr = curr.toLowerCase(); set_currency_in(curr); set_currency_out(twin_currency(curr), false); $('#inamount').attr('value', ''); typed_amount_in(); } function select_currency_out(caller) { $('#currsel_out').css('visibility', 'hidden'); curr = jQuery('.currcode', caller).text(); curr = curr.toLowerCase(); set_currency_out(curr); set_currency_in(twin_currency(curr)); $('#outamount').attr('value', ''); typed_amount_out(); } function typed_amount(this_name, change_name) { this_obj = $('#' + this_name + 'amount'); change_obj = $('#' + change_name + 'amount'); a_obj = $('#inamount'); b_obj = $('#outamount'); a_curr = jQuery('.currcode', '#incurrency').text(); b_curr = jQuery('.currcode', '#outcurrency').text(); if (a_curr in exchange_rates) { a_curr_rates = exchange_rates[a_curr]; if (b_curr in a_curr_rates) { text_field = this_obj.attr('value'); if (text_field == '') { change_obj.attr('value', 0); return; } else if (isNaN(text_field)) { change_obj.attr('value', '-'); return; } rate = a_curr_rates[b_curr]; val = parseFloat(text_field); val *= rate; change_obj.attr('value', val.toFixed(2)); } else { b_obj.attr('value', 'N/A'); } } else { b_obj.attr('value', 'N/A'); } } function typed_amount_in() { typed_amount('in', 'out'); } function typed_amount_out() { //typed_amount('out', 'in'); } function buy_clicked() { curr_type = jQuery('.currcode', '#incurrency').text(); want_curr_type = jQuery('.currcode', '#outcurrency').text(); amount = $('#inamount').attr('value'); want_amount = $('#outamount').attr('value'); $("input[name='type']").val(curr_type); $("input[name='amount']").val(amount); if (amount == '' || want_amount == '' || isNaN(amount) || isNaN(want_amount)) { alert("Invalid amount specified."); return false; } $("input[name='want_type']").val(want_curr_type); $("input[name='want_amount']").val(want_amount); return true; } If you need any more information, please feel free to ask, any help is greatly appreciated, thanks!!!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.