Solved

controlling browser's history/back button/cache

Posted on 1997-06-27
8
386 Views
Last Modified: 2013-12-25
I have a CGI application. Suppose the URL for that is:http://myserver/cgi-bin/foo.exe?ID=1I put this as a link in my startup page. SO when a user clicks this link, I generate a page which is returned back to the user. Now I want the following to happen:The URL shown to the user should be http://myserver/cgi-bin/foo.exe
  (no ID is to be shown)Now the page that I generated has another link to:http://myserver/cgi-bin/foo.exe?ID=2On clicking this link, I generate another page. Again I would like to display the URL to the user as:http://myserver/cgi-bin/foo.exe (again no ID is shown)And also if the user uses the 'BACK' button to go back to the previous page, he/she should not be able to go back tothe earlier page generated. The user should get back to the startup page.So basically what I want to do is havd a startup page. From there on I would generate pages, each of which will have next and previous links to go back and forward. But if the user uses teh browser's 'BACK' button, the user should go straight back to the startup page.
I would appreciate if someone can provide me with the html tags i would need to generate from my CGI script for this to happen.thanks.
0
Comment
Question by:vmanocha
  • 4
  • 4
8 Comments
 
LVL 8

Accepted Solution

by:
mrmick earned 100 total points
Comment Utility
You've asked several questions here.

In response to how you can show the user something different then what is referenced in a link:
<A HREF="http://WhatTheyGet_URL">WhatTheySee</A>

Your connected clients will always be able to view the source.  
The equivalent using your above references:

 <A HREF="http://myserver/cgi-bin/foo.exe?ID=1">http://myserver/cgi-bin/foo.exe</A>

mrmick
0
 
LVL 1

Author Comment

by:vmanocha
Comment Utility
This is not what i am looking for. Let me clarify my question.Let's say i have the following link in the start page:<A HREF="http://myserver/cgi-bin/foo.exe?ID=1">CGIPage</A>So when the user clicks on CGIPage, foo.exe gets executed and it generates a page which is then displayed back to the user. Now in the browser window, there is an Address field which will display:http://myserver/cgi-bin/foo.exe?ID=1Instead of the above, can i make it display:http://myserver/cgi-bin/foo.exe---And yes, i have many questions here, but i feel that they are all related. anyway, i am increasing the points for this question from 50 to 100 !!!
0
 
LVL 1

Author Comment

by:vmanocha
Comment Utility
This is not what i am looking for. Let me clarify my question.Let's say i have the following link in the start page:<A HREF="http://myserver/cgi-bin/foo.exe?ID=1">CGIPage</A>So when the user clicks on CGIPage, foo.exe gets executed and it generates a page which is then displayed back to the user. Now in the browser window, there is an Address field which will display:http://myserver/cgi-bin/foo.exe?ID=1Instead of the above, can i make it display:http://myserver/cgi-bin/foo.exe---And yes, i have many questions here, but i feel that they are all related. anyway, i am increasing the points for this question from 50 to 100 !!!
0
 
LVL 8

Expert Comment

by:mrmick
Comment Utility
I see. (said the blind man)

I don't think what you want is possible through the use of an anchor tag, however I think you can get exactly what you want using a form tag, for example:

<FORM ACTION="http://myserver/cgi-bin/foo.exe" METHOD="POST"> (do not use the GET method here as it would produce the same affect you're trying to avoid)

Inside the form use a submit button, for example:

<INPUT TYPE="SUBMIT" NAME="ID1" VALUE="Opt1_ButtonCaption">
<INPUT TYPE="SUBMIT" NAME="ID2" VALUE="Opt2_ButtonCaption">

</FORM> (close the form tag)

This may be the answer to both your questions because the displayed URL is the URL as it appears in the ACTION reference above.  So, "backs" clicked to the same URL will produce no change (or skip to the last different URL)

Hope this helps, mrmick

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

by:vmanocha
Comment Utility
i am not sure whether i can use a FORM. actually i am using images as links. when i use the type="submit", it will create a button. is there any way to use image instead ?
0
 
LVL 8

Expert Comment

by:mrmick
Comment Utility
I don't think so using straight HTML.  Perhaps an Active X component would do the trick, although I stick to straight html and server side scripting only because I like my stuff to work with any browser.

Good luck, mrmick
0
 
LVL 1

Author Comment

by:vmanocha
Comment Utility
thanks for your help. i was able to achieve what i wanted, usingthe combination of what you had suggested and JavaScript.
0
 
LVL 8

Expert Comment

by:mrmick
Comment Utility
Great!  what's the url so I can check out what your doing?

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now