garric
December 6, 2007, 2:26am
1
Hello All,
I was trying to come up with a form using perl cgi. I then created a frame to show the output of the form. Refer below
print $display_form->start_form(-title=>"Updateuser", -style => 'font-size: 9pt; color: #202020 ; font-family: Verdana', action=>"${DOCROOT}updateUser.pl", target=>'cmxiframe');
print $display_form->end_form();
print $display_form->Tr(
td(
{
-width => "70%",
-halign => "right",
-valign => "top" },
"<iframe id=\"cmxiframe\" name=\"cmxiframe\" src=\"${DOCROOT}blankPage.pl\" width=600 height=200 frameborder=0 scrolling=no style=\"overflow:visible\"></iframe>"
)
However, this is not redirecting the output of my 'action' scipt into the required frame. Does anyone see a problem here ? Thanks in advance.
Regards,
Garric
garric:
print $display_form->start_form(-title=>"Updateuser", -style => 'font-size: 9pt; color: #202020 ; font-family: Verdana', -action=>"${DOCROOT}updateUser.pl", -target=>'cmxiframe');
Some hyphens appear to be missing on this line.
garric
December 6, 2007, 3:21am
3
Even after adding the hyphens, it continues to take me to a new page and is not loading it in the frame
Have you checked the generated HTML (use browser's view source) really contains the "form" tag with the target attribute and the iframe is really there with that name?
As the CGI module does nothing but generates HTML, it should be reproducible with a static HTML form with the same HTML.
garric
December 9, 2007, 12:07am
5
The HTML looks right. Its here below
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<html xmlns="XHTML namespace " lang="en-US" xml:lang="en-US"><head><title>Untitled Document</title>
<meta http-equiv="refresh" content="300" />
</head><body><form method="post" action="/CSDADM/updateUser.pl" enctype="application/x-www-form-urlencoded" target="cmxiframe" style="font-size: 9pt; color: #202020 ; font-family: Verdana" title="Updateuser">
��<p /><p /><p /><b>Choose pool : </b>�<select name="pool">
<option value=""></option>
<option value="ipf_64g">ipf_64g</option>
<option value="md_alt">md_alt</option>
<option value="md_pnr">md_pnr</option>
<option value="rls">rls</option>
<option value="vesta">vesta</option>
</select>�������<p /><b>Enter User � : </b>�<textarea name="user" rows="1" cols="15" style="background-color: transparent">hkn</textarea>���������<p /><b>Choose operation : </b><input type="radio" name="operation" value="add " checked="checked" />add <input type="radio" name="operation" value=" remove" /> remove<p /><input type="submit" name="Update user" value="Update user" /><div><input type="hidden" name=".cgifields" value="operation" /></div></form><table border="0" cellspacing="0" cellpadding="0" width="70%"><tr><td valign="top" halign="right" width="70%"><iframe id="cmxiframe" name="cmxiframe" src="/CSDADM/blankPage.pl" width=600 height=200 frameborder=0 scrolling=no style="overflow:visible"></iframe></td></tr></table></body></html></body></html>