Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8560311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:14:52+00:00 2026-06-11T16:14:52+00:00

So I was trying to follow along multiple examples and I can’t get it

  • 0

So I was trying to follow along multiple examples and I can’t get it to work. I tried it in JSFiddle, and my own browser and nothing is working! I am trying to do an autocomplete field for drugs available from different websited.

  <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.js"></script>

<script>
$(document).ready(function(){
    var drugs = ["Acepromazine (PromAce, Aceproject)", "Acetaminophen (Tylenol)",
        "Acetazolamide (Diamox, Dazamide)", "Acetylcysteine (Mucomyst)", 
        "Acetylsalicylic Acid (Aspirin)", 
        "Activated Charcoal (Toxiban, Liqui-Char, UAA Gel)", "Acyclovir (Zovirax)",
        "Albuterol (Proventil, Volmax, Ventolin)", "Allopurinol (Zyloprim)",
        "Alprazolam (Xanax)", "Amikacin (Amiglyde-V)", "Aminopentamide (Centrine)",
"Aminophylline",
"Amitraz (Mitaban, Preventic)",
"Amitriptyline HCl (Elavil)",
"Amlodipine Besylate (Norvasc)",
"Amoxicillin",
"Amoxicillin and Clavulanate (Clavamox)",
"Amphetamines",
"Amphotericin B",
"Ampicillin (Polyflex)",
"Antibiotic with Steroid Eye Medication",
"Apomorphine",
"Bismuth Subsalicylate (Pepto-Bismol)",
"Brinzolamide (Azopt)",
"Bromides",
"Buprenorphine (Buprenex)",
"Burow's Solution",
"Buspirone HCl (BuSpar)",
"Butorphanol Tartrate (Torbugesic, Torbutrol)",
"Calcitonin",
"Calcitriol (Vitamin D)",
"Calcium Gluconate",
"CAPSTAR (Nitenpyram)",
"Captopril (Capoten)",
"Carbamazepine (Tegretol)",
"Carboplatin (Paraplatin)",
"Carnitine (Carnitor)",
"Carprofen (Rimadyl)",
"Cefadroxil (Cefa-Tabs and Cefa-Drops)",
"Cefazolin (Kefzol, Ancef)",
"Cefixime (Suprax)",
"Cefotaxime (Claforan)",
"Cefotixin (Mefoxin)",
"Cefpodoxime Proxetil (Simplicef)",
"Ceftriaxone (Rocephin)",
"Cephalexin (Keflex)",
"Cephalothin",
"Chlorambucil (Leukeran)",
"Chloramphenicol (Chloromycetin)",
"Chlorhexidine",
"Chlorpheniramine Maleate (Chlor-Trimeton)",
"Chlorpromazine (Thorazine)",
"Cimetidine HCl (Tagamet)",
"Ciprofloxacin (Cipro, Ciloxan)",
"Cisplatin (Platinol-AQ)",
"Colchicine",
"Cyclophosphamide (Cytoxan, Neosar)",
"Cyclosporine (Atopica, Optimmune)",
"Cyclosporine Ophthalmic (Optimmune)",
"Cytarabine",
"Deracoxib (Deramaxx)",
"Derm Caps",
"Desmopressin (DDAVP)",
"Desoxycorticosterone (Percorten-V)",
"Dexamethasone"];
$("#drug_name_1").autocomplete({source:drugs});
});
</script>

<script type="text/javascript">

function addTreatment(){
}

function removeTreatment(){
}
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <input type="button" name="increase" id="increase" value="Increase Drug Treatments" onclick="addTreatment()"/>
  <input type="button" name="decrease" id="decrease" value="Decrease Drug Treatments" onclick="removeTreatment()"/>
</form>
<form id="add_drugs" name="add_drugs" method="post" action="">
    <table width="100%" border="1" name="drug_treatment_table" id="drug_treatment_table">
          <tr>
            <th width="3%" scope="col">#</th>
            <th width="14%" scope="col">Drug</th>
            <th width="32%" scope="col">Special Directions </th>
            <th width="18%" scope="col">Quantity</th>
            <th width="12%" scope="col">How Often</th>
            <th width="8%" scope="col">Starting</th>
            <th width="13%" scope="col">Finishing</th>
          </tr>
          <tr>
            <td>1</td>
            <td>
            <input type="text" name="drug_name_1" id="drug_name_1" /></td>
            </tr>
         </table>
    </form>
    </body>
    </html>

I don’t see why it won’t work. Any ideas?

thanks!
Jon

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:14:53+00:00Added an answer on June 11, 2026 at 4:14 pm

    Look’s like it’s because of these two script files..

    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
          <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.js"></script>
    

    HTML does not understand script closing tags.. It should be self closing ..

    Try this

    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js" />
          <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.js" />
    

    Also

    <script  type="text/javascript">
         $(document).ready(function(){
    

    Check FIDDLE .. Its Working fine when you omit the script files..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to follow along with Railscasts #235 (Omniauth in a rails app). Having
I am using Xcode 4.3.2 and trying to follow along with the Learn Objective-C
Im trying to follow a tutorial that is using SBJsonParser to get twitter feeds,
I'm trying to follow along with Paul Sheriff's e-book Fundamentals of N-tier which is
I'm trying to follow along this tutorial to enable remote access to MySQL. The
I'm trying to follow along with http://mongotips.com/b/array-keys-allow-for-modeling-simplicity/ I have a Story document and a
I'm trying to follow along with http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options In an effort to do ./node_modules/.bin/mocha --reporter
I'm trying to follow along the demo source code for the Draggable jQuery method,
I'm trying to follow along with a tutorial. In the tutorial, the instructor shows
I'm trying to follow along with a book on Amazon EC2 and it says

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.