This topic is locked

Adv Search in Listpage

12/11/2007 3:31:28 PM
ASPRunnerPro General questions
R
Robvanlier author

Hi,
ASPRunnerPro5.1

I am trying to merge the advanced search page into the listpage. Somehow it's not working.
All I want is some dropdownboxes and a search button instead of the standard search. How can I achieve this? When I copy the code from advanced searchpage into the list page I will get an error :
Error Type:

Runtimefout Microsoft VBScript (0x800A000D)

Types don't match: 'editformats'

/libs/smarty.asp, line 316
Page:

GET /Recruiters_list.asp?a=search&value=1&SearchFor=&SearchOption=Contains&SearchField=
Is there any simple solution?
regards,

Rob

R
Robvanlier author 12/13/2007

Okay,
Thanks for helping
To achieve; after build,change smarty.asp lines consisting mode=MODE_SEARCH into mode=MODE_LIST
Indeed quite simple

G
gnabi 12/14/2007

I was also trying to merge advanced search page to the list. I tried changing smarty.asp as suggested above. I do not see advanced search on the list page at all. Can you please explain all the changes that need to made to achieve this.
Thanks for your help! gnabi

K
kissmmx 12/16/2007

me too!
TKS

R
Robvanlier author 12/17/2007

I'll try to explain.
Go to visual editor, search page, source code

select the part between <form> and </FORM>{$linkdata} (including <form> and </form> ofcourse) and copy this (ctrl-C)
goto list page and delete the search you don't want. Put in some plain text to remember where you are like test

goto source page

what I did was just put in <div> before test and </div> after test and paste the data we just copied in between there. remove the plain text "test"
Build your pages.

Edit smarty.asp into :
function smarty_function_build_edit_control()

dim mode

dim fformat
if bec_mode="edit" then

mode=MODE_EDIT

elseif bec_mode="add" then

mode=MODE_ADD

elseif bec_mode="inline_edit" then

mode=MODE_INLINE_EDIT

elseif bec_mode="inline_add" then

mode=MODE_INLINE_ADD

else

mode=MODE_LIST

end if
fformat=GetEditFormat(bec_field,"")

if (mode=MODE_EDIT or mode=MODE_ADD or mode=MODE_INLINE_EDIT or mode=MODE_INLINE_ADD) and fformat=EDIT_FORMAT_READONLY then

response.Write readonlyfields(bec_field)

end if

if mode=MODE_SEARCH then

fformat=editformats(bec_field)

end if

BuildEditControl bec_field,CStr(dbvalue(bec_value)),fformat,mode,bec_second,bec_id

end function
I think it was just the line mode=MODE_SEARCH change to MODE_list
That is all. The only thing is that you have to change smarty.asp every time you build your pages.
Hope this was of help. let me know

R
Robvanlier author 12/17/2007

I'll tr