This works on IE4.0 and should work on Netscape and up.
<SCRIPT LANGUAGE="JavaScript">
<!--
if (self != top) top.location.href = document.location.href;
// -->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
var fields = ["vCard.FirstName","vCard.MiddleName","vCard.LastName","vCard.DisplayName","vCard.Email","vCard.Gender","vCard.JobTitle","vCard.Homepage","vCard.Notes","vCard.Office","vCard.Pager","vCard.Cellular","vCard.Company","vCard.Department","vCard.Home.City","vCard.Home.Country","vCard.Home.Fax","vCard.Home.Phone","vCard.Home.State","vCard.Home.StreetAddress","vCard.Home.Zipcode","vCard.Business.City","vCard.Business.Country","vCard.Business.Fax","vCard.Business.Phone","vCard.Business.State","vCard.Business.StreetAddress","vCard.Business.URL","vCard.Business.Zipcode"];
function fillForm()
{
// Init the profile
var profile = navigator.userProfile;
if (profile)
{
profile.clearRequest();
// Add the requests to the queue
for (i = 0; i < fields.length; i++)
{
profile.addReadRequest(fields[i]);
}
// Submit the queue
profile.doReadRequest(1,"BrowserSpy - Henrik Gemal");
// Fill out the form
for (i = 0; i < fields.length; i++)
{
if (profile.getAttribute(fields[i]) == "")
{
document.profile[fields[i]].value = "Blank or unable to get information...";
}
else
{
document.profile[fields[i]].value = profile.getAttribute(fields[i]);
}
}
profile.clearRequest();
}
else
{
for (i = 0; i < fields.length; i++)
{
document.profile[fields[i]].value = "Property not supported!";
}
}
}
// -->
</SCRIPT>
See also:
| file: /Techref/language/JAVA/script/profile.htm, 2KB, , updated: 2003/9/24 12:27, local time: 2012/2/9 20:23,
38.107.179.232:LOG IN |
| ©2012 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/language/JAVA/script/profile.htm"> language JAVA script profile</A> |
| Did you find what you needed? |
LCD Front Panel Set: $8.99!
- 2x16 LCD HD44780 controller - 4 push buttons - 3 LEDs - 2x12 header |
|
Ubicom SX18 thru SX52, PIC 16c5X compatibile, 50 to 75 MIPS microcontrollers! Now US customers can buy the Excellent SXDev from SXList.com for $150 + $15 import fee + s&h (~ $180 total+tax in CA) |
.