Welcome to WebmasterWorld Guest from 54.196.232.162

Forum Moderators: open

Message Too Old, No Replies

Is it possible to simulate a user clicking on a href link?

     
11:37 am on Apr 26, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2003
posts:149
votes: 0


I know about meta and java redirects, but is there any way of simulating a human user clicking on a href link automatically when the page loads? Sounds kinda of strange but I have tracking setup and it doesn't register meta or java redirects only actual clicks on href links.

Any suggestions please?

11:55 am on Apr 26, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 27, 2003
posts:664
votes: 0


What do you mean by "java redirects"?
12:01 pm on Apr 26, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2003
posts:149
votes: 0


sorry javascript
3:04 pm on Apr 27, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Sept 24, 2002
posts:364
votes: 0


I am almost certain that DHTML does not support generating events. This would open up a whole slew of abuse problems...

what if it generated a Ctrl+alt+del keystroke? or just alt+f4? Or what if, you had a box pop up, that says "click here if you agree to download and load an ActiveX component", and then u generate the click...

An event must occur by hand.

I wuld say u have to chane the tracking system..,

5:58 pm on Apr 27, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


Ehm... What about this then?

...
<script type="text/javascript">
function clickedhref() {
location.href="whatever.html";
}
</script>
<body onload="clickedhref()">
<a href="whatever.html">Click me!</a>
...

6:02 pm on Apr 27, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


it doesn't register meta or java redirects

Why not?

6:08 pm on Apr 27, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Mar 27, 2003
posts:41
votes: 0


Re: DrDoc's post (whatever.html)... I think that's what he meant by a JavaScript redirect, which doesn't work in his situation.

gph

6:36 pm on Apr 27, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Jan 31, 2002
posts:285
votes: 0


This works in IE and of course Opera is along for the ride :)

document.getElementById('mylink').click()

gph

6:38 pm on Apr 27, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Jan 31, 2002
posts:285
votes: 0


SethCall just incase you didn't know. What I posted above only works on page elements.
9:25 pm on Apr 27, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


Well, usually, if a refresh or JavaScript redirect doesn't work, it's because parameters need to be passed with the URL. I can't think of any situation where the problem (whatever it may be) can't be solved.

So, as long as we know why a meta or JavaScript redirect doesn't work, then it should be possible to solve it.

10:35 pm on Apr 27, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 27, 2003
posts:664
votes: 0


Seems to me this thread is branching into 2 topics: How to do a javascript 'redirect' and why they don't register in Fleapit's tracking s/w. The first problem can be solved, per posts 5 and 8. Re the second question: Fleapit, what trackig s/w are you using?

Shawn

8:34 pm on Apr 29, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2003
posts:149
votes: 0


gph, you little beauty! document.getElementById('mylink').click() works absolutely spot on! You have saved me bucket load of work I can't thank you enough!

Just gotta love WebmasterWorld. Always someone out there who knows the answer :)