FrontPage
DRW Auto Jump Drop Down:
<select onchange=submit() NAME="bedrijfsnaam"
SIZE="1">
DRW Auto Jump Drop Down:
onchange="window.location.href=this.value;"
DRW Auto Jump Drop Down Specify Frame:
onchange="parent.frames["myframe"].location.href=this.value;".
Formatting Memo fields
This will reinsert the line breaks that appear in your text box but
get lost when displayed by the DRW
<%=replace(FP_FieldVal(fp_rs,"Product"),chr(10),"
<br>")%>
Formatting Dates
Different date time formats can be achieved using the values 1,2,3,4
<%=FormatDateTime(FP_FieldVal(fp_rs,"TimeField"),2)%>
Formatting Currency
<%=FormatCurrency(FP_FieldVal(fp_rs,"CurrencyField"),2)%>
Formatting Numbers
<%=FormatNumber(FP_FieldVal(fp_rs,"NumberField"),2)%>
For specific formatting options, check
the Microsoft documentation above
How to create a
JavaScript Jump Menu using a Dropdown list generated
from an Access Database
This article assumes
that you have already imported your database into
your web, and that FrontPage has created the fpdb
folder, put the database in that folder, and created
the global.asa file, the _fpclass folder, and the
database connection. Please review
How to create a FrontPage Database Connection
for more information.
For this tutorial, we
will use a fictitious database with one table,
called “websites”, with two fields, website_name and
website_url.
Create a new page and
save it as dropdown.asp.
On the Insert menu,
point to Form, and select Form.
Delete the Reset
button.
Position your cursor
within the form, to the left of the Submit button.
On the Insert menu,
point to Database, and select websites.
In step 1 of the
wizard, select your database connection. Click Next.
In step 2 of the
wizard, select your record source. Click Next.
In step 3 of the
wizard, select Edit List and remove all of the
fields, except website_name, the field you want to
show in the dropdown list and website_url, the URL
you want the user to jump to (note: the URL must be
in
http://www.example.com format). Click Next.
In Step 4, choose
Dropdown List – one record per item. Display values
from the field you are displaying (website_name),
Submit values from the field containing the URL (website_url)
. Click Next. Click Finish.
Switch to Code View,
find this statement:
<select NAME="
website_url " SIZE="1">
and add
id="setit"
so the statement
looks like this:
<select NAME="
website_url " id="setit" SIZE="1">
While still in Code
View, find this statement:
<input type="submit"
value="Submit" name="B1">
Change the value from
“Submit” to “Go” (this is the text that gets
displayed on the button)
and add
onclick="window.open(setit.options[setit.selectedIndex].value)"
So the statement
looks like this:
<input type="submit"
value="Go" onclick="window.open(setit.options[setit.selectedIndex].value)"
name="B1">
Save the page while
you are still in Code View and preview in browser.
|
Create A
dropdown within a DRW
<%
myDSN ="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & Server.Mappath("/fpdb/mydatabase.mdb")
FUNCTION
dropDownMenu(tableName,dbFieldName,formFieldName,sortBy,selectItem)
ddSQL = "SELECT " & dbFieldName & " FROM " &
tableName & " ORDER BY " & dbFieldName & " ASC"
set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN
set rstemp=conntemp.execute(ddSQL)
IF rstemp.eof THEN
response.write "No records matched so cannot make
menu."
Call CloseAll
ELSE
menuArray=rstemp.getrows
Call CloseAll
Response.write("<select size='1' name='" &
formFieldName & "'>" & VbCrLf)
FOR m = 0 TO ubound(menuArray,2)
Response.write("<option")
IF menuArray(0,m) = selectItem THEN
Response.write(" selected")
END IF
Response.write(">" & menuArray(0,m) & "</option>" &
VbCrLf)
NEXT
Response.write("</select>" & VbCrLf)
END IF
END FUNCTION
SUB CloseAll
'rstemp.close
'set rstemp=nothing
'conntemp.close
'set conntemp=nothing
END SUB
%>
(substitute your database name in the "myDSN =
blah,blah" line.)
Put that code at the top of the page in HTML view.
Now with that code, you should be able to use it
*inside* the
DRW calling it like so:
<%call
dropDownMenu("myTableWithDropDownValues","FieldIWantTheValuesToComeFrom","TheNameOfTheDropdown","TheFieldToSortBy
",FP_FieldVal(fp_rs,"TheDRWFieldValueIWantPreSelected"))%>
Substitute that line where you'd normally use just
the value. This must all be done on a dieted DRW.
|
|
DISABLE RIGHT CLICK
<script language="Javascript1.2">
am = "Right Click is Disabled!";
bV = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"
function nrc(e) {
if (bNS && e.which > 1){
alert(am)
return false
} else if (bIE && (event.button >1)) {
alert(am)
return false;
}
}
document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;
</script>
Command Line Switches
Usage: owsadm.exe [-help]
[-operation <install | upgrade | create | merge
| uninstall | fulluninstall | check
| setDirExec | setDirNoExec
| delete | rename | databaseconnection
| enable | disable | recalc
| putfile | recalcfile | setadminport | roles
| anonrole | roleusers | rolerights | users
| setproperty | getproperty | deleteproperty
| usage | backupdb | restoredb | accountlimits]
[-port <nnnn>]
[-web <web name>]
[-multihost <hostname or IP address>]
[-username <username>]
[-password <password>]
[-ipaddress <IP address>]
[-destination <destination Url>]
[-filename <file name>]
[-propertyname <name of property>]
[-propertyvalue <new value of property>]
[-name <name of role>]
[-command <command to execute>]
[-databaseserver <database server>]
[-databasename <name of database>]
[-databaseuser <user of database>]
[-databasepassword <password of database user>]
[-siteprovision <onet | onethp | collab | publish>]
[-access <remove | administrators | authors | users>]
Short form of each option is the first
letter, except for
-pw for -password, -pn for -propertyname, -pv
for
-propertyvalue, -cr for cloneright, -cu for
cloneusers,
-ds for -databaseserver, -dn for -databasename,
-du for -databaseuser, -dp for -databasepassword,
-sp for -siteprovision
SMTP mail server settings</B>
owsadm -o setproperty -p <port> -pn SMTPHost -pv smarthost
Additionally, you can set subscriptions properties with the following:
owsadm -o setproperty -p /lm/w3svc/1 -pn MailReplyTo -pv
webmaster@owslab1.com
owsadm -o setproperty -p /lm/w3svc/1 -pn MailSender -pv
robot@owslab11.gov
examples:
owsadm.exe -o merge -p 80 -w webname
|