Problem with showing data in Web Page

Hi All

I am in the middle of developing a web application. My requirement is as given below.

I have a form that has some fields. The mail field is called employee name. When I enter the employee name and click submit, other fields should be filled in based upon the name given.

I am trying to get the data using an agent. I am giving the code I have written below

On ClicK

window.open(“http://”+loc+“/EmployeeDetails.nsf/Getvalue?OpenAgent”)

GetValue agent

Sub Initialize

On Error Goto errHandler

Dim session As New NotesSession

Dim doc As notesdocument

Dim newdoc As NotesDocument

Dim db As notesdatabase

Dim view As NotesView

Dim item As notesitem

Dim thisDoc As notesdocument

Dim ID As String

Set db=session.GetDatabase("","employeedata.nsf")

Set doc=session.DocumentContext

Set view=db.GetView("PeopleData")





nam$=doc.EmployeeName

Set newdoc=view.GetDocumentByKey(nam$)

If Not newdoc Is Nothing Then

	email=newdoc.InternetAddress(0)

	thisDoc.BussEmail=email

Else

	Print "No Document Found"

	Getvalue="Nothing"

End If



Call doc.save(True,True)



Print "<SCRIPT LANGUAGE=JavaScript>"

Print "window.open('/" & parse_path(db.FilePath) & doc.UniversalID & "?EditDocument','_self')"

Print "</SCRIPT>"	

errHandler:

Msgbox "Initialize Function in Agent Getvalue Error on line " + Cstr(Erl()) + " - "+Error$

Resume Next

End Sub

Function parse_path(orig_param As String)

Dim char As String

Dim retval As String

Dim i As Integer



retval = ""

For i = 1 To Len(orig_param)               

	char = Mid$(orig_param, i, 1)

	If char = "\" Then

		char = "/"

	End If

	retval = retval & char                     

Next i         

parse_path = retval

End Function

Whenever i try this I am getting a blank page.

Can anybody please help?

Thanks In advance

Ranjith

Subject: add view name

missing the view name, or /0/, after db.filepath

Print “window.open('/” & parse_path(db.FilePath) & doc.UniversalID & “?EditDocument’,‘_self’)”