I believe that
document.all("theID")
will referece the object for you...
-----Original Message-----
From: Ron Singh [mailto:cyanyz@t...]
Sent: Wednesday, January 16, 2002 11:35 PM
To: javascript
Subject: [javascript] Re: Refreshing a Page from Cache
Thanks Elliot...for your tip...I tried it but it didnt work for what I
wanted it to do,,,found another way though. I will send u an e-mail to the
link to show you what I mean after I am done :)
May I bother you with another question
This may be an easy question...but I cant find any answers.
I have more than one form on a page and I have the following JavaScript to
change the value of a text box called msg in each form, if needed. The
forms are named form1, form2 form3 etc. The numericals 1,2,3 being passed
as a variable called id.
var formname = 'form'+id
document.formname.msg.value=msg1
How do I insert the variable formname into the statement without it
considering formname as a string.
(msg1 is also a variable)
Thank u in anticipation. I am migrating to JavaScript and getting over what
I cant do in ASP. Any help would be greatly appreciated.
Thanks again
Ron
-----Original Message-----
From: O'Hara, Elliott M [mailto:EMOHARA@k...]
Sent: Wednesday, January 16, 2002 4:53 AM
To: javascript
Subject: [javascript] Re: Refreshing a Page from Cache
lol..
if i read th original post write, you just sent him code that would do the
exact opposite of what he asked for...
Randeep,
try
Response.ExpiresAbsolute = dateadd("d",1,date)
the page should cache for a day...
i think that should do it for you....
-----Original Message-----
From: Sukhi Samra [mailto:sukhdeepsamra@h...]
Sent: Wednesday, January 16, 2002 2:15 AM
To: javascript
Subject: [javascript] Re: Refreshing a Page from Cache
hey Ron
Try this:
<%
Response.ExpiresAbsolute = #1/1/1980# ' Client treats page as expired
Response.AddHeader "cache-control", "private" ' Proxies not to cache
Response.AddHeader "pragma", "no-cache" ' Clients not to cache
%>
this prevents the page from caching....Good Luck
regards,
Sukhi
>From: "Randeep Singh" <cyanyz@t...>
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] Refreshing a Page from Cache
>Date: Wed, 16 Jan 2002 07:14:10
>
>Hello...I am new to java scripting but here is my problem. I have created
>a page complete with all the dhtml and javascript that I need on that
>page, using ASP and an Access Database. The Javascript writes cookies,
>does invoice calculations and changes images etc. However all of the page
>is created dynamically from a database. My problem is that each time some
>one clicks on a javascript enabled link, the whole page (which is an asp
>page)refreshes from the server hitting my server/database. Is there
>anyway that once I have created the page....I can prevent it from
>accessing the server yet refreshing the page (to show updated cookie
>information).
>
>Any help would be greatly appreciated
>
>Thanks
>
>Ron
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
-----Original Message-----
From: O'Hara, Elliott M [mailto:EMOHARA@k...]
Sent: Wednesday, January 16, 2002 4:53 AM
To: javascript
Subject: [javascript] Re: Refreshing a Page from Cache
lol..
if i read th original post write, you just sent him code that would do the
exact opposite of what he asked for...
Randeep,
try
Response.ExpiresAbsolute = dateadd("d",1,date)
the page should cache for a day...
i think that should do it for you....
-----Original Message-----
From: Sukhi Samra [mailto:sukhdeepsamra@h...]
Sent: Wednesday, January 16, 2002 2:15 AM
To: javascript
Subject: [javascript] Re: Refreshing a Page from Cache
hey Ron
Try this:
<%
Response.ExpiresAbsolute = #1/1/1980# ' Client treats page as expired
Response.AddHeader "cache-control", "private" ' Proxies not to cache
Response.AddHeader "pragma", "no-cache" ' Clients not to cache
%>
this prevents the page from caching....Good Luck
regards,
Sukhi
>From: "Randeep Singh" <cyanyz@t...>
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] Refreshing a Page from Cache
>Date: Wed, 16 Jan 2002 07:14:10
>
>Hello...I am new to java scripting but here is my problem. I have created
>a page complete with all the dhtml and javascript that I need on that
>page, using ASP and an Access Database. The Javascript writes cookies,
>does invoice calculations and changes images etc. However all of the page
>is created dynamically from a database. My problem is that each time some
>one clicks on a javascript enabled link, the whole page (which is an asp
>page)refreshes from the server hitting my server/database. Is there
>anyway that once I have created the page....I can prevent it from
>accessing the server yet refreshing the page (to show updated cookie
>information).
>
>Any help would be greatly appreciated
>
>Thanks
>
>Ron
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
-----Original Message-----
From: O'Hara, Elliott M [mailto:EMOHARA@k...]
Sent: Wednesday, January 16, 2002 4:53 AM
To: javascript
Subject: [javascript] Re: Refreshing a Page from Cache
lol..
if i read th original post write, you just sent him code that would do the
exact opposite of what he asked for...
Randeep,
try
Response.ExpiresAbsolute = dateadd("d",1,date)
the page should cache for a day...
i think that should do it for you....
-----Original Message-----
From: Sukhi Samra [mailto:sukhdeepsamra@h...]
Sent: Wednesday, January 16, 2002 2:15 AM
To: javascript
Subject: [javascript] Re: Refreshing a Page from Cache
hey Ron
Try this:
<%
Response.ExpiresAbsolute = #1/1/1980# ' Client treats page as expired
Response.AddHeader "cache-control", "private" ' Proxies not to cache
Response.AddHeader "pragma", "no-cache" ' Clients not to cache
%>
this prevents the page from caching....Good Luck
regards,
Sukhi
>From: "Randeep Singh" <cyanyz@t...>
>Reply-To: "javascript" <javascript@p...>
>To: "javascript" <javascript@p...>
>Subject: [javascript] Refreshing a Page from Cache
>Date: Wed, 16 Jan 2002 07:14:10
>
>Hello...I am new to java scripting but here is my problem. I have created
>a page complete with all the dhtml and javascript that I need on that
>page, using ASP and an Access Database. The Javascript writes cookies,
>does invoice calculations and changes images etc. However all of the page
>is created dynamically from a database. My problem is that each time some
>one clicks on a javascript enabled link, the whole page (which is an asp
>page)refreshes from the server hitting my server/database. Is there
>anyway that once I have created the page....I can prevent it from
>accessing the server yet refreshing the page (to show updated cookie
>information).
>
>Any help would be greatly appreciated
>
>Thanks
>
>Ron
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.