SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Search form help

    Hello,

    I wasn't too sure where to put this one so if this isn't in the right place by all means please move it.

    I've been working on a site redesign for a real estate agent, they have a search for properties for sale which you can view here - www.steveway.com.au (click on Sales and then you'll see it). The redesign is on my website here - http://dbelldesign.com.au/sway/sales.html

    I can't get the search function working at all and was wondering if anyone can provide assistance to help me out with this? I'm attempted to copy the code but still the search doesn't work. I also thought maybe some files were missing from my server, but as far as I can tell when I check the other server there's nothing missing.

    Please help me.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,165
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    The original site is pulling that form from realestateview.com.au via iframes. There's a lot more to a search form than HTML code. You could probably just copy that iframe code from the original site, I suspect.

  3. #3
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    The original site is pulling that form from realestateview.com.au via iframes. There's a lot more to a search form than HTML code. You could probably just copy that iframe code from the original site, I suspect.
    I noticed it was, but couldn't figure out how to use it in a page. Which code are you referring to? This?

    view-source:http://www.realestateview.com.au/cgi...n=S&tp=dev/117

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,165
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Yes, I think it would be pasted into the page something like this:

    Code:
    <script language='javascript'>
    if (screen.width > 800) {document.write("<iframe NAME='iframe1' SRC='http://www.realestateview.com.au/cgi-bin/search.pl?GID=117&Con=S&tp=dev/117' scrolling='no' marginwidth='0' frameborder='NO' border='0' framespacing='0' marginheight='0' ALIGN='top' width='800' height='300'></iframe>");}
    </script>
    but I don't know anything about iframes really. I've never used them.

  5. #5
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm neither have I. Hopefully someone else can shed some light, thanks for the help so far

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,165
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Did you try that code I pasted above? It works for me.

  7. #7
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Did you try that code I pasted above? It works for me.
    Not yet no, I'm having trouble understanding where to place this code, basically when pressing the search button where would that code come into play?

    The source at the moment is
    view-source:http://dbelldesign.com.au/sway/sales.html

    Would I replace all the other code in the page with that?

  8. #8
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,165
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by AirFor View Post
    Would I replace all the other code in the page with that?
    No, just place that code I posted where you want the form to appear in your page, something like so (see in red)

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      <title></title>
      <meta name="keywords" content="" />
      <meta name="description" content="" />
      <meta name="Revisit-After" content="7 days" />
      <meta name="robots" content="all,index" />
    <link rel="stylesheet" href="normal.css" type="text/css" media="screen" />
    
    
    <!--[if IE]>
    	<link rel="stylesheet" type="text/css" href="ieonly.css" />
    <![endif]-->
    <link rel="shortcut icon" href="images/favicon.ico" />
    <!--favicon-->
    <script language="JavaScript1.2">
    
    <!--
    
    
    
    function startSearch(quick) {
    
    
    
    var d = document.sForm
    
    var d2 = document.sForm2
    
    var i
    
    var temp			// Boolean for a region selected
    
    
    
    	if (d.PropertyID.value != '') {
    
    		d2.OID.value=d.PropertyID.value;
    
    		d2.submit()
    
    	}
    
         if(d.Suburb.options[0].selected) {
    
    		d.Sub.value=""
    
    	  }
    
    	  else
    
    	  {
    
    		temp="";
    
    		for (i=1; i<=(d.Suburb.length-1); i++) {
    
      			if(d.Suburb.options[i].selected) {
    
    					temp=d.Sub.value;
    
    					if (temp!="") {d.Sub.value=d.Suburb.options[i].text+" , "+temp}
    
    					else {d.Sub.value=d.Suburb.options[i].text}
    
    			}
    
    		}
    
    	  }
    
    	  d.GID.value=117;
    
    	  d.CID.value=0;
    
    	  d.submit();
    
    	return true;
    
    }
    
    
    
    function checkSuburb() {
    
    var d = document.sForm
    
    var i
    
    	if(d.Suburb.options[0].selected) {
    
    		for (i=1; i<=(d.Suburb.length-1); i++) {
    
    			d.Suburb.options[i].selected = false
    
    		}
    
    		d.Suburb.options[0].selected = true;
    
    	}
    
    }
    
    
    
    // -->
    
    </SCRIPT>
    
    </head>
    <body>
      <div id="wrapper">
        <div id="banner">Steveway Real Estate</div>
    	 <!--end of banner-->
    
        <div id="sidebar">
    	<ul class="sidenav">
    	<li>
    		<a href="index.html">Home
    		<span>The Steveway Real Estate home page, for the latest news. </span>
    		</a>
    	</li>
    	<li>
    		<a href="aboutus.html">About Us
    		<span>Our history and company profile. </span>
    
    		</a>
    	</li>
    	<li>
    		<a href="services.html">Our Services
    		<span>The services provided by Steveway Real Estate, commercial and residential sales, leasing and property management. </span>
    		</a>
    	</li>
    	<li>
    		<a href="sales.html">Sales
    		<span>Current and recent sales by Steveway Real Estate. </span>
    
    		</a>
    	</li>
    	<li>
    		<a href="rentals.html">Rentals
    		<span>Rental properties available for lease. </span>
    		</a>
    	</li>
    	<li>
    		<a href="appraisal.html">Free Appraisal
    		<span>Free market rental or sales appraisal request for your property. </span>
    
    		</a>
    	</li>
    	<li>
    		<a href="tenantinfo.html">Tenant Information
    		<span>Information for tenants such as application forms, maintenance and vacating requests. </span>
    		</a>
    	</li>
    	<li>
    		<a href="contactus.html">Contact Us
    		<span>How to get in touch with us. </span>
    
    		</a>
    	</li>
    	<li>
    		<a href="links.html">Links
    		<span>Links to website of interest. </span>
    		</a>
    	</li>
        </ul>
    	</div>
    
    	<!--end of sidebar-->
    	<div id="content">
    	<center>
    
    <script language='javascript'>
    if (screen.width > 800) {document.write("<iframe NAME='iframe1' SRC='http://www.realestateview.com.au/cgi-bin/search.pl?GID=117&Con=S&tp=dev/117' scrolling='no' marginwidth='0' frameborder='NO' border='0' framespacing='0' marginheight='0' ALIGN='top' width='800' height='300'></iframe>");}
    </script>
    
    
    </center>
    
    
    
    </span>
    
    
    	</div>
    	<!--end of content-->
        <div id="footer">
    	<p>235B Church Street, Richmond, Victoria 3121 Tel: (03) 9429 4883 Fax: (03) 9428 6779 Email: admin@steveway.com.au <br />
    	
    	&copy; Steveway Real Estate 2010, All Rights Reserved. Web Design by <a href="www.dbelldesign.com.au/">dbelldesign</a></p>
    
    	</div>
      <!--end of footer-->
      </div>
      <!--end of wrapper-->
    </body>

  9. #9
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    No, just place that code I posted where you want the form to appear in your page, something like so (see in red)

    *code*
    Thanks, it seems to work just by replacing all the code with this code:

    Code:
    <script language='javascript'>
    if (screen.width > 800) {document.write("<iframe NAME='iframe1' SRC='http://www.realestateview.com.au/cgi-bin/search.pl?GID=117&Con=S&tp=dev/117' scrolling='no' marginwidth='0' frameborder='NO' border='0' framespacing='0' marginheight='0' ALIGN='top' width='800' height='300'></iframe>");}
    </script>
    which looks like this overall (slightly modified)

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
    <head> 
      <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
      <title></title> 
      <meta name="keywords" content="" /> 
      <meta name="description" content="" /> 
      <meta name="Revisit-After" content="7 days" /> 
      <meta name="robots" content="all,index" /> 
    <link rel="stylesheet" href="normal.css" type="text/css" media="screen" /> 
     
     
    <!--[if IE]>
    	<link rel="stylesheet" type="text/css" href="ieonly.css" />
    <![endif]--> 
    <link rel="shortcut icon" href="images/favicon.ico" /> 
    <!--favicon--> 
     
    </head> 
    <body> 
      <div id="wrapper"> 
        <div id="banner">Steveway Real Estate</div> 
    	 <!--end of banner--> 
        <div id="sidebar"> 
    	<ul class="sidenav"> 
    	<li> 
    		<a href="index.html">Home
    		<span>The Steveway Real Estate home page, for the latest news. </span> 
    		</a> 
    	</li> 
    	<li> 
    		<a href="aboutus.html">About Us
    		<span>Our history and company profile. </span> 
    		</a> 
    	</li> 
    	<li> 
    		<a href="services.html">Our Services
    		<span>The services provided by Steveway Real Estate, commercial and residential sales, leasing and property management. </span> 
    		</a> 
    	</li> 
    	<li> 
    		<a href="sales.html">Sales
    		<span>Current and recent sales by Steveway Real Estate. </span> 
    		</a> 
    	</li> 
    	<li> 
    		<a href="rentals.html">Rentals
    		<span>Rental properties available for lease. </span> 
    		</a> 
    	</li> 
    	<li> 
    		<a href="appraisal.html">Free Appraisal
    		<span>Free market rental or sales appraisal request for your property. </span> 
    		</a> 
    	</li> 
    	<li> 
    		<a href="tenantinfo.html">Tenant Information
    		<span>Information for tenants such as application forms, maintenance and vacating requests. </span> 
    		</a> 
    	</li> 
    	<li> 
    		<a href="contactus.html">Contact Us
    		<span>How to get in touch with us. </span> 
    		</a> 
    	</li> 
    	<li> 
    		<a href="links.html">Links
    		<span>Links to website of interest. </span> 
    		</a> 
    	</li> 
        </ul> 
    	</div> 
    	<!--end of sidebar--> 
    	<div id="content"> 
    	<center> 
     
     
     
    <script language='javascript'> 
    if (screen.width > 800) {document.write("<iframe NAME='iframe1' SRC='http://www.realestateview.com.au/cgi-bin/search.pl?GID=117&Con=S&tp=dev/117' scrolling='no' marginwidth='0' frameborder='NO' border='0' framespacing='0' marginheight='0' ALIGN='top' width='100%' height='100%'></iframe>");}
    </script> 
     
     
    	</div> 
    	<!--end of content--> 
        <div id="footer"> 
    	<p>235B Church Street, Richmond, Victoria 3121 Tel: (03) 9429 4883 Fax: (03) 9428 6779 Email: admin@steveway.com.au <br /> 
    	
    	&copy; Steveway Real Estate 2010, All Rights Reserved. Web Design by <a href="www.dbelldesign.com.au/">dbelldesign</a></p> 
    	</div> 
      <!--end of footer--> 
      </div> 
      <!--end of wrapper--> 
    </body> 
    </html>
    Not sure if it makes a difference, the only thing missing is an internal scroll bar for the frame.

  10. #10
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,165
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    I don't think you can alter the code inside the iframe as such, as it comes from another site. I don't know why you'd need a scroll bar though.

    It seems setting height to 100% on the iframe doesn't work too well. I'd suggest a fixed height, like 300px.

    Also, there's a <center> tag just above the code that ought to go.

  11. #11
    SitePoint Zealot AirFor's Avatar
    Join Date
    Oct 2010
    Location
    Berrigan, NSW, Australia
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    I don't think you can alter the code inside the iframe as such, as it comes from another site. I don't know why you'd need a scroll bar though.

    It seems setting height to 100% on the iframe doesn't work too well. I'd suggest a fixed height, like 300px.

    Also, there's a <center> tag just above the code that ought to go.
    Ah right, well if you hit search now, it displays the results from the search within the iframe, looking at it here http://dbelldesign.com.au/sway/sales.html it looks rather odd, hence I changed the height to make it look a bit better in relation to the page. You'll notice from the search results it can scroll too, that's why I talked about the scroll bar.

    Edit: My guess is now I need to work around getting this frame to fit in the window to work correctly. I have no idea how I'm going to do this though. Maybe I'll have to edit the max-width of the site.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •