By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,385 Members | 1,921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,385 IT Pros & Developers. It's quick & easy.

Javascript eval help need URGENTLY

P: n/a

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


Feb 2 '06 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Sorry asleep for got to eval the whole statement

Feb 2 '06 #2

P: n/a
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!!!')
comp.lang.javascript FAQ - & newsgroup weekly
Javascript Best Practices -
Feb 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.