3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1383 Views |
-
Page control/function for getting current directory?

24 November 2009 at 3:00pm Last edited: 24 November 2009 3:00pm
Hi,
I am customizing the $SearchForm.ss for my template. I need to get the current directory for calling up the action for the search form.As in...
<form id="SearchForm_SearchForm" action="/currentdirectory/SearchForm" method="get" enctype="application/x-www-form-urlencoded">Is there a page control for getting the current directory/page. If not, what would be the alternative (e.g., page controller function)?
Thanks,
Sam -
Re: Page control/function for getting current directory?

25 November 2009 at 11:20am Last edited: 25 November 2009 11:21am
Hi,
I should have looked at the sapphire SearchForm.ss template before posting.I got the search form working by using $FormAttibutes. The sapphire SearchForm template has some extra tags that I don't need (e.g., fieldset and legend).
So, I created a file SearchForm.ss with the following in the root of my template folder, which includes a bit of javascript to remove the "search" text when the search box is clicked on.
<form $FormAttributes >
<input type="text" name="Search" id="search" value="Search.." onfocus="if(this.value == 'Search..') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search..';}"/>
<input class="action" id="SearchForm_SearchForm_action_results" type="submit" name="action_results" value="GO" title="GO" />
</form>And used $SearchForm in my page.ss template to call it up.
Sam
| 1383 Views | ||
|
Page:
1
|
Go to Top |

