/    Sign up×
Community /Pin to ProfileBookmark

help with onsubmit()

im looking for a script that will submit a querystring. but if the querystring doesn’t match the page then it will return back to the preivous page. this must script must be whole(as one script)

to post a comment
JavaScript

13 Comments(s)

Copy linkTweet thisAlerts:
@JonaOct 20.2004 — [font=trebuchet ms]Can you elaborate a little, please?[/font]
Copy linkTweet thisAlerts:
@tigereye4cauthorOct 20.2004 — is must be one script that submits, using querystrings, to another page but if an error occures next it will return to the first page
Copy linkTweet thisAlerts:
@JonaOct 20.2004 — [i]Originally posted by tigereye4c [/i]

[B]is must be one script that submits, using querystrings, to another page but if an error occures next it will return to the first page [/B][/QUOTE]


[font=trebuchet ms]You don't need JavaScript for this. ? [/font]

<i>
</i>&lt;form action="script.pl" [b]method="get"[/b]&gt;


[font=trebuchet ms]The elements in the form field will be submitted through the URI in name/value pairs. Where does JavaScript come in?[/font]
Copy linkTweet thisAlerts:
@tigereye4cauthorOct 20.2004 — [i]Originally posted by tigereye4c [/i]

[B]is must be one script that submits, using querystrings, to another page but if an error occures next it will return to the first page [/B][/QUOTE]
...

but that wont return to the previouse page if there is an error
Copy linkTweet thisAlerts:
@JonaOct 20.2004 — [font=trebuchet ms]What kind of an error?[/font]
Copy linkTweet thisAlerts:
@tigereye4cauthorOct 21.2004 — [i]Originally posted by tigereye4c [/i]

[B]...

but that wont return to the previouse page if there is an error [/B]
[/QUOTE]

either a asp or php error
Copy linkTweet thisAlerts:
@JonaOct 21.2004 — [font=trebuchet ms]You would handle those errors with ASP or PHP, then, because JavaScript cannot detect a server-side error; it is only client-side.[/font]
Copy linkTweet thisAlerts:
@tigereye4cauthorOct 21.2004 — [i]Originally posted by tigereye4c [/i]

[B]either a asp or php error [/B][/QUOTE]

but asp can't submit forms...do you know if php can??
Copy linkTweet thisAlerts:
@JonaOct 21.2004 — [i]Originally posted by tigereye4c [/i]

[B]but asp can't submit forms...do you know if php can?? [/B][/QUOTE]


[font=trebuchet ms]The submit button is made to submit forms.[/font]
Copy linkTweet thisAlerts:
@tigereye4cauthorOct 21.2004 — ...thats client side though...do you think server side javascript will work??
Copy linkTweet thisAlerts:
@JonaOct 21.2004 — [font=trebuchet ms]Yes, it is client-side. When you submit the form, however, information is transferred through a common gateway interface to an application interface such as ASP or PHP and that application then processes the information how ever it was programmed to; the resulting output, redirection or errors, then, would be completely done in ASP or PHP.[/font]
Copy linkTweet thisAlerts:
@tigereye4cauthorOct 21.2004 — [i]Originally posted by tigereye4c [/i]

[B]...thats client side though...do you think server side javascript will work?? [/B][/QUOTE]

that is cgi though, i do not know cgi, right now..
Copy linkTweet thisAlerts:
@JonaOct 21.2004 — [font=trebuchet ms]CGI is the interface, not the language; PHP or ASP can be run as a CGI application instead of a module. You can use ASP or PHP.[/font]
×

Success!

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