NavigateUrl and Javscript

M

Mike

Hi,

I am using the following script to open a popup window to display a calendar:

"javascript:frm=window.open('GrntCalendar.aspx?itemName=grd1__ctl3_txtOriginalDate&selectedDate=7/17/2004','Calendar','width=340px,height=305px,left='+((screen.width - 340) / 2)+',top='+ (screen.height - 305) / 2+'');"

The script correctly opens a popup window, but it also displays the original page (the one from which the script was run) with an "[object]" text only. Any idea what could be wrong with the javascript above?

Thanks
Mike
 
M

Martin Honnen

Mike said:
Hi,

I am using the following script to open a popup window to display a
calendar:

"javascript:frm=window.open('GrntCalendar.aspx?itemName=grd1__ctl3_txtOriginalDate&selectedDate=7/17/2004','Calendar','width=340px,height=305px,left='+((screen.width
- 340) / 2)+',top='+ (screen.height - 305) / 2+'');"

The script correctly opens a popup window, but it also displays the
original page (the one from which the script was run) with an "[object]"
text only. Any idea what could be wrong with the javascript above?

Nothing really, it does what you ask it to, if you add
void 0
after the last semicolon it is fixed.
However you might want to avoid the javascript: URL, see
http://jibbering.com/faq/#FAQ4_24
 

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,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top