Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

going back/refreshing page

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I open a login page of my application, if one is a new user then he/she clicks on 'register' link to be registered. After providing sufficient informations on the registration page and after passing validation rules new account is created.

Problem: The problem is when a user is registered then i use javascript to go back to the previous login page with new user Id/password and after applying certain security rules the user is entered into the application but with the main screen/window appearing TWICE (the problem). Also Id/password is appeaeing in the address bar appended to login page.

Can any body answer where may be the fault. The JavaScript part of the .jsp is,

<script language="JavaScript">
if (document.getElementById("_status").value == "Updated"){
window.location = "login.jsp?userid=" + userid + "&password=" + password;
}

</script>
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is all client-side stuff, so moved to the HTML/Javascript forum.
 
Something about .... going for a swim. With this tiny ad ...
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic