Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i hide the login in the url.

 
jyotsana dang
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got a code in my search page:
whcih is displaying the names found in the search:
<table align="center" border="1" width="400">
<td bgcolor="#FFFFCC"><a href ="my_page.jsp?user_login=<%=user_login%>" > <%=fname+" "+lname %></a></td>
<td bgcolor="#FFFFCC"><%=Desg%></td>
</table>
but iam not using any forms .
how do i make sure that the user_login is not displayed in the next page.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you put the data in the query string, it is a GET method. With this method, you CANNOT hide the query string at the next page.
If you really wanna hide it, I guess the best way is to use a FORM and submit it using POST method, not GET method.
Nick.
 
jyotsana dang
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tkx for the reply ..bt how can i use a form in this..iam not making the user submit anything..here..the user just clicks in the name found on search and goes to the page that shows that particular users records..
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just give you the outline, and below is not the exact codes.
You have a JavaScript, say, validate()

For the hyperlink part:

I forget how to invoke the JS in the onClick attribute, you need to check it. Then, when the user clicks the link, the validate will be called, and it will further call the form1 to submit, and thus, you can do the POST method.
Nick.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please notice that the [on click] in fact should be onClick, but I dont know why, when I use onClick, the server disallow me to send the post.
Anyway, hope this help.
Nick.
 
jyotsana dang
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nicholas..
will try this one out
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic