Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Desktop Technical Support Page: 1 2  Previous   Next
Problems embeding NOTES in a HTML window script
Author Message
DVD Profiler Unlimited Registrantdtsig
Just asking questions man
Registered: August 17, 2009
United States Posts: 352
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting FredLooks:
Quote:
I notice that you have the construct <IMDb>tt1234567</IMDb> in your example Notes image. Two points, assuming that you are not really interested in the "tt1234567" showing up in the HTML output:

1. If you are using this to take advantage of phpDVDProfiler's ability to construct an IMDb link, then there is an alternative syntax: <IMDb number=1234567 /> does the same thing, but will not display in an HTML window.

2. Alternatively, you can use the same technique TomGaines suggested (for changing \r\n into <br>) to remove the "detritus":
// replacing CRLF
DP_Notes = DP_Notes.replace(/\r?\n/g, '<br/>');
// removing IMDb cruft
DP_Notes = DP_Notes.replace(/<IMDb>[^<]*<\/IMDb>/gi, '');

Note that that last line ends with two single quotes side-by-each (single-quote single-quote right-parenthesis semicolon)(I wish there was some sort of teletype font that could be used to make this type of thing more clear)

Thanks for that Fred.

# 1 did is nice removing the HTML output as you stated.

You mentioned the code that Tom had, but if i use just the

// replacing CRLF
DP_Notes = DP_Notes.replace(/\r?\n/g, '<br/>');

My understanding is that it will put back all the crlf formatting that I have done in the NOTES editbox.  Once again here is the TEST html script ... with fixed single quote mark



and here is what the output looks like in html window



I am not getting any of the CRLF put back in.

Here is what it looks like in the Personalize window



Is it possible that I didn't put it in the right place? 
Is there something else i should do? 
Can you try this on yours and see if it works the same

Thanks again
DSig
DVD Profiler Unlimited RegistrantStar ContributorTomGaines
Registered Sept. 24, 2001
Registered: March 13, 2007
Reputation: High Rating
Germany Posts: 2,005
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
Still you did not put it in a "<script>" block.
What you get as output thereof is the <DP NAME="NOTES">, you think you have disabled with "//". But for one thing, you are not inside a script block for the "//" to have any effect. For another, the "DP NAME="NOTES"" will not be disabled, because these HTML tags are simple search and replace by the HTML window generation, and will throw off your script code (the <DP NAME="..."> tags should never be used inside script blocks. Only the DP_... variants should be used).


 Last edited: by TomGaines
DVD Profiler Unlimited Registrantdtsig
Just asking questions man
Registered: August 17, 2009
United States Posts: 352
Posted:
PM this userView this user's DVD collectionDirect link to this postReply with quote
Quoting TomGaines:
Quote:
Still you did not put it in a "<script>" block.
What you get as output thereof is the <DP NAME="NOTES">, you think you have disabled with "//". But for one thing, you are not inside a script block for the "//" to have any effect. For another, the "DP NAME="NOTES"" will not be disabled, because these HTML tags are simple search and replace by the HTML window generation, and will throw off your script code (the <DP NAME="..."> tags should never be used inside script blocks. Only the DP_... variants should be used).

Thanks for that.  I just tried to use what you had said.  I didn't notice earlier any mention about script blocks .. complete my fault.

i will keep trying to figure out a combination that will work.

Thanks everyone for trying to help

David
    Invelos Forums->DVD Profiler: Desktop Technical Support Page: 1 2  Previous   Next