 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Malatar Guest
|
Posted: Fri May 04, 2007 7:41 pm Post subject: Indy (IdHttp) and JavaScript |
|
|
English Version :
Hi,
I'm try to send post var to an URL with IDHttp.
But the web page return to me : The Browser that you use need to accept
JavaScript.
How may i use JavaScript With IdHttp ?
I don't want use ICS because i'm using SLL.
Thank
Malatar
French Version :
Bonjour,
J'ai un petit problème pour envoyer des données en moéthode Post avec
IdHttp.
La page me retourne que mon webbrowser doit activer les JavaScript pour
pouvoir continuer.
Comment puis je utiliser JavaScript avec IdHtpp ?
Je ne veux pas utiliser les composants ICS car j'ai besoin du SSL
Merci
Malatar |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri May 04, 2007 10:26 pm Post subject: Re: Indy (IdHttp) and JavaScript |
|
|
"Malatar" <info@full-technologies.com> wrote in message
news:463b4616 (AT) newsgroups (DOT) borland.com...
| Quote: | I'm try to send post var to an URL with IDHttp.
|
Please show your actual code.
| Quote: | But the web page return to me : The Browser that you use
need to accept JavaScript.
|
The Javascript on the original HTML form is probably filling in a
hidden input field that you are not submitting in your code.
| Quote: | How may i use JavaScript With IdHttp ?
|
You don't. Javascript has nothing to do with Indy, and vice versa.
Please show the original HTML that you are trying to submit
programmably.
Gambit |
|
| Back to top |
|
 |
Malatar Guest
|
Posted: Wed May 09, 2007 8:11 am Post subject: Re: Indy (IdHttp) and JavaScript |
|
|
Thank you for your answer,
My code is basically.
var
lst : TStringList;
begin
lst := TStringList.create;
try
lst.Add('MaVar=test');
Memo1.Text := IdHttp1.Post('https://myurl.com/page.jsp,lst);
finally
lst.free;
end;
end;
I can't show you the original HTML because i send information to a
external society.
| Quote: | The Javascript on the original HTML form is probably filling in a
hidden input field that you are not submitting in your code.
|
I don't know, but if you use the url with TWebBrowser, you can see a
frame working and after your are redirected to a page(page that you are
setup in her customer panel).
But with Indy, you are stopped and in the Memo1 i can see :
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<SCRIPT language="JavaScript1.2">
function testFrameSize()
{
winW = 100;
winH = 100;
if (parseInt(navigator.appVersion)>3)
{
if (navigator.appName=="Netscape")
{
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1)
{
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
}
if ((winW<25)||(winH<25))
{
document.cancelForm.hiddenFrame.value = "true";
}
}
function submitStart()
{
testFrameSize();
document.cancelForm.action =
'https://www._____.biz/upp/jsp/upStart_1.jsp';
document.cancelForm.submit();
}
</SCRIPT>
</HEAD>
<BODY onLoad="submitStart()">
<form name="cancelForm"
action="http%3A%2F%2Fwww.______.com%2Fdtrecepcancel.php" method="post">
<INPUT TYPE="HIDDEN" NAME="webtraTransactionId" VALUE="70509093246965588">
<INPUT TYPE="HIDDEN" NAME="hiddenFrame" VALUE="false">
<noscript>
<CENTER>
<TABLE style="FONT-SIZE: 12px; BACKGROUND: #ffffff; COLOR: #888888;
FONT-FAMILY: Verdana,Arial,Helvetica" cellSpacing=0 cellPadding=0 width=400>
<TBODY>
<TR>
<TD height=30 colspan=2> </TD>
</TR>
<TR>
<TD colspan=2>Your browser allows the use of Java Scripts. To complete
your transaction, please activate JavaScript in the configuration of
security of your browser.</TD>
</TR>
<TR>
<TD height=30 colspan=2> </TD>
</TR>
<TR>
<TD colspan=2 align=middle><INPUT TYPE="SUBMIT" style="FONT-SIZE:
10px; BACKGROUND: #eeeeee; CURSOR: hand; COLOR: #888888; FONT-FAMILY:
Verdana,Arial,Helvetica" value="Retour vers le magasin en ligne" > </TD>
</TR>
</TBODY>
</TABLE>
</CENTER>
</noscript>
</form>
</BODY>
</HTML>
if you may help me.
Cordialy,
Malatar.
Remy Lebeau (TeamB) a écrit :
| Quote: | "Malatar" <info@full-technologies.com> wrote in message
news:463b4616 (AT) newsgroups (DOT) borland.com...
I'm try to send post var to an URL with IDHttp.
Please show your actual code.
But the web page return to me : The Browser that you use
need to accept JavaScript.
The Javascript on the original HTML form is probably filling in a
hidden input field that you are not submitting in your code.
How may i use JavaScript With IdHttp ?
You don't. Javascript has nothing to do with Indy, and vice versa.
Please show the original HTML that you are trying to submit
programmably.
Gambit
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed May 09, 2007 9:44 pm Post subject: Re: Indy (IdHttp) and JavaScript |
|
|
"Malatar" <info@full-technologies.com> wrote in message
news:46417c4c$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I can't show you the original HTML because i send information to a
external society.
|
You can mask the URLs while still showing the types of values that
need to be submitted.
| Quote: | if you use the url with TWebBrowser, you can see a frame working
and after your are redirected to a page(page that you are setup in
her
customer panel).
|
Like I said, the Javascript is likely manipulating the HTML form. You
are not submitting the same values that the HTML is submitting, so the
server is catching that. There is no way a server can detect whether
a client has Javascript enabled otherwise.
| Quote: | But with Indy, you are stopped and in the Memo1 i can see :
|
That is not helpful without seeing the original HTML form that caused
that output. But even that output shows a Javascript is manipulating
an HTML form.
Gambit |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|