• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

How to refresh a page without using AJAX

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How to refresh textbox without using AJAX.
Please help me in this topic.
for example when i select country the particular states should be displayed in dropdown.

Thanks you.
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want to access the server, then you'll need to keep all information on the client as part of the web page. You'll need JavaScript data structures that hold the lists of states for all countries of your menu.
 
Pavan BH
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I know by using the javascript the whole page will be refreshed but not the particular textbox
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand what you're trying to say. If all the pertinent data is part of the original page (in appropriate JavaScript data structures), then it doesn't need to be refreshed, neither whole nor in parts. You will need to write the JS code to change the states menu in response to a selection in the country menu, obviously.
 
Pavan BH
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank u
 
Saloon Keeper
Posts: 22799
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think our naming requirements (http://www.javaranch.com/name.jsp) require a real last name, not just initials, but thanks for trying.

A web page in a browser like Internet Explorer or Firefox is stored in a hierarchical structure (the Document, or DOM). You can alter that document and its corresponding graphical section of the user's display will change without changing the content of the rest of the page, although the layout may be adjusted.

However, to do that, you need client-side scripting, such as JavaScript. AJAX is JavaScript plus communication back to a server.

The only way you can refresh the page without client-side scripting is to put a timer on page refresh using the HTML metatags. But that refreshes the ENTIRE page, not just part of it.
 
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Pavan BH", My request that you change your display name to adhere to JavaRanch standards was not a suggestion. Valid display names are mandatory for participation on the Ranch. Please change your display name as instructed prior to your next post.

Be aware that accounts with invalid display names are disabled.

bear
JavaRanch Sheriff
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do it by Javascript, it will not refresh the page. It will just load the data when you select a country.
Javascript is the best option.

Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic