Gossamer Forum
Home : General : Perl Programming :

html element changed when loaded from script

Quote Reply
html element changed when loaded from script
hey, i have a very strange problem, i have never come across something like this before. i use a script to load the content of a page. the thing is that all my form inputs which are text are slightly larger in both width and height. button inputs however are normal. see image.
if anyone has any idea where i am going wrong, i would much appriciate it.
thanks
pedge

css:
input {
width:200px;
height:20px;
background-color: #A0D0F0;
color: #000000;
font-family: arial, verdana, ms sans serif;
font-weight: bold;
font-style: italic;
font-size: 9pt;
border-style: solid;
border-width: 1px;
border-color: #FFFFFF;
}

perl:
sub make_page{
&make_menu;
&make_submenu;
print $query->header;
my $line;
open(READ,'<',"html/html.dat")|| warn "Can't open html.dat";
while($line = <READ>) {
$line =~ s/\$title/$title/gi;
$line =~ s/\$page_content/$page_content/gi;
$line =~ s/\$menu/$menu/gi;
$line =~ s/\$submenu/$submenu/gi;
print $line;
}
close READ;
}#end make_page
Quote Reply
Re: [pedge] html element changed when loaded from script In reply to
Hi. Do you have some sample HTML that it prints out?

Code:
sub make_page{

&make_menu;
&make_submenu;

print $query->header;

my $line;
open(READ,'<',"html/html.dat")|| warn "Can't open html.dat";
$line = <READ>;
close READ;

$line =~ s|\Q\$title|$title|gis;
$line =~ s|\Q\$page_content|$page_content|gis;
$line =~ s|\Q\$menu/$menu|gis;
$line =~ s|\Q\$submenu/$submenu/gis;
print $line;


}#end make_page

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] html element changed when loaded from script In reply to
thats the thing, the style is controled from a css page, as for the html its very basic:

<form name="search" method="post" action="/cgi-bin/search.cgi">
<input type="text" name="id">
<input type="hidden" name="type" value="Buy">
<input type="submit" name="Submit" value="Submit">
</form>

i have tested everything part of this and the only part that makes these text input boxes larger is when they are printed using that script.
Quote Reply
Re: [pedge] html element changed when loaded from script In reply to
played around with it a bit more. its not the style sheet, and its just that substitution line...
turns out, the text boxes are exactly 4 pixels bigger in both width and height. i dont understand this, coz i have another website and that uses exactly the same setup and that works ok... i can override the style sheet by adding
Code:
style="width:196px;height:16px;"
to all the boxes and that fixes it.

if anyone ever does figure this out, i will be very interested to see what i did wrong.
thanks
Pedge