PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WEBDEV 26 → Passing data to another website with Form Post
Passing data to another website with Form Post
Iniciado por PrinceFemiAdeniyi, abr., 05 2022 4:48 PM - 5 respostas
Membro registado
30 mensagems
Popularité : +1 (1 vote)
Publicado em abril, 05 2022 - 4:48 PM
Hi All,

I need to call another listening website via a Form post.

WB provides HttpFormCreate, httpformSend etc and when executed give no errors. however, it does not open the new site in a browser no give any response. See code below:

//*************
okay is boolean
HTTPCreateForm("Crystal")
HTTPAddParameter("Crystal", "reportName", "iGroupPlan\BrokerList.rpt")
okay = HTTPSendForm("Crystal", "http://localhost/ReCrystallizeServer/ViewReport.aspx")
IF okay = False THEN
Trace(ErrorInfo(errCode))
END
//***************

The httpsendform() code ought to open a new page on the browser and display the results in "viewreport.aspx"

What am I doing wrong?

TIA

--
Thanks in advance
Femi
Publicado em abril, 05 2022 - 5:05 PM
you are just using functions that are NOT for what you want.

all the httpxxx functions are made to retrieve an anwser from a web site as a STRING that can then be processed

If you want to DISPLAY another web site, then there are several other instructions for that like scriptdisplay
Membro registado
30 mensagems
Popularité : +1 (1 vote)
Publicado em abril, 08 2022 - 4:21 AM
Many tks Argus.

ScriptDisplay did work eventually. However, I had to pass a html file to it before it ran correctly. The only issue I have now is that it displays on the same page.

How do I display on a new browser tab without disrupting the current state of the current browser?

--
Thanks in advance
Femi
Publicado em abril, 08 2022 - 1:14 PM
that is the "destination" parameter of your button/link (first tab)
or with the "changedestination" function
Membro registado
30 mensagems
Popularité : +1 (1 vote)
Publicado em julho, 02 2022 - 1:25 PM
Thanks a lot Argus... 3 thumbs up

All is fine now. Thot I responded to this back then.

Appreciate a lot.

--
Thanks in advance
Femi
Membro registado
7 mensagems
Publicado em julho, 25 2022 - 12:00 PM
If you have no option to use server-side programming, such as PHP, you could use the query string, or GET parameters.

In the form, add a method="GET" attribute:

<form action="display.html" method="GET">
<input type="text" name="serialNumber" />
<input type="submit" value="Submit" />
</form>
When they submit this form, the user will be directed to an address which includes the serialNumber value as a parameter. Something like:

http://www.example.com/display.html…
You should then be able to parse the query string - which will contain the serialNumber parameter value - from JavaScript, using the window.location.search omegle.2yu.co value:

// from display.html
document.getElementById("write").innerHTML = window.location.search; // you will have to parse
// the query string to extract the
// parameter you need
More you can check out here:
https://stackoverflow.com/questions/12183572/how-to-use-javascript-to-fill-a-form-on-another-page/12183659… / https://omegle.love /https://omglz.com