Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
need some help with java if is possible
Old 11-23-2010, 04:31 AM need some help with java if is possible
ZoC
Skilled Talker

Posts: 68
Trades: 0
Hello there, is there anyway to have all urls from my website onclick="clicked=true;" ?

so i dont need to add manually to every url onclick="clicked=true;"

Thank You !
ZoC is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-24-2010, 02:05 AM Re: need some help with java if is possible
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Something like this:

Code:
var links = document.getElementsByTagName('a');

for(var link in links)
{
     link.onclick = "clicked=true;";
}
To be honest my javascript isn't what it should be so someone else might come along with a better solution.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 11-24-2010, 07:30 AM Re: need some help with java if is possible
ZoC
Skilled Talker

Posts: 68
Trades: 0
Hello there, NullPointer i try your command but didnt work you have and another suggestion ? Thank you !
ZoC is offline
Reply With Quote
View Public Profile
 
Old 11-24-2010, 12:28 PM Re: need some help with java if is possible
CSM
CSM's Avatar
Front-End Developer

Posts: 297
Name: Michael Pehl
Location: Palma de Mallorca
Trades: 0
Java is NOT JavaScript...

Why do you want/need "clicked:true"?
__________________
Chief Web Officer / Front-End Developer / System Engineer

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
CSM is offline
Reply With Quote
View Public Profile Visit CSM's homepage!
 
Old 11-26-2010, 10:28 AM Re: need some help with java if is possible
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And where is the variable "clicked" defined for each link?


Not forgetting of course that each refresh of the page will set any variables to empty.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-26-2010, 01:13 PM Re: need some help with java if is possible
Super Spam Talker

Posts: 879
Name: Paul W
Trades: 0
I also have to ask why you want to do this? As a general comment, if you're trying to do something odd or unusual and it's proving difficult, take a step back and reconsider what you're actually trying to achieve. Apologies if that sounds pompous
PaulW is online now
Reply With Quote
View Public Profile
 
Old 11-26-2010, 01:43 PM Re: need some help with java if is possible
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by PaulW View Post
I also have to ask why you want to do this? As a general comment, if you're trying to do something odd or unusual and it's proving difficult, take a step back and reconsider what you're actually trying to achieve. Apologies if that sounds pompous
Actually rather than being pompous, it is very good advice and something that developers in any scripting language should consider.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to need some help with java if is possible
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24939 seconds with 12 queries