 |
| Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 29th, 2005, 05:04 AM
|
|
Registered User
|
|
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
|
|
Button inplace of link. -- Solved
In a table I am showing a link like..
<td><a style='color:blue;background:#CCFF99' href='DelTS.asp?TSID=<%=objRSPD("tsid")%>&frm=<%= request.form("dateFrm6")%>&to=<%= request.form("dateTo6")%>' onclick="return confirm('Are you sure you want to delete this record?')">Click Here</a></td>
Rupen Anjaria.
We CAN'T avoid problems, but of course can solve it.
|
|

August 3rd, 2005, 06:47 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
|
|
<script>
function callConfirm(ptsid,pfrm)
{
yesorno=confirm("Delete Record")
if(yesorno==true)
{
strval="DelTS.asp?TSID="+ptsid +"&frm="+pfrm
document.location.href=strval;
}
else
{
//user clicked on cancel
}
}
</script>
<input type=button value="Click Here" style='color:blue;background:#CCFF99'
onclick="callConfirm('3','f')">
so u need to put
onclick="callConfirm('<%=objRSPD("tsid")%>','<%=re quest.form("dateFrm6")%>')"
Hope this will help you
Cheers :)
vinod
|
|

August 3rd, 2005, 07:20 AM
|
|
Registered User
|
|
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
|
|
Hi Vinod,
That is working fine as you suggested.
Thanks.
Rupen Anjaria.
We CAN'T avoid problems, but can solve it.
|
|

August 3rd, 2005, 10:06 AM
|
|
Registered User
|
|
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
|
|
Hi All,
One more doubt is that how can i refresh the parent window, after deleting?
i.e. When user presses on Delete button, he will get conformatin and after that the record should be delete and window should be reloaded.
Thanks in advance.
Rupen Anjaria.
We CAN'T avoid problems, but can solve it.
|
|

August 3rd, 2005, 06:03 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
|
|
This cosde closes the child and refreshes the parent.
<script language = JavaScript>
opener.history.go(0);
self.close();
</script>
Wind is your friend
Matt
|
|

August 3rd, 2005, 11:28 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi Rupen
Two ways to solve this problem
1>DelTS.asp?TSID="+ptsid +"&frm="+pfrm
put response.redirect in DelTS.asp page after delting the record redirect it to the original page
2>if your page is say page1.asp where delete button is shown,
when user click the button resubmit the page1.asp with delete record id
in page1.asp you have if statement where delete record id is not null then you are deleting the corresponding records.
Hope this will help you
Cheers :)
vinod
|
|

August 4th, 2005, 04:01 AM
|
|
Registered User
|
|
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
|
|
Hi Matt,
This works fine except that it asks for "Retry" "Cancel" button, asfter pressing "Retry" it shows result.
Hi Vinod,
For method 1, my parent form referes some value of parent's parent form, and that got lost while using response.redirect.
For method 2, i got the same problem i.e. it asks to "Retry".
Any solution?
Thanks in Advance.
Rupen Anjaria.
We CAN'T avoid problems, but can solve it.
|
|

August 4th, 2005, 06:27 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
|
|
A common problem - This means you are not carrying all the values you should (hidden form variables etc). Put the text in the promt into Google, there is loads of information on this problem including solutions
Wind is your friend
Matt
|
|

August 5th, 2005, 05:45 AM
|
|
Registered User
|
|
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
|
|
Hi All,
Now that is solved as i use to store then in cookies and using them.
Thanks.
Rupen Anjaria.
We CAN'T avoid problems, but can solve it.
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| How to link my button to a URL? |
larry |
Flash (all versions) |
1 |
June 26th, 2007 01:00 AM |
| Link Button |
deontae45 |
ASP.NET 1.0 and 1.1 Basics |
2 |
June 23rd, 2007 04:46 PM |
| Link Button |
sohrabus |
ASP.NET 2.0 Professional |
1 |
November 14th, 2006 08:33 AM |
| Link Button |
sohrabus |
ASP.NET 1.0 and 1.1 Professional |
3 |
October 27th, 2006 07:08 AM |
|
 |