This topic is locked

View Default Options

9/21/2009 3:56:49 PM
ASPRunnerPro General questions
C
cdlamore author

This one has me stumped too..
In my add and edit pages I created a "more" button that is pointing to -
<INPUT style="WIDTH: 60px; HEIGHT: 18px"

class=button

onclick="window.location.href='http://atlas/perinatal/fetalcomplications_edit.asp?editid1='; + '{$key1}'"

value=&nbsp;More...&nbsp

type="button</TD">;
Then on the fetal complications pages I set the default value of the primary key to - Session(strTableName &"_masterkey1")

so that it would bring up the corresponding child record when the user clicked a button on the master record the redirected to the child record.
However, on the View pages you do not get the option to set the "default value" so how do you get it to go right to corresponding primary key in child record otherwise?
Master table - parinataldata

child table - fetalcomplications
Any ideas how I can make the same behavior happen in this scenario?

J
Jane 9/22/2009

Hi,
I recommend you to use custom event (Insert ASP code snippet option on the Visual Editor tab) for this purpose:

str = "<INPUT style=""WIDTH: 60px; HEIGHT: 18px"" class=button onclick=""window.location.href='http://atlas/perinatal/fetalcomplications_edit.asp?editid1="&; Session(strTableName &"_masterkey1") & "';"" value=""&nbsp;More...&nbsp"" type="button>"

Response.write str