Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

making text info hidden on a web page

Posted on 2013-11-18
5
344 Views
Last Modified: 2013-11-18
Hi i have a text box 1) and i have text or data
2) this i am placing on the page that i wish to refer back to which is not a text box but want to put on the page for future ref
but cannot figure out how to hide
any help would be appreciated

1) <input type="hidden" name="itemid_<?php echo ($i);?>" value="<?php echo $item->id; ?>" />

********** this is what i need to reference but need to be
2) <td width="0%" align="right">
                        <span  id="Stockpres_<?php echo ($i);?>" class="tablchet" ><?php echo $item->amount;?></span>      
                  </td>

this does not work
3) <td width="0%" align="right">
                        <span type="hidden" id="Stockpres_<?php echo ($i);?>" class="tablchet" ><?php echo $item->amount;?></span>      
                  </td>
0
Comment
Question by:sydneyguy
5 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39658291
Why wouldn't you just create another hidden input field for that value?
0
 
LVL 24

Accepted Solution

by:
chaau earned 400 total points
ID: 39658296
You do not need to use type="hidden", as it applies to input only. For span, "hidden" is an actual attribute. Therefore change it to
<span hidden id="Stockpres_<?php echo ($i);?>" class="tablchet" ><?php echo $item->amount;?></span>   

Open in new window

0
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 100 total points
ID: 39658348
I think it may be the language barrier, but I thought you wanted the data to carry over to the next page perhaps via a get via the form.  That is why I suggested.
0
 

Author Closing Comment

by:sydneyguy
ID: 39658529
<span hidden id="Stockpres_<?php echo ($i);?>" class="tablchet" ><?php echo $item->amount;?></span>  

works fine thanks for that
i do not need to pass this value across, and i wanted to findout how to do it you never know when i could use this in another situation

thabks for all you help
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39658582
I've done things like that so I could look at the HTML source code for info I didn't want shown on the visible page.  Mostly test data so I could see why the visible page was working as it was.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
multiple selects 23 48
Row insertion failed. Array 5 46
Html Newline 7 20
Checking https returns 301 21 14
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question