Google Answers Logo
View Question
 
Q: Web Database in Frontpage ( Answered,   0 Comments )
Question  
Subject: Web Database in Frontpage
Category: Computers > Programming
Asked by: dol007ok-ga
List Price: $5.00
Posted: 30 Dec 2002 14:34 PST
Expires: 29 Jan 2003 14:34 PST
Question ID: 135138
I'm using Frontpage for this project. I'm not sure if this is doable
in Frontpage. There are 2 frames for my main page. Left frame consists
of
2 comboboxes 
	List of Divisions
	List of Month/Yr 
3 radio buttons 
	Report1
	Report2 
	Report3
2 push down buttons
	Get Report
	Reset

There are about 100 pdf files that will be displayed on the right
frame depending on what combinations the user selected on the left
frame.

Each pdf file name would be this format:
	Division_MMYY_Report1.pdf

Once the user selected the division, Month/Yr and report, how do you
program it to use the user criteria on the control to get the correct
file and present it on the right frame. I'm not really good at coding
so if the coding is simple enough please provide me the code.
Thank you.
Answer  
Subject: Re: Web Database in Frontpage
Answered By: mrbuzz-ga on 30 Dec 2002 19:58 PST
 
Hi dol007ok-ga,

You can accomplish this using JavaScript in your HTML code.  First,
you have to make sure that your main frame is named 'main'.  You can
find this out on your frame's page (usually index.htm) and look for
the '<frame name=' field.

Anyway, I've tested the following HTML in Frontpage.  The HTML below
should go into your left frame.  You'll have to modify your existing
options for Division and Dates to follow the examples below.

-----------------------------------------

<form name="pdfform">

<!-- webbot bot="HTMLMarkup" startspan -->
<script language="JavaScript">
<!--
function GetReport() {
	var selRadio;

	// get radio button selected
	for (i=0;i<document.pdfform.reptype.length;i++) {
		if (document.pdfform.reptype[i].checked == true) {
			selRadio = document.pdfform.reptype[i].value;
		}
	}

	parent.main.location.href=document.pdfform.division.options[document.pdfform.division.selectedIndex].value+'_'+document.pdfform.repdate.options[document.pdfform.repdate.selectedIndex].value+'_'+selRadio+'.pdf';

}
//-->
</script>
<!-- webbot bot="HTMLMarkup" endspan -->


<select name="division">
<option value="div1">Division 1 (Sales)</option>
<option value="div2">Division 2 (Marketing)</option>
</select><br>

<select name="repdate">
<option value="0100">January, 2000</option>
<option value="0200">February, 2000</option>
</select><br>

<input type="radio" name="reptype" value="Report1">Report 1<br>
<input type="radio" name="reptype" value="Report2">Report 2<br>
<input type="radio" name="reptype" value="Report3">Report 3<br>

<input type="button" value="Get Report"
onClick="javascript:GetReport();">

</form>

-----------------------------------------

Let me know through Request Clarification if you have problems
integrating this into your website.

Good luck,
mrbuzz-ga
Comments  
There are no comments at this time.

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