/    Sign up×
Community /Pin to ProfileBookmark

Form Submission Issues (Refresh)

Hi I have a form that basically has 2 submission buttons on the page because I have a movable div kinda thing happening. The problem with the form is that for some reason I need to hit “Submit” twice for the variables to kick in. I noticed if I hit submit and I refresh the page right after, the variables kick in I guess and the new values pop up.

Basically I want to try to integrate this in my script but it submits the form repeatedly..

Thanks for checking this post out.

[CODE]window.onload=
function() {
var sels = document.getElementsByTagName(‘select’);
CngColor(sels[0]);
CngColor2(sels[1]);
CngColor3(sels[2]);
CngColor4(sels[3]);

var drg = document.getElementsByTagName(‘div’);
if(readCookie(‘wd’)) {
drg[0].style.visibility=readCookie(‘wd’);
}
};

[COLOR=”Red”]document.getElementById(‘form1’).submit();[/COLOR] submits repeatedly

</script>[/CODE]

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@LeeUSep 23.2008 — Haven't tested this myself but try:
[CODE]
document.getElementById('form1').submit();
[COLOR="Red"]return false;[/COLOR]
[/CODE]

If that doesn't work, try "true" instead of "false".
Copy linkTweet thisAlerts:
@theflyingminstauthorSep 23.2008 — Hey thanks LeeU, I'm not sure what's going on but whatever it's doin, true or false, I'm losing my floatable div layer.. Is there a way to do this sorta thing as a refresh instead maybe just to see if it's a form submission issue?
Copy linkTweet thisAlerts:
@opifexSep 24.2008 — have a live example of the form? i don't understand the need for the "2 submit buttons"...
Copy linkTweet thisAlerts:
@theflyingminstauthorSep 24.2008 — Hey thanks for responding, I actually decided to go a different way with my setup, my coding was starting to get pretty obnoxious..
×

Success!

Help @theflyingminst 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.18,
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,
)...