Can't Display textbox label embedded in perl

X

xhoster

dd007 said:
When i try to do following, i am not able to see the label of the
textbox :(, any idea why??

Text input elements do not (AFAICT) have the label attribute. So there is
no such thing as *the* label of a text box. Of course, you can print a bit
of html that will be rendered next to the textbox, but you are not doing
that.
I can see the textbox, but no label..
I am using apache webserver on Linux machine and also running this
script on the same linux machine.

This is an html problem, not a Perl problem. It makes no difference that
you use Perl to generate the bad html, or what server you use to serve it.

Xho
 
D

dd007

When i try to do following, i am not able to see the label of the
textbox :(, any idea why??
I can see the textbox, but no label..
I am using apache webserver on Linux machine and also running this
script on the same linux machine.

print <<HTMLPAGE;
<HTML>
<HEAD>
<TITLE>some title</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<form method="POST" action="http://localhost/cgi-bin/someperl.pl">
<p>&nbsp;</p>
<p>&nbsp;</p>

<table border="1" width="54%" id="table1">
&nbsp;&nbsp;&nbsp;
</td>
</tr>
<tr>
</table>
<p>&nbsp;<input type="submit" value="Submit" name="B1"><input
type="reset" value="Reset" name="B2"><input type="button" value="Back"
onClick="history.go(-1);"></p>
</form>
</BODY>
</HTML>
HTMLPAGE
 
A

A. Sinan Unur

I can see the textbox, but no label..

What label? There is no label in the HTML below.
I am using apache webserver on Linux machine and also running this
script on the same linux machine.

What makes you think this has anything to do with Perl?
<td>&nbsp;<input type="text" name=$var1
size="20" value=$var2

What is in $var1 and $var2?

Sinan

--
A. Sinan Unur <[email protected]>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
 
D

dd007

Thank you for your reply.

$var1 and $var2 are variables initialized earlier in the perl script.
I also have tried just a simple textbox embedded in perl in above code
with the following :

<input type="text" name="Some Textbox" size="20" value="some value">

And I don't get the label "Some textbox" displayed but I do see a box
with "some value" displayed inside. I tried viewing the html source
from the browser, and it shows correctly

<input type="text" name="Some Textbox" size="20" value="some value">

but the problem is I can not see the textbox label on the browser.

If I just create an HTML page with a textbox lable and a box, it
displays just fine. But when I embed it in a perl script, I can't see
the label.

I would really appreciate if someone can point why I am not able to
display correctly.

Thanks
dd
 
D

dd007

I meant the name of the textbox as label, since it is displayed in
front of the textbox...
 
D

DJ Stunks

dd007 said:
Thank you for your reply.

who are you thanking?? you've posted more than one or two times to
this group - it's high time you learned how to post PROPERLY! Read the
Posting Guidelines which are posted here every other week.
<input type="text" name="Some Textbox" size="20" value="some value">

And I don't get the label "Some textbox" displayed but I do see a box
with "some value" displayed inside. I tried viewing the html source
from the browser, and it shows correctly

<input type="text" name="Some Textbox" size="20" value="some value">

but the problem is I can not see the textbox label on the browser.

you need to learn how HTML forms work. Your current understanding of
what the "name" attribute does is incorrect.

-jp

PS - Read the posting guidelines yet?? I'm sure a couple more posts
using your current posting style will ensure you're killfiled by the
majority of the list members...
 
A

A. Sinan Unur

Thank you for your reply.

Who are you thanking.
<input type="text" name="Some Textbox" size="20" value="some value">

And I don't get the label "Some textbox" displayed but I do see a box
with "some value" displayed inside.

Learn some HTML.

Post in the correct group.

Sinan
--
A. Sinan Unur <[email protected]>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
 
L

l v

dd007 said:
When i try to do following, i am not able to see the label of the
textbox :(, any idea why??
I can see the textbox, but no label..
I am using apache webserver on Linux machine and also running this
script on the same linux machine.

print <<HTMLPAGE;
<HTML>
<HEAD>
<TITLE>some title</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<form method="POST" action="http://localhost/cgi-bin/someperl.pl">
<p>&nbsp;</p>
<p>&nbsp;</p>

<table border="1" width="54%" id="table1">
<tr>


</td>
</tr>
<tr>
</table>
<p>&nbsp;<input type="submit" value="Submit" name="B1"><input
type="reset" value="Reset" name="B2"><input type="button" value="Back"
onClick="history.go(-1);"></p>
</form>
</BODY>
</HTML>
HTMLPAGE

What happens when you surround HTMLPAGE with double-quotes?

print <<"HTMLPAGE";
 
D

DJ Stunks

l said:
What happens when you surround HTMLPAGE with double-quotes?

print <<"HTMLPAGE";

here-docs interpolate by default if quotes are not supplied.

-jp
 
D

dd007

What happens when you surround HTMLPAGE with double-quotes?
print <<"HTMLPAGE"


I tried
print <<"HTMLPAGE"
..
..
..
</HTML>
"HTMLPAGE "

and am getting error:
Can't find string terminator "HTMLPAGE" anywhere before EOF.
 
D

dd007

PS - Read the posting guidelines yet?? I'm sure a couple more posts
using your current posting style will ensure you're killfiled by the
majority of the list members...

jp:
Thanks for your suggestion, I will try to improve.
 
L

l v

DJ said:
here-docs interpolate by default if quotes are not supplied.

-jp

eh, I knew that ;) -- oops *sorry*. My habit of putting on the
double-quotes, made me forget that.
 
L

l v

dd007 said:
I tried
print <<"HTMLPAGE"
.
.
.
</HTML>
"HTMLPAGE "

and am getting error:
Can't find string terminator "HTMLPAGE" anywhere before EOF.

As "DJ Stunks" pointed out, my suggestion will not solve your HTML
problem. However, you made extra modifications to your code than what I
suggested. Just the print was to have the double quotes, not the string
terminator.

print <<"HTMLPAGE";
..
..
..
</HTML>
HTMLPAGE


The problem you are experiencing is unrelated to Perl but appears to be
your understanding of HTML syntax.
 
D

DJ Stunks

l said:
eh, I knew that ;) -- oops *sorry*. My habit of putting on the
double-quotes, made me forget that.

it's a good habit to get into - as Pastor Conway says, it's better to
be clear than rely on default behavior.

-jp
 
D

DJ Stunks

dd007 said:
jp:
Thanks for your suggestion, I will try to improve.

You're getting better, but don't discard attributions. That means make
sure you keep who said what in addition to what they actually said.

-jp
 
D

dd007

As "DJ Stunks" pointed out, my suggestion will not solve your HTML
problem. However, you made extra modifications to your code than what I
suggested. Just the print was to have the double quotes, not the string
terminator.
print <<"HTMLPAGE";
.
.
.
</HTML>
HTMLPAGE
The problem you are experiencing is unrelated to Perl but appears to be
your understanding of HTML syntax.

Len:
Thank you for the clarification.
i tried what you have suggested, and it's still the same..
 
D

dd007

You're getting better, but don't discard attributions. That means make
sure you keep who said what in addition to what they actually said.

jp:
Thank you :)
ok, I will.
 
G

Guest

: And I don't get the label "Some textbox" displayed but I do see a box
: with "some value" displayed inside. I tried viewing the html source
: from the browser, and it shows correctly

: <input type="text" name="Some Textbox" size="20" value="some value">

: but the problem is I can not see the textbox label on the browser.

Of course you don't. Consult a reference; "label" != "displayed name".

Oliver.
 
D

dd007

: And I don't get the label "Some textbox" displayed but I do see a box
: with "some value" displayed inside. I tried viewing the html source
: from the browser, and it shows correctly
: <input type="text" name="Some Textbox" size="20" value="some value">
: but the problem is I can not see the textbox label on the browser.
Of course you don't. Consult a reference; "label" != "displayed name".

Oliver:
Thank you for the tip, I think, I could resolve with this tip.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,184
Messages
2,570,979
Members
47,579
Latest member
CharaS3188

Latest Threads

Top