![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Need help with displaying only part of a message as summary
I want to use an existing table that contains a summary for the item
details.. But on my page i want to display say the first 6 words or 35 characters as a summary for an item, and use that as the link to the details page... Not sure how to search for this, if someone can point me in the right direction on what to search for? Current summary: this item is a great addition to your purchase and has alot of extra features Wanted summary: This item is a great addition to........ i dont want to have to create a new table for the client to add the information again, i want to use the existing data and just display what i want on the page.. -- ASP, SQL2005, DW8 VBScript, Visual Studio 2005, Visual Studio 2008 |
|
|||
|
Re: Need help with displaying only part of a message as summary
that seems to work great..
thanks... by chance is there a way to do this but allow the last word to be complete? Example: Currently: Today the weather was gr... Would like: Today the weather was great... -- ************************************************ ASP, SQL2005, DW8 VBScript, Access "bregent" <webforumsuser@macromedia.com> wrote in message news:g7d8v5$o3i$1@forums.macromedia.com... > In VBScript you would use the Left function to grab how ever many > characters you want from the left hand side of a string. That's it. |
|
|||
|
Re: Need help with displaying only part of a message assummary
>by chance is there a way to do this but allow the last word to be complete?
There is no VBScript functions for this, but you should be able to build one easily with just a few lines of code by searching for the space character. Start by setting up a loop and use the loop variable as the length argument of the Left function. Initialize the loop to whatever you want the minimum character length to be - say 30 for example. Test the character at the loop counter position (use the Mid function) and if it's the space, stop looping. If it's not a space, increment and then test again. Once you find the position of the space, use the counter value as the argument to the Left function. |
|
|||
|
Re: Need help with displaying only part of a message as summary
Cool, ill have to play around with that.. thanks..
-- ASP, SQL2005, DW8 VBScript, Visual Studio 2005, Visual Studio 2008 "bregent" <webforumsuser@macromedia.com> wrote in message news:g7e07c$h00$1@forums.macromedia.com... > >by chance is there a way to do this but allow the last word to be > >complete? > > There is no VBScript functions for this, but you should be able to build > one > easily with just a few lines of code by searching for the space character. > Start by setting up a loop and use the loop variable as the length > argument of > the Left function. Initialize the loop to whatever you want the minimum > character length to be - say 30 for example. > > Test the character at the loop counter position (use the Mid function) and > if > it's the space, stop looping. If it's not a space, increment and then test > again. Once you find the position of the space, use the counter value as > the > argument to the Left function. > > |
|
|||
|
Re: Need help with displaying only part of a message as summary
Do not use form mail I used to use it and it nearly brought the sever down
there is a big hole in it that allows spammers to utilize it and send spam using your sever. it is better to use php to send your form with sendmail "Daniel" <dan_c@h.com> wrote in message news:g7d7g2$mjo$1@forums.macromedia.com... >I want to use an existing table that contains a summary for the item >details.. > > But on my page i want to display say the first 6 words or 35 characters as > a summary for an item, and use that as the link to the details page... > > Not sure how to search for this, if someone can point me in the right > direction on what to search for? > > > Current summary: > this item is a great addition to your purchase and has alot of extra > features > > Wanted summary: > This item is a great addition to........ > > i dont want to have to create a new table for the client to add the > information again, i want to use the existing data and just display what i > want on the page.. > > > > > > -- > ASP, SQL2005, DW8 VBScript, Visual Studio 2005, Visual Studio 2008 > |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|