Click here to Skip to main content
15,899,126 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a custom widget script library used for search purpose,which will execute dynamically. My custom library contains codes for writing primary jQuery tags(like 1.7.2.js) and other html elements need for search purpose including some date picker controls. When call this custom script in third party web page, script tags will be written in page head element and load search panel.This works fine when calling the script in simple HTML and ASPX pages, but when call this script in a pages having more HTML content, script error raises.
Errors are: $.widget is not a function()... and $(...).datepicker() is not a fuction etc.The problem is with jquery.ui.1.10.2.js which loads next after jquery.1.2.min.js.

I just called this way:

ASP.NET
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Search.aspx.cs"     Inherits="Location.Search" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head  runat="server">  
    <script src="https://mycustomwidget.js"></script> //This script will load all basic sript tag includes jquery min,jqueryUI and css links
</head>
<body>
    <form id="form1"  runat="server">
     <label>Search here</label>
      <input type="text" class="customsearch"></input>       
    </form>
</body>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900