NavigateURL and javascript

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 & "')"
 

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

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top