Re: Help with ASP/Java Hyperlink

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Roland Hall (nobody_at_nowhere)
Date: 01/25/05


Date: Tue, 25 Jan 2005 00:59:15 -0600


"Don Grover" wrote in message news:eeqcUOpAFHA.824@TK2MSFTNGP11.phx.gbl...
:I hope some one can help, I have a html table that is created with asp that
: has a row of repeated buttons down the side.
: these call a page passing a query string with invoice number.
:
: I need to get a Java Yes/No dialog up and on yes call the hyperling query
: string.

Java or j(ava)script? J(ava)script is not java. Also, ASP is server-side
scripting, as I'm sure you are aware and <script> unless runat="server" is
client-side code. Granted you need to pass a variable from server to client
side but then it helps to show the server side code.

: I can do this with a single hyperlink but not passing on the query string
: and invnumber
:
: Here is my Response Write link
: <a href='trackselinv.asp?noreorder=" & iInvoiceID & "'><img border='0'
width
: ='20' height='20' src='" & sApplicationLoc & "orderinactive.gif' alt='Set
: order # " & iInvoiceID & " To NOT RE-ORDER'></a>
:
: Here is my Java but I don't know how to pass on noreorder=MyVar to the
: function ?

It would have been nice to see what you have now.

: I think i need to call the function in link and pass on myVar, any help
much
: appreciated.

in line or in link? Not sure what in link means.

: <script type="text/javascript">
: <!--
: function clearcart() {
: var answer = confirm("Are you sure you want to Cancel Reordering?")
: if (answer){
: alert("Cart Cleared!")
: window.location = "'trackselinv.asp?noreorder=MyVar";
: }
: else{
: }
: }
: //-->
: </script>

Here is one problem... where is the other ' (single quote)?
: window.location = "'trackselinv.asp?noreorder=MyVar";

Not seeing your ASP script leaves me guessing. Here are two possibilities.

)1)
%><!-- shows end of ASP code -->
<script type="text/javascript">
  function clearcart() {
  var answer = confirm("Are you sure you want to Cancel Reordering?")
  if (answer){
    alert("Cart Cleared!")
    window.location = "trackselinv.asp?noreorder=<% = MyVar %>";
    }
  }
</script>
<% ' --- ASP code begins again here ---

)2)
<%
sub prt(str)
  Response.Write str & vbCrLf
end sub

prt "<script type=""text/javascript"">" & vbCrLf & _
  "function clearcart() {" & vbCrLf & _
  " var answer = confirm(""Are you sure you want to Cancel Reordering?"")"
& vbCrLf & _
  " if (answer){" & vbCrLf & _
  " alert(""Cart Cleared!"")" & vbCrLf & _
  " window.location=""trackselinv.asp?noreorder=" & MyVar & "";" & vbCrLf &
_
  " }" & vbCrLf & _
  "}" & vbCrLf & _
"</script>"
%>

HTH...

-- 
Roland Hall
/* This information is distributed in the hope that it will be useful, but 
without any warranty; without even the implied warranty of merchantability 
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


Relevant Pages

  • Re: Problem with ASP on Webserver
    ... There is no ActiveX object involved in this problem, we only request a ASP ... function in the script ... (Accept-Language:) ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Problem with ASP on Webserver
    ... There is no ActiveX object involved in this problem, we only request a ASP ... function in the script ... (Accept-Language:) ...
    (microsoft.public.windowsce.platbuilder)
  • HOWTO: Remotely debug classic ASP in Visual Studio 2005
    ... i am still no closer to being able to debug ... ASP not ASP.NET ... Connect to, or expand, the web-server running the web-site is you want ... Check the "Enable ASP server-side script debugging" checkbox. ...
    (microsoft.public.vsnet.debugging)
  • HOWTO: Remotely debug classic ASP in Visual Studio 2005
    ... i am still no closer to being able to debug ... ASP not ASP.NET ... Connect to, or expand, the web-server running the web-site is you want ... Check the "Enable ASP server-side script debugging" checkbox. ...
    (microsoft.public.vsnet.debugging)
  • Re: IIS Template Cache and Script Engine Cache
    ... Ok, I went and asked the ASP Dev about it, so I will share what I've ... The two concepts you are asking about is the "Template Cache" and "Script ... The "Template Cache" is a cache of the intermediate form of the particular ...
    (microsoft.public.inetserver.iis)