473,398 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Help with ASP/Java Hyperlink

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.
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 ?
I think i need to call the function in link and pass on myVar, any help much
appreciated.

<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>

Regards
Don Grover
Jul 22 '05 #1
4 1828
"Don Grover" wrote in message news:ee*************@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
Jul 22 '05 #2
On 25 jan 2005, you wrote in microsoft.public.inetserver.asp.general:
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 ?
I think i need to call the function in link and pass on myVar, any
help much appreciated.

<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>

<a href='trackselinv.asp?noreorder=<% =iInvoiceID %>'
onclick='return clearcart()'>
<img src='<% =sApplicationLoc %>orderinactive.gif'
alt='Set order # <% =iInvoiceID %> To NOT RE-ORDER'>
</a>

<script type="text/javascript">
function clearcart() {
if (confirm("Cancel Reordering?")) {
alert("Cart Cleared!");
return true;
};
alert("Cart NOT Cleared!");
return false;
};
</script>
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #3
Thank's Evertjan
I did not think of returning true, works like a dream.
Im tossing up if i should do a Java course or Advanced MSSQL, maybe ill do
the J first 8-)

Thanks Don
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
On 25 jan 2005, you wrote in microsoft.public.inetserver.asp.general:
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 ?
I think i need to call the function in link and pass on myVar, any
help much appreciated.

<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>

<a href='trackselinv.asp?noreorder=<% =iInvoiceID %>'
onclick='return clearcart()'>
<img src='<% =sApplicationLoc %>orderinactive.gif'
alt='Set order # <% =iInvoiceID %> To NOT RE-ORDER'>
</a>

<script type="text/javascript">
function clearcart() {
if (confirm("Cancel Reordering?")) {
alert("Cart Cleared!");
return true;
};
alert("Cart NOT Cleared!");
return false;
};
</script>
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #4
Don Grover wrote on 25 jan 2005 in microsoft.public.inetserver.asp.general:
Im tossing up if i should do a Java course
[please no topposting on usenet]

Don, Java is quite another language and is NOT a compiler form of
Javascript.
I did not think of returning true, works like a dream.


I'm glad.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Hemant | last post by:
Hi all, I am very new to this HTML/JAVA environment. I am having some doubts please answer them ASAP. I want to run an executable from the browser iteself, without "Save" or "Open" and "Security...
3
by: IntraRELY | last post by:
Hello, I am having an issue with this java code for a pop-up. window.open('clientsCreate.aspx',null,','_blank,height=350,width=750,menubar =no,status=no,toolbar=no') I need the ability to...
10
by: hecsan07 | last post by:
I am a novice programmer. I want to have a hyperlink that looks like so: www.mycoolsite.com?a=21132. On click I want to extract the query string and use it to query a table within a DB (SQL...
3
by: wazoo | last post by:
I'm hoping someone here might help me with this. I'm putting the finishing touches on my intranet web app, and I'm adding some simple JavaScript to my VB.Net Webforms. This works:...
1
by: SAL | last post by:
Has anyone worked with the System.Web.UI.WebControls.HyperLink? I am trying to find examples on how to use it. What I am trying to do is assign a Hyperlink to a document (i.e. .doc, .pdf,...
3
by: Chris | last post by:
I have an access database that we share on a public drive. Also there is a folder in the same drive that has PDF documents. On my computer, I can pull up the PDF document off the hyperlink but on...
10
by: David Thielen | last post by:
Hi; I have help html pages for each page of my ASP.NET webapp. So for the page datasource.aspx, I have help\datasource.htm. Bu what I want when the hyperlink is clicked, for it to look for the...
1
by: Radu | last post by:
Hi. I have a page, named "SelectScorecard", which contains a combo and some links to outside documents, on the server. These documents are situated in some sub-folders of the webfolder, named...
1
by: Radu | last post by:
Hi. I have a page, named "SelectScorecard", which contains a combo and some links to outside documents, on the server. These documents are situated in some sub-folders of the webfolder, named...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.