WordPress.org

Ready to get started?Download WordPress

Forums

Two tables with dropdown select inside of a post (2 posts)

  1. rulez22
    Member
    Posted 3 years ago #

    Is there a way to have inside of a single post:

    Two simple tables (simple HTML code)

    table1 - prices in USD
    table2 - prices in EUR
    and dropdown box on both "select your currency"

    I've done it in JavaScript, but don't know how to implement it in WP and best without page reloading.
    Here is my simple solution:

    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_jumpMenu(targ,selObj,restore){ //v3.0
      eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
      if (restore) selObj.selectedIndex=0;
    }
    //-->
    </script>
    <form name="form1" action="">
              <select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
                 <option selected>Choose Currency:</option>
    <option value="table1-usd.htm">USD</option>
        </select>
    </form>
    ... html code for the table

    The second file is the same, just replace USD with EUR.

    php include? flash include? Is there any solutions - is it possible at all? Plugins for this?
    It would also be perfect if once currency been selected to keep that information for other posts with same structure for that user to see(cookies?)
    Appreciate your help!

  2. rulez22
    Member
    Posted 3 years ago #

    I was told AJAX/jquery could be an answer, any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic