Hi,
I want to make changes to AjaxSearch input and the way it is called. Like, want to call from the following CHUNK on the page and want to get search result on another page, as you can see in the chunk code:
Chunk Name is: Search
Code:
<form action="[~96~]" method="post">
<label>search: </label>
<input type="text" id="search" alt="search input" />
</form>
Code on Page id 96 is:
[!AjaxSearch? &ajaxSearch=`0` &AS_landing=`96`!]
When ever i enter value on CHUNK: Search and press enter the $_POST[’search’] value goes to page 96 but it doesn’t produce any search result. I don’t know how AjaxSearch coding has been coded but want to get result whenevr i post value through CHUNK: Search rather then using [!AjaxSearch!]. If i use [!AjaxSearch!] it works fine and produce result as it is using its own search FORM/INPUT field, but in my case i want to use my own FORM/INPUT as shown in CHUNK: Search.
Please help and ask if you need any further information about my senario.
Many Thanks
Sami
-
MODX Staff
- 12,272 Posts
Please refrain from double, triple or more posting the same message in the future.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
It worked using the following code:
<form action="index.php?id=96" method="post">
<label>search: </label>
<input id="ajaxSearch_input" name="search" value="Search here..." onfocus="this.value=(this.value==’Search here...’)? ’’ : this.value ;" type="text">
<input id="ajaxSearchsubmit" name="sub" value="Search!" type="submit">
</form>