Results 1 to 2 of 2

Thread: new div using javascript...but adding via another page

  1. #1
    Join Date
    Nov 2011
    Posts
    44
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default new div using javascript...but adding via another page

    I currently have a select jump list (using jquery) that shows locations e.g spain,uk,italy when one of the locations is selected a div is shown with shops in the chosen location

    Code:
      <script type="text/javascript" src="jquery.js"></script>
    
      <script language="JavaScript1.2" type="text/javascript">
    $(document).ready(function(){
    $('#box1').hide();
    $('#box2').hide();
    $('#box3').hide();
    $('#box4').hide();
    $('#box5').hide();
    $('#box6').hide();
    $('#box7').hide();
    $('#box8').hide();
    $('#box9').hide();
    $('#box10').hide();
    $('#box11').hide();
    $("#thechoices").change(function(){
    $("#" + this.value).show().siblings().hide();
    });
    
    $("#thechoices").change();
    });
    </script>
    the select list
    Code:
                <select id="thechoices">
                  <option value="box1">SELECT</option>
                  <option value="box2">Belgium</option>
                  <option value="box3">Finland</option>
                  <option value="box4">France</option>
                  <option value="box5">Greece</option>
                  <option value="box6">Italy</option>
                  <option value="box7">Japan</option>
                  <option value="box8">Netherlands</option>
                  <option value="box9">Spain</option>
                  <option value="box10">South Korea</option>
                  <option value="box11">Switzerland</option>
                  <option value="box12">UK</option>
                  <option value="box13">USA</option>
                </select>
    div

    Code:
              <div id="boxes">
                <div id="box1">
                  <table width="400" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                </table></div></div>
    but what i need to do is be able to add this via the admin area. to content can dynamically added and shown on this page. i can add the address to the locations no problem but need to be able to show the newly added locations or shops in these divs

    does that make sense?

    thanks in advance

  2. #2
    Join Date
    Nov 2011
    Posts
    44
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    ignore this, i am doing it using php so will ask any questions in the php forum

Similar Threads

  1. Adding PHP to javascript
    By djwmguk in forum PHP
    Replies: 2
    Last Post: 10-13-2009, 11:57 PM
  2. Adding javascript into PHP
    By Master-T in forum JavaScript
    Replies: 3
    Last Post: 05-25-2007, 04:09 PM
  3. Adding Javascript to a PHP page not working...
    By tomyknoker in forum JavaScript
    Replies: 2
    Last Post: 06-07-2006, 05:39 PM
  4. Adding ALT tag to Images in JavaScript
    By chefbrian in forum JavaScript
    Replies: 8
    Last Post: 05-04-2006, 02:19 PM
  5. adding in javascript...
    By JLAudioFan in forum JavaScript
    Replies: 12
    Last Post: 01-24-2006, 03:22 AM

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
  •