Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we assign an object in Java Script??

For Example:-
-----------
If i create an object "obj1"
var obj1 = Object();
obj1.name = "hari";

and if i want to assign it to two objects "obj2" and "obj3"
with different names...

obj1.name = "gopi"
obj2 = new Object(obj1);

obj1.name = "raghu"
obj3 = new Object(obj1)

Now ob2.name become to "raghu" from "gopi". WHY?
how to solve the above problem?

Answer Posted / rajesh

I maynot give the exact reason..but root cause may be
because of...

As you know the javascript is just parsed from top to
bottom. It won;t execute as long as you run the app.
While parsing it just holds the reference and checks for
syntactical errors.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats with the -alpha in the install instructions?

931


What is the difference between synchronous postback and asynchronous postback? : asp.net ajax

1097


What are limitations of ajax?

956


How do I handle concurrent ajax requests?

1000


Explain fetch api in javascript?

1026


How does an ajax call work?

988


How ajax work ?

905


Does ajax have the same meaning as xmlhttprequest?

997


What are the differences between ajax and javascript?

949


How can javascript be debugged?

948


Will html_ajax integrate with other javascript ajax libraries such as scriptaculous? How would this integration look like?

958


Explain the need of the timer control in ajax? : asp.net ajax

969


What is asp.net ajax? : asp.net ajax

986


Is it possible to set session variables from javascript?

962


What are the new features included in the microsoft ajax library? : asp.net ajax

992