Jump to content

Retrieving data from remote form


JuiceBox

Recommended Posts

Hello,

 

is it possible to retrieve data from remote form, from another domain that I can't control.

I want to type in number in my local form text field and then post it to remote form and retrieve data. I know how to retrieve data from local mysql, but don't know how to retrieve it from remote form.

 

Remote form: http://www.otto.de/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/PV_DirectOrder-Start?ls=0#lmPromo=la,3,hk,home,fl,Sidebar_Bestellen

 

Working number: 31477682

 

I want to type in 31477682 on my local text field and retrieve data(price, color, status like "lieferbar") from another domain.

Link to comment
Share on other sites

I found those alternatives, but no one seems to be working for me. I don't have so much experience with AJAX.

I set up my local form here:

 

http://www.tsa.lt/betatest/ , but still no results.

 

What I found so far is that it is using this script in directform.js :

 

getArtInfoByAjax : function (artNo, amount, size, artInfoId, performAvailabiltyCheck){

 

$('#divArtLoading'+ artInfoId).removeClass(directOrder.CLASS_HIDDEN);

$('#divAlternativeArticleLayer'+ artInfoId).addClass(directOrder.CLASS_HIDDEN);

 

$('#divSpWheel'+ artInfoId).show();

 

$.ajax({

url: "http://" + window.location.host + "/is-bin/INTERSHOP.enfinity/WFS/Otto-OttoDe-Site/de_DE/-/EUR/PV_DirectOrder-GetArticleInformation",

async: true,

data: {

artInfoId : artInfoId,

artInfoRunningNumber : $('#divArtRunningNo'+ artInfoId).html(),

amount : amount,

articleNumber : artNo,

size : size

},

success: function(response){

 

var artInfo = $('#divArtInfo' + artInfoId);

 

artInfo.find('#divArtLoading'+ artInfoId).addClass(directOrder.CLASS_HIDDEN);

artInfo.html(response);

 

if (performAvailabiltyCheck){

directOrder.selectFirstAvailableArticle(artInfoId, artInfo);

}

else{

// no availability check neccessary, because it is already done in context

// of the AKI-Layer.

// So, we only determine the desired size and display it.

var selectBox = $("#sbTxtSize" + artInfoId);

selectBox.selectedIndex = directOrder.getIndexOfSelectBoxValue("sbTxtSize" + artInfoId, size);

if(selectBox.selectedIndex != directOrder.SELECT_BOX_VALUE_NOT_FOUND){

selectBox.val(size);

var jsonHiddenArtInfo = window.document['hiddenArtInfo'+ artInfoId];

directOrder.changeVariationInfo(selectBox, jsonHiddenArtInfo, artInfoId)

}

else{

// we did not find the value in the selectbox, so select

// the first available variation.

directOrder.selectFirstAvailableArticle(artInfoId, artInfo);

}

}

 

// article exists

if (window.document['hiddenArtInfo'+ artInfoId].data != null){

artInfo.find('#txtAmount'+ artInfoId).select().focus();

directOrder.checkAlternativesExistForNonAvailableArticles(artInfo, artInfoId);

}

// article does not exist

else{

artInfo.find('#txtArtNo'+ artInfoId).select();

}

artInfo.find('#divArtInfoLoeschen' + artInfoId).removeClass(directOrder.CLASS_HIDDEN);

 

directOrder.processEvent('event', artInfoId, directOrder.SRC_NONE, directOrder.FLG_NONE);

 

},

        error: function () {

directOrder.resetHiddenArtInfo(artInfoId);

var artInfo = $('#divArtInfo' + artInfoId);

artInfo.find('#divArtLoading'+ artInfoId).addClass(directOrder.CLASS_HIDDEN);

//artInfo.empty();

directOrder.resetArtInfo(artInfoId,artInfo);

var artInfoConfig = directOrder.createArtInfoConfiguration();

artInfoConfig.showMsgFrame = true;

artInfoConfig.clsMsgFrame = 'frame_err';

artInfoConfig.clsMsgAnyProblem = 'txt_err';

artInfoConfig.msgAnyProblem = window.document['hiddenDOMessages'].dbsTechnicalError;

directOrder.refineArtInfo(artInfoId, artInfo, artInfoConfig, true);

}

 

});

 

Tried this method: http://www.johnhamelink.com/2010/07/combat-crossdomain-post-problems-ajax/  but still no luck.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.