Forstly an apology for being such an appalling newbie, but I have a website I would like to tart up a bit with colorbox.
Essentially the web page uses input boxes and external php scripts to search a mysql database, and I have no clue how to direct the search results into a centred colorbox.
Here is the code for one of the search options, it calls a plain vanilla php script which does the query and formats the output via html commands. Nothing ver complicated:
And yes, Cambridge is nice but expensive! I used to live in London and the difference price-wise is not big at all, but the pace of life, the lack of noise and the sheer number of people everywhere are a lot better. Plus it’s nice to be able to get pretty much anywhere by bike in about 15 minutes.
Ahh yes, I remember it all well, there’s a certain air of academia about the place, hardly surprising of course…
As to the code, I put the js function in the header section and still can’t get a result. I must be an awful prat. Education will out and I think I just don’t have the programming expertise.
And yes, Cambridge is nice but expensive! I used to live in London and the difference price-wise is not big at all, but the pace of life, the lack of noise and the sheer number of people everywhere are a lot better. Plus it’s nice to be able to get pretty much anywhere by bike in about 15 minutes.
It’s probably because I’ve been a prat - the submit event happens on the form, not the submit button. So the jQuery selector before .submit() needs to be changed. Change it to this:
Thanks for the suggestions, I took them all. Where would I put the code you suggested above? Somewhere in the input code I gave? Help appreciated.
BTW, I see you are in Cambridge, loverly spot, I worked for a year at Addenbrooke’s a few years ago - love to able to afford to live there permanently…
BTW, searches normally use GET rather than POST. This can be useful so that users can edit the search string in the address bar. It also doesn’t involve sensitive information, so GET is OK. Also, you don’t need to have a name attribute for the FORM element, especially since one of the INPUTs already has that name.