Link to home
Start Free TrialLog in
Avatar of newbie27
newbie27Flag for United Kingdom of Great Britain and Northern Ireland

asked on

unable to use functions from .js file

Hello Experts,
I have all the functions now moved to list.js and this is included on the page. But for some reason the functions are getting called.
Please can you have a look.
thanks
sam
Avatar of hielo
hielo
Flag of Wallis and Futuna image

newbie27, you need to be more specific with your questions so that others may be able to help.
Avatar of newbie27

ASKER

ok sorry I will make sure from next time.

I had this before
<div id="defaultResults"><table id="listDisplay" style="display:none"></table></div>                        
<span id="dynamicResults"><table id="listDisplay1" style="display:none"></table></span>      

now I have changed it to

<div id="flexicontainer"><table id="listDisplay></table></div>

and have this function

function viewList(){
   
  var sListname = $("#drpLists").val();
 
  if(sListname == 0 || sListname == "new"){  
    alert('Please select a list');
  }else{
 
   // alert("viewList: "+sListname);
      getListRefs(sListname);            
      //$('#defaultResults').hide();
      $("#flexicontainer").html('<table id="listDisplay" style="display:none;"></table>');
       //$('#dynamicResults').html('<table id="listDisplay1" style="display:none"></table>');
  }
 }  

but it is not showing the Flexigrid

please advice



I also have to change it in this function as well

function getListRefs(sListname)
{
      $.ajax({
        type: "POST",
        url: "list_builder.asp",
        data: "action=results&listname="+sListname,
        success: function(msg)
                    {                              
                        $("#listRefnos").val( msg );            
      
                        var sRefNumbers = $("#listRefnos").val();
                        var sViewQuery = "SF1=keyword&ST1="+sRefNumbers;    
                        //alert("sViewQuery: "+sViewQuery);
                        
                        listViewer("#listDisplay",sViewQuery);
                        $("#txtListName").val('test6');
                        $("#txtNotes").val('test notes');
                  }
      
      });
}

Hielo, Can you please advice how to retrieve cookies values?
I mean do I need to modify in the attached  function ?

if sListName ="shortlist" then
 listViewer("#listDisplay",cookie);

please advice
thanks

function getListRefs(sListname)
{
	$.ajax({
	  type: "POST",
	  url: "list_builder.asp",
	  data: "action=results&listname="+sListname,
	  success: function(msg)
	  		{					
				$("#listRefnos").val( msg );		
	
				var sRefNumbers = $("#listRefnos").val();
				var sViewQuery = "SF1=keyword&ST1="+sRefNumbers;     
				 
				
				listViewer("#listDisplay",sViewQuery);
				$("#txtListName").val('test6');
				$("#txtNotes").val('test notes');
			}
	 
	});
} 

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks