Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: order in cgi function output ?

by ruzam (Curate)
on Jan 31, 2008 at 19:23 UTC ( [id://665424]=note: print w/replies, xml ) Need Help??


in reply to order in cgi function output ?

Try skipping the '-head' all together. You can include code in the -style section with the -code key. According to the CGI documentation "Style definitions in -code override similarly-named ones in -src", and hence come after the -src links by default.
print start_html({ -title => "title" , -style=>{ -src=>[ "/$common_css" , "/$css" , "/$common_cal_css" , "/$cal_css +" ], -code => '<!--[if IE]><link href="/ie.css" rel="stylesheet" type=" +text/css"><![endif]-->' }, });
This results in
<head> <title>title</title> <link rel="stylesheet" type="text/css" href="/common.css" /> <link rel="stylesheet" type="text/css" href="/1680x1050-css.css" /> <link rel="stylesheet" type="text/css" href="/common_cal.css" /> <link rel="stylesheet" type="text/css" href="/1024x768-cal.css" /> <style type="text/css"> <!--/* <![CDATA[ */ <!--[if IE]><link href="/ie.css" rel="stylesheet" type="text/css"><![e +ndif]--> /* ]]> */--> </style> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1 +" /> </head>

Replies are listed 'Best First'.
Re^2: order in cgi function output ?
by lepetitalbert (Abbot) on Feb 01, 2008 at 08:19 UTC

    Hello dear Monks,

    I first went back to my print qq, but ruzam's solution is really nicer :)

    Thank you all.

    Have a nice day.

    "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://665424]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-29 13:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found