Reply
How can a user-entered search string replace specified parts of a URL?
Old 11-13-2008, 06:37 PM How can a user-entered search string replace specified parts of a URL?
Junior Talker

Posts: 4
Trades: 0
First of all: Hi. I'm new to this forum and I hope it will prove mutually beneficial.

Second, what I'm looking for is to have a search bar on my site. When the user enters a string and clicks the Search button, a new window/tab opens with that string in the "from" section of the Google Maps URL.

Example 1:
User enters "Trenton NJ", clicks Search.
New window/tab opens here.

Example 2:
User enters "Hartford CT", clicks Search.
New window/tab opens here.

From what little I know (and I know very little), this would require a PHP script of some kind. However, I don't know where to begin and my Google searches turn up nothing. Direction or help on this would be much appreciated.

Thanks for your time.

-TM
TastyMonolith is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-13-2008, 06:42 PM Re: How can a user-entered search string replace specified parts of a URL?
chrishirst's Avatar
Super Moderator

Posts: 21,623
Location: Blackpool. UK
Trades: 0
It would need scripting at the receiving end, your HTML form just needs appropriately named fields and to use method="get" to send the values in the request URI.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-13-2008, 06:55 PM Re: How can a user-entered search string replace specified parts of a URL?
Junior Talker

Posts: 4
Trades: 0
Thanks for the reply, chrishirst.

I really don't know where to start. Do you have any ideas for what the script would need to be or look like? I'm using Dreamweaver CS3, if that helps.
TastyMonolith is offline
Reply With Quote
View Public Profile
 
Old 11-13-2008, 07:12 PM Re: How can a user-entered search string replace specified parts of a URL?
chrishirst's Avatar
Super Moderator

Posts: 21,623
Location: Blackpool. UK
Trades: 0
A form, two pre-populated hidden fields (f & daddr), a text box (saddr) and a button basically.

BUT
Using the Google Maps API would give you more options.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to How can a user-entered search string replace specified parts of a URL?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.12258 seconds with 13 queries