NavigateURL and javascript


David C

I have an asp menu control that I want to have the navigation run a
javascript function that I have on the page. I have the bolow javascript
function and below that is the code line in the page behind to set it. When
I click on the MenuItem it displays a new page but the URL is my javascript
command. Can someone help? Thanks.


function openrental(srecordid) {
var surl = 'RentalInfo.aspx?rid=' + srecordid;
//give new window a name so we know where we came from when
closing task screen
void, "viadates",
return false;

Menu1.Items(0).NavigateUrl = "javascript:return openrental('" &
strRecordID & "')"

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question