|
Help?
Jul 5, 2009 17:28:01 GMT -5
Post by PowderGuy10296 on Jul 5, 2009 17:28:01 GMT -5
i need help w/ a script... <center> <FORM ACTION="../cgi-bin/redirect.pl" METHOD=POST onSubmit="return dropdown(this.gourl)"> <SELECT NAME="gourl"> <OPTION VALUE="">Report for...
<OPTION VALUE="http://freegamersforum.proboards.com/index.cgi?action=pmsend&to=Admin&module=report&subject=Reporting Thread&message=I am reporting <url=' + enc(pageLink) + '%23' + postId +'>this Post for Abuse</url>" >Report Abuse <OPTION VALUE="http://freegamersforum.proboards.com/index.cgi?action=pmsend&to=Admin&module=report&subject=Reporting Thread&message=I am reporting <url=' + enc(pageLink) + '%23' + postId +'>this Post for Spam</url>" >Report Spam <OPTION VALUE="http://freegamersforum.proboards.com/index.cgi?action=pmsend&to=Admin&module=report&subject=Reporting Thread&message=I am reporting <url=' + enc(pageLink) + '%23' + postId +'>this Post for Swearing</url>" >Report Swearing
</SELECT>
<INPUT TYPE=SUBMIT VALUE="Report"> </FORM> </center>
Its for a dropdown menu. that "Reports" the post. but when you click the "Report" button, it takes you to a page that says "Not Found The requested URL /cgi-bin/redirect.pl was not found on this server." It worked before, but then it stopped. i got the original code off www.htmlcodetutorial.com/linking/linking_famsupp_114.html and edited it. and now its not working, can anyone help?
|
|
|
Help?
Jul 6, 2009 20:46:35 GMT -5
Post by me2 on Jul 6, 2009 20:46:35 GMT -5
This code uses javascript for a redirection mechanism. If somebody has disabled javascript, it is using a server-side based redirection instead.
First, you probably didn't include the javascript with the function dropdown(mySel), or you did not activate javascript at your browser. That's why the browser tried to use the server-side method. Second, the server-side redirection mechanism requires you to have a perl script called "redirect.pl" at your server, which does the actual HTTP redirect. You don't have this file on your server, and therefore it doesn't work.
If it worked before, that was probably because you did not forget the function dropdown(mySel) and you had javascript enabled. In this case you couldn't even notice that the perl script was missing at the server and everything worked.
You should not just copy some code, you should try to understand what the code is really doing. For example: <FORM ACTION="../cgi-bin/redirect.pl" ... This piece of code means you are sending data to a URL called "../cgi-bin/redirect.pl" at your server. And now you should start thinking: "From where do I get this file, or do I already have it?" And that's the reason why it's not working at all. You simply don't have it.
Well, you are calling three times the same file and only one parameter changes. Therefore you should be able to do it much simpler like this:
<center> <FORM ACTION="http://freegamersforum.proboards.com/index.cgi" METHOD=GET> <INPUT TYPE="hidden" NAME="action" VALUE="pmsend"> <INPUT TYPE="hidden" NAME="to" VALUE="Admin"> <INPUT TYPE="hidden" NAME="module" VALUE="report"> <INPUT TYPE="hidden" NAME="subject" VALUE="Reporting Thread"> <SELECT NAME="message"> <OPTION VALUE="">Report for... <OPTION VALUE="I am reporting <url=' + enc(pageLink) + '%23' + postId +'>this Post for Abuse</url>" >Report Abuse <OPTION VALUE="I am reporting <url=' + enc(pageLink) + '%23' + postId +'>this Post for Spam</url>" >Report Spam <OPTION VALUE="I am reporting <url=' + enc(pageLink) + '%23' + postId +'>this Post for Swearing</url>" >Report Swearing </SELECT> <INPUT TYPE=SUBMIT VALUE="Report"> </FORM> </center> And you don't need the perl script for this.
/me
Btw: "Help?" is a really bad thread title!
|
|