path() is not a function?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

path() is not a function?

Post by JAB Creations »

It looks like any other function I've written, what am I missing here?

Code: Select all

<script type="text/javascript">var path = 'http://example.com/123';function path() {alert (path);}</script>

Code: Select all

<a href="javascript&#058; path();">alert</a>
* The semi-colon is being output as an entity in my preview of the post.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: path() is not a function?

Post by JAB Creations »

Ha I realized it the moment after I posted, the function and the variable have the exact same name. Ops! :mrgreen:
Post Reply