perl script

Hi,

I am modifying a perl script

Here is a section

sub forgotten_password		{
print header;
print start_html( -title => $title,  -style => { 'src' => "$web_path$style" }, -onload => "document.loginform.email.focus();" );

Open in new window


I need to get rid of formatting but keep the onload function. The following seems to work, however I would like to know of a way to put the onload command on it's own line.

sub forgotten_password		{
print header ( -onload => "document.loginform.email.focus();" );

Open in new window


thanks for you help.
netplus21Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wilcoxonCommented:
What do you mean by "put the onload command on its own line"?  Can you give a (pseudo) code example of what you want?
0
netplus21Author Commented:
Wilcoxon: If I want to remove the print header; line, I want to know how to keep -onload => "document.loginform.email.focus();" in the script. Is it possible to place -onload => "document.loginform.email.focus();" on a line, on it's own, or does it have to be preceded by something?
0
ozoCommented:
print "Onload: document.loginform.email.focus();\n"; # is this what you mean?
print "<body onload=\"document.loginform.email.focus();\">\n"; # or this?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
netplus21Author Commented:
The second command worked for me.
print "<body onload=\"document.loginform.email.focus();\">\n";

Thanks!
0
netplus21Author Commented:
Hi, follow up question:

print header() unless $header_flag == 1;
		if ( $header_flag == 2 )		{
			
		}
		else			{
			print start_html( -title => $title,  -style => { 'src' => "$web_path$style" } ) unless $max_quiz_time;
			print start_html( -title => $title,  -style => { 'src' => "$web_path$style" }, -script => $j_script, -onload => "cd();" ) if $max_quiz_time;
		}
		
		header_tm();

Open in new window


I would like to get rid of start_html( -title => $title,  -style => { 'src' => "$web_path$style" } ) and start_html( -title => $title,  -style => { 'src' => "$web_path$style" }

What do I do?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.