Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-28-2021, 11:30 AM   #1
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,116
Turning a 'submit' button into a URL?

Is it possible to take a forms submit button and code it so that it acts like a url.

I do not think and 'onclick' element will actually work for what I need :/

I want to avoid using the form itself but still need it (data collection) and wanted to simply add a meta refresh to a page as if the button was clicked.

Nothing nefarious, just want the form to still count submit clicks in the database, without having to have the surfer click the submit button.

This is the form I'm using presently:

Quote:
<form action="vote.php?id=4" method="post">
<input type="hidden" name="confirmation" value="true" />
Are you sure that you want to vote for this?<br />
<input type="submit" value="Yes" /> <input type="button" value="No" onclick="javascriptstory.back();" />
</form>
__________________
NOTHING TO SEE HERE
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 11:56 AM   #2
ZTT
Confirmed User
 
ZTT's Avatar
 
Industry Role:
Join Date: Apr 2019
Posts: 657
If the surfer isn't clicking submit then what submit clicks are you counting?
__________________
__________________
ZTT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 11:57 AM   #3
faperoni
Confirmed User
 
faperoni's Avatar
 
Industry Role:
Join Date: Feb 2015
Location: Amsterdam
Posts: 208
Maybe something like:

Give the form a name, for example "form1", then

Code:
window.onload = function(){
  document.forms['form1'].submit();
}
or

Code:
<body onload="document.form1.submit()">
__________________
Faperoni.com Fucker.com
faperoni is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 12:05 PM   #4
ZTT
Confirmed User
 
ZTT's Avatar
 
Industry Role:
Join Date: Apr 2019
Posts: 657
So the question isn't how to turn a button into a URL (which I'm sure he's asked before) but how to make a form automatically submit on page load?
__________________
__________________
ZTT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 01:45 PM   #5
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,116
Quote:
Originally Posted by ZTT View Post
So the question isn't how to turn a button into a URL (which I'm sure he's asked before) but how to make a form automatically submit on page load?
It was a button to link to a specific URL in the past.

Onclick wont work for this, I need to be able to change a submit button to a clickable link (the link from the previous page loads the form, but i want to bypass the form but still carry the data through to the 3rd page).
__________________
NOTHING TO SEE HERE
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 02:31 PM   #6
ZTT
Confirmed User
 
ZTT's Avatar
 
Industry Role:
Join Date: Apr 2019
Posts: 657
Is the 3rd page on your site?
__________________
__________________
ZTT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 03:44 PM   #7
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,224
Quote:
Originally Posted by Publisher Bucks View Post
It was a button to link to a specific URL in the past.

Onclick wont work for this, I need to be able to change a submit button to a clickable link (the link from the previous page loads the form, but i want to bypass the form but still carry the data through to the 3rd page).
Would something like this work?:

<form action="page3.php" method="post">
Message: <input type="text" name="message">
Name: <input type="text" name="name">
Email address: <input type="text" name="emailad">
<input type="submit">
</form>

page3.php:

<html> <body>
Hello <?php echo $_POST["name"]; ?>, I see that you wrote <?php echo $_POST["message"]; ?><br>
Your email address is <?php echo $_POST["emailad"]; ?>
</body> </html>

This carries data to another page and doesn't need it to be a clickable link
__________________
Join the BEST cam affiliate program on the internet!
I've referred over $1.7mil in spending this past year, you should join in.
I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 05:04 PM   #8
dcortez
DINO CORTEZ™
 
dcortez's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
Quote:
Originally Posted by Publisher Bucks View Post
Is it possible to take a forms submit button and code it so that it acts like a url.

I do not think and 'onclick' element will actually work for what I need :/

I want to avoid using the form itself but still need it (data collection) and wanted to simply add a meta refresh to a page as if the button was clicked.

Nothing nefarious, just want the form to still count submit clicks in the database, without having to have the surfer click the submit button.

This is the form I'm using presently:
Nothing "nefarious"? It looks like your trying to dig back into the user's web browser history that may precede your pages.

Is that what you're trying to do?
dcortez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 06:00 PM   #9
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,116
Quote:
Originally Posted by dcortez View Post
Nothing "nefarious"? It looks like your trying to dig back into the user's web browser history that may precede your pages.

Is that what you're trying to do?
No im trying to get them to pass a vote across without actually having to click a button prior to hitting the target url

Otherwise I'll have a redirect page with a form on it that I'll have to throw ads on before going to the tagret url which will detract from the surfers site experience.
__________________
NOTHING TO SEE HERE
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 06:01 PM   #10
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,116
Quote:
Originally Posted by ZTT View Post
Is the 3rd page on your site?
No, the third page is an external site.
__________________
NOTHING TO SEE HERE
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 06:21 PM   #11
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,224
I think I read something wrong lol.

But, if you want to send data on a <a href=...> then sessions would work. But, if you want to send that data to other sites, then that makes things kind of tricky, like syncing up where the sessions are stored on both sites. Also, probably will have to use a prefix for the session variables on each site so that they aren't named the same and cause issues etc.
__________________
Join the BEST cam affiliate program on the internet!
I've referred over $1.7mil in spending this past year, you should join in.
I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 06:28 PM   #12
dcortez
DINO CORTEZ™
 
dcortez's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
Quote:
Originally Posted by Publisher Bucks View Post
No im trying to get them to pass a vote across without actually having to click a button prior to hitting the target url

Otherwise I'll have a redirect page with a form on it that I'll have to throw ads on before going to the tagret url which will detract from the surfers site experience.
I see.

If you want to move the visitor from one page to another, while at the same time, invoking a script using the form data from the first page, you might be able to achieve that by passing the data to the next page and coding the next page to recognize the passed form data, invoking a web hit to whatever script is handling the form data.

Do you have coding control of the target page, or is that a third party page?
dcortez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 06:29 PM   #13
dcortez
DINO CORTEZ™
 
dcortez's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
Quote:
Originally Posted by Publisher Bucks View Post
No, the third page is an external site.
That answers my last question.

How are you handling the form data? With a PHP script and some DB hit?
dcortez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 06:51 PM   #14
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,116
Quote:
Originally Posted by dcortez View Post
How are you handling the form data? With a PHP script and some DB hit?
Correct.

Once its completed theres a very high chance you might be interested in this script too ;)

Send me a PM
__________________
NOTHING TO SEE HERE
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 06:54 PM   #15
dcortez
DINO CORTEZ™
 
dcortez's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
How about this...

Your page with the form, on submit, executes a PHP script:

record_and_go.php

You pass whatever data you need for saving, AND the target URL.

The PHP script does whatever DB validation/update you need, and returns an tiny HTML shell that contains only a Javascript snippet that immediately sets the window location (page url) to the target page from the last form.

That will cause the target page to be loaded when the JS is executed (on form load).

??
dcortez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 06:57 PM   #16
Publisher Bucks
Confirmed User
 
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana. / Newcastle, England.
Posts: 1,116
Quote:
Originally Posted by dcortez View Post
How about this...

Your page with the form, on submit, executes a PHP script:

record_and_go.php

You pass whatever data you need for saving, AND the target URL.

The PHP script does whatever DB validation/update you need, and returns an tiny HTML shell that contains only a Javascript snippet that immediately sets the window location (page url) to the target page from the last form.

That will cause the target page to be loaded when the JS is executed (on form load).

??
That could potentially work perfectly actually

I'd need to add an additional .php file, but yeah, I can see that working.
__________________
NOTHING TO SEE HERE
Publisher Bucks is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 08:41 PM   #17
ZTT
Confirmed User
 
ZTT's Avatar
 
Industry Role:
Join Date: Apr 2019
Posts: 657
Quote:
Originally Posted by dcortez View Post
Nothing "nefarious"? It looks like your trying to dig back into the user's web browser history that may precede your pages.

Is that what you're trying to do?
Sounds more like he's faking votes on another site, using his visitors as bots.
__________________
__________________
ZTT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-28-2021, 09:34 PM   #18
dcortez
DINO CORTEZ™
 
dcortez's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
Quote:
Originally Posted by ZTT View Post
Sounds more like he's faking votes on another site, using his visitors as bots.
If that were the case, it's easy enough to render the visitor's page as a multi-framed document and with Javascript spawn multiple hits from the same visitor/IP.

As I now understand, the application is more for top list / traffic exchange tracking.
dcortez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-29-2021, 02:54 AM   #19
zerovic
Confirmed User
 
zerovic's Avatar
 
Industry Role:
Join Date: Apr 2010
Posts: 1,084
I'm trying to understand the question, but I have no idea what OP is trying to achieve =D

Can you please describe your question step by step? There are many good answers above, but I still have no idea what you need :D

You have a form, which, in this case is completely unnecessary.. You can simply use 2 links without the form itself..
zerovic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-29-2021, 04:25 AM   #20
tomash999
Confirmed User
 
Industry Role:
Join Date: Sep 2015
Posts: 88
Seems like he wants to use the visitor's IP and browser, to submit a form in an external site.

First check if they have CSRF tokens, a validation that their site is not in an iFrame, CloudFront, or any other security measures. Then it may be achievable with JavaScript as well.
tomash999 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-29-2021, 05:42 AM   #21
ZTT
Confirmed User
 
ZTT's Avatar
 
Industry Role:
Join Date: Apr 2019
Posts: 657
Quote:
Originally Posted by dcortez View Post
If that were the case, it's easy enough to render the visitor's page as a multi-framed document and with Javascript spawn multiple hits from the same visitor/IP.
An easy way to get flagged as a bot instantly.

Quote:
As I now understand, the application is more for top list / traffic exchange tracking.
Why would you need such a convoluted method, that not one person has even understood, to track outgoing hits?

The only thing he has been clear about is wanting to generate clicks that people haven't made.
__________________
__________________
ZTT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-29-2021, 09:24 AM   #22
dcortez
DINO CORTEZ™
 
dcortez's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
Quote:
Originally Posted by ZTT View Post
An easy way to get flagged as a bot instantly.
Absolutely correct. Sadly, not everyone flags bots. Regardless, this is not an approach to advocate in any case.
dcortez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-29-2021, 09:26 AM   #23
dcortez
DINO CORTEZ™
 
dcortez's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
Even simpler solution.

Use a PHP script that scrapes the form data (for DB) and the target URL.

When PHP updates the DB, simply return a location header from the PHP script, aimed at the target URL.
dcortez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks

Tags
submit, button, form, url, refresh, count, page, clicked, nefarious, presently, vote, click, surfer, database, meta, clicks, collection, onclick, element, acts, forms, code, data, simply, avoid



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.