Looking for help with creating a HTML snippet. I have the HTML, i think.

Associate
Joined
30 Dec 2003
Posts
1,641
Hi guys, My friend is wanting me to add a search function to his realtor site. He currently has this search feature online here.

http://www.roseandwomble.com/Agents/agent.aspx?id=2739

I was wondering if any one could make the search widget on the right into a HTML snippet? Is there any restrictions?

I would be using this HTML snippet on a website builder.

If this is not possible then let me know. I did manage to get the snippet partially on, yet it wont search as I believe this is due to the fact it is not on the same server/website.

If anyone has any questions or is able to help,

It would be amazing.

thanks,

Adam.
 
Associate
Joined
16 Jan 2008
Posts
2,350
I'm slightly confused. So you want people to be able to type in the search query from his site and for it to go to the results on the rose & womble site?

If so, use a form which has a "get" method to the following URL:

Code:
http://www.roseandwomble.com/ForSale/searchresults.aspx

The search fields you can use are:

Code:
?selectedCity
subdivision
pricelow
pricehigh
bedrooms
bathrooms
newonly

There's more but you can inspect those on the results page.
 
Associate
Joined
16 Mar 2013
Posts
396
If I understand it, you want a search form to search another site's database? You'll need to authorise access to that site's content. It's a huge security risk as well.
 
Associate
OP
Joined
30 Dec 2003
Posts
1,641
Basically I am creating a website for Nick Jones. He initially wanted a basic portfolio website for his clients to view. From the website I was going to link to rose and womble.

Yet I was just wondering if there was a way that I could somehow incorporate that search box into another website.

I did think there may be some search issues, but I was thinking if the search automatically took you to rose and womble then that would be great.

I understand this may not be possible, I was just exploring some options.

Thanks for the input.
 
Associate
Joined
16 Jan 2008
Posts
2,350
Yep, that's what I did. Check this out:

http://jsfiddle.net/KexPL/

The code is pretty easy:

Code:
<form name="input" action="http://www.roseandwomble.com/ForSale/searchresults.aspx" method="get">
City: <select name="selectedCity">
  <option value="SUFFOLK">Suffolk</option>
  <option value="HAMPTON">Hampton</option>
  <option value="NORFOLK">Norfolk</option>
</select>
<input type="submit" value="Submit">
</form>
 
Soldato
Joined
6 Mar 2008
Posts
10,079
Location
Stoke area
Code:
<form name="input" action="http://www.roseandwomble.com/ForSale/searchresults.aspx" method="get" [B]target="_blank"[/B]>
City: <select name="selectedCity">
  <option value="SUFFOLK">Suffolk</option>
  <option value="HAMPTON">Hampton</option>
  <option value="NORFOLK">Norfolk</option>
</select>
<input type="submit" value="Submit">
</form>

10 mins googling came up with this :)
 
Associate
OP
Joined
30 Dec 2003
Posts
1,641
Amazing guys thanks.

I am trying to add a price from / price to search option. Any one able to help, this is not me been lazy, I just generally suck at HTML :/

Thanks for your help all.
 
Soldato
Joined
6 Mar 2008
Posts
10,079
Location
Stoke area
Amazing guys thanks.

I am trying to add a price from / price to search option. Any one able to help, this is not me been lazy, I just generally suck at HTML :/

Thanks for your help all.

I think you'd need to add another text line but for the options that Cheechm posted above, so pricelow and pricehigh and add a value box to each.

Best guess from me and I'm about to head to work so i can't have a play with it :(

EDIT:

I think:

Code:
<form name="input" action="http://www.roseandwomble.com/ForSale/searchresults.aspx" method="get" target="_blank">
City: <select name="selectedCity">
  <option value="SUFFOLK">Suffolk</option>
  <option value="HAMPTON">Hampton</option>
  <option value="NORFOLK">Norfolk</option>
</select>
<br>
Min Price: <input type="text" name="pricelow" value=""><br>
Max Price: <input type="text" name="pricehigh" value=""><br>
<input type="submit" value="Submit">
</form>
 
Last edited:
Associate
OP
Joined
30 Dec 2003
Posts
1,641
Awesome! that works a treat. I am now trying to actually figure out how to change the style of the submit button, even though its not a massive thing. But thanks to all, you have helped allot.

:D
 
Associate
Joined
16 Jan 2008
Posts
2,350
Code:
// Normal button style
input[type="submit"] {

}

// Button style on hover
input[type="submit"]:hover {

}

// Button style while being clicked
input[type="submit"]:active {

}
 
Back
Top Bottom