Hi! I am a developer. I am using jquery to implement various functionalities. I am using jquery.js with jquery-1.2.6.min.js. It shows an error in the following code snippet:
(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init())
as object expected when I debug the web application.
I am a novice in this field. Any kind of help will be appreciated.

Recommended Answers

All 4 Replies

If you are really using both (jquery.js and jquery-1.2.6.min.js), remove one. (Latest version currently is 1.4.4)

If you are really using both (jquery.js and jquery-1.2.6.min.js), remove one. (Latest version currently is 1.4.4)

I need two files for separate purpose.
1. jquery-1.2.6.min.js is for virtual keyboard
2. jquery.js is for modal dialog.
They have different init() definitions and I need both the init definitions.
Please suggest something.

Show your code.

The issue is solved. I have two files had different init() definitions and it created a clash. So, I did the following:
I declared jquery.js as: <script type="text/javascript" src="URL"></script>

and

I declared jquery-1.2.6.min.js as:

$(document).ready(function(){
//Referencing JScript File
var js = document.createElement("jquery-1.2.6.min.js");
js.type = "text/javascript";
js.src = "URL";
document.body.appendChild(js);
});

If you reference a js file $(document).ready then it is accessible in that $(document).ready only. Thus removing the clash in definitions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.