/    Sign up×
Community /Pin to ProfileBookmark

I need this to open in a new window upon submission. Thanks!

[CODE]<script type=”text/javascript”>
function getURL(val){
if(!val){
alert(‘Who were you Referred By? (Access Code)’);
return false;
}
else{
base = ‘http://www.freecardmatrix.com/index.aspx?refid=’;
location = base + val;
return false;
}
}
</script>
</head>

<body>
<form id=”form1″ name=”form1″ method=”post” action=”” onsubmit=”return getURL(this.url.value)”>
<label>
<input type=”text” name=”url” />
</label>
<label>
<input type=”submit” name=”Submit” value=”Enter” />
</label>
</form>
</body>
</html>[/CODE]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@pugs421Jul 21.2007 — Do it like this:

[CODE]
<html>
<head>
<script type="text/javascript">
function validate(formObj){
if(formObj.refid.value == ''){
alert('Who were you Referred By? (Access Code)');
formObj.refid.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" target="_NEW" action="http://www.freecardmatrix.com/index.aspx" onsubmit="return validate(this)">
<label>
<input type="text" name="refid" value="" />
</label>
<label>
<input type="submit" name="Submit" value="Enter" />
</label>
</form>
</body>
</html>
[/CODE]


It will submit "refid" via POST when it passes validation, so keep in mind that you won't see "refid" passed in the URL, but it will be accessible as a variable on the next page.
Copy linkTweet thisAlerts:
@profitshareauthorJul 21.2007 — It doesn't work all the way. I am going to be using that script for other opportunities such as www.rotatrix.net/?profitshare (without the profitshare) and when modified for such it just goes to 'company page' not an individuals affiliate page-this is an absolute must and is the whole point of the 'gateway'.

Please understand I appreciate your help and look forward to try #2!
×

Success!

Help @profitshare spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...