all the little red x's–how do I properly paste in the JavaScript
-
Greetings, I tried pasting this JavaScript into a new block in your plugin:
<script language="javascript" type="text/javascript"> function goToNewPage(dropdownlist) { var url = dropdownlist.options [dropdownlist.selectedIndex ].value; if (url != "") { window.open(url); } } </script>
Saving it, and then testing my drop down app:
<form name="dropdown"> <label>Article & Research Databases</label> <select name="list"> <option selected>Please select one</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://search.proquest.com/abicomplete?accountid=7093">ABI/Inform Business </option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://infotrac.galegroup.com/itweb/txshracd2575?db=AONE">Academic One File</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://search.ebscohost.com/login.aspx?authtype=ip,uid&profile=ehost&defaultdb=a9h">American Search Complete</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://www.accessscience.com/">Access Science</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://infoweb.newsbank.com/">Access World News</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://dl.acm.org/">ACM Digital Library</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://search.proquest.com/biologyjournals?accountid=7093">Biology Journals (ProQuest)</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://bsc.chadwyck.com/">Black Studies Center</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://infotrac.galegroup.com/itweb/txshracd2575?db=PPCM">Communication and Mass Media Collection</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://literati.credoreference.com/">Credo Reference</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://infotrac.galegroup.com/itweb/txshracd2575?db=PPCJ">Criminal Justice Center</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://infotrac.galegroup.com/itweb/txshracd2575?db=DNOW">Demographics Now-Library Edition</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://search.proquest.com/pqdtglobal?accountid=7093">Dissertations and Theses</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://search.ebscohost.com/login.aspx?authtype=ip,uid&profile=ehost&defaultdb=ehh">Education Research Complete</option> <option value="https://infotrac.galegroup.com/itweb/tsla_artemis?id=trial&db=GLS">Gale Artemis Literary Sources</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://www.jstor.org/">JSTOR</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://www.lexisnexis.com/hottopics/lnacademic/">Lexis-Nexis Academic</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://tsu.naxosmusiclibrary.com">Naxos Music Library</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://search.ebscohost.com/login.aspx?authtype=ip,uid&custid=s9008954&profile=ehost&defaultdb=ofm">OmniFile Full Text Mega (H.W. Wilson)</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://infotrac.galegroup.com/itweb/txshracd2575?db=OVIC">Opposing Viewpoints in Context</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://www.oxfordaasc.com/">Oxford African American Studues Online</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://www.oxfordmusiconline.com/">Oxford Music Online</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://www.oxfordmusiconline.com/">ProQuest Databases (GET URL)</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://search.ebscohost.com/login.aspx?authtype-ip,uid&profile=ehost&defaultdb=pbh">Psychology & Behavioral Science Collection (EBSCO)</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://online.sagepub.com/">SAGE Journals Online</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://www.sciencedirect.com">ScienceDirect(Elsevier)</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://search.proquest.com/sciencejournals?accountid=7093">Science Journals (ProQuest)</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://scifinder.cas.org/">SciFinder (Biomedical, Chemistry, Engineering)</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://search.proquest.com/sociology?accountid=7093">Sociology (ProQuest)</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://online.statref.com/Default.aspx?grpalias=TSU1">STATRef!</option> <option value="https://tsuhhelweb.tsu.edu:2048/login?url=https://infotrac.galegroup.com/itweb/txshracd2575?db=UHIC">U.S. History in Context</option> </select> <input type="submit" value="Go" onclick="goToNewPage(document.dropdown.list)"> </form>
It works just fine in HTML with the html in the body and the JavaScript between the head tags but I can’t figure out how to get this to work in WordPress. I just downloaded your plugin to try to get this to work and it isn’t working. I want to make sure I am entering the JS correctly because several of the lines have red x’s by them so I’m not sure I’m using the plugin correctly. Thank you.
https://www.ads-software.com/plugins/css-javascript-toolbox/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘all the little red x's–how do I properly paste in the JavaScript’ is closed to new replies.