473,320 Members | 1,947 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,320 software developers and data experts.

Refresh page problem using AJAX

hi
i am having a page in which i have 3 dropdowns,values of 2nd dropdown comes based on 1st and values of 3rd dropdown come based on 2nd.using AJAX+PHP to load dropdowns.

but whenever i refresh the page the selection and values of dropdown are lost.
can anyone help me how to maintain the selected values of dropdown on page refresh (to maintain webpage state).


thnx.
Mar 12 '07 #1
9 5944
hi
i am having a page in which i have 3 dropdowns,values of 2nd dropdown comes based on 1st and values of 3rd dropdown come based on 2nd.using AJAX+PHP to load dropdowns.

but whenever i refresh the page the selection and values of dropdown are lost.
can anyone help me how to maintain the selected values of dropdown on page refresh (to maintain webpage state).


thnx.
Mar 12 '07 #2
ronverdonk
4,258 Expert 4TB
But the whole point/reason of using the Ajax technique is NOT to have the page refreshed!

When you still want to do that, you'll have to take precautions by preserving the selected box'es values, and setting the already clicked dropdown options to 'selected=selected'.

Ronald :cool:
Mar 12 '07 #3
acoder
16,027 Expert Mod 8TB
Merged and split threads.
Mar 12 '07 #4
on dat page im having a button which when clicked opens a pop and some data is entered in dat pop up window,when pop window is closed the data dat is entered is to be reflected in one of the dropdowns in the page.

so onclose event of pop up window i refresh d parent window for d same.

but on refresh i loose the dropdown from page which i have created using ajax.

thnx
Mar 12 '07 #5
acoder
16,027 Expert Mod 8TB
You don't need to refresh the page for that. Just use
Expand|Select|Wrap|Line Numbers
  1. window.opener
to access the opening window. Once you've set the dropdown, close the popup.
Mar 12 '07 #6
hi

thnx for reply.

but problem is not opening the pop window,problem is to retain the dropdown boxes after the pop window is closed and the parent gets refreshed,i loose all the dropdowns created using AJAX and their selected values.

thnx
Mar 12 '07 #7
acoder
16,027 Expert Mod 8TB
I think you've misunderstood my reply. See this page. You can use 'window.opener' to reference the parent window. Once you have that ref. you can manipulate the dropdowns.
Mar 12 '07 #8
I think you've misunderstood my reply. See this page. You can use 'window.opener' to reference the parent window. Once you have that ref. you can manipulate the dropdowns.

thnx it worked for me
Mar 13 '07 #9
acoder
16,027 Expert Mod 8TB
No problem. You're welcome.
Mar 13 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Phil | last post by:
Hi. A fairly basic sort of 'direction to go in' question of the type that can be hard to find an answer to! I am using ASP.NET (framework 1.1) to present data on web pages (IIS 5.0 / IE6) from...
1
by: rockdale | last post by:
Hi, all I am coding a asp.net application as user data entry and report interface. We also have another C#.net appplication (a server) does some other stuff, my webserver can send and receive...
2
by: Lonifasiko | last post by:
My ASP.NET application's main page should change values on screen when some extern event occurs (a change in the state of a machine monitored by a .NET Remoting object). That is, this .NET Remoting...
0
by: Phillip Ian | last post by:
Tried this over in CSharp.General and didn't get anything, so I thought I'd try again here. If there's an AJAX specific group I could ask this in, please let me know...I did look. I'm trying to...
0
by: angiemc | last post by:
Hi, I have a question about AJAX and ASP.Net controls. I'm working on a system that requires pages to be generated dynamically based on XML to provide the layout (eg text boxes, dropdowns, save...
10
by: Piotr Nowak | last post by:
Hi, Say i have a server process which listens for some changes in database. When a change occurs i want to refresh my page in browser by notyfinig it. I do not want to refresh my page i.e....
35
by: Kaante | last post by:
Hi, i want a frame on my website to display one pic if the user has new messages and another different pic if it dsnt. Before i used html to auto refresh page every 10 secs. that was annoying...
3
by: Dave | last post by:
I have an GridView on one page that will open a popup for the selected record. I've been told that there is a way that when the popup record is updated the GridView can be refreshed or Databind. ...
4
kelleyvanevert
by: kelleyvanevert | last post by:
Hello everyone, This question is often asked, and I know there are lots and lots of answers that I could be using, but I just want a clear good answer. I am making a website (for playing a game...
6
by: Peter | last post by:
I have a APS.NET 3.5 webpage which calls a web service. What I need is to update this page automatically when a value changes in the webservice, does anyone have an example? Thank You ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.