Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

location.reload() problem

Status
Not open for further replies.

JohannIcon

Programmer
Sep 3, 2002
440
0
0
MT
I have a form which the user can alter data into, and when the user presses the modify button, I am setting the varaibles to disabled and readonly, however, when I added the location.reload(), to reload the page with the new values, the fields are loosing the disabled and readonly function, and thus the user can alter the fields again, which is something I do not wish to allow.

Can you please tell me why the disabled and readonly attribs are lost with the location.reload()?

Thanks for your help
 
location.reload() refreshes the page to exactly how it would look if you loaded it from scratch, so any scripts that have modified content "haven't happened yet".
I don't understand what you mean about reloading the page with the new values. What new values are these? If you are updating an area of the page with items input in forms, then you will have to change those areas on the fly. Hope I helped / Thanks for helping
if ((x<10&&y<10) &&(((parseInt(x.toString()+y.toString())-x-y)%9)!=0)){ alert(&quot;I'm a monkey's uncle&quot;); }
 
the form is refreshing since I am loadinf the new varaibles from the recordset, ie from the table, that is why the new values are appearing.

But then the form fields loose their attribs, ie disabled and readonly
 
You would then I think have to pass some variables stating that the fields are hidden in the querystring to a replaced page rather than a reload. Is it asp? Hope I helped / Thanks for helping
if ((x<10&&y<10) &&(((parseInt(x.toString()+y.toString())-x-y)%9)!=0)){ alert(&quot;I'm a monkey's uncle&quot;); }
 
Yes it is asp, and instead of querystring vars, I am passing hidden vars to the same page so that when it encounters them, it knows that it is the second time in
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top