Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
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 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 November 22nd, 2004, 09:50 PM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default document.lcoation.href is null or not an object

Dear members

Who could help me with this:

I use main file index.php
to include a file (abc.php)
on abc.php file, I retreive data from database, then use javascript to to get all data and link to new pages:
On index.php html file, I have
<a href="javascript:newLocation(0)"><img src..></a>
in abc.php
I have function newLocation:
function newLocation(x){

document.Location.href="http://www"+Info[x][thisAdd[x]];
}

then, when the program are runing, it said
document.Location.href is null or not object.

Who please to help me?
Thanks a lot
Ice
 
Old November 22nd, 2004, 11:05 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

You must use location, not Location. Lowercase 'l'.

-Snib
Where will you be in 100 years?
Try new FreshView 0.2!
 
Old November 24th, 2004, 04:44 AM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. Sir. It is work well now.
Best regards
Ice






Similar Threads
Thread Thread Starter Forum Replies Last Post
document.location.href surendran Javascript 5 August 3rd, 2005 10:17 PM
null or not an object crmpicco Classic ASP Basics 0 July 4th, 2005 05:58 AM
Href to Excel Document rbmohr Classic ASP Basics 1 November 15th, 2004 09:19 PM
document null or not an object Adam H-W Javascript 2 April 22nd, 2004 05:59 AM
document null or not an object Adam H-W Javascript How-To 2 February 18th, 2004 01:25 PM





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