Google Answers Logo
View Question
 
Q: script for selecting interior link in the web-site using 'checkboxes' ( No Answer,   3 Comments )
Question  
Subject: script for selecting interior link in the web-site using 'checkboxes'
Category: Computers > Programming
Asked by: zaczac-ga
List Price: $50.00
Posted: 18 Sep 2005 12:54 PDT
Expires: 18 Oct 2005 12:54 PDT
Question ID: 569430
Could you please create for me a script to put in my web-site
(form-style) so my visitos can select which property

(accommodation) mutching their creteria, giving their selection by
'check boxes', then the results will be validatded by the

script and the property/ies mutching this will be shown with their
LINKS as well for example:

No.1 property have : 2 bedrooms, swimming pool, pool table, tennis table, Sat TV
No.2 property have : 3 bedrooms, swimming pool, pool table, tennis table, sat tv
No.3 property have : 3 bedrooms, swimming pool, pool table, tennis table
No.4 property have : 4 bedrooms, swimming pool, pool table
No.5 property have : 4 bedrooms, swimming pool


For the above example Please put in the form the following selection
(facilities) using 'CHECKBOXES'so the visitors may

select or deselect their choice: 2 bedrooms,3 bedrooms,4 bedrooms,
swimming pool, pool table, tennis table, sat TV

so when for example the visitors in my web-site (in the form) select:

a) 3 bedrooms,pool table, tennis table: Then the No.2 & No.3
properties (where only mutch this creteria) will be shown
b) 4 bedrooms: Then the No.4 & No.5 property will be shown
c) 4 bedrooms, pool table: Then only the No.4 property will be shown
d) swimming pool: all the properties will be shown
e) 4 bedrooms, tennis table: NO one propertiy will be show giving the
message "NO PROPERT FOUND" try again
f) sat tv: No.2 & No.3 properties will be shown


Other instructions where will be usfull: 

- The above keywords (facility) which each property have could be
placed (declared) in the same web-site (search-form

web-site) and have nothing to do with the "keywords" in the properties web-page
- A CGI script also is acceptable with full instruction (I have based
knowledge of programming and I know how to put the sgi

scrip in the cgi-pin)
- DEFINATRY the input of the selection need to be with "CHECKBOXES"
- DEFINADLY the results of the validation need to be CLICKABLE to go
to the PROPERT LINK (for the above example the link for

No.1 property could be: www.mydomain.com/no_1_property.htm
- For your information In my web-site I don't use "dynamic site"
- After sending me the script I may convert it to mutch in my real situation
- If that helps my site I will use this script is the: 
www.villaspaphoscyprus.com   , since I have many properties I would

like to give to my customers the oportunity to select easier and quick
the property mutching their creteria without writing

me emails to ask me for something they can find by teir selfs.

Clarification of Question by zaczac-ga on 21 Sep 2005 10:11 PDT
Dear Mr. Frederic,

Thank you for the scrip.

what I have done is:

As you told me I have created a site (sample.htm) and put in that the
whole scrip, this looks good but finally not working when I select
something in the checkboxes and press the submit. Do I need to do
anything else?

Because you told me that you'll create it in php and mysql but as I
see looks normal htm with java script (of course not problem for me,
better for me the html) if that can work finally anyway.

If you want to check it at: 
http://www.villaspaphoscyprus.com/sample.htm

Of course when it's working I will convert it to real data and real url


Pls advice

Regards
Zacharias Papadopoulos
Answer  
There is no answer at this time.

Comments  
Subject: Re: script for selecting interior link in the web-site using 'checkboxes'
From: samharnett-ga on 18 Sep 2005 15:02 PDT
 
I could write a script to do this for you in php with a mysql database
that will run on most web hosting services using apache server. Is
this acceptable?
Subject: Re: script for selecting interior link in the web-site using 'checkboxes'
From: zaczac-ga on 18 Sep 2005 19:56 PDT
 
My Server will run this (I know that runnig mysql),it's acceptable
assuming that you write me also the instructions how to make it
runnig.
Subject: Re: script for selecting interior link in the web-site using 'checkboxes'
From: fredericanand-ga on 21 Sep 2005 01:40 PDT
 
Hi

Please create the file sample.htm and add the following code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2800.1515" name=GENERATOR><SCRIPT
ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function submit_onclick() {

var twobed =document.FacilityForm.twobed;
var threebed =document.FacilityForm.threebed;
var fourbed =document.FacilityForm.fourbed;
var sp =document.FacilityForm.sp;
var pt =document.FacilityForm.pt;
var tt =document.FacilityForm.tt;
var st =document.FacilityForm.st;

if(twobed.status == false && threebed.status == false &&
fourbed.status == false && sp.status == false && tt.status == false &&
pt.status == false && st.status == false)
return;

var no_1_property = "<P><A
href=\"http:\\\\www.mydomain.com\\no_1_property.htm\"><FONT
face=\"Trebuchet MS\" size=2>2 bedrooms, swimming pool, pool table,
tennis table, Sat TV</FONT> </A><FONT face=\"Trebuchet MS\" size=2>
</FONT></P>";
var no_2_property = "<P><A
href=\"http:\\\\www.mydomain.com\\no_2_property.htm\"><FONT
face=\"Trebuchet MS\" size=2>3 bedrooms, swimming pool, pool table,
tennis table, sat tv</FONT> </A><FONT face=\"Trebuchet MS\" size=2>
</FONT></P>"
var no_3_property = "<P><A
href=\"http:\\\\www.mydomain.com\\no_3_property.htm\"><FONT
face=\"Trebuchet MS\" size=2>3 bedrooms, swimming pool, pool table,
tennis table</FONT> </A><FONT face=\"Trebuchet MS\" size=2>
</FONT></P>"
var no_4_property = "<P><A
href=\"http:\\\\www.mydomain.com\\no_4_property.htm\"><FONT
face=\"Trebuchet MS\" size=2>4 bedrooms, swimming pool, pool
table</FONT> </A><FONT face=\"Trebuchet MS\" size=2> </FONT></P>"
var no_5_property = "<P><A
href=\"http:\\\\www.mydomain.com\\no_5_property.htm\"><FONT
face=\"Trebuchet MS\" size=2>4 bedrooms, swimming pool</FONT>
</A><FONT face=\"Trebuchet MS\" size=2> </FONT></P>"

myWin= open("", "displayWindow", 
"resizable=yes,status=yes,toolbar=yes,menubar=yes,scrollbars=yes,location=yes",bReplace=true);

// open document for further output
myWin.document.open();

// create document
myWin.document.write("<html><head><title>Facilites");
myWin.document.write("</title></head><body>");

myWin.document.write("<FONT face=\"Trebuchet MS\" size=3>Please select
any of the following link</FONT>");

if(twobed.status == true) {
myWin.document.write(no_1_property.toString());
} else if(threebed.status == true) {
myWin.document.write(no_2_property.toString());
myWin.document.write(no_3_property.toString());
} else if(fourbed.status == true) {
myWin.document.write(no_4_property.toString());
myWin.document.write(no_5_property.toString());
} else if(st.status == true) {
myWin.document.write(no_1_property.toString());
myWin.document.write(no_2_property.toString());
} else if(tt.status == true) {
myWin.document.write(no_1_property.toString());
myWin.document.write(no_2_property.toString());
myWin.document.write(no_3_property.toString());
} else if(pt.status == true) {
myWin.document.write(no_1_property.toString());
myWin.document.write(no_2_property.toString());
myWin.document.write(no_3_property.toString());
myWin.document.write(no_4_property.toString());
} else if(sp.status == true) {
myWin.document.write(no_1_property.toString());
myWin.document.write(no_2_property.toString());
myWin.document.write(no_3_property.toString());
myWin.document.write(no_4_property.toString());
myWin.document.write(no_5_property.toString());
}

myWin.document.write("</body></html>");

// close the document - (not the window!)
myWin.document.close();  

//document.FacilityForm.reset().click;
}
//-->
</SCRIPT>
</HEAD>
<BODY bgColor=bisque>
<FORM action="" method=post name="FacilityForm">
<P><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</P>
<P><FONT face="Trebuchet MS" size=2>Please select the facilty: </FONT></P>
<P><FONT size=2 style ="FONT-FAMILY: Trebuchet MS" ><INPUT
type=checkbox id=twobed name=bedroom>2 bedroom<INPUT id=threebed
type=checkbox name=bedroom>3 bedroom<INPUT id=fourbed type=checkbox
name=bedroom>&nbsp;<FONT face="Trebuchet MS" size=2> 4 bedroom </FONT>
</FONT> </P>
<P><FONT style="FONT-FAMILY: Trebuchet MS" size=2><INPUT id=sp
type=checkbox>Swimming Pool</FONT></P>
<P><FONT face="Trebuchet MS" size=2><INPUT type=checkbox id=pt>Pool
Table</FONT></P>
<P><FONT face="Trebuchet MS" size=2><INPUT type=checkbox id=tt>Tennis
Table</FONT></P>
<P><FONT face="Trebuchet MS" size=2><INPUT type=checkbox id=st>Sat TV</FONT></P>
<P id=""><FONT face="Trebuchet MS" size=2>&nbsp; </FONT> <INPUT
type=button value=Submit id=submit LANGUAGE=javascript onclick="return
submit_onclick()" style="FONT-FAMILY: Trebuchet MS"><FONT
face="Trebuchet MS" size=2> </FONT> <INPUT id=reset type=reset
value=Reset style="FONT-FAMILY: Trebuchet MS"><FONT face="Trebuchet
MS"><FONT size=2><FONT> </FONT></FONT></FONT></FONT></P></FORM>
<P><FONT face="Trebuchet MS" size=2></FONT></P>
<P><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</P>
<P><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</P></BODY></HTML>


Regards
Frederic Anand

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy