Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI Syntax for Message Box

Status
Not open for further replies.

SDGregory

Technical User
Sep 22, 2003
11
US
I am customizing formmail.pl and I would like to utilize a message error box instead of the pre-written html error page. What would the syntax be to prompt a message box?
 
A javascript Alert box as far as I know

--Paul
 
So I could use javascript to make a message box and this would be ok in the perl file?
 
It's a bit of a debugger to debug, but essentially yes

Write out the javascript, in the HTML, as it would appear in a normal HTML file, and you should be OK
--Paul

 
Ok, I didn't have any luck with javascript. It could be the perl file I'm using redirecting to HTML before it gets to an alermsg so it doesn't work. Can I just use $alertmsg in the perl file instead of using java?
 
print &quot;<script language=\&quot;javascript\&quot;>\nalert(&quot;Hello World&quot;);</script>&quot;;

Would be the way I'd be thinking of going, but you'd best give me an idea of what you're trying to accomplish

--Paul
 
I am trying to change the current error result for formmail. Right now the script redirects the user to an html page showing the fields they didn't fill in. I'd like to prompt an alert message showing these missing fields instead of the messy html error page. I think my biggest issue is the script redirects the user to the html page before it actually runs the error script. I'm not sure where this is happening. I think I have the syntax correct but when the script redirects to html then prompts for an alert it doens't work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top