473,566 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Forcing document to submit cookies

Dear Experts:

I have a problem.

When you enter the website I am working on, wherever you go within the
website, the URL address on the website will display:
"http:\\..\inde x.html", whether you go to "Page1.html ", "Page2.html ",
etc. The cookies in every page is set on "<BODY onLoad =
"setCookie();"> . Except for index.html, all the cookies are set and
written to a textfile correctly in the server. All cookie values in
every page in the website are written to a textfile in the server by
using the SAME PHP script.

My question is: Why is the cookie set in index.html not written to a
textfile in the browser? Is it because of the fact that index.html is
considered to never finish loading because it is the page that always
gets displayed on the URL? Is there a way to force the document to
submit cookies in "index.html " to the server without the user knows
anything about it?

The method that I am using right now is by creating an image object,
e.g. img = new image();, and set image.source to be some PHP file that
will process values of cookies submitted. This works correctly for
most pages but all for one page, e.g. index.html.

duane
Jul 20 '05 #1
1 2399
Ivo
"duane" <du******@hotma il.com> wrote in message
news:59******** *************** ***@posting.goo gle.com...
website, the URL address on the website will display:
"http:\\..\inde x.html", whether you go to "Page1.html ", "Page2.html ",
I assume you achieve this with a "100%,0%" frame. Unnecessarily complicating
most of the time.
etc. The cookies in every page is set on "<BODY onLoad =
"setCookie();"> . Except for index.html, all the cookies are set and
written to a textfile correctly in the server. All cookie values in
every page in the website are written to a textfile in the server by
using the SAME PHP script.

My question is: Why is the cookie set in index.html not written to a
textfile in the browser?
No idea. Perhaps post some example code.

Is it because of the fact that index.html is considered to never finish loading because it is the page that always
gets displayed on the URL?
Try onload="alert() "

Is there a way to force the document to submit cookies in "index.html " to the server without the user knows
anything about it?
Cookies are stored on the client side. Forms are submitted to the server.

The method that I am using right now is by creating an image object,
e.g. img = new image();, and set image.source to be some PHP file that
will process values of cookies submitted. This works correctly for
most pages but all for one page, e.g. index.html.
Type
javascript:aler t(document.imag es.length)
in the address bar and verify the number.
If that is correct, and the php image is the last image on the page,
javascript:aler t(document.imag es[document.images .length].src)
or, if it is the first
javascript:aler t(document.imag es[0].src)
That should give you some clues.
HTH
Ivo

duane

Jul 20 '05 #2

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

Similar topics

1
6653
by: kalyan | last post by:
Hi Using Input in HTML i am allowing user upload the document. When they click submit i am saving in Server. They can upload same document any time. Here is my problem each time when they upload document it is saved in server But when they open in browser new updated document is not shown only old document is displayed.
3
4523
by: Varun | last post by:
Hi There, I have a form("myRequest.asp") and the values from it are retrieved into the page ("output_Print.asp") on which I have two buttons('Save As Complete' and 'Save As Incomplete'). When the 'Save as Incomplete' button is Clicked the form will be going to the "SaveAsincomplete.asp" without validation of the fields. And when the 'save as...
1
2660
by: John M | last post by:
Hello All, The code below is something I have been working on and just can't get past. I know it must be very simple but here goes. The Form Method line text is invisible on browers, but still forcing a space betweem the graphics and the forms. How do I make the Form Method line function, but not require space on the page? Code is...
0
1408
by: kalyan | last post by:
Hi Using Input in HTML i am allowing user upload the document. When they click submit i am saving in Server. They can upload same document any time. Here is my problem each time when they upload document it is saved in server But when they open in browser new updated document is not shown only old document is displayed.
10
19322
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is able to fill that one out just fine. The second form is multipart/form-data. Unfortunately, I haven't been able to fill that out in a way that makes...
3
1505
by: Martin Mrazek | last post by:
Hi, how can one HTML document create more than one cookie? I have bloody long html form, to save all its values in 4KB of one cookie is impossible... MM
1
5428
by: Robert Oschler | last post by:
I have two sites, both with valid P3P policies that passed the W3C P3P validator, including the P3P compliant HTTP headers test. On one of the sites, Site A, I have a web page that loads a document from Site B in an IFRAME. In this context the web page on Site A is the "originating" document and the web page on Site B is a 3rd-party...
3
4218
by: Ashish | last post by:
Hello All, This is a bit wierd. I have a main page in my webapp that has toolbar to carry out some common operations. Also this main page has an iframe that hosts a page that serves as an introductory page for carrying out common actions. When a user clicks on the links in the intro page, I want the main window (i.e. the main page that hosts...
2
2165
by: =?Utf-8?B?d2FsdGVy?= | last post by:
Hi there... we have a list of internal websites. For logging purpose, we would like to attach some client side info in each HTTP request before submit to server. Two options for us : 1) each website can add some script to do so, but the changes are enumerous; 2) it will be nice if we can inject the info on IE before it submit the request...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6260
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.