Solved

controlling browser's history/back button/cache

Posted on 1997-06-27
8
387 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
ID: 1828603
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
ID: 1828604
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
ID: 1828605
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
ID: 1828606
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 1

Author Comment

by:vmanocha
ID: 1828607
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
ID: 1828608
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
ID: 1828609
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
ID: 1828610
Great!  what's the url so I can check out what your doing?

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PowerShell Get-Help 10 68
Perl script to find new files and compress those new files 5 81
inactive users 13 71
Need help editing script 3 65
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

920 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

15 Experts available now in Live!

Get 1:1 Help Now