Difference between revisions of "Webeshoppin"

From Wiki2
Line 25: Line 25:
var myCars=["Saab","Volvo","BMW"]; // literal array</pre>
var myCars=["Saab","Volvo","BMW"]; // literal array</pre>


===click===
         <script>
         <script>
         //Why is delete button not firing?  
         //Why is delete button not firing?  

Revision as of 15:09, 30 January 2012

to force a move with refresh method1

location.href= 'food2buy.html?repo=' + rep + '&list=' + lis;

method2

 $('#allyourlists').append('<li><a href="food2buy.html?repo=' + rep + 
  '&list=' + lis + '" data-ajax="false" >Repo: ' + rep + '& List: ' + 
  lis + '</a></li>');

Why doesn't the clich http://10.0.1.18/webeshoppin/stuff2get/zmisc/buttonnotfiring.html


javascript

var myCars=new Array(); // regular array (add an optional integer
myCars[0]="Saab";       // argument to control array's size)
myCars[1]="Volvo";
myCars[2]="BMW";
2:

var myCars=new Array("Saab","Volvo","BMW"); // condensed array
3:

var myCars=["Saab","Volvo","BMW"]; // literal array

click

       <script>
       //Why is delete button not firing? 
       $('#thelists').bind('pageinit', function(event) {
           console.log('in bind pageinit for yourlists');
           var thelists = ["list1", "list2"];
           console.log(thelists);
           $.each(thelists, function(index, alist) {

$('#allyourlists').append('

  • <a href="index.html" data-role="button" id="delalist">List: ' + alist + '</a>
  • '); }); $('#allyourlists').listview('refresh'); }); //gets the val of val1 from the previois call $('body').on('click', "#delalist", function (e) { e.stopImmediatePropagation(); e.preventDefault(); alert ('in delalist') ; }); </script>