what is worng with this JScript

C

Craig G

i havent a clue about javascript, i found a small snippet for launching a
datetimepicker, ive used the following to successfully open a small dialog
window for a calender. i want to do something similar for postcodes

this is the calender code and it works fine

var popUp;

function OpenCalendar(idname, postBack)
{
popUp = window.open('frmCalender.aspx?formname=' + document.forms[0].name +
'&id=' + idname + '&selected=' + document.forms[0].elements[idname].value +
'&postBack=' + postBack, 'popupcal',
'width=175,height=248,left=200,top=250');
}


so i just *adapted* it to launch the postcode form. but it keeps on falling
over with an error on page when i click the link and wont open the dialog

function OpenPostCode(idname, postBack)
{
popUp = window.open('frmPostCode.aspx?formname=' + document.forms[0].name +
'&id=' + idname + '&selected=' + document.forms[0].elements[idname].value +
'&postBack=' + postBack, 'popupPC',
'width=175,height=248,left=200,top=250');
}

any idea's as to why this would be happening?

Cheers,
Craig
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top