Just for my own curiosity, what ever happend to the Java Applet that was
referenced in the FAQ along with the HTTPRequestObje ct? http://jibbering.com/faq/#FAQ4_34
And in http://jibbering.com/faq/#FAQ4_43, any chance of adding a snippet
about this bookmarklet:
javascript :'<co de><ol><li>'+(d ocument.documen tElement||docum ent.body).outer HTML.replace(/&/g,"&").repl ace(/</g,"<").repla ce(/%20%20/g," %20"). replace(/\n/g,"<li>")+'<\/ol><\/code>';
I don't recall who wrote it, but it gives you the source of the
document, with line numbers, to make debugging in IE a lot simpler.
<FAQENTRY>
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05
13 1508
Thomas 'PointedEars' Lahn wrote: javascript:'<co de><ol><li>'+( document.docume ntElement||docu ment.body).oute rHTML.replace( /&/g,"&").repl ace(/</g,"<").repla ce( /%20%20/g," %20"). replace( /\r/g,"<li>")+'<\/ol><\/code>'; Don't use javascript: URIs where you can avoid it. Particularly your example creates invalid HTML.
How else do you propose to create bookmarklets?
Duh.
--
Matt Kruse http://www.JavascriptToolbox.com
Thomas 'PointedEars' Lahn wrote: Robert wrote:
Randy Webb <Hi************ @aol.com> wrote in message
The only two differences in the two is that the first one numbers the lines, which makes it a lot easier to see where a particular line number is. The other difference is outerHTML versus innerHTML. Does outerHTML work in IE on the MAC? I had to change the \n to \r to get this one line of Javascript to work on MacOS 10.2.6 for IE 5.2.
javascript:'< code><ol><li>'+ ( document.docume ntElement||docu ment.body).oute rHTML.replace( /&/g,"&").repl ace(/</g,"<").repla ce( /%20%20/g," %20"). replace( /\r/g,"<li>")+'<\/ol><\/code>';
Don't use javascript: URIs where you can avoid it. Particularly your example creates invalid HTML.
If you had bothered to read the entire thread, you would have noticed
that it was the creation of a bookmarklet that would number the lines in
the source code of a page. To mark the end of a line in a text file (...), the MacOS uses a carriage return (CR, ASCII 13), UNIX uses a line feed (LF, ASCII 10) while Windows uses a carriage return and a line feed (CRLF). < http://mathstat.carleton.ca/~help/ma...xplatform.html >
Perhaps, we could include both the Mac and PC line end characters in the same one liner.
There is no need for different versions for Mac and PC. Perl Compatible Regular Expressions, as supported by ECMAScript implementations , support alternations:
var b = document && (document.docum entElement || document.body); if (typeof b.outerHTML == "string")
Since the bookmarklet is for IE only, that test is not needed.
{ alert( b.outerHTML .replace(/&/g,"&") .replace(/</g,"<") .replace(/ /g," ") .replace(/(\r\n?|\n)/g, "<li>")); }
That does not do what was needed. Read the thread, then try again.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Matt Kruse wrote: Thomas 'PointedEars' Lahn wrote: javascript:'<co de><ol><li>'+( document.docume ntElement||docu ment.body).oute rHTML.replace( /&/g,"&").repl ace(/</g,"<").repla ce( /%20%20/g," %20"). replace( /\r/g,"<li>")+'<\/ol><\/code>'; Don't use javascript: URIs where you can avoid it. Particularly your
^^^^^^^^^^^^^^^ ^^^^^^^ example creates invalid HTML.
How else do you propose to create bookmarklets? Duh.
I have marked what is important here for
those who have difficulties with reading.
PointedEars
--
Eternal salvation or triple your money back!
Thomas 'PointedEars' Lahn wrote: Matt Kruse wrote:Thomas 'PointedEars' Lahn wrote:javascript: '<code><ol><li> '+( document.docume ntElement||docu ment.body).oute rHTML.replace( /&/g,"&").repl ace(/</g,"<").repla ce( /%20%20/g," %20"). replace( /\r/g,"<li>")+'<\/ol><\/code>';
Don't use javascript: URIs where you can avoid it. Particularly your ^^^^^^^^^^^^^^^ ^^^^^^^example creates invalid HTML. How else do you propose to create bookmarklets? Duh. I have marked what is important here for those who have difficulties with reading.
What you missed is the whole topic of this thread, which is bookmarklets
and how to come up with a way to make IE easier to debug. Now, if you
can come up with a way to use that script, from the address bar, without
using a javascript URI, then you might have a case. Until then, please
STFU, RTFM, and move on.
Normal course of action:
1) Open Mouth
2) Insert Foot
3) Be notified of it
4) Remove foot
5) Thank the person who notified
6) Complain of taste
Thomas Lahn's Course of Action:
1) Open Mouth
2) Insert Foot
3) Be notified of it
4) Insist it tastes good, insert foot further
And he wonders why most think he is anally retentive. Sheesh.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: softwareengineer2006 |
last post by:
All Interview Questions And Answers
10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP)
I have listed over 10000 interview questions asked
in interview/placement test papers for all companies between year
2000-2005
in my website
http://www.geocities.com/allinterviewquestion/
So please have a look and make use of it.
|
by: connectrajesh |
last post by:
INTERVIEWINFO.NET
http://www.interviewinfo.net
FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES
NO ADVERTISEMENT
|
by: freepdfforjobs |
last post by:
Full eBook with 4000 C#, JAVA,.NET and SQL Server Interview questions
http://www.questpond.com/SampleInterviewQuestionBook.zip
Download the JAVA , .NET and SQL Server interview sheet and rate
yourself. This will help you judge yourself are you really worth of
attending interviews. If you own a company best way to judge if the
candidate is worth of it.
http://www.questpond.com/InterviewRatingSheet.zip
|
by: Drew |
last post by:
I posted this to the asp.db group, but it doesn't look like there is much
activity on there, also I noticed that there are a bunch of posts on here
pertaining to database and asp. Sorry for cross-posting.
I am trying to build a "checklist", where a user can navigate to an ASP page
on the intranet which shows a list of "questions" that the user can check
off. I am trying to figure out how to do this so that it is scalable, but I
am...
|
by: Krypto |
last post by:
Hi,
I have used Python for a couple of projects last year and I found it
extremely useful. I could write two middle size projects in 2-3 months
(part time). Right now I am a bit rusty and trying to catch up again
with Python.
I am now appearing for Job Interviews these days and I am wondering if
anybody of you appeared for a Python Interview. Can you please share
the questions you were asked. That will be great help to me.
| |
by: ramu |
last post by:
C# Interview Questions and Answers8
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html
C# Interview Questions and Answers7
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html
C# Interview Questions and Answers 6
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html
C# Interview Questions and Answers 5...
|
by: ramu |
last post by:
C# Interview Questions and Answers8
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html
C# Interview Questions and Answers7
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html
C# Interview Questions and Answers 6
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html
C# Interview Questions and Answers 5...
|
by: ramu |
last post by:
C# Interview Questions and Answers8
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html
C# Interview Questions and Answers7
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers7.html
C# Interview Questions and Answers 6
http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers-6.html
C# Interview Questions and Answers 5...
|
by: reema |
last post by:
EJB Interview Questions
http://interviewdoor.com/technical/EJB-Interview-Questions.htm
CSS Interview Questions
http://interviewdoor.com/technical/CSS-Interview-Questions.htm
C Interview Questions
http://interviewdoor.com/technical/C-Interview-Questions.htm
C# Interview Questions
http://interviewdoor.com/technical/C-sharp-Interview-Questions.htm
C++ Interview Questions
http://interviewdoor.com/technical/C++-Interview-Questions.htm
|
by: reema |
last post by:
EJB Interview Questions
http://interviewdoor.com/technical/EJB-Interview-Questions.htm
CSS Interview Questions
http://interviewdoor.com/technical/CSS-Interview-Questions.htm
C Interview Questions
http://interviewdoor.com/technical/C-Interview-Questions.htm
C# Interview Questions
http://interviewdoor.com/technical/C-sharp-Interview-Questions.htm
C++ Interview Questions
http://interviewdoor.com/technical/C++-Interview-Questions.htm
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |