Hi

I am going to new page from current page on click of a button using function :

function gotonextpage()
{
window.location.href = "newurl";
}

I also want to call another function on load of new page to set its paragraphs. I am hiding or showing paragraphs based on a dropdown value selected in first page.

I dont want to do <body onload="func()"> in my second page. Is there any other alternative to this? Also, I have all my js code in separate file.

Thanks,
VC

Have you tried embedding the onload function in the gotonextpage() function?

Try this

function gotonextpage()
{
    window.location.href = "newurl";

    window.onload = function()
    {
       paragraph code setting here
    }
}