View Full Version : keeps returning to the same page, the index page

11-03-2006, 10:10 AM
Hi people,

when enter a search function like "dog" it returns to the index page,

ive put a javascript function to send the search criteria to a folder to display all the searches by no luck?

any ideas

website, www.area.co.uk

this one works when i use the search function



11-03-2006, 10:43 AM
you arnt defining a page after the submit

look at the url after submitting. You are only getting back the query string not the page that the querystring needs to execute

either the form does not have an action defined or the javascript function you are using is not working properly

11-03-2006, 10:52 AM
o, i didnt think the needs an action because of the javafunction i put on it.

headache alert!!

11-03-2006, 10:56 AM
you dont need an action and you can define this in JS

however i have just looked at your function. What are you searching in ?
a database? or the page?

11-03-2006, 11:44 AM
im searching into a database,

what should happen is when the user enters the key word, using the javascript function, the key word is then taken to "www.area.co.uk/web/a/"

which turn returns the resutls.

at the mo, only the index page on that url works, the one mentioned above.

i think its the javascript that isnt working

11-03-2006, 01:00 PM
are you using PHP

11-03-2006, 01:24 PM
Hi, i am using php,

im using php to create the categories below on the index page, at area.co.uk,
ie,Web Site Directory Site organised by subject.

the rest of the php resides in the index page at web/a/index.php, ( which seems to work )

im gradually creating that file to replace the index page on the home site

11-03-2006, 01:33 PM

if your wanting to append your query to a url using get then use the get method in the form tag

then set the action to the page that is performing the query and that should be all you need

personally i would use the post method