Javascript eval help need URGENTLY

U

u1jd

Hi,

I am trying to do the following but i get an error, is there no way i
can use eval to print have it assigned to a predeterminded variable.

eval (object_name + "_CalCalendar") = new CalendarPopup(object_name);

Cannot assign to function result

Thanks
 
R

Randy Webb

u1jd said the following on 2/2/2006 4:44 AM:
Sorry asleep for got to eval the whole statement

Nah, what you forgot was that you don't need eval in that construct.

window[object_name + "_CalCalender"] = .....
alert('Look Ma! No eval!!!')
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top