its really frustrating

Results 1 to 3 of 3

Thread: its really frustrating

  1. #1
    Mark b. Guest

    Default its really frustrating

    hi There i need some here.. this is what i need the script below is for 4Guys search page.. i&#039;v modified the title that is displayed to display the real page title. now i wanted to know is it at all posiable to make the discription buy saying. that in the text of the page the word "dog" is found now i want to disply 50 caractors in front of "dog" and 50 behind.. hope that makes sence.. please help me its really frustrating<BR><BR><BR> If bolValid then<BR> iPos = InStr(1,strContents,"&#060;TITLE&#062;")<BR> If iPos = 0 then<BR> strTitle = "Untitled (" & objFile.Name & ")"<BR> strDesc = ""<BR> Else<BR> strTitle = Mid(strContents,iPos+7,InStr(iPos,strContents,"&#0 60;/TITLE&#062;")-iPos-10)<BR>&#039;THIS IS WHERE I NEED THE HELP<BR> &#039;iPos = InStr(iPos,strContents, strKeywords ,1)<BR> iPos = InStr(iPos,strContents,"&#060;!--DESC:")<BR> If iPos = 0 then<BR> strDesc = ""<BR> Else<BR> strDesc = Mid(strContents,iPos+9,InStr(iPos,strContents,"--&#062;")-iPos-9)<BR> End If<BR> End If<BR> <BR> Response.Write "&#060;A HREF=""" & objFile.Name & """&#062;" & _<BR> strTitle & "&#060;/A&#062;<BR>" & vbCrLf<BR> Response.Write "&#060;FONT SIZE=2&#062;" & strDesc<BR> Response.Write "&#060;/FONT&#062;&#060;P&#062;" & vbCrLf<BR> iCount = iCount + 1<BR> End if

  2. #2
    Join Date
    Dec 1969

    Default RE: its really frustrating

    I don&#039;t know why you want this, but<BR><BR>String(50,"-") & "dog" & String(50, "-")

  3. #3
    Join Date
    Dec 1969

    Default Desert Ghost was teasing you...

    ...because this is NOT an advanced question so you should ask it in the ASP forum, not here.<BR><BR>But what the heck...<BR><BR>That code will never *FIND* "dog". All it does is display all the text between &#060;!--DESC: and --&#062;<BR><BR>So how can you show 50 characters in front and in back of "dog" if it isn&#039;t found????<BR><BR>Hmmmm....maybe DG was *not* teasing you??? I think I&#039;m beginning to wonder!<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts