User:Connel MacKenzie/catlan.js

From Wiktionary, the free dictionary
Jump to navigation Jump to search

Note – after saving, you may have to bypass your browser’s cache to see the changes.

  • Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh);
  • Konqueror and Chrome: click Reload or press F5;
  • Opera: clear the cache in Tools → Preferences;
  • Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.

function stuffandsubmit() {
  var frm = PromptWin.document.getElementsByTagName('form')[0];
  frm.txtWord.value = wgPageName;
  frm.submit();
}

function catlanLookup() {
        PromptWin = window.open("about:blank", "PromptWin", "width=800,height=320,dependent=yes,location=yes,menubar=yes,resizable=yes,status=yes,toolbar=yes");
        PromptWin.document.open();
        PromptWin.document.write("<html>");
        PromptWin.document.write("<body onload=\"frmSearch.submit()\">");
        PromptWin.document.write("<form name=\"frmSearch\" method=\"post\" action=\"http://dcvb.iecat.net/inici.asp\">");
        PromptWin.document.write("<input class=\"txtNormal\" name=\"txtWord\" type=\"text\" size=\"30\" maxlength=\"30\" value=\"" + escape(wgPageName) + "\">");
        PromptWin.document.write("</form></body></html>");
        PromptWin.document.close();
   setTimeout('stuffandsubmit()', 5000);
 }

catlanLookup();