473,396 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to post the values to the form whose action is in javascript?

Hi

I am trying to post the values to the form. The form action is not
done in html i.e not in form tag, it is done by javascript code using
document.FORMNAME.action = "results.asp";

I think in that results.asp file, they are creating one xml file for
the posted values and these xml file has been redirected to some other
asp file. for ex, displayresults.asp to show the results.

My actual flow is...

I am searching some "example" content in http://example.com/
example.asp and i am getting answers for the searched "example" in
http://example.com/displayresults.asp. Before getting the answer in
the page, i can see http://example.com/example.asp redirecting to
http://example.com/results.asp and then finally getting answer in
http://example.com/displayresults.asp.

I tried to achieve/get the content by posting the values through CURL,
but i didnt get the content. When i echoed the content i can see that
my posted values has been passed/set perfectly. I have doubt on
javascript action....not sure only because of this action.
Code:

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$postvalues);
curl_setopt($ch,CURLOPT_COOKIEJAR,$fpath.'/example.txt');
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,0);
curl_setopt($ch, CURLOPT_HEADER , 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);

I dont know whether i have to set the redirection param or something
else.

Can anyone please teach me how to proceed with this?

Jan 29 '07 #1
3 1706
Got the solution.

Feb 2 '07 #2
On 2 Feb, 10:39, "Mani" <maniraj...@gmail.comwrote:
Got the solution.
Care to share it?

Feb 2 '07 #3
On Feb 2, 3:42 pm, "Captain Paralytic" <paul_laut...@yahoo.comwrote:
On 2 Feb, 10:39, "Mani" <maniraj...@gmail.comwrote:
Got the solution.

Care to share it?
In the beginning, I was trying http://example.com/ as URL to get the
content. But i didnt get the content. After that, I picked the form
action value and necessary varible values [which will be passed to the
form action ] from the http://example.com/ source [ Javascript
section ].

Then, I used http://example.com/ACTIONVALUE as url with necessary
javascript variables as post values for the CURL operation and got the
expected content sucessfully.

Feb 15 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: TG | last post by:
Dear PHP Group, I have two forms that are used to collect user information. The first one takes user inputted values such as fullname, city, address etc. I want these values to display in the...
2
by: Omar E Contreras | last post by:
Hi guys, Let me explain what I want to do in just 3 steps: Step 1: An HTML page that has a form which passes some data to an aspx page Step 2: The aspx page take this values and add some...
3
by: iam247 | last post by:
Hi I have an asp page without any javascript. It posts the content of a form to another page, which reads the form fields using Request.Form. This is the form header: <form name=form...
2
by: Matt | last post by:
When we submit the form data to another page, we usually do the following: <form action="display.aspx" method="post"> will submit the form data and open display.asp in the current browser ...
3
by: Michele | last post by:
Hi all, I have a form with 3 combobox whitin a asp page called data.asp, whose action form is itself; the first combobox drives the behaviour of the other two. The onchange event of the first...
6
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many...
4
by: Angel | last post by:
I have an html form with checkboxes in different rows. The functionality is that of changing the position of the checkboxes through DOM. When I try to save the form after the changes, firefox...
23
by: Bjorn | last post by:
Hi. Every time i post data in a form the contents are being checked for validity. When i click the back-button, all data is gone and i have to retype it. It's obvious that only a few or none of...
5
by: SMP | last post by:
I've got a simple form with an HTML OPTION block. I'd like to POST the form to a page whose name is based on the OPTION they select. So for example say the user selected this option, I'd like to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.