Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening new form based on id onclick of table

Status
Not open for further replies.

JSMITH242B

Programmer
Mar 7, 2003
352
GB
Hi guys!!
I've seen the examples but I can't seem to get this to work.
So far, I've been able to retrieve the data and show it in a 'table' format on my ASP page.

When the user clicks a record, I want to be able to open up a new form showing more information for this user.

function tblclick(l_persref)
{
document.frmperson.persref.value = l_persref ;
document.frmperson.action="kidframe.asp?persref=" & _persref
document.frmperson.submit();
}

<form name="frmperson" action="kidframe.asp" target="_top" method="post">
<input type="hidden" name="persref" value="">
</form>

snippet of code used to create table (shows where the code is used for the onclick event - persref which is the key)
strHTML = strHTML & "<tr class=""TblDetail"" "
strHTML = strHTML & " onclick=""tblclick(" & objRs("persref")
strHTML = strHTML & ")""> "
strHTML = strHTML & crlf


Any pointers much appreciated.
TIA
 
[tt]strHTML = strHTML & "<tr class=""TblDetail"" "
strHTML = strHTML & " onclick=""tblclick([red]'[/red]" & objRs("persref")
strHTML = strHTML & "[red]'[/red])""> "
strHTML = strHTML & [red]vb[/red]crlf
[/tt]
 
tsuji
The syntax I have is correct.
BillyRayPreachersSon I want the user to be directed to another form which displays more information based on the persref id.

I used: document.frmperson.action = "kidframe.asp?persref=" & l_persref

but my kidframe.asp page does not open when I click the record.
cheers
 
>tsuji
>The syntax I have is correct.
You tell the forum what is crlf, etc? But, it does not matter. Error is most often not from a single cause and we get by.
 
BillyRayPreachersSon
I need to pass in a parameter too...

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top