PDA

View Full Version : Post request to perl with JavaScript?


cortic
10-27-2002, 01:10 AM
I have a page that's purpose is to change certain txt file, an iframe on the page is hooked into a perl script and I just change the src to 'cgi-bin/work.pl?whatever' with whatever being the info its to work with, fine, but I need to send a larger string (larger than the thousand odd characters that's the max of this) so I need to make a post request - without a form, is there any way to do this with JavaScript?

I can think of another way to do this, by creating dynamically a form on the page (or in the iframe) after the info presents itself and executing it, but this is really messy, I'd like another way...

Thanks.

joh6nn
10-27-2002, 01:37 AM
yeah, unfortunately, you're gonna have to do it the second way. there's no way to send post info with javascript, aside from submitting a form.

cortic
10-27-2002, 05:06 AM
Thanks for your reply joh6nn, thought when I couldn't find anything on this that the chances were slim, had to ask cause this forum has surprised the hell out of me more times than not, I'll just have to make a function that create and executes a form, maybe in the iframe, calling an htm file that has the script...

Thanks again for clearing this up.