•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 427,110 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,087 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1206 | Replies: 5
![]() |
Dear All
i am totally confuse in how to explain the issue.
i will try
i am web master of one site
www.makePakistanbetter.com
if you check this link,there is one issue
you will be seeing there this txt
1 "Burney’s"
but this is not what i entered.
in the text box i pasted the text which i copied frm other site and it was
2 "Burney's"
when i saved and displayed this to the page it appears as above 1 instead of above 2.
this is happening with some other chars as well.
but the interesting thing is , if i try to edit this, then the whole text will be moved to the text box , and there it appears correct as above 2, but again if i save it will be as above 1.
another scenario is, if i edit this copied 2 text manually then it will appear correct.
so there is some thing wrong in copy and paste.
i will really appreciate if some one can help.
my findig is, may be i have to add soem char-set in head or some thing like th, and those char-sets are automatically associated with txt box.
thanking u in advance
i am totally confuse in how to explain the issue.
i will try
i am web master of one site
www.makePakistanbetter.com
if you check this link,there is one issue
you will be seeing there this txt
1 "Burney’s"
but this is not what i entered.
in the text box i pasted the text which i copied frm other site and it was
2 "Burney's"
when i saved and displayed this to the page it appears as above 1 instead of above 2.
this is happening with some other chars as well.
but the interesting thing is , if i try to edit this, then the whole text will be moved to the text box , and there it appears correct as above 2, but again if i save it will be as above 1.
another scenario is, if i edit this copied 2 text manually then it will appear correct.
so there is some thing wrong in copy and paste.
i will really appreciate if some one can help.
my findig is, may be i have to add soem char-set in head or some thing like th, and those char-sets are automatically associated with txt box.
thanking u in advance
What are you copying and pasting from?
Unless you are copying pure text from a text editor, anything you grab from a website or Word document will likely contain some formatting characters and these will show up as odd characters or little squares.
Try pasting into Notepad and see what happens.
The reason those characters show is because that's what you're pasting into your code.
Unless you are copying pure text from a text editor, anything you grab from a website or Word document will likely contain some formatting characters and these will show up as odd characters or little squares.
Try pasting into Notepad and see what happens.
The reason those characters show is because that's what you're pasting into your code.
thankyou
you are right may be, some time i cpy from yahoomails or other web sites. but how i can over come this situation as users will keep on doing this, they can copy text from any site and paste in the website editor , in web site editor it appear fine but when they will ave it, it will appear wrong.
what i think in page i ahve to add some thing/code, which i dont know what?
you are right may be, some time i cpy from yahoomails or other web sites. but how i can over come this situation as users will keep on doing this, they can copy text from any site and paste in the website editor , in web site editor it appear fine but when they will ave it, it will appear wrong.
what i think in page i ahve to add some thing/code, which i dont know what?
It isn't a security thing. It's just what happens when you copy from one application and paste into another most times.
I notice it most in forums where people type their replies in Word and then paste that into the rich text editor because that way they can use a spellchecker.
If you use PHP you can use the preg_match function - or one of the string handling functions - to strip out the characters you don't want. But it is always going to take a bit of effort to clean it up if you grab your content that way.
I notice it most in forums where people type their replies in Word and then paste that into the rich text editor because that way they can use a spellchecker.
If you use PHP you can use the preg_match function - or one of the string handling functions - to strip out the characters you don't want. But it is always going to take a bit of effort to clean it up if you grab your content that way.
This may help you get started:
http://javascript.internet.com/forms...haracters.html
You just tell the script which characters to want taken out and it does it. I haven't tested this script, but this source is usually very good.
http://javascript.internet.com/forms...haracters.html
You just tell the script which characters to want taken out and it does it. I haven't tested this script, but this source is usually very good.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Horizontal lines across display (Monitors, Displays and Video Cards)
- Javascript/CSS Problem: Display is not properly hiding items (style.display="none") (JavaScript / DHTML / AJAX)
- PHP Help - Display forum online and total members on main page (PHP)
- Newmember with big problem!!! (C)
- Dell inspirion 1000 problem (Troubleshooting Dead Machines)
- problem due to too many forms being displayed/how to display forms neatly? (C#)
- Desktop Background Hijacked-NEW Problem(! Smart Security) (Viruses, Spyware and other Nasties)
- AOC Monitor display problems (Monitors, Displays and Video Cards)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Print button using rollover images
- Next Thread: "make Us Your Homepage" Script ?


Linear Mode