Click here to Skip to main content
15,889,116 members
Home / Discussions / JavaScript
   

JavaScript

 
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 
AnswerRe: jquery confirm dialogue box Pin
Nathan Minier24-Mar-16 1:50
professionalNathan Minier24-Mar-16 1:50 
QuestionGroup by - Custom function Pin
NJdotnetdev22-Mar-16 3:19
NJdotnetdev22-Mar-16 3:19 
AnswerRe: Group by - Custom function Pin
Nathan Minier23-Mar-16 1:56
professionalNathan Minier23-Mar-16 1:56 
QuestionAngularJS view ng-grid not refreshing after ngDialog close. Pin
Stephen Holdorf14-Mar-16 5:44
Stephen Holdorf14-Mar-16 5:44 
AnswerRe: AngularJS view ng-grid not refreshing after ngDialog close. Pin
Nathan Minier16-Mar-16 1:54
professionalNathan Minier16-Mar-16 1:54 
QuestionAngularJS:How to indentify which angular code we need to run manually by angular.bootstrap function Pin
Tridip Bhattacharjee8-Mar-16 1:37
professionalTridip Bhattacharjee8-Mar-16 1:37 
AnswerRe: AngularJS:How to indentify which angular code we need to run manually by angular.bootstrap function Pin
Nathan Minier16-Mar-16 2:15
professionalNathan Minier16-Mar-16 2: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.