Connecting Tech Pros Worldwide Forums | Help | Site Map

catch previous url

Newbie
 
Join Date: Jul 2008
Posts: 3
#1: Sep 30 '08
Hi
I want help on my project It has a table which visible on click and It has 2 button send, and cancle. Send button redirect second page and return with status "Y" in this ok after sending a message second table is visible which has Ok button. Now my Problem is that I want when button Ok is click url remove status "y" from IT.
How Is it Possible??????????????????/
Just to give example first url is
www.xyz.com?prodId=20&colorID=30&size=20 after redirect it come like this
www.xyz.com?prodId=20&colorID=30&size=20&Statys="Y "

I want when I click Ok it catch first URl.

DrBunchman's Avatar
Moderator
 
Join Date: Jan 2008
Location: Winchester, UK
Posts: 930
#2: Sep 30 '08

re: catch previous url


You can't remove anything from the URL but you can redirect to the first URL which will have the same effect. Either use Javascript in the buttons onclick event or set the target of the form that contains the Ok button to the first URL.

Dr B
Newbie
 
Join Date: Jul 2008
Posts: 3
#3: Oct 4 '08

re: catch previous url


Hi
I have a program which redirect same url with status ' Y '
and display a message now my proble is That I want when user click Ok button it remove only 'Y' from Url For detail I give u a Example
suppose I have tow page
First page is like
http://bytes.com/forum/newthread.asp?do=newthread&f=151
its action on other page
http://bytes.com/forum/newthread.php...f=151&Status=Y
and It show a table which visible a table which has a button Ok
i want when use click button ok tabel visible property is hidden
I use to call javascript function

Expand|Select|Wrap|Line Numbers
  1. function  divHid()
  2. {
  3. document.getElementById('div1').style.visibility='Hidden';
  4. }
Its working Ok
but I want to catch First page url also because url is still
http://bytes.com/forum/newthread.php...f=151&Status=Y
like this
How to remove status=Y form URl or
catch first page url that is
http://bytes.com/forum/newthread.php?do=newthread&f=151

Plz guide me
u can mail me on my mail Id
(e-Mail address removed by DrBunchman)
Thanks and Redirect
Ragni
Newbie
 
Join Date: Jul 2008
Posts: 3
#4: Oct 4 '08

re: catch previous url


Quote:

Originally Posted by DrBunchman

You can't remove anything from the URL but you can redirect to the first URL which will have the same effect. Either use Javascript in the buttons onclick event or set the target of the form that contains the Ok button to the first URL.

Dr B

thanks for reply but page is not redirect
i use javascript code
Expand|Select|Wrap|Line Numbers
  1. function  divHid()
  2. {
  3. document.getElementById('div1').style.visibility='Hidden';
  4. //    myUrl="purchase/productdetail_EMail.asp?cgmain=" & mprimarycatId & "%26cgsub=" & msubcatId & "%26prodid=" & mprodId
  5. //alert(purchase/productdetail_EMail.asp?cgmain="& mprimarycatId & "%26cgsub=" & msubcatId & "%26prodid=" & mprodId);
  6. //document.getElementById('div1').action=("purchase/productdetail_EMail.asp?cgmain="& mprimarycatId & "%26cgsub=" & msubcatId & "%26prodid=" & mprodId);
  7.  
  8. }
all comented line I use but not redirect page
I also use
<%Response.Redirect (myUrl)%>
in Javascript function divHid()
but button stop working how to redirect that page
DrBunchman's Avatar
Moderator
 
Join Date: Jan 2008
Location: Winchester, UK
Posts: 930
#5: Oct 4 '08

re: catch previous url


Ragni,

Please don't double post your questions - it is against the rules laid out in the Posting Guidelines and I have merged your other thread on this topic with this one. Also please don't print your email address in your posts - it is for your own protection against spamming.

You can use a javascript redirect in your function if you wish to change the URL of the page like this:

Expand|Select|Wrap|Line Numbers
  1. window.location.href="http://www.whatever.com/";
However i'm not sure that is exactly what you want. Having the 'Y' in the querystring is triggering some kind of action on the page - is that correct? Why do you then want to remove it?

Dr B
Reply