473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SUBSTRING(), HTML tags issue

33
In my home page I am showing a small part of my product’s description.



I am achieving this by using “SUBSTRING” function in sql server stored prodedure.



SUBSTRING(Product.Description,1,198)

Description may contain HTML data or pure text



That all is ok



But this create a problem in my page layout,

The lay out became ugly occasionally

I found the reason as by taking only 198 character

HTML tags like <table> and <div>

Will not be closed properly



for emaple a sample data is as

<TABLE cellSpacing=1 cellPadding=2 width=311 border=1>
<TBODY>
<TR>
<TD vAlign=top width="60%" bgColor=#ffffff height=24><B><FONT face=Arial size=1>



see <TABLE> <TBODY> <TR> <TD >all are not closed

similarly DIV in some other case also causing the same problem



Do any good practices to take handle this situation?


--kuttan--
Apr 19 '08 #1
0 881

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Chris | last post by:
Im hoping someone can help me understand why this works? Requirement: Navigate DOM through javascript to perform DHTML actions. Issue: GIANT html document, up to 4MB in size, thousands and...
32
by: Cornel Bicutzi | last post by:
Hello, What is the difference between HTML and XHTML... Thanks, ------------------------------------------------------------------------ IT Interview Questions :...
2
by: anand | last post by:
Hello Group , I am making a search programe in which i have to make a search in an HTML document .Now i am having entire html code in a field of table where i search.Now my issue is that i want to...
3
by: colinhumber | last post by:
How can I use regular expressions to search for a substring within another substring? For example, if I have the string: "This is * some text <button id="123">Some * text</button>" and I only...
11
by: Darren Anderson | last post by:
I have a function that I've tried using in an if then statement and I've found that no matter how much reworking I do with the code, the expected result is incorrect. the code: If Not...
9
by: anupamjain | last post by:
Hi, After 2 weeks of search/hit-and-trial I finally thought to revert to the group to find solution to my problem.(something I should have done much earlier) This is the deal : On a JSP...
4
by: samuelberthelot | last post by:
Hi, I would like to extract 'some string' from the following string: <A href=\"#\">some string</A> Attention! This is not an HTML element, it is a STRING, so I can't do ..innerHTML. 'some...
19
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
1
by: Trmbne2000 | last post by:
Hello, I'm developing a press release system, and on the homepage, they want a short preview of the article. I would consider using left(...) to take the first x characters, however there is HTML...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.