/    Sign up×
Community /Pin to ProfileBookmark

Hi All,

I an very new to HTML/CGI and web development in general but have a simple query.

I want a HTML form to run a server-side perl script that returns a table which is then presented/rendered in the clients browser. I would like this to happen without having a button on the clients page which must be clicked before the script runs and returns data, although I have managed to get it to work this way. How can I get it to happen without the button? I understand there is a way using JavaScript but have been unsuccessful in attempting this. My working HTML is below. Any ideas?

<META http-equiv=’Content-Type’ content=’text/html; charset=UTF-8′>
<link rel=”stylesheet” href=”xxx.css” type=”text/css”>
<HTML>

<!– SCRIPT LANGUAGE=”JavaScript”>
function sendSMS()
{
documen.zzz_Logging.submit();
}
<!– img src=”/images/but_send_live.gif” WIDTH=”63″ HEIGHT=”28″ onClick=”sendPPP(‘Live’);”– >

</SCRIPT –>
<BODY>
<CENTER>
<H1>Welcome To The Home Page For The <i>SSS</i> PPPPackage.</H1>
</CENTER>
<FORM METHOD=”POST” ACTION=”csv2table.pl” NAME=”SSS_Logging”>
<!– FORM VARIABLES –>
<INPUT TYPE=”hidden” NAME=”CAPTION” VALUE=”PMF_TEST”>
<INPUT TYPE=”hidden” NAME=”CSV_DIR_NAME” VALUE=”.webm_xxx”><br>
<INPUT TYPE=”submit” VALUE=”submit”>

<!–SELECT NAME=”srcTON” SIZE=”1″>
<OPTION VALUE=”1″>International</OPTION>
</SELECT–>
</FORM>
</BODY>

</HTML>

Thanks
Pat

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@ray326Jul 07.2004 — I think you just need to run the script directly and not fool with this page.
Copy linkTweet thisAlerts:
@PhillMcJul 07.2004 — [i]Originally posted by ray326 [/i]

[B]I think you just need to run the script directly and not fool with this page. [/B][/QUOTE]


Agreed. You'd get into a lot of non-standard code trying to get the form to "Submit" without a "Submit" Button.
Copy linkTweet thisAlerts:
@flemi_pauthorJul 08.2004 — Hi Gents,

Thanks for taking the time to look at this. I had a play with it yesterday and tried a redirect tag to invoke the perl script as a URL, passing the arguments as part of it and it worked a treat.

I have been developing this using IIS and its all fine. When I pop the script and the HTML onto another Webserver, the mechanism to serve the page and run the script executes but the Perl fails as the Webserver does not seem to know about Perl(?). This issue is probably beyond the scope of this forum.

Thanks

Pat
Copy linkTweet thisAlerts:
@ray326Jul 08.2004 — Yep, that's a server configuration issue.
×

Success!

Help @flemi_p 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.6,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...