Welcome to WebmasterWorld Guest from 54.196.224.166

Forum Moderators: open

Message Too Old, No Replies

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

     

FleaPit

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

10+ Year Member



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?

ShawnR

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

WebmasterWorld Senior Member 10+ Year Member



What do you mean by "java redirects"?

FleaPit

12:01 pm on Apr 26, 2003 (gmt 0)

10+ Year Member



sorry javascript

SethCall

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

10+ Year Member



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..,

DrDoc

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

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



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>
...

DrDoc

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

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



it doesn't register meta or java redirects

Why not?

bryndyment

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

10+ Year Member



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)

10+ Year Member



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)

10+ Year Member



SethCall just incase you didn't know. What I posted above only works on page elements.

DrDoc

9:25 pm on Apr 27, 2003 (gmt 0)

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



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.

ShawnR

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

WebmasterWorld Senior Member 10+ Year Member



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

FleaPit

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

10+ Year Member



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 :)

 

Featured Threads

Hot Threads This Week

Hot Threads This Month