Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 10th, 2005, 08:44 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default 'hand' is undefined

Why does this through an error:

<%
response.write "<a class='elinks' onclick='javascript: history.back()' onmouseover='javascript: style.cursor=hand'>Previous</span>"
%>

Error:

'hand' is undefined

Picco

www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
Reply With Quote
  #2 (permalink)  
Old March 10th, 2005, 08:45 AM
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default

the fix:
<%
response.write "<a class='elinks' href=# onclick='javascript: history.back()'>Previous</span>"
%>

www.crmpicco.co.uk
www.milklemonadechocolate.uk.tt
Reply With Quote
  #3 (permalink)  
Old March 10th, 2005, 08:49 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Hand is a string value, not a variable so should be:
Code:
<%
response.write "<a class='elinks' onclick='history.back()' onmouseover='style.cursor=""hand""'>Previous</span>"
%>
You don't even need on mouseover because the cursor only changes then anyway so you can simplify to:
Code:
<%
response.write "<a class='elinks' onclick='history.back()' style='cursor: hand;'>Previous</span>"
%>
--

Joe (Microsoft MVP - XML)
Reply With Quote
  #4 (permalink)  
Old March 10th, 2005, 10:43 AM
Authorized User
Points: 251, Level: 5
Points: 251, Level: 5 Points: 251, Level: 5 Points: 251, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Canada.
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rushman
Default

use style="cursor:pointer;"

Dijkstra's law on Programming and Inertia:

If you don't know what your program is supposed to do, don't try to write it.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hand code for datasets greenbriar BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 May 1st, 2008 05:42 AM
how to integrate a hand-held bar code scanner suneet.pant Pro VB.NET 2002/2003 4 March 4th, 2008 06:06 AM
using <div>'s to have a left hand pane on web page crmpicco CSS Cascading Style Sheets 2 December 7th, 2007 11:54 PM
Hand Coding VS Data Wizards Bulldog BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 3 May 22nd, 2007 04:21 AM
Use Hand Held Scanner Mahavishnu Classic ASP Professional 1 November 16th, 2004 12:50 PM



All times are GMT -4. The time now is 08:53 AM.


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