Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP 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
 
Old May 20th, 2005, 04:28 PM
jamara
Guest
 
Posts: n/a
Default Javascript in Anchor Tag

I am having an issue with the code below:

The anchor tag below is supposed to execute a script named scan_more_units. I am also trying to make the variables on the page available to the script.

 <A href=""javascript:scan_more_units(document.scan_SP Board_no)"">Scan Units</a><BR>

The scan_more_units script is below:

<script language="jscript">
function scan_more_units(myform) {
    myform.action = "scan_unit_no.asp";
    myform.submit();
}
</script>

When I click on the anchor tag, it goes to the default.asp page in the folder but does not go to scan_unit_no.asp. The default.asp page is the login page. I'd like to bypass that page but send the userid and password directly to scan_unit_no.asp. I'm trying to eliminate the need for the user to login every time they access a new page.

Can anyone help me with this?
Thanks!

 
Old May 30th, 2005, 01:00 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Please modify the following line as:

<A href="javascript:scan_more_units(document.scan_SPB oard_no)">Scan Units</a><BR>

instead of

<A href=""javascript:scan_more_units(document.scan_SP Board_no)"">Scan Units</a><BR>

Om Prakash





Similar Threads
Thread Thread Starter Forum Replies Last Post
Anchor Tag kapilmirchi ASP.NET 1.0 and 1.1 Basics 2 November 18th, 2008 05:57 AM
Anchor tag visited CSS related question mat41 Classic ASP Basics 0 April 16th, 2008 05:55 PM
Want to pass value at href in anchor tag on xslt Abhinavnaresh XSLT 4 February 21st, 2008 04:32 AM
place anchor tag around bgImage inside cell?? mat41 HTML Code Clinic 4 January 26th, 2006 07:42 AM
Problem with input type image With Anchor tag vinkumrect Javascript How-To 1 July 21st, 2005 08:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.