|
|
Who knows anything about HTML forms?
|
|
|
|
Dedicated MacNNer
Join Date: Oct 2000
Location: UK
Status:
Offline
|
|
Quite a simple question I'm hoping...
I'm using Adobe GoLive to write a basic site (circa 35-40pgs). On the top of every page I've got a simple box/html form that's 35 characters long, with the intention being that a user need simply type in a search term into the box and off it goes to bring up the results.
To search at the moment I've got a seperate serarch page (/search.html) with a Java searching applet. To search using this you simply type in your search terms and hit enter - and it goes and does the rest - yadda yadda yadda.
Question - how do I set it such that when a user types a search term into the 35-character box (the one at the top of every page) and hits enter, the text that they typed is "copied and pasted" (if you get my drift) into the search.html page's Java applet?
All help *greatly* appreciated - because I know zip about HTML forms.
- Neil
|
I no longer have a signature.
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Jan 2001
Location: East of Belfast Furry Animal Sanctuary
Status:
Offline
|
|
look at the way the java on the search.html 'packages' the search request, then you should be able to copy that into the form, you got examples?
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Oct 2000
Location: UK
Status:
Offline
|
|
Thanks for the help.
You'll find the main search page here.
It's kind of difficult to examine the source file - it appears to be an intact applet - but again - I know zip :-)
- Neil
|
I no longer have a signature.
|
|
|
|
|
|
|
|
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status:
Offline
|
|
Hmmm, not an easy one this.
Basically, you're going to have to send the search term as a querystring to search.html.
If you have your form code like this:
[form action="search.html" method="get"]
[input type="text" name="search"]
[/form]
Now if you type "whatever" into the search box and press return, the results page will come up in this format:
search.html?search=whatever
That's the easy bit, however. Now, you would have to grab the "whatever" bit out of the querystring using Javascript.
Then you would have to give this to the Applet with a [param] tag.
So, if you've got the applet like this:
[applet code="Search.class" width=400 height="300"]
[/applet]
You would need a couple of extra bits:
[applet code="Search.class" width=400 height="300"]
[param name="searchterm" value="whatever"]
[param name="dosearch" value="true"]
[/applet]
And then you'd have to add some code to the applet to see the param bits, and if the param "dosearch=true", then do the search automatically.
Could you post the code for the search java applet and i'll take a look.
edit: since when did this forum allow you to insert html???
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Oct 2000
Location: UK
Status:
Offline
|
|
I'd love to post the code... but the applet is a freebie doodah in which I can't view the source. For obvious reasons the main file (which is a .class) opened in TextEdit appears in its raw form :-(
You can download the "app" here It's only a few kb in size.
If you could find a way around it I'd be jolly appreciative
Thanks -
Neil
(
Last edited by neilnet; Aug 11, 2003 at 12:06 PM.
)
|
I no longer have a signature.
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by neilnet:
I'd love to post the code... but the applet is a freebie doodah in which I can't view the source. For obvious reasons the main file (which is a .class) opened in TextEdit appears in its raw form :-(
You can download the "app" here It's only a few kb in size.
If you could find a way around it I'd be jolly appreciative
Thanks -
Neil
There are tools to "decompile" java back into source. Just look around for one.
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|