|
|
|
||||
|
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. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
(felis madjewicus)
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
|
Manipulating a form field with your URL?
Ok, say I have a signup form with a few text input fields and a submit button. Is it possible without any uber-fancy script or code to manipulate the input to one of those fields via the URL, to create a sort of referal link?
|
|
|
|
|
|
#2 |
|
Viva la vulva!
Join Date: Mar 2003
Location: you can't please everyone, so you got to please yourself
Posts: 16,557
|
[Your URL]?id=your_value
Using PHP: <INPUT TYPE=submit value=\"$id\"> Using Javascript something like: Code:
id = location.href.substring(location.href.lastIndexOf(' '),location.href.lastIndexOf('id=')+3);
then use a javascript write to the value into the form: Code:
<input type=submit value="<script language="JavaScript">document.write(id);</script>"> |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Apr 2004
Location: NEW YORK CITY
Posts: 2,274
|
make sure you do some input validation while you're at it
__________________
Make Real Green with ORGANIC SEO | Blog post exchange | Non-index page trades | A-B C-D Trades [icq: 194-215-962] [mail: [email protected]] |
|
|
|