newbie27
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
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
newbie27, you need to be more specific with your questions so that others may be able to help.
ASKER
ok sorry I will make sure from next time.
I had this before
<div id="defaultResults"><table id="listDisplay" style="display:none"></tab le></div>
<span id="dynamicResults"><table id="listDisplay1" style="display:none"></tab le></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').hid e();
$("#flexicontainer").html( '<table id="listDisplay" style="display:none;"></ta ble>');
//$('#dynamicResults').htm l('<table id="listDisplay1" style="display:none"></tab le>');
}
}
but it is not showing the Flexigrid
please advice
I had this before
<div id="defaultResults"><table
<span id="dynamicResults"><table
now I have changed it to
<div id="flexicontainer"><table
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').hid
$("#flexicontainer").html(
//$('#dynamicResults').htm
}
}
but it is not showing the Flexigrid
please advice
ASKER
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="+sRefNum bers;
//alert("sViewQuery: "+sViewQuery);
listViewer("#listDisplay", sViewQuery );
$("#txtListName").val('tes t6');
$("#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="
success: function(msg)
{
$("#listRefnos").val( msg );
var sRefNumbers = $("#listRefnos").val();
var sViewQuery = "SF1=keyword&ST1="+sRefNum
//alert("sViewQuery: "+sViewQuery);
listViewer("#listDisplay",
$("#txtListName").val('tes
$("#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",
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');
}
});
}
ASKER
I have open question for this , please look
https://www.experts-exchange.com/questions/23492362/change-the-default-result.html
https://www.experts-exchange.com/questions/23492362/change-the-default-result.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks