Click here to Skip to main content
15,917,481 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionEXT JS 2.2 - File upload control Pin
Hemant Thaker13-Apr-16 3:39
Hemant Thaker13-Apr-16 3:39 
QuestionHow to hide "save as" button in IE11 Pin
vivek rajavel11-Apr-16 20:18
vivek rajavel11-Apr-16 20:18 
AnswerRe: How to hide "save as" button in IE11 Pin
John C Rayan15-Apr-16 3:44
professionalJohn C Rayan15-Apr-16 3:44 
GeneralISBT Barcode Pin
Praveen Kandari10-Apr-16 20:28
Praveen Kandari10-Apr-16 20:28 
GeneralRe: ISBT Barcode Pin
Richard MacCutchan10-Apr-16 20:50
mveRichard MacCutchan10-Apr-16 20:50 
QuestionOdd TypeError being thrown. Pin
Dralken5-Apr-16 9:57
Dralken5-Apr-16 9:57 
AnswerRe: Odd TypeError being thrown. Pin
Richard MacCutchan5-Apr-16 21:25
mveRichard MacCutchan5-Apr-16 21:25 
GeneralRe: Odd TypeError being thrown. Pin
Dralken5-Apr-16 21:31
Dralken5-Apr-16 21:31 
GeneralRe: Odd TypeError being thrown. Pin
Richard MacCutchan5-Apr-16 21:52
mveRichard MacCutchan5-Apr-16 21:52 
QuestionGet data from mysql database if checkbox is selected Pin
TaRoshka5-Apr-16 0:49
TaRoshka5-Apr-16 0:49 
QuestionNot really a question, but.... Pin
Wombaticus2-Apr-16 0:08
Wombaticus2-Apr-16 0:08 
AnswerRe: Not really a question, but.... Pin
Richard Deeming4-Apr-16 2:00
mveRichard Deeming4-Apr-16 2:00 
GeneralRe: Not really a question, but.... Pin
Wombaticus10-Apr-16 23:12
Wombaticus10-Apr-16 23:12 
AnswerRe: Not really a question, but.... Pin
F-ES Sitecore10-Apr-16 22:55
professionalF-ES Sitecore10-Apr-16 22:55 
GeneralRe: Not really a question, but.... Pin
Wombaticus10-Apr-16 23:11
Wombaticus10-Apr-16 23:11 
Well, I don't find the syntax (or documentation) clear at all.

Maybe I should turn this into a question: how would you, for example, "jQueryify" this?
JavaScript
if (window.XMLHttpRequest) {
    rQM = new XMLHttpRequest();
} else if (window.ActiveXObject) {
    rQM = new ActiveXObject("Microsoft.XMLHTTP");
}

function getPage(p, tImg, iImg, t, s, h) {
   var r = new Date().getTime();
   var url = 'pagebox.ashx?p=' + p.toString() + '&r=' + r.toString();
   rQM.open("GET", url, true);
   rQM.onreadystatechange = function () {
      UpdateScreen(p, tImg, iImg, t, s, h);
   }
   rQM.send(null);
}

function UpdateScreen(p, tImg, iImg, t, s, h) {
   if (rQM.readyState == 4) {
      var response = rQM.responseText;
      if (response != '') {
         var params = response.split("|");
         document.getElementById(tImg).value = 'userfiles/' + params[0];
         document.getElementById(iImg).src = 'userfiles/' + params[0];
         document.getElementById(t).value = params[1];
         document.getElementById(h).value = params[2];
         tinyMCE.get(s).setContent(params[3]);
      }
   }
}

(tinyMCE references the tinyMCE HTML editor[^])

To me, that is pretty easy to grok - I've tried over and over to work out how to do it in jQuery and, as I say given up each time in despair...

(And, yes, I know it's a little ugly in the return - I should probably return the data as XML or JSON, but it works well enough for my purposes.)
GeneralRe: Not really a question, but.... Pin
Richard Deeming11-Apr-16 1:25
mveRichard Deeming11-Apr-16 1:25 
GeneralRe: Not really a question, but.... Pin
Wombaticus11-Apr-16 1:33
Wombaticus11-Apr-16 1:33 
QuestionHow to hide the URL textbox using javascript Pin
zdbl20924-Mar-16 8:58
zdbl20924-Mar-16 8:58 
AnswerRe: How to hide the URL textbox using javascript Pin
Richard Deeming24-Mar-16 9:10
mveRichard Deeming24-Mar-16 9:10 
GeneralRe: How to hide the URL textbox using javascript Pin
zdbl20924-Mar-16 9:27
zdbl20924-Mar-16 9:27 
GeneralRe: How to hide the URL textbox using javascript Pin
Nathan Minier25-Mar-16 1:08
professionalNathan Minier25-Mar-16 1:08 
AnswerRe: How to hide the URL textbox using javascript Pin
ZurdoDev29-Mar-16 2:41
professionalZurdoDev29-Mar-16 2:41 
AnswerRe: How to hide the URL textbox using javascript Pin
F-ES Sitecore30-Mar-16 0:03
professionalF-ES Sitecore30-Mar-16 0:03 
AnswerRe: How to hide the URL textbox using javascript Pin
John C Rayan5-Apr-16 0:26
professionalJohn C Rayan5-Apr-16 0:26 
Questionjquery confirm dialogue box Pin
Member 1231770923-Mar-16 20:15
Member 1231770923-Mar-16 20:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.