NavigateURL and javascript

  • Thread starter Thread starter David C
  • Start date Start date
D

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.

David

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 window.open(surl, "viadates",
"height=475,width=400,status=yes,toolbar=no,menubar=no,location=no");
return false;
}


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